@@ -48,13 +48,11 @@ |
||
| 48 | 48 | header("Location: artifacts.php#{$unit_id}"); |
| 49 | 49 | ob_end_flush(); |
| 50 | 50 | die(); |
| 51 | - } |
|
| 52 | - else |
|
| 51 | + } else |
|
| 53 | 52 | { |
| 54 | 53 | $Message = $lang['off_maxed_out']; |
| 55 | 54 | } |
| 56 | - } |
|
| 57 | - else |
|
| 55 | + } else |
|
| 58 | 56 | { |
| 59 | 57 | $Message = $lang['sys_no_points']; |
| 60 | 58 | } |
@@ -2,7 +2,9 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | function dump($value,$varname = "",$level=0,$dumper = "") |
| 4 | 4 | { |
| 5 | - if ($varname) $varname .= " = "; |
|
| 5 | + if ($varname) { |
|
| 6 | + $varname .= " = "; |
|
| 7 | + } |
|
| 6 | 8 | |
| 7 | 9 | if ($level==-1) |
| 8 | 10 | { |
@@ -13,7 +15,9 @@ discard block |
||
| 13 | 15 | $trans["\0"]='⊕'; |
| 14 | 16 | return strtr(htmlspecialchars($value),$trans); |
| 15 | 17 | } |
| 16 | - if ($level==0) $dumper = '<pre>' . $varname; |
|
| 18 | + if ($level==0) { |
|
| 19 | + $dumper = '<pre>' . $varname; |
|
| 20 | + } |
|
| 17 | 21 | |
| 18 | 22 | $type = gettype($value); |
| 19 | 23 | $dumper .= $type; |
@@ -22,9 +26,9 @@ discard block |
||
| 22 | 26 | { |
| 23 | 27 | $dumper .= '('.strlen($value).')'; |
| 24 | 28 | $value = dump($value,"",-1); |
| 25 | - } |
|
| 26 | - elseif ($type=='boolean') $value= ($value?'true':'false'); |
|
| 27 | - elseif ($type=='object') |
|
| 29 | + } elseif ($type=='boolean') { |
|
| 30 | + $value= ($value?'true':'false'); |
|
| 31 | + } elseif ($type=='object') |
|
| 28 | 32 | { |
| 29 | 33 | $props= get_class_vars(get_class($value)); |
| 30 | 34 | $dumper .= '('.count($props).') <u>'.get_class($value).'</u>'; |
@@ -34,8 +38,7 @@ discard block |
||
| 34 | 38 | $dumper .= dump($value->$key,"",$level+1); |
| 35 | 39 | } |
| 36 | 40 | $value= ''; |
| 37 | - } |
|
| 38 | - elseif ($type=='array') |
|
| 41 | + } elseif ($type=='array') |
|
| 39 | 42 | { |
| 40 | 43 | $dumper .= '('.count($value).')'; |
| 41 | 44 | foreach($value as $key=>$val) |
@@ -46,7 +49,9 @@ discard block |
||
| 46 | 49 | $value= ''; |
| 47 | 50 | } |
| 48 | 51 | $dumper .= " <b>$value</b>"; |
| 49 | - if ($level==0) $dumper .= '</pre>'; |
|
| 52 | + if ($level==0) { |
|
| 53 | + $dumper .= '</pre>'; |
|
| 54 | + } |
|
| 50 | 55 | return $dumper; |
| 51 | 56 | } |
| 52 | 57 | |
@@ -70,8 +75,7 @@ discard block |
||
| 70 | 75 | if(substr(getcwd(), -4) != 'docs') |
| 71 | 76 | { |
| 72 | 77 | $path_prefix = 'docs/'; |
| 73 | -} |
|
| 74 | -else |
|
| 78 | +} else |
|
| 75 | 79 | { |
| 76 | 80 | $path_prefix = ''; |
| 77 | 81 | } |
@@ -119,8 +123,7 @@ discard block |
||
| 119 | 123 | $buffer['name'] = $chapter[0]; |
| 120 | 124 | } |
| 121 | 125 | $prev_chapter_is_header = true; |
| 122 | - } |
|
| 123 | - else |
|
| 126 | + } else |
|
| 124 | 127 | { |
| 125 | 128 | $prev_chapter_is_header = false; |
| 126 | 129 | foreach($chapter as &$note) |
@@ -150,8 +153,7 @@ discard block |
||
| 150 | 153 | if(!isset($note_out['name'])) |
| 151 | 154 | { |
| 152 | 155 | $note_out['name'] = $buf_str; |
| 153 | - } |
|
| 154 | - else |
|
| 156 | + } else |
|
| 155 | 157 | { |
| 156 | 158 | $note_out['lines'][] = $buf_str; |
| 157 | 159 | } |
@@ -228,36 +230,31 @@ discard block |
||
| 228 | 230 | if($matches[2]) |
| 229 | 231 | { |
| 230 | 232 | buf_print("<ol>\r\n"); |
| 231 | - } |
|
| 232 | - else |
|
| 233 | + } else |
|
| 233 | 234 | { |
| 234 | 235 | buf_print("<ul>\r\n"); |
| 235 | 236 | } |
| 236 | 237 | buf_print('<li>'); |
| 237 | 238 | $last_spaces = $matches[1]; |
| 238 | 239 | $depth[] = $matches[2]; |
| 239 | - } |
|
| 240 | - elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 240 | + } elseif(strlen($matches[1]) < strlen($last_spaces) && count($depth)) |
|
| 241 | 241 | { |
| 242 | 242 | if(array_pop($depth)) |
| 243 | 243 | { |
| 244 | 244 | buf_print("</ol>\r\n"); |
| 245 | - } |
|
| 246 | - else |
|
| 245 | + } else |
|
| 247 | 246 | { |
| 248 | 247 | buf_print("</ul>\r\n"); |
| 249 | 248 | } |
| 250 | 249 | $last_spaces = $matches[1]; |
| 251 | 250 | buf_print('<li>'); |
| 252 | - } |
|
| 253 | - elseif(strlen($last_spaces) == strlen($matches[1])) |
|
| 251 | + } elseif(strlen($last_spaces) == strlen($matches[1])) |
|
| 254 | 252 | { |
| 255 | 253 | if($matches[2] == '' && $depth[count($depth) - 1] != '') |
| 256 | 254 | { |
| 257 | 255 | buf_print("</ol>\r\n"); |
| 258 | 256 | buf_print("<ul>\r\n"); |
| 259 | - } |
|
| 260 | - elseif($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 257 | + } elseif($matches[2] != '' && $depth[count($depth) - 1] == '') |
|
| 261 | 258 | { |
| 262 | 259 | buf_print("</ul>\r\n"); |
| 263 | 260 | buf_print("<ol>\r\n"); |
@@ -274,8 +271,7 @@ discard block |
||
| 274 | 271 | if(array_pop($depth)) |
| 275 | 272 | { |
| 276 | 273 | buf_print("</ol>\r\n"); |
| 277 | - } |
|
| 278 | - else |
|
| 274 | + } else |
|
| 279 | 275 | { |
| 280 | 276 | buf_print("</ul>\r\n"); |
| 281 | 277 | } |
@@ -86,8 +86,7 @@ discard block |
||
| 86 | 86 | if($n % 2 == 0) |
| 87 | 87 | { |
| 88 | 88 | $median = ($args[$h] + $args[$h-1]) / 2; |
| 89 | - } |
|
| 90 | - else |
|
| 89 | + } else |
|
| 91 | 90 | { |
| 92 | 91 | $median = $args[$h]; |
| 93 | 92 | } |
@@ -111,7 +110,9 @@ discard block |
||
| 111 | 110 | $eq[$j] /= $eq[$from]; |
| 112 | 111 | } |
| 113 | 112 | } |
| 114 | - if($debug) pdump($linear, 'Нормализовано по х' . $from); |
|
| 113 | + if($debug) { |
|
| 114 | + pdump($linear, 'Нормализовано по х' . $from); |
|
| 115 | + } |
|
| 115 | 116 | |
| 116 | 117 | for($i = $from + 1; $i < count($linear); $i++) |
| 117 | 118 | { |
@@ -121,7 +122,9 @@ discard block |
||
| 121 | 122 | $eq[$j] -= $linear[$from][$j]; |
| 122 | 123 | } |
| 123 | 124 | } |
| 124 | - if($debug) pdump($linear, 'Подставили х' . $from); |
|
| 125 | + if($debug) { |
|
| 126 | + pdump($linear, 'Подставили х' . $from); |
|
| 127 | + } |
|
| 125 | 128 | |
| 126 | 129 | if($from < count($linear) - 1) |
| 127 | 130 | { |
@@ -138,11 +141,14 @@ discard block |
||
| 138 | 141 | $eq[$j] = $eq[$j] - $eq[$from] * $linear[$from][$j]; |
| 139 | 142 | } |
| 140 | 143 | } |
| 141 | - if($debug) pdump($linear, 'Подставили обратно х' . $from); |
|
| 142 | - } |
|
| 143 | - else |
|
| 144 | + if($debug) { |
|
| 145 | + pdump($linear, 'Подставили обратно х' . $from); |
|
| 146 | + } |
|
| 147 | + } else |
|
| 144 | 148 | { |
| 145 | - if($debug) pdump($linear, 'Результат' . $from); |
|
| 149 | + if($debug) { |
|
| 150 | + pdump($linear, 'Результат' . $from); |
|
| 151 | + } |
|
| 146 | 152 | foreach($linear as $index => &$eq) |
| 147 | 153 | { |
| 148 | 154 | pdump($eq[count($linear)], 'x' . $index); |
@@ -46,8 +46,7 @@ |
||
| 46 | 46 | sn_db_transaction_commit(); |
| 47 | 47 | sys_redirect("galaxy.php?mode=name&galaxy={$uni_galaxy}&system={$uni_system}"); |
| 48 | 48 | } |
| 49 | - } |
|
| 50 | - catch (exception $e) |
|
| 49 | + } catch (exception $e) |
|
| 51 | 50 | { |
| 52 | 51 | sn_db_transaction_rollback(); |
| 53 | 52 | $template->assign_block_vars('result', array( |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | |
| 80 | 80 | sn_db_transaction_commit(); |
| 81 | 81 | throw new Exception($info_action, ERR_NONE); |
| 82 | - } |
|
| 83 | - catch (Exception $e) |
|
| 82 | + } catch (Exception $e) |
|
| 84 | 83 | { |
| 85 | 84 | sn_db_transaction_rollback(); |
| 86 | 85 | |
@@ -35,8 +35,7 @@ |
||
| 35 | 35 | if($planetrow['id_owner']) { |
| 36 | 36 | $global_data = sys_o_get_updated($user, $planetrow, SN_TIME_NOW); |
| 37 | 37 | $planetrow = $global_data['planet']; |
| 38 | - } |
|
| 39 | - else { |
|
| 38 | + } else { |
|
| 40 | 39 | // Locking user record |
| 41 | 40 | $user = db_user_by_id($user['id'], true); |
| 42 | 41 | } |
@@ -17,8 +17,7 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | $avatar_field = 0; |
| 19 | 19 | throw new Exception($lang['opt_msg_avatar_removed'], ERR_NONE); |
| 20 | - } |
|
| 21 | - elseif($_FILES['avatar']['size']) |
|
| 20 | + } elseif($_FILES['avatar']['size']) |
|
| 22 | 21 | { |
| 23 | 22 | if(!in_array($_FILES['avatar']['type'], array('image/gif', 'image/jpeg', 'image/jpg', 'image/pjpeg', 'image/png')) || $_FILES['avatar']['size'] > 204800) |
| 24 | 23 | { |
@@ -61,8 +60,7 @@ discard block |
||
| 61 | 60 | imagedestroy($avatar_image); |
| 62 | 61 | throw new Exception($lang['opt_msg_avatar_uploaded'], ERR_NONE); |
| 63 | 62 | } |
| 64 | - } |
|
| 65 | - catch (Exception $e) |
|
| 63 | + } catch (Exception $e) |
|
| 66 | 64 | { |
| 67 | 65 | return array( |
| 68 | 66 | 'STATUS' => in_array($e->getCode(), array(ERR_NONE, ERR_WARNING, ERR_ERROR)) ? $e->getCode() : ERR_ERROR, |
@@ -66,8 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | return; |
| 68 | 68 | trigger_error("template->_tpl_load_file(): File {$this->template->files[$handle]} does not exist or is empty", E_USER_ERROR); |
| 69 | - } |
|
| 70 | - else |
|
| 69 | + } else |
|
| 71 | 70 | { |
| 72 | 71 | $this->template->files[$handle] = $this->template->files_inherit[$handle]; |
| 73 | 72 | } |
@@ -225,15 +224,13 @@ discard block |
||
| 225 | 224 | $var = substr($temp, 2, -1); |
| 226 | 225 | //$file = $this->template->_tpldata['DEFINE']['.'][$var]; |
| 227 | 226 | $temp = "\$this->_tpldata['DEFINE']['.']['$var']"; |
| 228 | - } |
|
| 229 | - else |
|
| 227 | + } else |
|
| 230 | 228 | { |
| 231 | 229 | $var = substr($temp, 1, -1); |
| 232 | 230 | //$file = $this->template->_rootref[$var]; |
| 233 | 231 | $temp = "\$this->_rootref['$var']"; |
| 234 | 232 | } |
| 235 | - } |
|
| 236 | - else |
|
| 233 | + } else |
|
| 237 | 234 | { |
| 238 | 235 | $file = $temp; |
| 239 | 236 | } |
@@ -381,8 +378,7 @@ discard block |
||
| 381 | 378 | if ($match[2] < 0) |
| 382 | 379 | { |
| 383 | 380 | $loop_start = '($_' . $tag_args . '_count ' . $match[2] . ' < 0 ? 0 : $_' . $tag_args . '_count ' . $match[2] . ')'; |
| 384 | - } |
|
| 385 | - else |
|
| 381 | + } else |
|
| 386 | 382 | { |
| 387 | 383 | $loop_start = '($_' . $tag_args . '_count < ' . $match[2] . ' ? $_' . $tag_args . '_count : ' . $match[2] . ')'; |
| 388 | 384 | } |
@@ -390,17 +386,14 @@ discard block |
||
| 390 | 386 | if (strlen($match[3]) < 1 || $match[3] == -1) |
| 391 | 387 | { |
| 392 | 388 | $loop_end = '$_' . $tag_args . '_count'; |
| 393 | - } |
|
| 394 | - else if ($match[3] >= 0) |
|
| 389 | + } else if ($match[3] >= 0) |
|
| 395 | 390 | { |
| 396 | 391 | $loop_end = '(' . ($match[3] + 1) . ' > $_' . $tag_args . '_count ? $_' . $tag_args . '_count : ' . ($match[3] + 1) . ')'; |
| 397 | - } |
|
| 398 | - else //if ($match[3] < -1) |
|
| 392 | + } else //if ($match[3] < -1) |
|
| 399 | 393 | { |
| 400 | 394 | $loop_end = '$_' . $tag_args . '_count' . ($match[3] + 1); |
| 401 | 395 | } |
| 402 | - } |
|
| 403 | - else |
|
| 396 | + } else |
|
| 404 | 397 | { |
| 405 | 398 | $loop_start = 0; |
| 406 | 399 | $loop_end = '$_' . $tag_args . '_count'; |
@@ -413,8 +406,7 @@ discard block |
||
| 413 | 406 | { |
| 414 | 407 | // We need to implode $no_nesting times from the end... |
| 415 | 408 | $block = array_slice($this->block_names, -$no_nesting); |
| 416 | - } |
|
| 417 | - else |
|
| 409 | + } else |
|
| 418 | 410 | { |
| 419 | 411 | $block = $this->block_names; |
| 420 | 412 | } |
@@ -424,8 +416,7 @@ discard block |
||
| 424 | 416 | // Block is not nested. |
| 425 | 417 | $tag_template_php = '$_' . $tag_args . "_count = (isset(\$this->_tpldata['$tag_args'])) ? sizeof(\$this->_tpldata['$tag_args']) : 0;"; |
| 426 | 418 | $varref = "\$this->_tpldata['$tag_args']"; |
| 427 | - } |
|
| 428 | - else |
|
| 419 | + } else |
|
| 429 | 420 | { |
| 430 | 421 | // This block is nested. |
| 431 | 422 | // Generate a namespace string for this block. |
@@ -573,8 +564,7 @@ discard block |
||
| 573 | 564 | if (preg_match('#^((?:[a-z0-9\-_]+\.)+)?(\$)?(?=[A-Za-z])([A-Za-z0-9\-_]+)#s', $token, $varrefs)) |
| 574 | 565 | { |
| 575 | 566 | $token = (!empty($varrefs[1])) ? $this->generate_block_data_ref(substr($varrefs[1], 0, -1), true, $varrefs[2]) . '[\'' . $varrefs[3] . '\']' : (($varrefs[2]) ? '$this->_tpldata[\'DEFINE\'][\'.\'][\'' . $varrefs[3] . '\']' : '$this->_rootref[\'' . $varrefs[3] . '\']'); |
| 576 | - } |
|
| 577 | - else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs)) |
|
| 567 | + } else if (preg_match('#^\.((?:[a-z0-9\-_]+\.?)+)$#s', $token, $varrefs)) |
|
| 578 | 568 | { |
| 579 | 569 | // Allow checking if loops are set with .loopname |
| 580 | 570 | // It is also possible to check the loop count by doing <!-- IF .loopname > 1 --> for example |
@@ -590,8 +580,7 @@ discard block |
||
| 590 | 580 | |
| 591 | 581 | // Add the block reference for the last child. |
| 592 | 582 | $varref .= "['" . $block . "']"; |
| 593 | - } |
|
| 594 | - else |
|
| 583 | + } else |
|
| 595 | 584 | { |
| 596 | 585 | $varref = '$this->_tpldata'; |
| 597 | 586 | |
@@ -599,8 +588,7 @@ discard block |
||
| 599 | 588 | $varref .= "['" . $blocks[0] . "']"; |
| 600 | 589 | } |
| 601 | 590 | $token = "sizeof($varref)"; |
| 602 | - } |
|
| 603 | - else if (!empty($token)) |
|
| 591 | + } else if (!empty($token)) |
|
| 604 | 592 | { |
| 605 | 593 | $token = '(' . $token . ')'; |
| 606 | 594 | } |
@@ -645,8 +633,7 @@ discard block |
||
| 645 | 633 | |
| 646 | 634 | // Now replace the php code |
| 647 | 635 | $match[4] = "'" . str_replace(array('<?php echo ', '; ?>'), array("' . ", " . '"), $match[4]) . "'"; |
| 648 | - } |
|
| 649 | - else |
|
| 636 | + } else |
|
| 650 | 637 | { |
| 651 | 638 | preg_match('#true|false|\.#i', $match[4], $type); |
| 652 | 639 | |
@@ -708,8 +695,7 @@ discard block |
||
| 708 | 695 | { |
| 709 | 696 | $negate_expr = true; |
| 710 | 697 | $expr_type = array_shift($tokens); |
| 711 | - } |
|
| 712 | - else |
|
| 698 | + } else |
|
| 713 | 699 | { |
| 714 | 700 | $expr_type = $first_token; |
| 715 | 701 | } |
@@ -722,8 +708,7 @@ discard block |
||
| 722 | 708 | $expr_end++; |
| 723 | 709 | $expr_arg = $tokens[$expr_end++]; |
| 724 | 710 | $expr = "!(($is_arg / $expr_arg) % $expr_arg)"; |
| 725 | - } |
|
| 726 | - else |
|
| 711 | + } else |
|
| 727 | 712 | { |
| 728 | 713 | $expr = "!($is_arg & 1)"; |
| 729 | 714 | } |
@@ -735,8 +720,7 @@ discard block |
||
| 735 | 720 | $expr_end++; |
| 736 | 721 | $expr_arg = $tokens[$expr_end++]; |
| 737 | 722 | $expr = "(($is_arg / $expr_arg) % $expr_arg)"; |
| 738 | - } |
|
| 739 | - else |
|
| 723 | + } else |
|
| 740 | 724 | { |
| 741 | 725 | $expr = "($is_arg & 1)"; |
| 742 | 726 | } |
@@ -818,12 +802,10 @@ discard block |
||
| 818 | 802 | $varref .= '[$_' . $blocks[$blockcount] . '_i]'; |
| 819 | 803 | } |
| 820 | 804 | return $varref; |
| 821 | - } |
|
| 822 | - else if ($include_last_iterator) |
|
| 805 | + } else if ($include_last_iterator) |
|
| 823 | 806 | { |
| 824 | 807 | return '$_'. $blocks[$blockcount] . '_val'; |
| 825 | - } |
|
| 826 | - else |
|
| 808 | + } else |
|
| 827 | 809 | { |
| 828 | 810 | return '$_'. $blocks[$blockcount - 1] . '_val[\''. $blocks[$blockcount]. '\']'; |
| 829 | 811 | } |
@@ -89,8 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $this->inherit_root = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template'; |
| 91 | 91 | } |
| 92 | - } |
|
| 93 | - else |
|
| 92 | + } else |
|
| 94 | 93 | { |
| 95 | 94 | trigger_error('Template path could not be found: styles/' . $user->theme['template_path'] . '/template', E_USER_ERROR); |
| 96 | 95 | } |
@@ -126,8 +125,7 @@ discard block |
||
| 126 | 125 | |
| 127 | 126 | $this->inherit_root = $fallback_template_path; |
| 128 | 127 | $this->orig_tpl_inherits_id = true; |
| 129 | - } |
|
| 130 | - else |
|
| 128 | + } else |
|
| 131 | 129 | { |
| 132 | 130 | $this->orig_tpl_inherits_id = false; |
| 133 | 131 | } |
@@ -201,8 +199,7 @@ discard block |
||
| 201 | 199 | } |
| 202 | 200 | |
| 203 | 201 | unset($str[$blocks[$blockcount]]); |
| 204 | - } |
|
| 205 | - else |
|
| 202 | + } else |
|
| 206 | 203 | { |
| 207 | 204 | // Top-level block. |
| 208 | 205 | unset($this->_tpldata[$blockname]); |
@@ -238,8 +235,7 @@ discard block |
||
| 238 | 235 | if ($filename = $this->_tpl_load($handle)) |
| 239 | 236 | { |
| 240 | 237 | ($include_once) ? include_once($filename) : include($filename); |
| 241 | - } |
|
| 242 | - else |
|
| 238 | + } else |
|
| 243 | 239 | { |
| 244 | 240 | eval(' ?>' . $this->compiled_code[$handle] . '<?php '); |
| 245 | 241 | } |
@@ -293,8 +289,7 @@ discard block |
||
| 293 | 289 | if (!file_exists($filename) || @filesize($filename) === 0) |
| 294 | 290 | { |
| 295 | 291 | $recompile = true; |
| 296 | - } |
|
| 297 | - else if ($config->load_tplcompile) |
|
| 292 | + } else if ($config->load_tplcompile) |
|
| 298 | 293 | { |
| 299 | 294 | // No way around it: we need to check inheritance here |
| 300 | 295 | if ($user->theme['template_inherits_id'] && !file_exists($this->files[$handle])) |
@@ -382,15 +377,13 @@ discard block |
||
| 382 | 377 | $this->files[$row['template_filename']] = $file; |
| 383 | 378 | $this->files_inherit[$row['template_filename']] = $file; |
| 384 | 379 | $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id']; |
| 385 | - } |
|
| 386 | - else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) |
|
| 380 | + } else if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id']) |
|
| 387 | 381 | { |
| 388 | 382 | // Ok, we have a situation. There is a file in the subtemplate, but nothing in the DB. We have to fix that. |
| 389 | 383 | $force_reload = true; |
| 390 | 384 | $this->files_template[$row['template_filename']] = $user->theme['template_inherits_id']; |
| 391 | 385 | } |
| 392 | - } |
|
| 393 | - else |
|
| 386 | + } else |
|
| 394 | 387 | { |
| 395 | 388 | $this->files_template[$row['template_filename']] = $user->theme['template_id']; |
| 396 | 389 | } |
@@ -400,8 +393,7 @@ discard block |
||
| 400 | 393 | if ($row['template_filename'] == $this->filename[$handle]) |
| 401 | 394 | { |
| 402 | 395 | $compile->_tpl_load_file($handle, true); |
| 403 | - } |
|
| 404 | - else |
|
| 396 | + } else |
|
| 405 | 397 | { |
| 406 | 398 | $this->files[$row['template_filename']] = $file; |
| 407 | 399 | $this->filename[$row['template_filename']] = $row['template_filename']; |
@@ -416,8 +408,7 @@ discard block |
||
| 416 | 408 | { |
| 417 | 409 | $this->compiled_code[$handle] = $compile->compile(trim($row['template_data'])); |
| 418 | 410 | $compile->compile_write($handle, $this->compiled_code[$handle]); |
| 419 | - } |
|
| 420 | - else |
|
| 411 | + } else |
|
| 421 | 412 | { |
| 422 | 413 | // Only bother compiling if it doesn't already exist |
| 423 | 414 | if (!file_exists($this->cachepath . str_replace('/', '.', $row['template_filename']) . DOT_PHP_EX)) |
@@ -428,8 +419,7 @@ discard block |
||
| 428 | 419 | } |
| 429 | 420 | } |
| 430 | 421 | } |
| 431 | - } |
|
| 432 | - else |
|
| 422 | + } else |
|
| 433 | 423 | { |
| 434 | 424 | $file = $this->root . '/' . $row['template_filename']; |
| 435 | 425 | |
@@ -517,8 +507,7 @@ discard block |
||
| 517 | 507 | // We're adding a new iteration to this block with the given |
| 518 | 508 | // variable assignments. |
| 519 | 509 | $str[$blocks[$blockcount]][] = $vararray; |
| 520 | - } |
|
| 521 | - else |
|
| 510 | + } else |
|
| 522 | 511 | { |
| 523 | 512 | // Top-level block. |
| 524 | 513 | $s_row_count = (isset($this->_tpldata[$blockname])) ? sizeof($this->_tpldata[$blockname]) : 0; |
@@ -618,8 +607,7 @@ discard block |
||
| 618 | 607 | $key = sizeof($this->_tpldata[$blockname]); |
| 619 | 608 | unset($this->_tpldata[$blockname][($key - 1)]['S_LAST_ROW']); |
| 620 | 609 | $vararray['S_LAST_ROW'] = true; |
| 621 | - } |
|
| 622 | - else if ($key === 0) |
|
| 610 | + } else if ($key === 0) |
|
| 623 | 611 | { |
| 624 | 612 | unset($this->_tpldata[$blockname][0]['S_FIRST_ROW']); |
| 625 | 613 | $vararray['S_FIRST_ROW'] = true; |
@@ -719,8 +707,7 @@ discard block |
||
| 719 | 707 | if(!$name) |
| 720 | 708 | { |
| 721 | 709 | $this->assign_vars($values); |
| 722 | - } |
|
| 723 | - else |
|
| 710 | + } else |
|
| 724 | 711 | { |
| 725 | 712 | $this->assign_block_vars($name, $values); |
| 726 | 713 | } |