Completed
Branch trunk (230097)
by SuperNova.WS
32:07
created
classes/template.php 1 patch
Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
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();
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
   var $parsed = false;
61 61
 
62 62
   /**
63
-  * Set template location
64
-  * @access public
65
-  */
63
+   * Set template location
64
+   * @access public
65
+   */
66 66
   function set_template()
67 67
   {
68 68
     global $phpbb_root_path, $user;
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
   }
102 102
 
103 103
   /**
104
-  * Set custom template location (able to use directory outside of phpBB)
105
-  * @access public
106
-  */
104
+   * Set custom template location (able to use directory outside of phpBB)
105
+   * @access public
106
+   */
107 107
   function set_custom_template($template_path, $template_name, $fallback_template_path = false)
108 108
   {
109 109
     global $phpbb_root_path, $user;
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
   }
143 143
 
144 144
   /**
145
-  * Sets the template filenames for handles. $filename_array
146
-  * should be a hash of handle => filename pairs.
147
-  * @access public
148
-  */
145
+   * Sets the template filenames for handles. $filename_array
146
+   * should be a hash of handle => filename pairs.
147
+   * @access public
148
+   */
149 149
   function set_filenames($filename_array)
150 150
   {
151 151
     if (!is_array($filename_array))
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
   }
173 173
 
174 174
   /**
175
-  * Destroy template data set
176
-  * @access public
177
-  */
175
+   * Destroy template data set
176
+   * @access public
177
+   */
178 178
   function destroy()
179 179
   {
180 180
     $this->_tpldata = array('.' => array(0 => array()));
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
   }
183 183
 
184 184
   /**
185
-  * Reset/empty complete block
186
-  * @access public
187
-  */
185
+   * Reset/empty complete block
186
+   * @access public
187
+   */
188 188
   function destroy_block_vars($blockname)
189 189
   {
190 190
     if (strpos($blockname, '.') !== false)
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
   }
213 213
 
214 214
   /**
215
-  * Display handle
216
-  * @access public
217
-  */
215
+   * Display handle
216
+   * @access public
217
+   */
218 218
   function display($handle, $include_once = true)
219 219
   {
220 220
     global $user, $phpbb_hook, $lang, $config;
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
   }
249 249
 
250 250
   /**
251
-  * Display the handle and assign the output to a template variable or return the compiled result.
252
-  * @access public
253
-  */
251
+   * Display the handle and assign the output to a template variable or return the compiled result.
252
+   * @access public
253
+   */
254 254
   function assign_display($handle, $template_var = '', $return_content = true, $include_once = false)
255 255
   {
256 256
     ob_start();
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
   }
269 269
 
270 270
   /**
271
-  * Load a compiled template if possible, if not, recompile it
272
-  * @access private
273
-  */
271
+   * Load a compiled template if possible, if not, recompile it
272
+   * @access private
273
+   */
274 274
   function _tpl_load(&$handle)
275 275
   {
276 276
     global $user, $config;
@@ -453,9 +453,9 @@  discard block
 block discarded – undo
453 453
   }
454 454
 
455 455
   /**
456
-  * Assign key variable pairs from an array
457
-  * @access public
458
-  */
456
+   * Assign key variable pairs from an array
457
+   * @access public
458
+   */
459 459
   function assign_vars($vararray)
460 460
   {
461 461
     foreach ($vararray as $key => $val)
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
   }
468 468
 
469 469
   /**
470
-  * Assign a single variable to a single key
471
-  * @access public
472
-  */
470
+   * Assign a single variable to a single key
471
+   * @access public
472
+   */
473 473
   function assign_var($varname, $varval)
474 474
   {
475 475
     $this->_rootref[$varname] = $varval;
@@ -478,9 +478,9 @@  discard block
 block discarded – undo
478 478
   }
479 479
 
480 480
   /**
481
-  * Assign key variable pairs from an array to a specified block
482
-  * @access public
483
-  */
481
+   * Assign key variable pairs from an array to a specified block
482
+   * @access public
483
+   */
484 484
   function assign_block_vars($blockname, $vararray)
485 485
   {
486 486
     if (strpos($blockname, '.') !== false)
@@ -545,33 +545,33 @@  discard block
 block discarded – undo
545 545
   }
