| @@ -39,8 +39,8 @@ | ||
| 39 | 39 | 0 => $row['visit_time'], // start | 
| 40 | 40 | 1 => $row['visit_time'], // end | 
| 41 | 41 | ) | 
| 42 | - //: false | |
| 43 | - ; | |
| 42 | + //: false | |
| 43 | + ; | |
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | $session_list = array(); | 
| @@ -50,52 +50,52 @@ | ||
| 50 | 50 | stat_tpl_assign($template, $who, 'subject', $subject_list, $sn_group_stat_common); | 
| 51 | 51 | |
| 52 | 52 | $stat_types = array( | 
| 53 | - STAT_TOTAL => array( | |
| 54 | - 'type' => 'total', | |
| 55 | - ), | |
| 53 | + STAT_TOTAL => array( | |
| 54 | + 'type' => 'total', | |
| 55 | + ), | |
| 56 | 56 | |
| 57 | - STAT_FLEET => array( | |
| 58 | - 'type' => 'fleet', | |
| 59 | - ), | |
| 57 | + STAT_FLEET => array( | |
| 58 | + 'type' => 'fleet', | |
| 59 | + ), | |
| 60 | 60 | |
| 61 | - STAT_TECH => array( | |
| 62 | - 'type' => 'tech', | |
| 63 | - ), | |
| 61 | + STAT_TECH => array( | |
| 62 | + 'type' => 'tech', | |
| 63 | + ), | |
| 64 | 64 | |
| 65 | - STAT_BUILDING => array( | |
| 66 | - 'type' => 'build', | |
| 67 | - ), | |
| 65 | + STAT_BUILDING => array( | |
| 66 | + 'type' => 'build', | |
| 67 | + ), | |
| 68 | 68 | |
| 69 | - STAT_DEFENSE => array( | |
| 70 | - 'type' => 'defs', | |
| 71 | - ), | |
| 69 | + STAT_DEFENSE => array( | |
| 70 | + 'type' => 'defs', | |
| 71 | + ), | |
| 72 | 72 | |
| 73 | - STAT_RESOURCE => array( | |
| 74 | - 'type' => 'res', | |
| 75 | - ), | |
| 73 | + STAT_RESOURCE => array( | |
| 74 | + 'type' => 'res', | |
| 75 | + ), | |
| 76 | 76 | |
| 77 | - STAT_RAID_TOTAL => array( | |
| 78 | - 'type' => 'raids', | |
| 79 | - ), | |
| 77 | + STAT_RAID_TOTAL => array( | |
| 78 | + 'type' => 'raids', | |
| 79 | + ), | |
| 80 | 80 | |
| 81 | - STAT_RAID_WON => array( | |
| 82 | - 'type' => 'raidswin', | |
| 83 | - ), | |
| 81 | + STAT_RAID_WON => array( | |
| 82 | + 'type' => 'raidswin', | |
| 83 | + ), | |
| 84 | 84 | |
| 85 | - STAT_RAID_LOST => array( | |
| 86 | - 'type' => 'raidsloose', | |
| 87 | - ), | |
| 85 | + STAT_RAID_LOST => array( | |
| 86 | + 'type' => 'raidsloose', | |
| 87 | + ), | |
| 88 | 88 | |
| 89 | 89 | STAT_LVL_BUILDING => array( | 
| 90 | - 'type' => 'lvl_minier', | |
| 90 | + 'type' => 'lvl_minier', | |
| 91 | 91 | ), | 
| 92 | 92 | |
| 93 | 93 | STAT_LVL_TECH => array( | 
| 94 | - 'type' => 'player_rpg_tech_level', | |
| 94 | + 'type' => 'player_rpg_tech_level', | |
| 95 | 95 | ), | 
| 96 | 96 | |
| 97 | 97 | STAT_LVL_RAID => array( | 
| 98 | - 'type' => 'lvl_raid', | |
| 98 | + 'type' => 'lvl_raid', | |
| 99 | 99 | ), | 
| 100 | 100 | ); | 
| 101 | 101 | stat_tpl_assign($template, $type, 'type', $stat_types, $sn_group_stat_common); | 
| @@ -27,7 +27,7 @@ | ||
| 27 | 27 | */ | 
| 28 | 28 | |
| 29 | 29 |  if (!defined('INSIDE')) { | 
| 30 | -	die('Hack attempt!'); | |
| 30 | +  die('Hack attempt!'); | |
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 | global $config; | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 | */ | 
| 29 | 29 |  if (!defined('INSIDE'))  | 
| 30 | 30 |  { | 
| 31 | -	die('Hack attempt!'); | |
| 31 | +  die('Hack attempt!'); | |
| 32 | 32 | } | 
| 33 | 33 | |
| 34 | 34 | $lang_info = array( | 
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | */ | 
| 30 | 30 | protected $_repository; | 
| 31 | 31 | |
| 32 | - /** | |
| 32 | + /** | |
| 33 | 33 | * @var ContainerPlus $_oldRepo | 
| 34 | 34 | */ | 
| 35 | 35 | protected $_oldRepo; | 
| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 | */ | 
| 17 | 17 |  if (!defined('IN_PHPBB')) | 
| 18 | 18 |  { | 
| 19 | - exit; | |
| 19 | + exit; | |
| 20 | 20 | } | 
| 21 | 21 | |
| 22 | 22 | /** | 
| @@ -24,227 +24,227 @@ discard block | ||
| 24 | 24 | */ | 
| 25 | 25 | class phpbb_hook | 
| 26 | 26 |  { | 
| 27 | - /** | |
| 28 | - * Registered hooks | |
| 29 | - */ | |
| 30 | - var $hooks = array(); | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * Results returned by functions called | |
| 34 | - */ | |
| 35 | - var $hook_result = array(); | |
| 36 | - | |
| 37 | - /** | |
| 38 | - * internal pointer | |
| 39 | - */ | |
| 40 | - var $current_hook = NULL; | |
| 41 | - | |
| 42 | - /** | |
| 43 | - * Initialize hook class. | |
| 44 | - * | |
| 45 | - * @param array $valid_hooks array containing the hookable functions/methods | |
| 46 | - */ | |
| 47 | - function phpbb_hook($valid_hooks) | |
| 48 | -	{ | |
| 49 | - foreach ($valid_hooks as $_null => $method) | |
| 50 | -		{ | |
| 51 | - $this->add_hook($method); | |
| 52 | - } | |
| 53 | - | |
| 54 | -		if (function_exists('phpbb_hook_register')) | |
| 55 | -		{ | |
| 56 | - phpbb_hook_register($this); | |
| 57 | - } | |
| 58 | - } | |
| 59 | - | |
| 60 | - /** | |
| 61 | - * Register function/method to be called within hook | |
| 62 | - * This function is normally called by the modification/application to attach/register the functions. | |
| 63 | - * | |
| 64 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 65 | - * @param mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition | |
| 66 | - * @param string $mode Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain. | |
| 67 | - */ | |
| 68 | - function register($definition, $hook, $mode = 'normal') | |
| 69 | -	{ | |
| 70 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 71 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 72 | - | |
| 73 | - // Method able to be hooked? | |
| 74 | - if (isset($this->hooks[$class][$function])) | |
| 75 | -		{ | |
| 76 | - switch ($mode) | |
| 77 | -			{ | |
| 78 | - case 'standalone': | |
| 79 | - if (!isset($this->hooks[$class][$function]['standalone'])) | |
| 80 | -					{ | |
| 81 | -						$this->hooks[$class][$function] = array('standalone' => $hook); | |
| 82 | - } | |
| 83 | - else | |
| 84 | -					{ | |
| 85 | -						trigger_error('Hook not able to be called standalone, previous hook already standalone.', E_NOTICE); | |
| 86 | - } | |
| 87 | - break; | |
| 88 | - | |
| 89 | - case 'first': | |
| 90 | - case 'last': | |
| 91 | - $this->hooks[$class][$function][$mode][] = $hook; | |
| 92 | - break; | |
| 93 | - | |
| 94 | - case 'normal': | |
| 95 | - default: | |
| 96 | - $this->hooks[$class][$function]['normal'][] = $hook; | |
| 97 | - break; | |
| 98 | - } | |
| 99 | - } | |
| 100 | - } | |
| 101 | - | |
| 102 | - /** | |
| 103 | - * Calling all functions/methods attached to a specified hook. | |
| 104 | - * Called by the function allowing hooks... | |
| 105 | - * | |
| 106 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 107 | - * @return bool False if no hook got executed, true otherwise | |
| 108 | - */ | |
| 109 | - function call_hook($definition) | |
| 110 | -	{ | |
| 111 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 112 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 113 | - | |
| 114 | - if (!empty($this->hooks[$class][$function])) | |
| 115 | -		{ | |
| 116 | - // Developer tries to call a hooked function within the hooked function... | |
| 117 | - if ($this->current_hook !== NULL && $this->current_hook['class'] === $class && $this->current_hook['function'] === $function) | |
| 118 | -			{ | |
| 119 | - return false; | |
| 120 | - } | |
| 121 | - | |
| 122 | - // Call the hook with the arguments attached and store result | |
| 123 | - $arguments = func_get_args(); | |
| 124 | -			$this->current_hook = array('class' => $class, 'function' => $function); | |
| 125 | - $arguments[0] = &$this; | |
| 126 | - | |
| 127 | - // Call the hook chain... | |
| 128 | - if (isset($this->hooks[$class][$function]['standalone'])) | |
| 129 | -			{ | |
| 130 | - $this->hook_result[$class][$function] = call_user_func_array($this->hooks[$class][$function]['standalone'], $arguments); | |
| 131 | - } | |
| 132 | - else | |
| 133 | -			{ | |
| 134 | -				foreach (array('first', 'normal', 'last') as $mode) | |
| 135 | -				{ | |
| 136 | - if (!isset($this->hooks[$class][$function][$mode])) | |
| 137 | -					{ | |
| 138 | - continue; | |
| 139 | - } | |
| 140 | - | |
| 141 | - foreach ($this->hooks[$class][$function][$mode] as $hook) | |
| 142 | -					{ | |
| 143 | - $this->hook_result[$class][$function] = call_user_func_array($hook, $arguments); | |
| 144 | - } | |
| 145 | - } | |
| 146 | - } | |
| 147 | - | |
| 148 | - $this->current_hook = NULL; | |
| 149 | - return true; | |
| 150 | - } | |
| 151 | - | |
| 152 | - $this->current_hook = NULL; | |
| 153 | - return false; | |
| 154 | - } | |
| 155 | - | |
| 156 | - /** | |
| 157 | - * Get result from previously called functions/methods for the same hook | |
| 158 | - * | |
| 159 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 160 | -	* @return mixed False if nothing returned if there is no result, else array('result' => ... ) | |
| 161 | - */ | |
| 162 | - function previous_hook_result($definition) | |
| 163 | -	{ | |
| 164 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 165 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 166 | - | |
| 167 | - if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 168 | -		{ | |
| 169 | -			return array('result' => $this->hook_result[$class][$function]); | |
| 170 | - } | |
| 171 | - | |
| 172 | - return false; | |
| 173 | - } | |
| 174 | - | |
| 175 | - /** | |
| 176 | - * Check if the called functions/methods returned something. | |
| 177 | - * | |
| 178 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 179 | - * @return bool True if results are there, false if not | |
| 180 | - */ | |
| 181 | - function hook_return($definition) | |
| 182 | -	{ | |
| 183 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 184 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 185 | - | |
| 186 | - if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 187 | -		{ | |
| 188 | - return true; | |
| 189 | - } | |
| 190 | - | |
| 191 | - return false; | |
| 192 | - } | |
| 193 | - | |
| 194 | - /** | |
| 195 | - * Give actual result from called functions/methods back. | |
| 196 | - * | |
| 197 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 198 | - * @return mixed The result | |
| 199 | - */ | |
| 200 | - function hook_return_result($definition) | |
| 201 | -	{ | |
| 202 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 203 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 204 | - | |
| 205 | - if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 206 | -		{ | |
| 207 | - $result = $this->hook_result[$class][$function]; | |
| 208 | - unset($this->hook_result[$class][$function]); | |
| 209 | - return $result; | |
| 210 | - } | |
| 211 | - | |
| 212 | - return; | |
| 213 | - } | |
| 214 | - | |
| 215 | - /** | |
| 216 | - * Add new function to the allowed hooks. | |
| 217 | - * | |
| 218 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 219 | - */ | |
| 220 | - function add_hook($definition) | |
| 221 | -	{ | |
| 222 | - if (!is_array($definition)) | |
| 223 | -		{ | |
| 224 | -			$definition = array('__global', $definition); | |
| 225 | - } | |
| 226 | - | |
| 227 | - $this->hooks[$definition[0]][$definition[1]] = array(); | |
| 228 | - } | |
| 229 | - | |
| 230 | - /** | |
| 231 | - * Remove function from the allowed hooks. | |
| 232 | - * | |
| 233 | - * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 234 | - */ | |
| 235 | - function remove_hook($definition) | |
| 236 | -	{ | |
| 237 | - $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 238 | - $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 239 | - | |
| 240 | - if (isset($this->hooks[$class][$function])) | |
| 241 | -		{ | |
| 242 | - unset($this->hooks[$class][$function]); | |
| 243 | - | |
| 244 | - if (isset($this->hook_result[$class][$function])) | |
| 245 | -			{ | |
| 246 | - unset($this->hook_result[$class][$function]); | |
| 247 | - } | |
| 248 | - } | |
| 249 | - } | |
| 27 | + /** | |
| 28 | + * Registered hooks | |
| 29 | + */ | |
| 30 | + var $hooks = array(); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * Results returned by functions called | |
| 34 | + */ | |
| 35 | + var $hook_result = array(); | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * internal pointer | |
| 39 | + */ | |
| 40 | + var $current_hook = NULL; | |
| 41 | + | |
| 42 | + /** | |
| 43 | + * Initialize hook class. | |
| 44 | + * | |
| 45 | + * @param array $valid_hooks array containing the hookable functions/methods | |
| 46 | + */ | |
| 47 | + function phpbb_hook($valid_hooks) | |
| 48 | +  { | |
| 49 | + foreach ($valid_hooks as $_null => $method) | |
| 50 | +    { | |
| 51 | + $this->add_hook($method); | |
| 52 | + } | |
| 53 | + | |
| 54 | +    if (function_exists('phpbb_hook_register')) | |
| 55 | +    { | |
| 56 | + phpbb_hook_register($this); | |
| 57 | + } | |
| 58 | + } | |
| 59 | + | |
| 60 | + /** | |
| 61 | + * Register function/method to be called within hook | |
| 62 | + * This function is normally called by the modification/application to attach/register the functions. | |
| 63 | + * | |
| 64 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 65 | + * @param mixed $hook The replacement function/method to be called. Passing function name or array with object/class definition | |
| 66 | + * @param string $mode Specify the priority/chain mode. 'normal' -> hook gets appended to the chain. 'standalone' -> only the specified hook gets called - later hooks are not able to overwrite this (E_NOTICE is triggered then). 'first' -> hook is called as the first one within the chain. 'last' -> hook is called as the last one within the chain. | |
| 67 | + */ | |
| 68 | + function register($definition, $hook, $mode = 'normal') | |
| 69 | +  { | |
| 70 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 71 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 72 | + | |
| 73 | + // Method able to be hooked? | |
| 74 | + if (isset($this->hooks[$class][$function])) | |
| 75 | +    { | |
| 76 | + switch ($mode) | |
| 77 | +      { | |
| 78 | + case 'standalone': | |
| 79 | + if (!isset($this->hooks[$class][$function]['standalone'])) | |
| 80 | +          { | |
| 81 | +            $this->hooks[$class][$function] = array('standalone' => $hook); | |
| 82 | + } | |
| 83 | + else | |
| 84 | +          { | |
| 85 | +            trigger_error('Hook not able to be called standalone, previous hook already standalone.', E_NOTICE); | |
| 86 | + } | |
| 87 | + break; | |
| 88 | + | |
| 89 | + case 'first': | |
| 90 | + case 'last': | |
| 91 | + $this->hooks[$class][$function][$mode][] = $hook; | |
| 92 | + break; | |
| 93 | + | |
| 94 | + case 'normal': | |
| 95 | + default: | |
| 96 | + $this->hooks[$class][$function]['normal'][] = $hook; | |
| 97 | + break; | |
| 98 | + } | |
| 99 | + } | |
| 100 | + } | |
| 101 | + | |
| 102 | + /** | |
| 103 | + * Calling all functions/methods attached to a specified hook. | |
| 104 | + * Called by the function allowing hooks... | |
| 105 | + * | |
| 106 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 107 | + * @return bool False if no hook got executed, true otherwise | |
| 108 | + */ | |
| 109 | + function call_hook($definition) | |
| 110 | +  { | |
| 111 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 112 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 113 | + | |
| 114 | + if (!empty($this->hooks[$class][$function])) | |
| 115 | +    { | |
| 116 | + // Developer tries to call a hooked function within the hooked function... | |
| 117 | + if ($this->current_hook !== NULL && $this->current_hook['class'] === $class && $this->current_hook['function'] === $function) | |
| 118 | +      { | |
| 119 | + return false; | |
| 120 | + } | |
| 121 | + | |
| 122 | + // Call the hook with the arguments attached and store result | |
| 123 | + $arguments = func_get_args(); | |
| 124 | +      $this->current_hook = array('class' => $class, 'function' => $function); | |
| 125 | + $arguments[0] = &$this; | |
| 126 | + | |
| 127 | + // Call the hook chain... | |
| 128 | + if (isset($this->hooks[$class][$function]['standalone'])) | |
| 129 | +      { | |
| 130 | + $this->hook_result[$class][$function] = call_user_func_array($this->hooks[$class][$function]['standalone'], $arguments); | |
| 131 | + } | |
| 132 | + else | |
| 133 | +      { | |
| 134 | +        foreach (array('first', 'normal', 'last') as $mode) | |
| 135 | +        { | |
| 136 | + if (!isset($this->hooks[$class][$function][$mode])) | |
| 137 | +          { | |
| 138 | + continue; | |
| 139 | + } | |
| 140 | + | |
| 141 | + foreach ($this->hooks[$class][$function][$mode] as $hook) | |
| 142 | +          { | |
| 143 | + $this->hook_result[$class][$function] = call_user_func_array($hook, $arguments); | |
| 144 | + } | |
| 145 | + } | |
| 146 | + } | |
| 147 | + | |
| 148 | + $this->current_hook = NULL; | |
| 149 | + return true; | |
| 150 | + } | |
| 151 | + | |
| 152 | + $this->current_hook = NULL; | |
| 153 | + return false; | |
| 154 | + } | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * Get result from previously called functions/methods for the same hook | |
| 158 | + * | |
| 159 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 160 | +   * @return mixed False if nothing returned if there is no result, else array('result' => ... ) | |
| 161 | + */ | |
| 162 | + function previous_hook_result($definition) | |
| 163 | +  { | |
| 164 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 165 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 166 | + | |
| 167 | + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 168 | +    { | |
| 169 | +      return array('result' => $this->hook_result[$class][$function]); | |
| 170 | + } | |
| 171 | + | |
| 172 | + return false; | |
| 173 | + } | |
| 174 | + | |
| 175 | + /** | |
| 176 | + * Check if the called functions/methods returned something. | |
| 177 | + * | |
| 178 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 179 | + * @return bool True if results are there, false if not | |
| 180 | + */ | |
| 181 | + function hook_return($definition) | |
| 182 | +  { | |
| 183 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 184 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 185 | + | |
| 186 | + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 187 | +    { | |
| 188 | + return true; | |
| 189 | + } | |
| 190 | + | |
| 191 | + return false; | |
| 192 | + } | |
| 193 | + | |
| 194 | + /** | |
| 195 | + * Give actual result from called functions/methods back. | |
| 196 | + * | |
| 197 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 198 | + * @return mixed The result | |
| 199 | + */ | |
| 200 | + function hook_return_result($definition) | |
| 201 | +  { | |
| 202 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 203 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 204 | + | |
| 205 | + if (!empty($this->hooks[$class][$function]) && isset($this->hook_result[$class][$function])) | |
| 206 | +    { | |
| 207 | + $result = $this->hook_result[$class][$function]; | |
| 208 | + unset($this->hook_result[$class][$function]); | |
| 209 | + return $result; | |
| 210 | + } | |
| 211 | + | |
| 212 | + return; | |
| 213 | + } | |
| 214 | + | |
| 215 | + /** | |
| 216 | + * Add new function to the allowed hooks. | |
| 217 | + * | |
| 218 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 219 | + */ | |
| 220 | + function add_hook($definition) | |
| 221 | +  { | |
| 222 | + if (!is_array($definition)) | |
| 223 | +    { | |
| 224 | +      $definition = array('__global', $definition); | |
| 225 | + } | |
| 226 | + | |
| 227 | + $this->hooks[$definition[0]][$definition[1]] = array(); | |
| 228 | + } | |
| 229 | + | |
| 230 | + /** | |
| 231 | + * Remove function from the allowed hooks. | |
| 232 | + * | |
| 233 | + * @param mixed $definition Declaring function (with __FUNCTION__) or class with array(__CLASS__, __FUNCTION__) | |
| 234 | + */ | |
| 235 | + function remove_hook($definition) | |
| 236 | +  { | |
| 237 | + $class = (!is_array($definition)) ? '__global' : $definition[0]; | |
| 238 | + $function = (!is_array($definition)) ? $definition : $definition[1]; | |
| 239 | + | |
| 240 | + if (isset($this->hooks[$class][$function])) | |
| 241 | +    { | |
| 242 | + unset($this->hooks[$class][$function]); | |
| 243 | + | |
| 244 | + if (isset($this->hook_result[$class][$function])) | |
| 245 | +      { | |
| 246 | + unset($this->hook_result[$class][$function]); | |
| 247 | + } | |
| 248 | + } | |
| 249 | + } | |
| 250 | 250 | } | 
| @@ -25,11 +25,11 @@ discard block | ||
| 25 | 25 | class template | 
| 26 | 26 |  { | 
| 27 | 27 | /** variable that holds all the data we'll be substituting into | 
| 28 | - * the compiled templates. Takes form: | |
| 29 | - * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value | |
| 30 | - * if it's a root-level variable, it'll be like this: | |
| 31 | - * --> $this->_tpldata[.][0][varname] == value | |
| 32 | - */ | |
| 28 | + * the compiled templates. Takes form: | |
| 29 | + * --> $this->_tpldata[block][iteration#][child][iteration#][child2][iteration#][variablename] == value | |
| 30 | + * if it's a root-level variable, it'll be like this: | |
| 31 | + * --> $this->_tpldata[.][0][varname] == value | |
| 32 | + */ | |
| 33 | 33 |    var $_tpldata = array('.' => array(0 => array())); | 
| 34 | 34 | var $_rootref; | 
| 35 | 35 | // var $_block_counter = array(); | 
| @@ -79,9 +79,9 @@ discard block | ||
| 79 | 79 | } | 
| 80 | 80 | |
| 81 | 81 | /** | 
| 82 | - * Set template location | |
| 83 | - * @access public | |
| 84 | - */ | |
| 82 | + * Set template location | |
| 83 | + * @access public | |
| 84 | + */ | |
| 85 | 85 | function set_template() | 
| 86 | 86 |    { | 
| 87 | 87 | global $user; | 
| @@ -120,9 +120,9 @@ discard block | ||
| 120 | 120 | } | 
| 121 | 121 | |
| 122 | 122 | /** | 
| 123 | - * Set custom template location (able to use directory outside of phpBB) | |
| 124 | - * @access public | |
| 125 | - */ | |
| 123 | + * Set custom template location (able to use directory outside of phpBB) | |
| 124 | + * @access public | |
| 125 | + */ | |
| 126 | 126 | function set_custom_template($template_path, $template_name, $fallback_template_path = false) | 
| 127 | 127 |    { | 
| 128 | 128 | global $user; | 
| @@ -161,10 +161,10 @@ discard block | ||
| 161 | 161 | } | 
| 162 | 162 | |
| 163 | 163 | /** | 
| 164 | - * Sets the template filenames for handles. $filename_array | |
| 165 | - * should be a hash of handle => filename pairs. | |
| 166 | - * @access public | |
| 167 | - */ | |
| 164 | + * Sets the template filenames for handles. $filename_array | |
| 165 | + * should be a hash of handle => filename pairs. | |
| 166 | + * @access public | |
| 167 | + */ | |
| 168 | 168 | function set_filenames($filename_array) | 
| 169 | 169 |    { | 
| 170 | 170 | if (!is_array($filename_array)) | 
| @@ -191,9 +191,9 @@ discard block | ||
| 191 | 191 | } | 
| 192 | 192 | |
| 193 | 193 | /** | 
| 194 | - * Destroy template data set | |
| 195 | - * @access public | |
| 196 | - */ | |
| 194 | + * Destroy template data set | |
| 195 | + * @access public | |
| 196 | + */ | |
| 197 | 197 | function destroy() | 
| 198 | 198 |    { | 
| 199 | 199 |      $this->_tpldata = array('.' => array(0 => array())); | 
| @@ -201,9 +201,9 @@ discard block | ||
| 201 | 201 | } | 
| 202 | 202 | |
| 203 | 203 | /** | 
| 204 | - * Reset/empty complete block | |
| 205 | - * @access public | |
| 206 | - */ | |
| 204 | + * Reset/empty complete block | |
| 205 | + * @access public | |
| 206 | + */ | |
| 207 | 207 | function destroy_block_vars($blockname) | 
| 208 | 208 |    { | 
| 209 | 209 | if (strpos($blockname, '.') !== false) | 
| @@ -231,9 +231,9 @@ discard block | ||
| 231 | 231 | } | 
| 232 | 232 | |
| 233 | 233 | /** | 
| 234 | - * Display handle | |
| 235 | - * @access public | |
| 236 | - */ | |
| 234 | + * Display handle | |
| 235 | + * @access public | |
| 236 | + */ | |
| 237 | 237 | function display($handle, $include_once = true) | 
| 238 | 238 |    { | 
| 239 | 239 | /** | 
| @@ -275,9 +275,9 @@ discard block | ||
| 275 | 275 | } | 
| 276 | 276 | |
| 277 | 277 | /** | 
| 278 | - * Display the handle and assign the output to a template variable or return the compiled result. | |
| 279 | - * @access public | |
| 280 | - */ | |
| 278 | + * Display the handle and assign the output to a template variable or return the compiled result. | |
| 279 | + * @access public | |
| 280 | + */ | |
| 281 | 281 | function assign_display($handle, $template_var = '', $return_content = true, $include_once = false) | 
| 282 | 282 |    { | 
| 283 | 283 | ob_start(); | 
| @@ -295,9 +295,9 @@ discard block | ||
| 295 | 295 | } | 
| 296 | 296 | |
| 297 | 297 | /** | 
| 298 | - * Load a compiled template if possible, if not, recompile it | |
| 299 | - * @access private | |
| 300 | - */ | |
| 298 | + * Load a compiled template if possible, if not, recompile it | |
| 299 | + * @access private | |
| 300 | + */ | |
| 301 | 301 | function _tpl_load(&$handle) | 
| 302 | 302 |    { | 
| 303 | 303 | global $user, $config; | 
| @@ -475,9 +475,9 @@ discard block | ||
| 475 | 475 | } | 
| 476 | 476 | |
| 477 | 477 | /** | 
| 478 | - * Assign key variable pairs from an array | |
| 479 | - * @access public | |
| 480 | - */ | |
| 478 | + * Assign key variable pairs from an array | |
| 479 | + * @access public | |
| 480 | + */ | |
| 481 | 481 | function assign_vars($vararray) | 
| 482 | 482 |    { | 
| 483 | 483 | foreach ($vararray as $key => $val) | 
| @@ -489,9 +489,9 @@ discard block | ||
| 489 | 489 | } | 
| 490 | 490 | |
| 491 | 491 | /** | 
| 492 | - * Assign a single variable to a single key | |
| 493 | - * @access public | |
| 494 | - */ | |
| 492 | + * Assign a single variable to a single key | |
| 493 | + * @access public | |
| 494 | + */ | |
| 495 | 495 | function assign_var($varname, $varval) | 
| 496 | 496 |    { | 
| 497 | 497 | $this->_rootref[$varname] = $varval; | 
| @@ -500,9 +500,9 @@ discard block | ||
| 500 | 500 | } | 
| 501 | 501 | |
| 502 | 502 | /** | 
| 503 | - * Assign key variable pairs from an array to a specified block | |
| 504 | - * @access public | |
| 505 | - */ | |
| 503 | + * Assign key variable pairs from an array to a specified block | |
| 504 | + * @access public | |
| 505 | + */ | |
| 506 | 506 | function assign_block_vars($blockname, $vararray) | 
| 507 | 507 |    { | 
| 508 | 508 | if (strpos($blockname, '.') !== false) | 
| @@ -567,33 +567,33 @@ discard block | ||
| 567 | 567 | } | 
| 568 | 568 | |
| 569 | 569 | /** | 
| 570 | - * Change already assigned key variable pair (one-dimensional - single loop entry) | |
| 571 | - * | |
| 572 | - * An example of how to use this function: | |
| 573 | -  * {@example alter_block_array.php} | |
| 574 | - * | |
| 575 | - * @param string $blockname the blockname, for example 'loop' | |
| 576 | - * @param array $vararray the var array to insert/add or merge | |
| 577 | - * @param mixed $key Key to search for | |
| 578 | - * | |
| 579 | - * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] | |
| 580 | - * | |
| 581 | - * int: Position [the position to change or insert at directly given] | |
| 582 | - * | |
| 583 | - * If key is false the position is set to 0 | |
| 584 | - * If key is true the position is set to the last entry | |
| 585 | - * | |
| 586 | - * @param string $mode Mode to execute (valid modes are 'insert' and 'change') | |
| 587 | - * | |
| 588 | - * If insert, the vararray is inserted at the given position (position counting from zero). | |
| 589 | - * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). | |
| 590 | - * | |
| 591 | - * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) | |
| 592 | - * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) | |
| 593 | - * | |
| 594 | - * @return bool false on error, true on success | |
| 595 | - * @access public | |
| 596 | - */ | |
| 570 | + * Change already assigned key variable pair (one-dimensional - single loop entry) | |
| 571 | + * | |
| 572 | + * An example of how to use this function: | |
| 573 | +   * {@example alter_block_array.php} | |
| 574 | + * | |
| 575 | + * @param string $blockname the blockname, for example 'loop' | |
| 576 | + * @param array $vararray the var array to insert/add or merge | |
| 577 | + * @param mixed $key Key to search for | |
| 578 | + * | |
| 579 | + * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position] | |
| 580 | + * | |
| 581 | + * int: Position [the position to change or insert at directly given] | |
| 582 | + * | |
| 583 | + * If key is false the position is set to 0 | |
| 584 | + * If key is true the position is set to the last entry | |
| 585 | + * | |
| 586 | + * @param string $mode Mode to execute (valid modes are 'insert' and 'change') | |
| 587 | + * | |
| 588 | + * If insert, the vararray is inserted at the given position (position counting from zero). | |
| 589 | + * If change, the current block gets merged with the vararray (resulting in new key/value pairs be added and existing keys be replaced by the new value). | |
| 590 | + * | |
| 591 | + * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array) | |
| 592 | + * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) | |
| 593 | + * | |
| 594 | + * @return bool false on error, true on success | |
| 595 | + * @access public | |
| 596 | + */ | |
| 597 | 597 | function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert') | 
| 598 | 598 |    { | 
| 599 | 599 | if (strpos($blockname, '.') !== false) | 
| @@ -677,9 +677,9 @@ discard block | ||
| 677 | 677 | } | 
| 678 | 678 | |
| 679 | 679 | /** | 
| 680 | - * Include a separate template | |
| 681 | - * @access private | |
| 682 | - */ | |
| 680 | + * Include a separate template | |
| 681 | + * @access private | |
| 682 | + */ | |
| 683 | 683 | function _tpl_include($filename, $include = true) | 
| 684 | 684 |    { | 
| 685 | 685 | // This is used to access global vars | 
| @@ -709,9 +709,9 @@ discard block | ||
| 709 | 709 | } | 
| 710 | 710 | |
| 711 | 711 | /** | 
| 712 | - * Include a php-file | |
| 713 | - * @access private | |
| 714 | - */ | |
| 712 | + * Include a php-file | |
| 713 | + * @access private | |
| 714 | + */ | |
| 715 | 715 | function _php_include($filename) | 
| 716 | 716 |    { | 
| 717 | 717 | $file = $this->rootPhysical . $filename; | 
| @@ -726,9 +726,9 @@ discard block | ||
| 726 | 726 | } | 
| 727 | 727 | |
| 728 | 728 | /** | 
| 729 | - * Assign key variable pairs from an array with block support | |
| 730 | - * @access public | |
| 731 | - */ | |
| 729 | + * Assign key variable pairs from an array with block support | |
| 730 | + * @access public | |
| 731 | + */ | |
| 732 | 732 | function assign_recursive($values, $name = '') | 
| 733 | 733 |    { | 
| 734 | 734 | if(isset($values['.'])) | 
| @@ -96,9 +96,9 @@ discard block | ||
| 96 | 96 | |
| 97 | 97 | for ($Option = 10; $Option >= 0; $Option--) | 
| 98 | 98 |  { | 
| 99 | - $template->assign_block_vars('option', array( | |
| 100 | - 'VALUE' => $Option * 10, | |
| 101 | - )); | |
| 99 | +  $template->assign_block_vars('option', array( | |
| 100 | + 'VALUE' => $Option * 10, | |
| 101 | + )); | |
| 102 | 102 | } | 
| 103 | 103 | |
| 104 | 104 | $capsObj = new ResourceCalculations(); | 
| @@ -165,12 +165,12 @@ discard block | ||
| 165 | 165 | int_calc_storage_bar(RES_DEUTERIUM, $capsObj); | 
| 166 | 166 | |
| 167 | 167 | $template->assign_vars(array( | 
| 168 | - 'PLANET_NAME' => $planetrow['name'], | |
| 169 | - 'PLANET_TYPE' => $planetrow['planet_type'], | |
| 168 | + 'PLANET_NAME' => $planetrow['name'], | |
| 169 | + 'PLANET_TYPE' => $planetrow['planet_type'], | |
| 170 | 170 | |
| 171 | - 'PRODUCTION_LEVEL' => floor($capsObj->efficiency * 100), | |
| 171 | + 'PRODUCTION_LEVEL' => floor($capsObj->efficiency * 100), | |
| 172 | 172 | |
| 173 | - 'PAGE_HINT' => $lang['res_hint'], | |
| 173 | + 'PAGE_HINT' => $lang['res_hint'], | |
| 174 | 174 | )); | 
| 175 | 175 | |
| 176 | 176 | display($template, $lang['res_planet_production']); | 
| @@ -55,9 +55,9 @@ discard block | ||
| 55 | 55 | } | 
| 56 | 56 | |
| 57 | 57 | /** | 
| 58 | - * Load template source from file | |
| 59 | - * @access private | |
| 60 | - */ | |
| 58 | + * Load template source from file | |
| 59 | + * @access private | |
| 60 | + */ | |
| 61 | 61 | function _tpl_load_file($handle, $store_in_db = false) | 
| 62 | 62 |    { | 
| 63 | 63 | // Try and open template for read | 
| @@ -100,10 +100,10 @@ discard block | ||
| 100 | 100 | } | 
| 101 | 101 | |
| 102 | 102 | /** | 
| 103 | - * Remove any PHP tags that do not belong, these regular expressions are derived from | |
| 104 | - * the ones that exist in zend_language_scanner.l | |
| 105 | - * @access private | |
| 106 | - */ | |
| 103 | + * Remove any PHP tags that do not belong, these regular expressions are derived from | |
| 104 | + * the ones that exist in zend_language_scanner.l | |
| 105 | + * @access private | |
| 106 | + */ | |
| 107 | 107 | function remove_php_tags(&$code) | 
| 108 | 108 |    { | 
| 109 | 109 | // This matches the information gathered from the internal PHP lexer | 
| @@ -117,9 +117,9 @@ discard block | ||
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | 119 | /** | 
| 120 | - * The all seeing all doing compile method. Parts are inspired by or directly from Smarty | |
| 121 | - * @access private | |
| 122 | - */ | |
| 120 | + * The all seeing all doing compile method. Parts are inspired by or directly from Smarty | |
| 121 | + * @access private | |
| 122 | + */ | |
| 123 | 123 | function compile($code, $no_echo = false, $echo_var = '') | 
| 124 | 124 |    { | 
| 125 | 125 | global $config; | 
| @@ -290,9 +290,9 @@ discard block | ||
| 290 | 290 | } | 
| 291 | 291 | |
| 292 | 292 | /** | 
| 293 | - * Compile variables | |
| 294 | - * @access private | |
| 295 | - */ | |
| 293 | + * Compile variables | |
| 294 | + * @access private | |
| 295 | + */ | |
| 296 | 296 | function compile_var_tags(&$text_blocks) | 
| 297 | 297 |    { | 
| 298 | 298 | // including $lang variable | 
| @@ -365,9 +365,9 @@ discard block | ||
| 365 | 365 | } | 
| 366 | 366 | |
| 367 | 367 | /** | 
| 368 | - * Compile blocks | |
| 369 | - * @access private | |
| 370 | - */ | |
| 368 | + * Compile blocks | |
| 369 | + * @access private | |
| 370 | + */ | |
| 371 | 371 | function compile_tag_block($tag_args) | 
| 372 | 372 |    { | 
| 373 | 373 | $no_nesting = false; | 
| @@ -453,14 +453,14 @@ discard block | ||
| 453 | 453 |      $tag_template_php .= 'if ($_' . $tag_args . '_count) {'; | 
| 454 | 454 | |
| 455 | 455 | /** | 
| 456 | - * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory | |
| 457 | - * <code> | |
| 458 | - * if (!$offset) | |
| 459 | -    * { | |
| 460 | -    *   $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; | |
| 461 | - * } | |
| 462 | - * </code> | |
| 463 | - */ | |
| 456 | + * The following uses foreach for iteration instead of a for loop, foreach is faster but requires PHP to make a copy of the contents of the array which uses more memory | |
| 457 | + * <code> | |
| 458 | + * if (!$offset) | |
| 459 | +     * { | |
| 460 | +     *   $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){'; | |
| 461 | + * } | |
| 462 | + * </code> | |
| 463 | + */ | |
| 464 | 464 | |
| 465 | 465 |      $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){'; | 
| 466 | 466 | // $tag_template_php .= '$this->_block_counter["'. $tag_args . '"] = $_' . $tag_args . '_i;'; | 
| @@ -471,10 +471,10 @@ discard block | ||
| 471 | 471 | } | 
| 472 | 472 | |
| 473 | 473 | /** | 
| 474 | - * Compile IF tags - much of this is from Smarty with | |
| 475 | - * some adaptions for our block level methods | |
| 476 | - * @access private | |
| 477 | - */ | |
| 474 | + * Compile IF tags - much of this is from Smarty with | |
| 475 | + * some adaptions for our block level methods | |
| 476 | + * @access private | |
| 477 | + */ | |
| 478 | 478 | function compile_tag_if($tag_args, $elseif) | 
| 479 | 479 |    { | 
| 480 | 480 | // Tokenize args for 'if' tag. | 
| @@ -629,9 +629,9 @@ discard block | ||
| 629 | 629 | } | 
| 630 | 630 | |
| 631 | 631 | /** | 
| 632 | - * Compile DEFINE tags | |
| 633 | - * @access private | |
| 634 | - */ | |
| 632 | + * Compile DEFINE tags | |
| 633 | + * @access private | |
| 634 | + */ | |
| 635 | 635 | function compile_tag_define($tag_args, $op) | 
| 636 | 636 |    { | 
| 637 | 637 |      preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match); | 
| @@ -682,9 +682,9 @@ discard block | ||
| 682 | 682 | } | 
| 683 | 683 | |
| 684 | 684 | /** | 
| 685 | - * Compile INCLUDE tag | |
| 686 | - * @access private | |
| 687 | - */ | |
| 685 | + * Compile INCLUDE tag | |
| 686 | + * @access private | |
| 687 | + */ | |
| 688 | 688 | function compile_tag_include($tag_args) | 
| 689 | 689 |    { | 
| 690 | 690 | // Process dynamic includes | 
| @@ -697,19 +697,19 @@ discard block | ||
| 697 | 697 | } | 
| 698 | 698 | |
| 699 | 699 | /** | 
| 700 | - * Compile INCLUDE_PHP tag | |
| 701 | - * @access private | |
| 702 | - */ | |
| 700 | + * Compile INCLUDE_PHP tag | |
| 701 | + * @access private | |
| 702 | + */ | |
| 703 | 703 | function compile_tag_include_php($tag_args) | 
| 704 | 704 |    { | 
| 705 | 705 |      return "\$this->_php_include('$tag_args');"; | 
| 706 | 706 | } | 
| 707 | 707 | |
| 708 | 708 | /** | 
| 709 | - * parse expression | |
| 710 | - * This is from Smarty | |
| 711 | - * @access private | |
| 712 | - */ | |
| 709 | + * parse expression | |
| 710 | + * This is from Smarty | |
| 711 | + * @access private | |
| 712 | + */ | |
| 713 | 713 | function _parse_is_expr($is_arg, $tokens) | 
| 714 | 714 |    { | 
| 715 | 715 | $expr_end = 0; | 
| @@ -802,14 +802,14 @@ discard block | ||
| 802 | 802 | } | 
| 803 | 803 | |
| 804 | 804 | /** | 
| 805 | - * Generates a reference to the array of data values for the given | |
| 806 | - * (possibly nested) block namespace. This is a string of the form: | |
| 807 | - * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] | |
| 808 | - * | |
| 809 | - * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. | |
| 810 | - * NOTE: does not expect a trailing "." on the blockname. | |
| 811 | - * @access private | |
| 812 | - */ | |
| 805 | + * Generates a reference to the array of data values for the given | |
| 806 | + * (possibly nested) block namespace. This is a string of the form: | |
| 807 | + * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] | |
| 808 | + * | |
| 809 | + * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. | |
| 810 | + * NOTE: does not expect a trailing "." on the blockname. | |
| 811 | + * @access private | |
| 812 | + */ | |
| 813 | 813 | function generate_block_data_ref($blockname, $include_last_iterator, $defop = false) | 
| 814 | 814 |    { | 
| 815 | 815 | // Get an array of the blocks involved. | 
| @@ -845,9 +845,9 @@ discard block | ||
| 845 | 845 | } | 
| 846 | 846 | |
| 847 | 847 | /** | 
| 848 | - * Write compiled file to cache directory | |
| 849 | - * @access private | |
| 850 | - */ | |
| 848 | + * Write compiled file to cache directory | |
| 849 | + * @access private | |
| 850 | + */ | |
| 851 | 851 | function compile_write($handle, $data) | 
| 852 | 852 |    { | 
| 853 | 853 |      $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . DOT_PHP_EX; | 
| @@ -870,9 +870,9 @@ discard block | ||
| 870 | 870 | |
| 871 | 871 | // Gorlum's minifier BOF | 
| 872 | 872 | /** | 
| 873 | - * Minifies template w/i PHP code by removing extra spaces | |
| 874 | - * @access private | |
| 875 | - */ | |
| 873 | + * Minifies template w/i PHP code by removing extra spaces | |
| 874 | + * @access private | |
| 875 | + */ | |
| 876 | 876 | function minify($html) | 
| 877 | 877 |    { | 
| 878 | 878 | global $config; |