@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -213,8 +215,7 @@ discard block |
||
| 213 | 215 | if (count($db->queries) == 0) |
| 214 | 216 | { |
| 215 | 217 | $output .= "<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;padding:5px;'>".$this->CI->lang->line('profiler_no_queries')."</td></tr>\n"; |
| 216 | - } |
|
| 217 | - else |
|
| 218 | + } else |
|
| 218 | 219 | { |
| 219 | 220 | foreach ($db->queries as $key => $val) |
| 220 | 221 | { |
@@ -258,8 +259,7 @@ discard block |
||
| 258 | 259 | if (count($_GET) == 0) |
| 259 | 260 | { |
| 260 | 261 | $output .= "<div style='color:#cd6e00;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_get')."</div>"; |
| 261 | - } |
|
| 262 | - else |
|
| 262 | + } else |
|
| 263 | 263 | { |
| 264 | 264 | $output .= "\n\n<table style='width:100%; border:none'>\n"; |
| 265 | 265 | |
@@ -274,8 +274,7 @@ discard block |
||
| 274 | 274 | if (is_array($val)) |
| 275 | 275 | { |
| 276 | 276 | $output .= "<pre>" . htmlspecialchars(stripslashes(print_r($val, true))) . "</pre>"; |
| 277 | - } |
|
| 278 | - else |
|
| 277 | + } else |
|
| 279 | 278 | { |
| 280 | 279 | $output .= htmlspecialchars(stripslashes($val)); |
| 281 | 280 | } |
@@ -307,8 +306,7 @@ discard block |
||
| 307 | 306 | if (count($_POST) == 0) |
| 308 | 307 | { |
| 309 | 308 | $output .= "<div style='color:#009900;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_post')."</div>"; |
| 310 | - } |
|
| 311 | - else |
|
| 309 | + } else |
|
| 312 | 310 | { |
| 313 | 311 | $output .= "\n\n<table style='width:100%'>\n"; |
| 314 | 312 | |
@@ -323,8 +321,7 @@ discard block |
||
| 323 | 321 | if (is_array($val)) |
| 324 | 322 | { |
| 325 | 323 | $output .= "<pre>" . htmlspecialchars(stripslashes(print_r($val, TRUE))) . "</pre>"; |
| 326 | - } |
|
| 327 | - else |
|
| 324 | + } else |
|
| 328 | 325 | { |
| 329 | 326 | $output .= htmlspecialchars(stripslashes($val)); |
| 330 | 327 | } |
@@ -356,8 +353,7 @@ discard block |
||
| 356 | 353 | if ($this->CI->uri->uri_string == '') |
| 357 | 354 | { |
| 358 | 355 | $output .= "<div style='color:#000;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_uri')."</div>"; |
| 359 | - } |
|
| 360 | - else |
|
| 356 | + } else |
|
| 361 | 357 | { |
| 362 | 358 | $output .= "<div style='color:#000;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->uri->uri_string."</div>"; |
| 363 | 359 | } |
@@ -409,8 +405,7 @@ discard block |
||
| 409 | 405 | if (function_exists('memory_get_usage') && ($usage = memory_get_usage()) != '') |
| 410 | 406 | { |
| 411 | 407 | $output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".number_format($usage).' bytes</div>'; |
| 412 | - } |
|
| 413 | - else |
|
| 408 | + } else |
|
| 414 | 409 | { |
| 415 | 410 | $output .= "<div style='color:#5a0099;font-weight:normal;padding:4px 0 4px 0'>".$this->CI->lang->line('profiler_no_memory')."</div>"; |
| 416 | 411 | } |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -95,13 +97,13 @@ discard block |
||
| 95 | 97 | $expected = str_replace('is_float', 'is_double', $expected); |
| 96 | 98 | $result = ($expected($test)) ? TRUE : FALSE; |
| 97 | 99 | $extype = str_replace(array('true', 'false'), 'bool', str_replace('is_', '', $expected)); |
| 98 | - } |
|
| 99 | - else |
|
| 100 | + } else |
|
| 100 | 101 | { |
| 101 | - if ($this->strict == TRUE) |
|
| 102 | - $result = ($test === $expected) ? TRUE : FALSE; |
|
| 103 | - else |
|
| 104 | - $result = ($test == $expected) ? TRUE : FALSE; |
|
| 102 | + if ($this->strict == TRUE) { |
|
| 103 | + $result = ($test === $expected) ? TRUE : FALSE; |
|
| 104 | + } else { |
|
| 105 | + $result = ($test == $expected) ? TRUE : FALSE; |
|
| 106 | + } |
|
| 105 | 107 | |
| 106 | 108 | $extype = gettype($expected); |
| 107 | 109 | } |
@@ -157,8 +159,7 @@ discard block |
||
| 157 | 159 | if ($val == $CI->lang->line('ut_passed')) |
| 158 | 160 | { |
| 159 | 161 | $val = '<span style="color: #0C0;">'.$val.'</span>'; |
| 160 | - } |
|
| 161 | - elseif ($val == $CI->lang->line('ut_failed')) |
|
| 162 | + } elseif ($val == $CI->lang->line('ut_failed')) |
|
| 162 | 163 | { |
| 163 | 164 | $val = '<span style="color: #C00;">'.$val.'</span>'; |
| 164 | 165 | } |
@@ -249,8 +250,7 @@ discard block |
||
| 249 | 250 | } |
| 250 | 251 | $temp[$CI->lang->line('ut_'.$k)] = $v; |
| 251 | 252 | } |
| 252 | - } |
|
| 253 | - else |
|
| 253 | + } else |
|
| 254 | 254 | { |
| 255 | 255 | if (FALSE !== ($line = $CI->lang->line(strtolower('ut_'.$val)))) |
| 256 | 256 | { |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -93,8 +95,7 @@ discard block |
||
| 93 | 95 | if ($j < 16) |
| 94 | 96 | { |
| 95 | 97 | $w[$j] = $x[$i + $j]; |
| 96 | - } |
|
| 97 | - else |
|
| 98 | + } else |
|
| 98 | 99 | { |
| 99 | 100 | $w[$j] = $this->_rol($w[$j - 3] ^ $w[$j - 8] ^ $w[$j - 14] ^ $w[$j - 16], 1); |
| 100 | 101 | } |
@@ -149,12 +150,15 @@ discard block |
||
| 149 | 150 | */ |
| 150 | 151 | function _ft($t, $b, $c, $d) |
| 151 | 152 | { |
| 152 | - if ($t < 20) |
|
| 153 | - return ($b & $c) | ((~$b) & $d); |
|
| 154 | - if ($t < 40) |
|
| 155 | - return $b ^ $c ^ $d; |
|
| 156 | - if ($t < 60) |
|
| 157 | - return ($b & $c) | ($b & $d) | ($c & $d); |
|
| 153 | + if ($t < 20) { |
|
| 154 | + return ($b & $c) | ((~$b) & $d); |
|
| 155 | + } |
|
| 156 | + if ($t < 40) { |
|
| 157 | + return $b ^ $c ^ $d; |
|
| 158 | + } |
|
| 159 | + if ($t < 60) { |
|
| 160 | + return ($b & $c) | ($b & $d) | ($c & $d); |
|
| 161 | + } |
|
| 158 | 162 | |
| 159 | 163 | return $b ^ $c ^ $d; |
| 160 | 164 | } |
@@ -172,16 +176,13 @@ discard block |
||
| 172 | 176 | if ($t < 20) |
| 173 | 177 | { |
| 174 | 178 | return 1518500249; |
| 175 | - } |
|
| 176 | - else if ($t < 40) |
|
| 179 | + } else if ($t < 40) |
|
| 177 | 180 | { |
| 178 | 181 | return 1859775393; |
| 179 | - } |
|
| 180 | - else if ($t < 60) |
|
| 182 | + } else if ($t < 60) |
|
| 181 | 183 | { |
| 182 | 184 | return -1894007588; |
| 183 | - } |
|
| 184 | - else |
|
| 185 | + } else |
|
| 185 | 186 | { |
| 186 | 187 | return -899497514; |
| 187 | 188 | } |
@@ -231,8 +232,7 @@ discard block |
||
| 231 | 232 | if (strlen($bin) < $b) |
| 232 | 233 | { |
| 233 | 234 | $bin = 0; |
| 234 | - } |
|
| 235 | - else |
|
| 235 | + } else |
|
| 236 | 236 | { |
| 237 | 237 | $bin = substr($bin, 0, strlen($bin) - $b); |
| 238 | 238 | } |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -106,8 +108,7 @@ discard block |
||
| 106 | 108 | if ( ! $this->sess_read()) |
| 107 | 109 | { |
| 108 | 110 | $this->sess_create(); |
| 109 | - } |
|
| 110 | - else |
|
| 111 | + } else |
|
| 111 | 112 | { |
| 112 | 113 | $this->sess_update(); |
| 113 | 114 | } |
@@ -148,8 +149,7 @@ discard block |
||
| 148 | 149 | if ($this->sess_encrypt_cookie == TRUE) |
| 149 | 150 | { |
| 150 | 151 | $session = $this->CI->encrypt->decode($session); |
| 151 | - } |
|
| 152 | - else |
|
| 152 | + } else |
|
| 153 | 153 | { |
| 154 | 154 | // encryption was not used, so we need to check the md5 hash |
| 155 | 155 | $hash = substr($session, strlen($session)-32); // get last 32 chars |
@@ -277,8 +277,7 @@ discard block |
||
| 277 | 277 | if (count($custom_userdata) === 0) |
| 278 | 278 | { |
| 279 | 279 | $custom_userdata = ''; |
| 280 | - } |
|
| 281 | - else |
|
| 280 | + } else |
|
| 282 | 281 | { |
| 283 | 282 | // Serialize the custom data array so we can store it |
| 284 | 283 | $custom_userdata = $this->_serialize($custom_userdata); |
@@ -622,8 +621,7 @@ discard block |
||
| 622 | 621 | { |
| 623 | 622 | $now = time(); |
| 624 | 623 | $time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now)); |
| 625 | - } |
|
| 626 | - else |
|
| 624 | + } else |
|
| 627 | 625 | { |
| 628 | 626 | $time = time(); |
| 629 | 627 | } |
@@ -652,8 +650,7 @@ discard block |
||
| 652 | 650 | if ($this->sess_encrypt_cookie == TRUE) |
| 653 | 651 | { |
| 654 | 652 | $cookie_data = $this->CI->encrypt->encode($cookie_data); |
| 655 | - } |
|
| 656 | - else |
|
| 653 | + } else |
|
| 657 | 654 | { |
| 658 | 655 | // if encryption is not used, we provide an md5 hash to prevent userside tampering |
| 659 | 656 | $cookie_data = $cookie_data.md5($cookie_data.$this->encryption_key); |
@@ -695,8 +692,7 @@ discard block |
||
| 695 | 692 | $data[$key] = str_replace('\\', '{{slash}}', $val); |
| 696 | 693 | } |
| 697 | 694 | } |
| 698 | - } |
|
| 699 | - else |
|
| 695 | + } else |
|
| 700 | 696 | { |
| 701 | 697 | if (is_string($data)) |
| 702 | 698 | { |
@@ -3,6 +3,7 @@ |
||
| 3 | 3 | $name = 'Courier-Oblique'; |
| 4 | 4 | $up = -100; |
| 5 | 5 | $ut = 50; |
| 6 | -for($i=0;$i<=255;$i++) |
|
| 7 | - $cw[chr($i)] = 600; |
|
| 6 | +for($i=0;$i<=255;$i++) { |
|
| 7 | + $cw[chr($i)] = 600; |
|
| 8 | +} |
|
| 8 | 9 | ?> |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -219,12 +221,10 @@ discard block |
||
| 219 | 221 | xml_error_string(xml_get_error_code($parser)), |
| 220 | 222 | xml_get_current_line_number($parser))); |
| 221 | 223 | xml_parser_free($parser); |
| 222 | - } |
|
| 223 | - elseif ($parser_object->xh[$parser]['isf']) |
|
| 224 | + } elseif ($parser_object->xh[$parser]['isf']) |
|
| 224 | 225 | { |
| 225 | 226 | return new XML_RPC_Response(0, $this->xmlrpcerr['invalid_return'], $this->xmlrpcstr['invalid_return']); |
| 226 | - } |
|
| 227 | - else |
|
| 227 | + } else |
|
| 228 | 228 | { |
| 229 | 229 | xml_parser_free($parser); |
| 230 | 230 | |
@@ -306,14 +306,12 @@ discard block |
||
| 306 | 306 | { |
| 307 | 307 | return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']); |
| 308 | 308 | } |
| 309 | - } |
|
| 310 | - else |
|
| 309 | + } else |
|
| 311 | 310 | { |
| 312 | 311 | if ($objectCall && ! is_callable(array($method_parts['0'],$method_parts['1']))) |
| 313 | 312 | { |
| 314 | 313 | return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']); |
| 315 | - } |
|
| 316 | - elseif ( ! $objectCall && ! is_callable($this->methods[$methName]['function'])) |
|
| 314 | + } elseif ( ! $objectCall && ! is_callable($this->methods[$methName]['function'])) |
|
| 317 | 315 | { |
| 318 | 316 | return new XML_RPC_Response(0, $this->xmlrpcerr['unknown_method'], $this->xmlrpcstr['unknown_method']); |
| 319 | 317 | } |
@@ -361,22 +359,19 @@ discard block |
||
| 361 | 359 | if ($method_parts[0] == "this" && $system_call == TRUE) |
| 362 | 360 | { |
| 363 | 361 | return call_user_func(array($this, $method_parts[1]), $m); |
| 364 | - } |
|
| 365 | - else |
|
| 362 | + } else |
|
| 366 | 363 | { |
| 367 | 364 | if ($this->object === FALSE) |
| 368 | 365 | { |
| 369 | 366 | $CI =& get_instance(); |
| 370 | 367 | return $CI->$method_parts['1']($m); |
| 371 | - } |
|
| 372 | - else |
|
| 368 | + } else |
|
| 373 | 369 | { |
| 374 | 370 | return $this->object->$method_parts['1']($m); |
| 375 | 371 | //return call_user_func(array(&$method_parts['0'],$method_parts['1']), $m); |
| 376 | 372 | } |
| 377 | 373 | } |
| 378 | - } |
|
| 379 | - else |
|
| 374 | + } else |
|
| 380 | 375 | { |
| 381 | 376 | return call_user_func($this->methods[$methName]['function'], $m); |
| 382 | 377 | } |
@@ -442,13 +437,11 @@ discard block |
||
| 442 | 437 | $sigs[]= new XML_RPC_Values($cursig, 'array'); |
| 443 | 438 | } |
| 444 | 439 | $r = new XML_RPC_Response(new XML_RPC_Values($sigs, 'array')); |
| 445 | - } |
|
| 446 | - else |
|
| 440 | + } else |
|
| 447 | 441 | { |
| 448 | 442 | $r = new XML_RPC_Response(new XML_RPC_Values('undef', 'string')); |
| 449 | 443 | } |
| 450 | - } |
|
| 451 | - else |
|
| 444 | + } else |
|
| 452 | 445 | { |
| 453 | 446 | $r = new XML_RPC_Response(0,$this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']); |
| 454 | 447 | } |
@@ -474,8 +467,7 @@ discard block |
||
| 474 | 467 | $docstring = isset($this->methods[$method_name]['docstring']) ? $this->methods[$method_name]['docstring'] : ''; |
| 475 | 468 | |
| 476 | 469 | return new XML_RPC_Response(new XML_RPC_Values($docstring, 'string')); |
| 477 | - } |
|
| 478 | - else |
|
| 470 | + } else |
|
| 479 | 471 | { |
| 480 | 472 | return new XML_RPC_Response(0, $this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']); |
| 481 | 473 | } |
@@ -559,8 +551,7 @@ discard block |
||
| 559 | 551 | if ($call->kindOf() != 'struct') |
| 560 | 552 | { |
| 561 | 553 | return $this->multicall_error('notstruct'); |
| 562 | - } |
|
| 563 | - elseif ( ! $methName = $call->me['struct']['methodName']) |
|
| 554 | + } elseif ( ! $methName = $call->me['struct']['methodName']) |
|
| 564 | 555 | { |
| 565 | 556 | return $this->multicall_error('nomethod'); |
| 566 | 557 | } |
@@ -571,16 +562,13 @@ discard block |
||
| 571 | 562 | if ($methName->kindOf() != 'scalar' OR $scalar_type != 'string') |
| 572 | 563 | { |
| 573 | 564 | return $this->multicall_error('notstring'); |
| 574 | - } |
|
| 575 | - elseif ($scalar_value == 'system.multicall') |
|
| 565 | + } elseif ($scalar_value == 'system.multicall') |
|
| 576 | 566 | { |
| 577 | 567 | return $this->multicall_error('recursion'); |
| 578 | - } |
|
| 579 | - elseif ( ! $params = $call->me['struct']['params']) |
|
| 568 | + } elseif ( ! $params = $call->me['struct']['params']) |
|
| 580 | 569 | { |
| 581 | 570 | return $this->multicall_error('noparams'); |
| 582 | - } |
|
| 583 | - elseif ($params->kindOf() != 'array') |
|
| 571 | + } elseif ($params->kindOf() != 'array') |
|
| 584 | 572 | { |
| 585 | 573 | return $this->multicall_error('notarray'); |
| 586 | 574 | } |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -639,8 +641,7 @@ discard block |
||
| 639 | 641 | if ($external_file !== '') |
| 640 | 642 | { |
| 641 | 643 | $this->_javascript_location = $external_file; |
| 642 | - } |
|
| 643 | - else |
|
| 644 | + } else |
|
| 644 | 645 | { |
| 645 | 646 | if ($this->CI->config->item('javascript_location') != '') |
| 646 | 647 | { |
@@ -651,12 +652,10 @@ discard block |
||
| 651 | 652 | if ($relative === TRUE OR strncmp($external_file, 'http://', 7) == 0 OR strncmp($external_file, 'https://', 8) == 0) |
| 652 | 653 | { |
| 653 | 654 | $str = $this->_open_script($external_file); |
| 654 | - } |
|
| 655 | - elseif (strpos($this->_javascript_location, 'http://') !== FALSE) |
|
| 655 | + } elseif (strpos($this->_javascript_location, 'http://') !== FALSE) |
|
| 656 | 656 | { |
| 657 | 657 | $str = $this->_open_script($this->_javascript_location.$external_file); |
| 658 | - } |
|
| 659 | - else |
|
| 658 | + } else |
|
| 660 | 659 | { |
| 661 | 660 | $str = $this->_open_script($this->CI->config->slash_item('base_url').$this->_javascript_location.$external_file); |
| 662 | 661 | } |
@@ -763,17 +762,14 @@ discard block |
||
| 763 | 762 | if (is_object($result)) |
| 764 | 763 | { |
| 765 | 764 | $json_result = $result->result_array(); |
| 766 | - } |
|
| 767 | - elseif (is_array($result)) |
|
| 765 | + } elseif (is_array($result)) |
|
| 768 | 766 | { |
| 769 | 767 | $json_result = $result; |
| 770 | - } |
|
| 771 | - else |
|
| 768 | + } else |
|
| 772 | 769 | { |
| 773 | 770 | return $this->_prep_args($result); |
| 774 | 771 | } |
| 775 | - } |
|
| 776 | - else |
|
| 772 | + } else |
|
| 777 | 773 | { |
| 778 | 774 | return 'null'; |
| 779 | 775 | } |
@@ -784,8 +780,7 @@ discard block |
||
| 784 | 780 | if ( ! is_array($json_result) AND empty($json_result)) |
| 785 | 781 | { |
| 786 | 782 | show_error("Generate JSON Failed - Illegal key, value pair."); |
| 787 | - } |
|
| 788 | - elseif ($match_array_type) |
|
| 783 | + } elseif ($match_array_type) |
|
| 789 | 784 | { |
| 790 | 785 | $_is_assoc = $this->_is_associative_array($json_result); |
| 791 | 786 | } |
@@ -795,8 +790,7 @@ discard block |
||
| 795 | 790 | if ($_is_assoc) |
| 796 | 791 | { |
| 797 | 792 | $json[] = $this->_prep_args($k, TRUE).':'.$this->generate_json($v, $match_array_type); |
| 798 | - } |
|
| 799 | - else |
|
| 793 | + } else |
|
| 800 | 794 | { |
| 801 | 795 | $json[] = $this->generate_json($v, $match_array_type); |
| 802 | 796 | } |
@@ -848,16 +842,13 @@ discard block |
||
| 848 | 842 | if (is_null($result)) |
| 849 | 843 | { |
| 850 | 844 | return 'null'; |
| 851 | - } |
|
| 852 | - elseif (is_bool($result)) |
|
| 845 | + } elseif (is_bool($result)) |
|
| 853 | 846 | { |
| 854 | 847 | return ($result === TRUE) ? 'true' : 'false'; |
| 855 | - } |
|
| 856 | - elseif (is_string($result) OR $is_key) |
|
| 848 | + } elseif (is_string($result) OR $is_key) |
|
| 857 | 849 | { |
| 858 | 850 | return '"'.str_replace(array('\\', "\t", "\n", "\r", '"', '/'), array('\\\\', '\\t', '\\n', "\\r", '\"', '\/'), $result).'"'; |
| 859 | - } |
|
| 860 | - elseif (is_scalar($result)) |
|
| 851 | + } elseif (is_scalar($result)) |
|
| 861 | 852 | { |
| 862 | 853 | return $result; |
| 863 | 854 | } |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -120,8 +122,7 @@ discard block |
||
| 120 | 122 | if ($this->_mcrypt_exists === TRUE) |
| 121 | 123 | { |
| 122 | 124 | $enc = $this->mcrypt_encode($string, $key); |
| 123 | - } |
|
| 124 | - else |
|
| 125 | + } else |
|
| 125 | 126 | { |
| 126 | 127 | $enc = $this->_xor_encode($string, $key); |
| 127 | 128 | } |
@@ -158,8 +159,7 @@ discard block |
||
| 158 | 159 | { |
| 159 | 160 | return FALSE; |
| 160 | 161 | } |
| 161 | - } |
|
| 162 | - else |
|
| 162 | + } else |
|
| 163 | 163 | { |
| 164 | 164 | $dec = $this->_xor_decode($dec, $key); |
| 165 | 165 | } |
@@ -527,13 +527,11 @@ discard block |
||
| 527 | 527 | require_once(BASEPATH.'libraries/Sha1.php'); |
| 528 | 528 | $SH = new CI_SHA; |
| 529 | 529 | return $SH->generate($str); |
| 530 | - } |
|
| 531 | - else |
|
| 530 | + } else |
|
| 532 | 531 | { |
| 533 | 532 | return bin2hex(mhash(MHASH_SHA1, $str)); |
| 534 | 533 | } |
| 535 | - } |
|
| 536 | - else |
|
| 534 | + } else |
|
| 537 | 535 | { |
| 538 | 536 | return sha1($str); |
| 539 | 537 | } |
@@ -1,4 +1,6 @@ discard block |
||
| 1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
| 1 | +<?php if ( ! defined('BASEPATH')) { |
|
| 2 | + exit('No direct script access allowed'); |
|
| 3 | +} |
|
| 2 | 4 | /** |
| 3 | 5 | * CodeIgniter |
| 4 | 6 | * |
@@ -144,8 +146,7 @@ discard block |
||
| 144 | 146 | if ($this->use_set_names === TRUE) |
| 145 | 147 | { |
| 146 | 148 | return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id); |
| 147 | - } |
|
| 148 | - else |
|
| 149 | + } else |
|
| 149 | 150 | { |
| 150 | 151 | return @mysql_set_charset($charset, $this->conn_id); |
| 151 | 152 | } |
@@ -313,16 +314,13 @@ discard block |
||
| 313 | 314 | if (function_exists('mysql_real_escape_string') AND is_resource($this->conn_id)) |
| 314 | 315 | { |
| 315 | 316 | $str = mysql_real_escape_string($str, $this->conn_id); |
| 316 | - } |
|
| 317 | - elseif (function_exists('mysql_real_escape_string')) |
|
| 317 | + } elseif (function_exists('mysql_real_escape_string')) |
|
| 318 | 318 | { |
| 319 | 319 | $str = mysql_real_escape_string($str); |
| 320 | - } |
|
| 321 | - elseif (function_exists('mysql_escape_string')) |
|
| 320 | + } elseif (function_exists('mysql_escape_string')) |
|
| 322 | 321 | { |
| 323 | 322 | $str = mysql_escape_string($str); |
| 324 | - } |
|
| 325 | - else |
|
| 323 | + } else |
|
| 326 | 324 | { |
| 327 | 325 | $str = addslashes($str); |
| 328 | 326 | } |
@@ -506,8 +504,7 @@ discard block |
||
| 506 | 504 | if (strpos($item, '.') !== FALSE) |
| 507 | 505 | { |
| 508 | 506 | $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char; |
| 509 | - } |
|
| 510 | - else |
|
| 507 | + } else |
|
| 511 | 508 | { |
| 512 | 509 | $str = $this->_escape_char.$item.$this->_escape_char; |
| 513 | 510 | } |
@@ -753,8 +750,7 @@ discard block |
||
| 753 | 750 | if ($offset == 0) |
| 754 | 751 | { |
| 755 | 752 | $offset = ''; |
| 756 | - } |
|
| 757 | - else |
|
| 753 | + } else |
|
| 758 | 754 | { |
| 759 | 755 | $offset .= ", "; |
| 760 | 756 | } |