546 546
 
547 547
   /**
548
-  * Change already assigned key variable pair (one-dimensional - single loop entry)
549
-  *
550
-  * An example of how to use this function:
551
-  * {@example alter_block_array.php}
552
-  *
553
-  * @param  string  $blockname  the blockname, for example 'loop'
554
-  * @param  array $vararray the var array to insert/add or merge
555
-  * @param  mixed $key    Key to search for
556
-  *
557
-  * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
558
-  *
559
-  * int: Position [the position to change or insert at directly given]
560
-  *
561
-  * If key is false the position is set to 0
562
-  * If key is true the position is set to the last entry
563
-  *
564
-  * @param  string  $mode   Mode to execute (valid modes are 'insert' and 'change')
565
-  *
566
-  * If insert, the vararray is inserted at the given position (position counting from zero).
567
-  * 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).
568
-  *
569
-  * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
570
-  * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
571
-  *
572
-  * @return bool false on error, true on success
573
-  * @access public
574
-  */
548
+   * Change already assigned key variable pair (one-dimensional - single loop entry)
549
+   *
550
+   * An example of how to use this function:
551
+   * {@example alter_block_array.php}
552
+   *
553
+   * @param  string  $blockname  the blockname, for example 'loop'
554
+   * @param  array $vararray the var array to insert/add or merge
555
+   * @param  mixed $key    Key to search for
556
+   *
557
+   * array: KEY => VALUE [the key/value pair to search for within the loop to determine the correct position]
558
+   *
559
+   * int: Position [the position to change or insert at directly given]
560
+   *
561
+   * If key is false the position is set to 0
562
+   * If key is true the position is set to the last entry
563
+   *
564
+   * @param  string  $mode   Mode to execute (valid modes are 'insert' and 'change')
565
+   *
566
+   * If insert, the vararray is inserted at the given position (position counting from zero).
567
+   * 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).
568
+   *
569
+   * Since counting begins by zero, inserting at the last position will result in this array: array(vararray, last positioned array)
570
+   * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars)
571
+   *
572
+   * @return bool false on error, true on success
573
+   * @access public
574
+   */
575 575
   function alter_block_array($blockname, $vararray, $key = false, $mode = 'insert')
576 576
   {
577 577
     if (strpos($blockname, '.') !== false)
@@ -655,9 +655,9 @@  discard block
 block discarded – undo
655 655
   }
656 656
 
657 657
   /**
658
-  * Include a separate template
659
-  * @access private
660
-  */
658
+   * Include a separate template
659
+   * @access private
660
+   */
661 661
   function _tpl_include($filename, $include = true)
662 662
   {
663 663
     global $lang, $config;
@@ -686,9 +686,9 @@  discard block
 block discarded – undo
686 686
   }
687 687
 
688 688
   /**
689
-  * Include a php-file
690
-  * @access private
691
-  */
689
+   * Include a php-file
690
+   * @access private
691
+   */
692 692
   function _php_include($filename)
693 693
   {
694 694
     global $phpbb_root_path;
@@ -705,9 +705,9 @@  discard block
 block discarded – undo
705 705
   }
706 706
 
707 707
   /**
708
-  * Assign key variable pairs from an array with block support
709
-  * @access public
710
-  */
708
+   * Assign key variable pairs from an array with block support
709
+   * @access public
710
+   */
711 711
   function assign_recursive($values, $name = '')
