@@ -51,14 +51,14 @@ |
||
51 | 51 | * |
52 | 52 | * @var string |
53 | 53 | */ |
54 | - protected $_list_databases = 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases |
|
54 | + protected $_list_databases = 'EXEC sp_helpdb'; // Can also be: EXEC sp_databases |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * OPTIMIZE TABLE statement |
58 | 58 | * |
59 | 59 | * @var string |
60 | 60 | */ |
61 | - protected $_optimize_table = 'ALTER INDEX all ON %s REORGANIZE'; |
|
61 | + protected $_optimize_table = 'ALTER INDEX all ON %s REORGANIZE'; |
|
62 | 62 | |
63 | 63 | // -------------------------------------------------------------------- |
64 | 64 |
@@ -75,10 +75,10 @@ discard block |
||
75 | 75 | 'img_id' => '', |
76 | 76 | 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', |
77 | 77 | 'colors' => array( |
78 | - 'background' => array(255,255,255), |
|
79 | - 'border' => array(153,102,102), |
|
80 | - 'text' => array(204,153,153), |
|
81 | - 'grid' => array(255,182,182) |
|
78 | + 'background' => array(255, 255, 255), |
|
79 | + 'border' => array(153, 102, 102), |
|
80 | + 'text' => array(204, 153, 153), |
|
81 | + 'grid' => array(255, 182, 182) |
|
82 | 82 | ) |
83 | 83 | ); |
84 | 84 | |
@@ -225,8 +225,8 @@ discard block |
||
225 | 225 | // Determine angle and position |
226 | 226 | // ----------------------------------- |
227 | 227 | $length = strlen($word); |
228 | - $angle = ($length >= 6) ? mt_rand(-($length-6), ($length-6)) : 0; |
|
229 | - $x_axis = mt_rand(6, (360/$length)-16); |
|
228 | + $angle = ($length >= 6) ? mt_rand(-($length - 6), ($length - 6)) : 0; |
|
229 | + $x_axis = mt_rand(6, (360 / $length) - 16); |
|
230 | 230 | $y_axis = ($angle >= 0) ? mt_rand($img_height, $img_width) : mt_rand(6, $img_height); |
231 | 231 | |
232 | 232 | // Create image |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | // ----------------------------------- |
255 | 255 | // Create the spiral pattern |
256 | 256 | // ----------------------------------- |
257 | - $theta = 1; |
|
257 | + $theta = 1; |
|
258 | 258 | $thetac = 7; |
259 | 259 | $radius = 16; |
260 | 260 | $circles = 20; |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | { |
297 | 297 | if ($use_font === FALSE) |
298 | 298 | { |
299 | - $y = mt_rand(0 , $img_height / 2); |
|
299 | + $y = mt_rand(0, $img_height / 2); |
|
300 | 300 | imagestring($im, $font_size, $x, $y, $word[$i], $colors['text']); |
301 | 301 | $x += ($font_size * 2); |
302 | 302 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | return FALSE; |
332 | 332 | } |
333 | 333 | |
334 | - $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />'; |
|
334 | + $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height.'; border: 0;" alt=" " />'; |
|
335 | 335 | ImageDestroy($im); |
336 | 336 | |
337 | 337 | return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function timespan($seconds = 1, $time = '', $units = 7) |
179 | 179 | { |
180 | - $CI =& get_instance(); |
|
180 | + $CI = & get_instance(); |
|
181 | 181 | $CI->lang->load('date'); |
182 | 182 | |
183 | 183 | is_numeric($seconds) OR $seconds = 1; |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | } |
308 | 308 | } |
309 | 309 | |
310 | - $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
310 | + $days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
311 | 311 | return $days_in_month[$month - 1]; |
312 | 312 | } |
313 | 313 | } |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | */ |
571 | 571 | function timezone_menu($default = 'UTC', $class = '', $name = 'timezones', $attributes = '') |
572 | 572 | { |
573 | - $CI =& get_instance(); |
|
573 | + $CI = & get_instance(); |
|
574 | 574 | $CI->lang->load('date'); |
575 | 575 | |
576 | 576 | $default = ($default === 'GMT') ? 'UTC' : $default; |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | $is_unix = ! ( ! $is_unix OR $is_unix === 'days'); |
694 | 694 | |
695 | 695 | // Validate input and try strtotime() on invalid timestamps/intervals, just in case |
696 | - if ( ( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_start)) === FALSE) |
|
696 | + if (( ! ctype_digit((string) $unix_start) && ($unix_start = @strtotime($unix_start)) === FALSE) |
|
697 | 697 | OR ( ! ctype_digit((string) $mixed) && ($is_unix === FALSE OR ($mixed = @strtotime($mixed)) === FALSE)) |
698 | 698 | OR ($is_unix === TRUE && $mixed < $unix_start)) |
699 | 699 | { |
@@ -68,9 +68,9 @@ |
||
68 | 68 | { |
69 | 69 | if ($fp = @opendir($source_dir)) |
70 | 70 | { |
71 | - $filedata = array(); |
|
72 | - $new_depth = $directory_depth - 1; |
|
73 | - $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
71 | + $filedata = array(); |
|
72 | + $new_depth = $directory_depth - 1; |
|
73 | + $source_dir = rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
74 | 74 | |
75 | 75 | while (FALSE !== ($file = readdir($fp))) |
76 | 76 | { |
@@ -100,7 +100,7 @@ |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | // Load the mime types |
103 | - $mimes =& get_mimes(); |
|
103 | + $mimes = & get_mimes(); |
|
104 | 104 | |
105 | 105 | // Only change the default MIME if we can find one |
106 | 106 | if (isset($mimes[$extension])) |
@@ -415,17 +415,17 @@ |
||
415 | 415 | // Owner |
416 | 416 | $symbolic .= (($perms & 0x0100) ? 'r' : '-') |
417 | 417 | .(($perms & 0x0080) ? 'w' : '-') |
418 | - .(($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); |
|
418 | + .(($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-')); |
|
419 | 419 | |
420 | 420 | // Group |
421 | 421 | $symbolic .= (($perms & 0x0020) ? 'r' : '-') |
422 | 422 | .(($perms & 0x0010) ? 'w' : '-') |
423 | - .(($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); |
|
423 | + .(($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-')); |
|
424 | 424 | |
425 | 425 | // World |
426 | 426 | $symbolic .= (($perms & 0x0004) ? 'r' : '-') |
427 | 427 | .(($perms & 0x0002) ? 'w' : '-') |
428 | - .(($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); |
|
428 | + .(($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-')); |
|
429 | 429 | |
430 | 430 | return $symbolic; |
431 | 431 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | function form_open($action = '', $attributes = array(), $hidden = array()) |
65 | 65 | { |
66 | - $CI =& get_instance(); |
|
66 | + $CI = & get_instance(); |
|
67 | 67 | |
68 | 68 | // If no action is provided then set to the current url |
69 | 69 | if ( ! $action) |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | */ |
689 | 689 | function set_value($field, $default = '', $html_escape = TRUE) |
690 | 690 | { |
691 | - $CI =& get_instance(); |
|
691 | + $CI = & get_instance(); |
|
692 | 692 | |
693 | 693 | $value = (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) |
694 | 694 | ? $CI->form_validation->set_value($field, $default) |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | */ |
717 | 717 | function set_select($field, $value = '', $default = FALSE) |
718 | 718 | { |
719 | - $CI =& get_instance(); |
|
719 | + $CI = & get_instance(); |
|
720 | 720 | |
721 | 721 | if (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) |
722 | 722 | { |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | */ |
764 | 764 | function set_checkbox($field, $value = '', $default = FALSE) |
765 | 765 | { |
766 | - $CI =& get_instance(); |
|
766 | + $CI = & get_instance(); |
|
767 | 767 | |
768 | 768 | if (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) |
769 | 769 | { |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | */ |
816 | 816 | function set_radio($field, $value = '', $default = FALSE) |
817 | 817 | { |
818 | - $CI =& get_instance(); |
|
818 | + $CI = & get_instance(); |
|
819 | 819 | |
820 | 820 | if (isset($CI->form_validation) && is_object($CI->form_validation) && $CI->form_validation->has_rule($field)) |
821 | 821 | { |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | */ |
868 | 868 | function form_error($field = '', $prefix = '', $suffix = '') |
869 | 869 | { |
870 | - if (FALSE === ($OBJ =& _get_validation_object())) |
|
870 | + if (FALSE === ($OBJ = & _get_validation_object())) |
|
871 | 871 | { |
872 | 872 | return ''; |
873 | 873 | } |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | */ |
893 | 893 | function validation_errors($prefix = '', $suffix = '') |
894 | 894 | { |
895 | - if (FALSE === ($OBJ =& _get_validation_object())) |
|
895 | + if (FALSE === ($OBJ = & _get_validation_object())) |
|
896 | 896 | { |
897 | 897 | return ''; |
898 | 898 | } |
@@ -1012,7 +1012,7 @@ discard block |
||
1012 | 1012 | */ |
1013 | 1013 | function &_get_validation_object() |
1014 | 1014 | { |
1015 | - $CI =& get_instance(); |
|
1015 | + $CI = & get_instance(); |
|
1016 | 1016 | |
1017 | 1017 | // We set this as a variable since we're returning by reference. |
1018 | 1018 | $return = FALSE; |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function img($src = '', $index_page = FALSE, $attributes = '') |
179 | 179 | { |
180 | - if ( ! is_array($src) ) |
|
180 | + if ( ! is_array($src)) |
|
181 | 181 | { |
182 | 182 | $src = array('src' => $src); |
183 | 183 | } |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | */ |
278 | 278 | function link_tag($href = '', $rel = 'stylesheet', $type = 'text/css', $title = '', $media = '', $index_page = FALSE) |
279 | 279 | { |
280 | - $CI =& get_instance(); |
|
280 | + $CI = & get_instance(); |
|
281 | 281 | $link = '<link '; |
282 | 282 | |
283 | 283 | if (is_array($href)) |
@@ -363,10 +363,10 @@ discard block |
||
363 | 363 | $str = ''; |
364 | 364 | foreach ($name as $meta) |
365 | 365 | { |
366 | - $type = (isset($meta['type']) && $meta['type'] !== 'name') ? 'http-equiv' : 'name'; |
|
367 | - $name = isset($meta['name']) ? $meta['name'] : ''; |
|
368 | - $content = isset($meta['content']) ? $meta['content'] : ''; |
|
369 | - $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; |
|
366 | + $type = (isset($meta['type']) && $meta['type'] !== 'name') ? 'http-equiv' : 'name'; |
|
367 | + $name = isset($meta['name']) ? $meta['name'] : ''; |
|
368 | + $content = isset($meta['content']) ? $meta['content'] : ''; |
|
369 | + $newline = isset($meta['newline']) ? $meta['newline'] : "\n"; |
|
370 | 370 | |
371 | 371 | $str .= '<meta '.$type.'="'.$name.'" content="'.$content.'" />'.$newline; |
372 | 372 | } |
@@ -133,25 +133,25 @@ |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $plural_rules = array( |
136 | - '/(quiz)$/' => '\1zes', // quizzes |
|
137 | - '/^(ox)$/' => '\1\2en', // ox |
|
138 | - '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
139 | - '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
140 | - '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
141 | - '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
142 | - '/(hive)$/' => '\1s', // archive, hive |
|
143 | - '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
144 | - '/sis$/' => 'ses', // basis, diagnosis |
|
145 | - '/([ti])um$/' => '\1a', // datum, medium |
|
146 | - '/(p)erson$/' => '\1eople', // person, salesperson |
|
147 | - '/(m)an$/' => '\1en', // man, woman, spokesman |
|
148 | - '/(c)hild$/' => '\1hildren', // child |
|
149 | - '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
150 | - '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
151 | - '/(alias|status|virus)$/' => '\1es', // alias |
|
152 | - '/(octop)us$/' => '\1i', // octopus |
|
153 | - '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
154 | - '/s$/' => 's', // no change (compatibility) |
|
136 | + '/(quiz)$/' => '\1zes', // quizzes |
|
137 | + '/^(ox)$/' => '\1\2en', // ox |
|
138 | + '/([m|l])ouse$/' => '\1ice', // mouse, louse |
|
139 | + '/(matr|vert|ind)ix|ex$/' => '\1ices', // matrix, vertex, index |
|
140 | + '/(x|ch|ss|sh)$/' => '\1es', // search, switch, fix, box, process, address |
|
141 | + '/([^aeiouy]|qu)y$/' => '\1ies', // query, ability, agency |
|
142 | + '/(hive)$/' => '\1s', // archive, hive |
|
143 | + '/(?:([^f])fe|([lr])f)$/' => '\1\2ves', // half, safe, wife |
|
144 | + '/sis$/' => 'ses', // basis, diagnosis |
|
145 | + '/([ti])um$/' => '\1a', // datum, medium |
|
146 | + '/(p)erson$/' => '\1eople', // person, salesperson |
|
147 | + '/(m)an$/' => '\1en', // man, woman, spokesman |
|
148 | + '/(c)hild$/' => '\1hildren', // child |
|
149 | + '/(buffal|tomat)o$/' => '\1\2oes', // buffalo, tomato |
|
150 | + '/(bu|campu)s$/' => '\1\2ses', // bus, campus |
|
151 | + '/(alias|status|virus)$/' => '\1es', // alias |
|
152 | + '/(octop)us$/' => '\1i', // octopus |
|
153 | + '/(ax|cris|test)is$/' => '\1es', // axis, crisis |
|
154 | + '/s$/' => 's', // no change (compatibility) |
|
155 | 155 | '/$/' => 's', |
156 | 156 | ); |
157 | 157 |