Lines Matching refs:value

213 			$value = $this->integrator->getConf( $name, null );
214 if ( is_null( $value ) )
216 $value = $conf[$name];
218 return $value;
432 list( $name, $value ) = $temp;
440 $value = trim( $value );
441 $sep = strcspn( $value, ':' );
443 $username = trim( substr( $value, 0, $sep ) );
444 $password = trim( substr( $value, $sep + 1 ) );
520 foreach ( $_REQUEST as $name => $value )
524 if ( !is_array( $value ) || !is_null( $value[$index] ) )
525 $this->input[$matches[1]] = is_array( $value ) ? $value[$index] : $value;
1081 foreach ( $store as $column => $value )
1087 $value = $this->valueToDB( $rowid, $column, $value, $this->meta[$column] );
1089 if ( $value !== false )
1090 $record[$column] = $value;
1230 foreach ( $record as $name => $value )
1244 foreach ( $store as $column => $value )
1245 $store[$column] = $this->valueFromDB( $rowid, $column, $value, $this->meta[$column] );
1294 foreach ( $store as $column => $value )
1295 $elements[] = $this->renderField( $rowid, $column, $value,
1336 foreach ( $in as $column => $value )
1347 foreach ( $in as $column => $value )
1851 foreach ( $row as $column => $value )
1869 $value = $this->valueFromDB( $rowid, $column, $value, $def );
1871 $cell = $this->renderValue( $rowid, $column, $value, $def,
2344 foreach ( $hiddens as $name => $value )
2345 $form->addHidden( $name, $value );
2850 foreach ( $input as $key => $value )
2859 $session['search'][$index][$matches[1]] = $value;
3246 $value = true;
3264 $value = $temp;
3272 $value = substr( $in, $pos, $end - $pos );
3280 return array( $name, $value );
3417 $value = '';
3429 list( $name, $value ) = $temp;
3431 $options[$name] = $value;
3538 foreach ( $attributes as $name => $value )
3550 $options['required'] = self::asBool( $value );
3557 if ( self::asBool( $value ) )
3566 if ( self::asBool( $value ) )
3576 if ( ctype_digit( trim( $value ) ) )
3577 $options['tabindex'] = intval( $value );
3587 $value = strtolower( $value );
3588 if ( !in_array( $value, array( 'yesno', 'int', 'xmark' ) ) )
3590 $options['booltype'] = $value;
3596 $options['readonly'] = self::asBool( $value );
3600 if ( !is_string( $value ) ||
3601 ( trim( $value ) === '' ) )
3606 $options['aliasing'] = $value;
3644 $options[$name] = $value;
4766 foreach ( $order as $key => $value )
4767 $out[$value] = intval( $matches[$key+1] );
4802 foreach ( $order as $key => $value )
4803 $out[$value] = sprintf( '%02d', intval( $matches[$key+1] ) );
4980 $value = array_search( $default, $def['options']['selectables'] );
4981 if ( $value === false )
4984 $value = null;
4995 $value = $default - 1;
4997 $value = $default;
5003 return $value;
5024 * @param mixed $value value in DB
5029 protected function valueFromDB( $rowid, $column, $value, $def ) argument
5037 if ( is_null( $value ) )
5040 if ( $value === '||' )
5044 $a = strpos( $value, '|' );
5047 return ( strlen( $value ) > 0 );
5049 $b = strpos( $value, '|', $a + 1 );
5055 'mime' => substr( $value, 0, $a ),
5056 'name' => substr( $value, $a + 1, $b - $a - 1 ),
5057 'file' => substr( $value, $b + 1 ),
5072 return $value;
5074 if ( ( trim( $value ) === '' ) || ( $value == '0000-00-00' ) )
5077 return self::parseDBDateTime( $value, true );
5080 return $value;
5084 return $value;
5086 $value = substr( $value, 0, 19 );
5087 if ( ( trim( $value ) === '' ) ||
5088 ( $value == '0000-00-00T00:00:00' ) ||
5089 ( $value == '0000-00-00 00:00:00' ) )
5092 return self::parseDBDateTime( $value, false );
5095 $value = trim( $value );
5100 return ( intval( $value ) != 0 );
5103 return ( strtolower( $value[0] ) == 'x' );
5107 return ( strtolower( $value[0] ) == 'y' );
5112 $value = trim( $value );
5113 $value = array_search( $value, $def['options']['selectables'] );
5114 if ( $value === false )
5115 $value = null;
5117 $value = intval( $value );
5122 if ( is_numeric( $value ) )
5123 $value = intval( $value );
5142 return $value;
5152 * @param mixed $value value in internal format
5158 protected function valueToDB( $rowid, &$column, $value, $def ) argument
5166 if ( is_null( $value ) && !$def['options']['notnull'] &&
5177 if ( is_bool( $value ) )
5181 if ( is_string( $value ) || is_null( $value ) )
5183 return strval( $value );
5185 if ( !is_array( $value ) || !is_string( $value['file'] ) )
5189 return "$value[mime]|$value[name]|$value[file]";
5192 if ( !$value )
5202 return $def['options']['unixts'] ? $value : date( 'Y-m-d',intval( $value ) );
5205 $time = self::parseInternalTime( $value );
5209 if ( !$value )
5219 return $def['options']['unixts'] ? $value : date( 'Y-m-d\TH:i:s', intval( $value ) );
5226 return $value ? 'x' : ' ';
5229 return $value ? 1 : 0;
5233 return $value ? 'y' : 'n';
5238 $value = $def['options']['selectables'][$value];
5244 if ( is_null( $value ) )
5245 $value = '0.00';
5256 if ( is_null( $value ) )
5257 $value = '';
5262 $value = intval( $value );
5267 return $value;
5281 * @param mixed $value input value, optionally adjusted on return
5287 protected function checkValue( $rowid, &$column, $value, &$inStore, $def ) argument
5300 if ( trim( $value ) !== '' )
5305 $value = null;
5327 $value = $inStore;
5360 $value = array(
5369 $value = ( $value != false );
5371 if ( !$value && $def['options']['required'] )
5378 $value = trim( $value );
5384 if ( $value === '' )
5385 $value = null;
5390 if ( ctype_digit( trim( $value ) ) )
5393 $new = array_search( $value, $def['options']['selectables'] );
5396 $value = $new;
5401 if ( !ctype_digit( $value ) )
5404 $value = intval( $value );
5411 if ( !array_key_exists( $value, $def['options']['selectables'] ) )
5415 else if ( intval( $value ) > 0 )
5419 if ( intval( $value ) > count( $def['options']['selectables'] ) )
5423 $value--;
5443 $value = $this->inputToInternal( $value, $def );
5448 if ( is_null( $value ) )
5453 $inStore = $value;
5463 public function inputToInternal( $value, $def ) argument
5471 if ( !is_bool( $value ) )
5472 if ( !is_array( $value ) || ( trim( implode( '', $value ) ) === '' ) )
5473 $value = null;
5478 $value = trim( $value );
5479 if ( $value === '' )
5480 $value = null;
5484 if ( $value !== '' )
5485 if ( !preg_match( '/^[+-]?\d+$/', $value ) )
5488 $value = intval( $value );
5494 $value = strtolower( trim( $value ) );
5495 if ( $value === '' )
5496 $value = null;
5497 else if ( in_array( $value, array( $this->getLang( 'today' ), $this->getLang( 'now' ) ) ) )
5498 $value = time();
5502 $value = self::parseInternalDate( $value );
5503 if ( $value === false )
5506 $value = mktime( 12, 0, 0, $value['month'], $value['day'], $value['year'] );
5512 $value = strtolower( trim( $value ) );
5513 if ( $value !== '' )
5516 if ( $value == $this->getLang( 'now' ) )
5517 $value = date( 'H:i:s' );
5518 else if ( !self::parseInternalTime( $value ) )
5523 $value = null;
5528 $value = strtolower( trim( $value ) );
5529 if ( $value === '' )
5530 $value = null;
5531 else if ( $value === $this->getLang( 'now' ) )
5532 $value = time();
5536 list( $date, $time, $tail ) = preg_split( '/[\s,;]+/', $value );
5566 $value = mktime( $time['hour'], $time['minute'],
5575 $value = trim( $value );
5576 if ( $value !== '' )
5579 $temp = preg_replace( '/\s+/', '', $value );
5587 $value = null;
5592 $value = trim( $value );
5593 if ( $value !== '' )
5598 if ( !preg_match( $valuePattern, $value ) )
5603 $temp = preg_split( $valuePattern, $value );
5613 $value = null;
5618 $value = trim( $value );
5619 if ( $value === '' )
5620 $value = null;
5624 if ( !preg_match( '/^[+-]?\d+([.,]\d+)?$/', $value ) )
5627 $value = doubleval( strtr( $value, ',', '.' ) );
5634 $value = trim( $value );
5635 if ( $value !== '' )
5638 $info = parse_url( $value );
5641 if ( ( $value !== '' ) && !$info['scheme'] )
5646 $value = null;
5651 $value = trim( $value );
5652 if ( $value !== '' )
5655 if ( !mail_isvalid( $value ) )
5661 list( $box, $domain ) = explode( '@', $value );
5670 $value = null;
5677 $value = implode( ';', $this->parseACLRule( trim( $value ), true ) );
5679 $value = null;
5687 if ( trim( $value ) === '' )
5688 $value = null;
5692 return $value;
5709 * @param mixed $value input value
5716 protected function renderField( $rowid, $column, $value, $def, $error, $readOnly, &$rowACL ) argument
5801 $code = $this->renderValue( $rowid, $column, $value, $def, true, true, $rowACL );
5824 return $this->renderField( $rowid, $column, $value, $def, '', true, $rowACL );
5857 if ( ( $value === true ) || ( $value === false ) )
5862 $current = $this->renderValue( $rowid, $column, $value, $def, true, true, $rowACL );
5879 $value = strtr( $value, array( '<' => '&lt;' ) );
5880 $code = "<textarea name=\"$name\" class=\"text\" rows=\"5\" cols=\"50\">$value</textarea>";
5885 $checked = $value ? ' checked="checked"' : '';
5897 $selected = ( $index === $value ) ? ' selected="selected"' : '';
5919 if ( !$value )
5920 $value = '';
5921 else if ( preg_match( '/-?\d+/', trim( $value ) ) )
5922 $value = strftime( strtok( trim( $this->getConf( 'dformat' ) ), ' ' ), intval( $value ) );
5926 if ( !$value )
5927 $value = '';
5928 else if ( preg_match( '/-?\d+/', trim( $value ) ) )
5929 $value = strftime( $this->getConf( 'dformat' ), intval( $value ) );
5948 $value = strtr( $value, array( '"' => '&quot;' ) );
5972 …$code = "<input name=\"$name\" type=\"text\" value=\"$value\" size=\"$size\" maxlength=\"$maxlen\"…
6007 protected function renderValue( $rowid, $column, $value, $def, argument
6014 if ( is_null( $value ) && ( $def['type'] != 'data' ) )
6022 if ( ( trim( $value ) === '' ) && $mayBeSkipped )
6029 $value = p_render( 'xhtml', p_get_instructions( $value ), $info );
6031 if ( preg_match( '#^<p>((.|\n)+)</p>$#i', trim( $value ), $matches ) )
6032 $value = $matches[1];
6037 $value = $this->stripTags( $value );
6039 return trim( $value );
6043 if ( $value === true )
6045 else if ( $value === false )
6050 $temp = is_array( $value ) ? trim( implode( '', $value ) )
6064 …c=\"$url\" alt=\"" . sprintf( $this->getLang( 'fileimagealt' ), $column, $value['mime'] ) . "\" />…
6078 if ( ( trim( $value ) === '' ) && $mayBeSkipped )
6081 return DokuWiki_Plugin::email( $value, $email );
6084 if ( ( trim( $value ) === '' ) && $mayBeSkipped )
6087 return DokuWiki_Plugin::external_link( $value );
6091 if ( ( trim( $value ) === '' ) && $mayBeSkipped )
6094 return $value;
6097 if ( !$value && $mayBeSkipped )
6099 return $value ? '&#10007;' : '&ndash;';
6102 if ( !$value )
6105 return strftime( strtok( trim( $this->getConf( 'dformat' ) ), ' ' ), $value );
6108 if ( !$value )
6111 return strftime( $this->getConf( 'dformat' ), $value );
6114 if ( $value && ( substr( $value, -3 ) == ':00' ) &&
6115 ( strlen( $value ) > 5 ) )
6116 $value = substr( $value, 0, -3 );
6118 return $value;
6123 if ( !$value && $mayBeSkipped )
6126 return $value;
6130 if ( is_integer( $value ) )
6131 $value = $def['options']['selectables'][$value];
6133 return $value;
6140 return $value;
6143 return $value;