712 712
   {
713 713
     if(isset($values['.']))
Please login to merge, or discard this patch.
galaxy.php 1 patch
Indentation   +94 added lines, -94 removed lines patch added patch discarded remove patch
@@ -237,53 +237,53 @@  discard block
 block discarded – undo
237 237
   $birthday_array = $uni_galaxyRowUser['user_birthday'] ? date_parse($uni_galaxyRowUser['user_birthday']) : array();
238 238
   $user_activity = floor((SN_TIME_NOW - $uni_galaxyRowUser['onlinetime'])/(60*60*24));
239 239
   $template->assign_block_vars('galaxyrow', array(
240
-     'PLANET_ID'        => $uni_galaxyRowPlanet['id'],
241
-     'PLANET_NUM'       => $Planet,
242
-     'PLANET_NAME'      => $uni_galaxyRowPlanet['name'],
243
-     'PLANET_NAME_JS'   => js_safe_string($uni_galaxyRowPlanet['name']),
244
-     'PLANET_DESTROYED' => $uni_galaxyRowPlanet["destruyed"],
245
-     'PLANET_TYPE'      => $uni_galaxyRowPlanet["planet_type"],
246
-     'PLANET_ACTIVITY'  => floor((SN_TIME_NOW - $uni_galaxyRowPlanet['last_update'])/60),
247
-     'PLANET_IMAGE'     => $uni_galaxyRowPlanet['image'],
248
-     'PLANET_FLEET_ID'  => $planet_fleet_id,
249
-     'PLANET_DIAMETER'  => number_format($uni_galaxyRowPlanet['diameter'], 0, '', '.'),
250
-
251
-     'MOON_NAME_JS'   => js_safe_string($uni_galaxyRowMoon['name']),
252
-     'MOON_IMAGE'     => $uni_galaxyRowMoon['image'],
253
-     'MOON_DIAMETER'  => number_format($uni_galaxyRowMoon['diameter'], 0, '', '.'),
254
-     'MOON_TEMP'      => number_format($uni_galaxyRowMoon['temp_min'], 0, '', '.'),
255
-     'MOON_FLEET_ID'  => $moon_fleet_id,
256
-
257
-     'DEBRIS'         => $uni_galaxyRowPlanet['debris'],
258
-     'DEBRIS_METAL'   => $uni_galaxyRowPlanet['debris_metal'],
259
-     'DEBRIS_CRYSTAL' => $uni_galaxyRowPlanet['debris_crystal'],
260
-     'DEBRIS_REST_PERCENT' => $uni_galaxyRowPlanet["debris_rest_percent"],
261
-
262
-     'DEBRIS_RESERVED' => $uni_galaxyRowPlanet['debris_reserved'],
263
-     'DEBRIS_RESERVED_PERCENT' => $uni_galaxyRowPlanet['debris_reserved_percent'],
264
-     'DEBRIS_WILL_GATHER' => $uni_galaxyRowPlanet['debris_will_gather'],
265
-     'DEBRIS_WILL_GATHER_PERCENT' => $uni_galaxyRowPlanet['debris_will_gather_percent'],
266
-     'DEBRIS_GATHER_TOTAL' => $uni_galaxyRowPlanet['debris_gather_total'],
267
-     'DEBRIS_GATHER_TOTAL_PERCENT' => $uni_galaxyRowPlanet['debris_gather_total_percent'],
268
-
269
-     'USER_ID'       => $uni_galaxyRowUser['id'],
270
-     'USER_NAME'     => player_nick_render_to_html($uni_galaxyRowUser),
271
-     'USER_NAME_JS'  => js_safe_string(player_nick_render_to_html($uni_galaxyRowUser)),
272
-     'USER_RANK'     => in_array($uni_galaxyRowUser['id'], $user_skip_list) ? '-' : $uni_galaxyRowUser['total_rank'],
273
-     'USER_BANNED'   => $uni_galaxyRowUser['banaday'],
274
-     'USER_VACATION' => $uni_galaxyRowUser['vacation'],
275
-     'USER_ACTIVITY' => $user_activity,
276
-     'USER_ATTACKABLE' => $user_activity >= 7,
277
-     'USER_INACTIVE' => $user_activity >= 28,
278
-     'USER_PROTECTED'=> $RowUserPoints <= classSupernova::$config->game_noob_points,
279
-     'USER_NOOB'     => $RowUserPoints * classSupernova::$config->game_noob_factor < $CurrentPoints && classSupernova::$config->game_noob_factor,
280
-     'USER_STRONG'   => $CurrentPoints * classSupernova::$config->game_noob_factor < $RowUserPoints && classSupernova::$config->game_noob_factor,
281
-     'USER_AUTH'     => $uni_galaxyRowUser['authlevel'],
282
-     'USER_ADMIN'    => $lang['user_level_shortcut'][$uni_galaxyRowUser['authlevel']],
283
-     'USER_BIRTHDAY' => $birthday_array['month'] == $time_now_parsed['mon'] && $birthday_array['day'] == $time_now_parsed['mday'] ? date(FMT_DATE, SN_TIME_NOW) : 0,
284
-
285
-     'ALLY_ID'       => $uni_galaxyRowUser['ally_id'],
286
-     'ALLY_TAG'      => $uni_galaxyRowUser['ally_tag'],
240
+      'PLANET_ID'        => $uni_galaxyRowPlanet['id'],
241
+      'PLANET_NUM'       => $Planet,
242
+      'PLANET_NAME'      => $uni_galaxyRowPlanet['name'],
243
+      'PLANET_NAME_JS'   => js_safe_string($uni_galaxyRowPlanet['name']),
244
+      'PLANET_DESTROYED' => $uni_galaxyRowPlanet["destruyed"],
245
+      'PLANET_TYPE'      => $uni_galaxyRowPlanet["planet_type"],
246
+      'PLANET_ACTIVITY'  => floor((SN_TIME_NOW - $uni_galaxyRowPlanet['last_update'])/60),
247
+      'PLANET_IMAGE'     => $uni_galaxyRowPlanet['image'],
248
+      'PLANET_FLEET_ID'  => $planet_fleet_id,
249
+      'PLANET_DIAMETER'  => number_format($uni_galaxyRowPlanet['diameter'], 0, '', '.'),
250
+
251
+      'MOON_NAME_JS'   => js_safe_string($uni_galaxyRowMoon['name']),
252
+      'MOON_IMAGE'     => $uni_galaxyRowMoon['image'],
253
+      'MOON_DIAMETER'  => number_format($uni_galaxyRowMoon['diameter'], 0, '', '.'),
254
+      'MOON_TEMP'      => number_format($uni_galaxyRowMoon['temp_min'], 0, '', '.'),
255
+      'MOON_FLEET_ID'  => $moon_fleet_id,
256
+
257
+      'DEBRIS'         => $uni_galaxyRowPlanet['debris'],
258
+      'DEBRIS_METAL'   => $uni_galaxyRowPlanet['debris_metal'],
259
+      'DEBRIS_CRYSTAL' => $uni_galaxyRowPlanet['debris_crystal'],
260
+      'DEBRIS_REST_PERCENT' => $uni_galaxyRowPlanet["debris_rest_percent"],
261
+
262
+      'DEBRIS_RESERVED' => $uni_galaxyRowPlanet['debris_reserved'],
263
+      'DEBRIS_RESERVED_PERCENT' => $uni_galaxyRowPlanet['debris_reserved_percent'],
264
+      'DEBRIS_WILL_GATHER' => $uni_galaxyRowPlanet['debris_will_gather'],
265
+      'DEBRIS_WILL_GATHER_PERCENT' => $uni_galaxyRowPlanet['debris_will_gather_percent'],
266
+      'DEBRIS_GATHER_TOTAL' => $uni_galaxyRowPlanet['debris_gather_total'],
267
+      'DEBRIS_GATHER_TOTAL_PERCENT' => $uni_galaxyRowPlanet['debris_gather_total_percent'],
268
+
269
+      'USER_ID'       => $uni_galaxyRowUser['id'],
270
+      'USER_NAME'     => player_nick_render_to_html($uni_galaxyRowUser),
271
+      'USER_NAME_JS'  => js_safe_string(player_nick_render_to_html($uni_galaxyRowUser)),
272
+      'USER_RANK'     => in_array($uni_galaxyRowUser['id'], $user_skip_list) ? '-' : $uni_galaxyRowUser['total_rank'],
273
+      'USER_BANNED'   => $uni_galaxyRowUser['banaday'],
274
+      'USER_VACATION' => $uni_galaxyRowUser['vacation'],
275
+      'USER_ACTIVITY' => $user_activity,
276
+      'USER_ATTACKABLE' => $user_activity >= 7,
277
+      'USER_INACTIVE' => $user_activity >= 28,
278
+      'USER_PROTECTED'=> $RowUserPoints <= classSupernova::$config->game_noob_points,
279
+      'USER_NOOB'     => $RowUserPoints * classSupernova::$config->game_noob_factor < $CurrentPoints && classSupernova::$config->game_noob_factor,
280
+      'USER_STRONG'   => $CurrentPoints * classSupernova::$config->game_noob_factor < $RowUserPoints && classSupernova::$config->game_noob_factor,
281
+      'USER_AUTH'     => $uni_galaxyRowUser['authlevel'],
282
+      'USER_ADMIN'    => $lang['user_level_shortcut'][$uni_galaxyRowUser['authlevel']],
283
+      'USER_BIRTHDAY' => $birthday_array['month'] == $time_now_parsed['mon'] && $birthday_array['day'] == $time_now_parsed['mday'] ? date(FMT_DATE, SN_TIME_NOW) : 0,
284
+
285
+      'ALLY_ID'       => $uni_galaxyRowUser['ally_id'],
286
+      'ALLY_TAG'      => $uni_galaxyRowUser['ally_tag'],
287 287
   ));
288 288
 }
289 289
 
@@ -349,53 +349,53 @@  discard block
 block discarded – undo
349 349
 $system_name = doquery("select `universe_name` from `{{universe}}` where `universe_galaxy` = {$uni_galaxy} and `universe_system` = {$uni_system} limit 1;", true);
350 350
 
351 351
 $template->assign_vars(array(
352
-     'rows'                => $Result,
353
-     'userCount'           => classSupernova::$config->users_amount,
354
-     'ALLY_COUNT'          => $ally_count['ally_count'],
355
-     'PLANET_EXPEDITION'   => classSupernova::$config->game_maxPlanet + 1,
356
-     'curPlanetID'         => $planetrow['id'],
357
-     'curPlanetG'          => $planetrow['galaxy'],
358
-     'curPlanetS'          => $planetrow['system'],
359
-     'curPlanetP'          => $planetrow['planet'],
360
-     'curPlanetPT'         => $planetrow['planet_type'],
361
-     'deathStars'          => mrc_get_level($user, $planetrow, SHIP_HUGE_DEATH_STAR, false, true),
362
-     'galaxy'              => $uni_galaxy,
363
-     'system'              => $uni_system,
364
-     'planet'              => $planet,
365
-     'MIPs'                => round($CurrentMIP),
366
-     'MODE'                => $mode,
367
-     'planets'             => $planetcount,
368
-     'SPs'                 => pretty_number(mrc_get_level($user, $planetrow, SHIP_SPY, false, true)),
369
-     'SHOW_ADMIN'          => SHOW_ADMIN,
370
-     'fleet_count'         => $flying_fleet_count,
371
-     'fleet_max'           => $fleetmax,
372
-     'ALLY_ID'             => $user['ally_id'],
373
-     'USER_ID'             => $user['id'],
374
-     'ACT_SPIO'            => classSupernova::$user_options[PLAYER_OPTION_FLEET_SPY_DEFAULT],
375
-     'ACT_SPY'             => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_SPYING],
376
-     'ACT_WRITE'           => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PM],
377
-     'ACT_STATISTICS'      => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_STATS],
378
-     'ACT_INFO'            => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PROFILE],
379
-     'ACT_FRIEND'          => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_BUDDY],
380
-     'opt_uni_tooltip_time'=> classSupernova::$user_options[PLAYER_OPTION_TOOLTIP_DELAY],
381
-     'opt_uni_avatar_user' => $user['opt_uni_avatar_user'],
382
-     'opt_uni_avatar_ally' => $user['opt_uni_avatar_ally'],
383
-     'ACT_MISSILE'         => $is_missile,
384
-     'PLANET_PHALANX'      => $HavePhalanx && $uni_galaxy == $CurrentGalaxy && $uni_system >= $CurrentSystem - $PhalanxRange && $uni_system <= $CurrentSystem + $PhalanxRange,
385
-     'PAGE_HINT'           => $lang['gal_sys_hint'],
386
-     'PLANET_RECYCLERS'    => $planet_recyclers_orbiting,
387
-     'PLANET_RECYCLERS_TEXT' => pretty_number($planet_recyclers_orbiting),
388
-     'GALAXY_NAME'         => $galaxy_name['universe_name'],
389
-     'SYSTEM_NAME'         => $system_name['universe_name'],
390
-     'COL_SPAN'            => $colspan + 9,
391
-     'COL_SPAN_PLUS'       => $colspan + 3,
392
-
393
-     'COL_SPAN_NEW'        => $colspan + 4,
394
-     'COL_SPAN_NEW_COLONIZE' => $colspan - 2,
395
-
396
-     'PLAYER_OPTION_UNIVERSE_OLD' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_OLD],
397
-     'PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE],
398
-   )
352
+      'rows'                => $Result,
353
+      'userCount'           => classSupernova::$config->users_amount,
354
+      'ALLY_COUNT'          => $ally_count['ally_count'],
355
+      'PLANET_EXPEDITION'   => classSupernova::$config->game_maxPlanet + 1,
356
+      'curPlanetID'         => $planetrow['id'],
357
+      'curPlanetG'          => $planetrow['galaxy'],
358
+      'curPlanetS'          => $planetrow['system'],
359
+      'curPlanetP'          => $planetrow['planet'],
360
+      'curPlanetPT'         => $planetrow['planet_type'],
361
+      'deathStars'          => mrc_get_level($user, $planetrow, SHIP_HUGE_DEATH_STAR, false, true),
362
+      'galaxy'              => $uni_galaxy,
363
+      'system'              => $uni_system,
364
+      'planet'              => $planet,
365
+      'MIPs'                => round($CurrentMIP),
366
+      'MODE'                => $mode,
367
+      'planets'             => $planetcount,
368
+      'SPs'                 => pretty_number(mrc_get_level($user, $planetrow, SHIP_SPY, false, true)),
369
+      'SHOW_ADMIN'          => SHOW_ADMIN,
370
+      'fleet_count'         => $flying_fleet_count,
371
+      'fleet_max'           => $fleetmax,
372
+      'ALLY_ID'             => $user['ally_id'],
373
+      'USER_ID'             => $user['id'],
374
+      'ACT_SPIO'            => classSupernova::$user_options[PLAYER_OPTION_FLEET_SPY_DEFAULT],
375
+      'ACT_SPY'             => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_SPYING],
376
+      'ACT_WRITE'           => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PM],
377
+      'ACT_STATISTICS'      => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_STATS],
378
+      'ACT_INFO'            => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_PROFILE],
379
+      'ACT_FRIEND'          => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_ICON_BUDDY],
380
+      'opt_uni_tooltip_time'=> classSupernova::$user_options[PLAYER_OPTION_TOOLTIP_DELAY],
381
+      'opt_uni_avatar_user' => $user['opt_uni_avatar_user'],
382
+      'opt_uni_avatar_ally' => $user['opt_uni_avatar_ally'],
383
+      'ACT_MISSILE'         => $is_missile,
384
+      'PLANET_PHALANX'      => $HavePhalanx && $uni_galaxy == $CurrentGalaxy && $uni_system >= $CurrentSystem - $PhalanxRange && $uni_system <= $CurrentSystem + $PhalanxRange,
385
+      'PAGE_HINT'           => $lang['gal_sys_hint'],
386
+      'PLANET_RECYCLERS'    => $planet_recyclers_orbiting,
387
+      'PLANET_RECYCLERS_TEXT' => pretty_number($planet_recyclers_orbiting),
388
+      'GALAXY_NAME'         => $galaxy_name['universe_name'],
389
+      'SYSTEM_NAME'         => $system_name['universe_name'],
390
+      'COL_SPAN'            => $colspan + 9,
391
+      'COL_SPAN_PLUS'       => $colspan + 3,
392
+
393
+      'COL_SPAN_NEW'        => $colspan + 4,
394
+      'COL_SPAN_NEW_COLONIZE' => $colspan - 2,
395
+
396
+      'PLAYER_OPTION_UNIVERSE_OLD' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_OLD],
397
+      'PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE' => classSupernova::$user_options[PLAYER_OPTION_UNIVERSE_DISABLE_COLONIZE],
398
+    )
399 399
 );
400 400
 
401 401
 display(parsetemplate($template), $lang['sys_universe'], true, '', false);
Please login to merge, or discard this patch.
classes/template_compile.php 1 patch
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -46,17 +46,17 @@  discard block
 block discarded – undo
46 46
   var $block_else_level = array();
47 47
 
48 48
   /**
49
-  * constuctor
50
-  */
49
+   * constuctor
50
+   */
51 51
   function template_compile(&$template)
52 52
   {
53 53
     $this->template = &$template;
54 54
   }
55 55
 
56 56
   /**
57
-  * Load template source from file
58
-  * @access private
59
-  */
57
+   * Load template source from file
58
+   * @access private
59
+   */
60 60
   function _tpl_load_file($handle, $store_in_db = false)
61 61
   {
62 62
     // Try and open template for read
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
   }
100 100
 
101 101
   /**
102
-  * Remove any PHP tags that do not belong, these regular expressions are derived from
103
-  * the ones that exist in zend_language_scanner.l
104
-  * @access private
105
-  */
102
+   * Remove any PHP tags that do not belong, these regular expressions are derived from
103
+   * the ones that exist in zend_language_scanner.l
104
+   * @access private
105
+   */
106 106
   function remove_php_tags(&$code)
107 107
   {
108 108
     // This matches the information gathered from the internal PHP lexer
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
   }
117 117
 
118 118
   /**
119
-  * The all seeing all doing compile method. Parts are inspired by or directly from Smarty
120
-  * @access private
121
-  */
119
+   * The all seeing all doing compile method. Parts are inspired by or directly from Smarty
120
+   * @access private
121
+   */
122 122
   function compile($code, $no_echo = false, $echo_var = '')
123 123
   {
124 124
     global $config;
@@ -289,9 +289,9 @@  discard block
 block discarded – undo
289 289
   }
290 290
 
291 291
   /**
292
-  * Compile variables
293
-  * @access private
294
-  */
292
+   * Compile variables
293
+   * @access private
294
+   */
295 295
   function compile_var_tags(&$text_blocks)
296 296
   {
297 297
     // including $lang variable
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
   }
355 355
 
356 356
   /**
357
-  * Compile blocks
358
-  * @access private
359
-  */
357
+   * Compile blocks
358
+   * @access private
359
+   */
360 360
   function compile_tag_block($tag_args)
361 361
   {
362 362
     $no_nesting = false;
@@ -442,14 +442,14 @@  discard block
 block discarded – undo
442 442
     $tag_template_php .= 'if ($_' . $tag_args . '_count) {';
443 443
 
444 444
     /**
445
-    * 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
446
-    * <code>
447
-    * if (!$offset)
448
-    * {
449
-    *   $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){';
450
-    * }
451
-    * </code>
452
-    */
445
+     * 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
446
+     * <code>
447
+     * if (!$offset)
448
+     * {
449
+     *   $tag_template_php .= 'foreach (' . $varref . ' as $_' . $tag_args . '_i => $_' . $tag_args . '_val){';
450
+     * }
451
+     * </code>
452
+     */
453 453
 
454 454
     $tag_template_php .= 'for ($_' . $tag_args . '_i = ' . $loop_start . '; $_' . $tag_args . '_i < ' . $loop_end . '; ++$_' . $tag_args . '_i){';
455 455
 //    $tag_template_php .= '$this->_block_counter["'. $tag_args . '"] = $_' . $tag_args . '_i;';
@@ -460,10 +460,10 @@  discard block
 block discarded – undo
460 460
   }
461 461
 
462 462
   /**
463
-  * Compile IF tags - much of this is from Smarty with
464
-  * some adaptions for our block level methods
465
-  * @access private
466
-  */
463
+   * Compile IF tags - much of this is from Smarty with
464
+   * some adaptions for our block level methods
465
+   * @access private
466
+   */
467 467
   function compile_tag_if($tag_args, $elseif)
468 468
   {
469 469
     // Tokenize args for 'if' tag.
@@ -618,9 +618,9 @@  discard block
 block discarded – undo
618 618
   }
619 619
 
620 620
   /**
621
-  * Compile DEFINE tags
622
-  * @access private
623
-  */
621
+   * Compile DEFINE tags
622
+   * @access private
623
+   */
624 624
   function compile_tag_define($tag_args, $op)
625 625
   {
626 626
     preg_match('#^((?:[a-z0-9\-_]+\.)+)?\$(?=[A-Z])([A-Z0-9_\-]*)(?: = (\'?)([^\']*)(\'?))?$#', $tag_args, $match);
@@ -671,9 +671,9 @@  discard block
 block discarded – undo
671 671
   }
672 672
 
673 673
   /**
674
-  * Compile INCLUDE tag
675
-  * @access private
676
-  */
674
+   * Compile INCLUDE tag
675
+   * @access private
676
+   */
677 677
   function compile_tag_include($tag_args)
678 678
   {
679 679
     // Process dynamic includes
@@ -686,19 +686,19 @@  discard block
 block discarded – undo
686 686
   }
687 687
 
688 688
   /**
689
-  * Compile INCLUDE_PHP tag
690
-  * @access private
691
-  */
689
+   * Compile INCLUDE_PHP tag
690
+   * @access private
691
+   */
692 692
   function compile_tag_include_php($tag_args)
693 693
   {
694 694
     return "\$this->_php_include('$tag_args');";
695 695
   }
696 696
 
697 697
   /**
698
-  * parse expression
699
-  * This is from Smarty
700
-  * @access private
701
-  */
698
+   * parse expression
699
+   * This is from Smarty
700
+   * @access private
701
+   */
702 702
   function _parse_is_expr($is_arg, $tokens)
703 703
   {
704 704
     $expr_end = 0;
@@ -763,13 +763,13 @@  discard block
 block discarded – undo
763 763
   }
764 764
 
765 765
   /**
766
-  * Generates a reference to the given variable inside the given (possibly nested)
767
-  * block namespace. This is a string of the form:
768
-  * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
769
-  * It's ready to be inserted into an "echo" line in one of the templates.
770
-  * NOTE: expects a trailing "." on the namespace.
771
-  * @access private
772
-  */
766
+   * Generates a reference to the given variable inside the given (possibly nested)
767
+   * block namespace. This is a string of the form:
768
+   * ' . $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . '
769
+   * It's ready to be inserted into an "echo" line in one of the templates.
770
+   * NOTE: expects a trailing "." on the namespace.
771
+   * @access private
772
+   */
773 773
   function generate_block_varref($namespace, $varname, $echo = true, $defop = false)
774 774
   {
775 775
     // Strip the trailing period.
@@ -787,14 +787,14 @@  discard block
 block discarded – undo
787 787
   }
788 788
 
789 789
   /**
790
-  * Generates a reference to the array of data values for the given
791
-  * (possibly nested) block namespace. This is a string of the form:
792
-  * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
793
-  *
794
-  * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
795
-  * NOTE: does not expect a trailing "." on the blockname.
796
-  * @access private
797
-  */
790
+   * Generates a reference to the array of data values for the given
791
+   * (possibly nested) block namespace. This is a string of the form:
792
+   * $this->_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN']
793
+   *
794
+   * If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above.
795
+   * NOTE: does not expect a trailing "." on the blockname.
796
+   * @access private
797
+   */
798 798
   function generate_block_data_ref($blockname, $include_last_iterator, $defop = false)
799 799
   {
800 800
     // Get an array of the blocks involved.
@@ -830,9 +830,9 @@  discard block
 block discarded – undo
830 830
   }
831 831
 
832 832
   /**
833
-  * Write compiled file to cache directory
834
-  * @access private
835
-  */
833
+   * Write compiled file to cache directory
834
+   * @access private
835
+   */
836 836
   function compile_write($handle, $data)
837 837
   {
838 838
     $filename = $this->template->cachepath . str_replace('/', '.', $this->template->filename[$handle]) . DOT_PHP_EX;
@@ -855,9 +855,9 @@  discard block
 block discarded – undo
855 855
 
856 856
   // Gorlum's minifier BOF
857 857
   /**
858
-  * Minifies template w/i PHP code by removing extra spaces
859
-  * @access private
860
-  */
858
+   * Minifies template w/i PHP code by removing extra spaces
859
+   * @access private
860
+   */
861 861
   function minify($html)
862 862
   {
863 863
     global $config;
Please login to merge, or discard this patch.
classes/classCache.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
       if(self::$mode === CACHER_NOT_INIT) {
60 60
         self::$mode = CACHER_NO_CACHE;
61 61
         if(!self::$data) {
62
-         self::$data = array();
62
+          self::$data = array();
63 63
         }
64 64
       }
65 65
     }
Please login to merge, or discard this patch.