diff --git a/admin/Default/1.6/universe_create.php b/admin/Default/1.6/universe_create.php index 30bcce575..4bbbe0873 100644 --- a/admin/Default/1.6/universe_create.php +++ b/admin/Default/1.6/universe_create.php @@ -24,5 +24,5 @@ while ($db->nextRecord()) { $games[] = SmrGame::getGame($db->getInt('game_id')); } -$template->assignByRef('EditGames',$games); +$template->assign('EditGames',$games); ?> diff --git a/admin/Default/1.6/universe_create_locations.php b/admin/Default/1.6/universe_create_locations.php index 946031da8..ce5a4f354 100644 --- a/admin/Default/1.6/universe_create_locations.php +++ b/admin/Default/1.6/universe_create_locations.php @@ -17,10 +17,10 @@ $totalLocs[$sectorLocation->getTypeID()]++; } unset($sectorLocation); } unset($sector); -$template->assignByRef('TotalLocs', $totalLocs); +$template->assign('TotalLocs', $totalLocs); $galaxy =& SmrGalaxy::getGalaxy($var['game_id'],$var['gal_on']); -$template->assignByRef('Galaxy', $galaxy); +$template->assign('Galaxy', $galaxy); // Though we expect a location to be only in one category, it is possible to // edit a location in the Admin Tools so that it is in two or more categories. @@ -87,8 +87,8 @@ public function added($locID) { $locText[$location->getTypeID()] = $location->getName() . $extra; } unset($location); -$template->assignByRef('LocText', $locText); -$template->assignByRef('LocTypes', $categories->locTypes); +$template->assign('LocText', $locText); +$template->assign('LocTypes', $categories->locTypes); // Form to make location changes $container = create_container('1.6/universe_create_save_processing.php', diff --git a/admin/Default/1.6/universe_create_planets.php b/admin/Default/1.6/universe_create_planets.php index 76d7532ee..9c78d5a75 100644 --- a/admin/Default/1.6/universe_create_planets.php +++ b/admin/Default/1.6/universe_create_planets.php @@ -7,7 +7,7 @@ while ($db->nextRecord()) { $allowedTypes[$db->getInt('planet_type_id')] = $db->getField('planet_type_name'); } -$template->assignByRef('AllowedTypes', $allowedTypes); +$template->assign('AllowedTypes', $allowedTypes); // Initialize all planet counts to zero $numberOfPlanets = array(); @@ -24,8 +24,8 @@ } } -$template->assignByRef('Galaxy', $galaxy); -$template->assignByRef('NumberOfPlanets', $numberOfPlanets); +$template->assign('Galaxy', $galaxy); +$template->assign('NumberOfPlanets', $numberOfPlanets); $numberOfNpcPlanets = (isset($planet_info['NPC']) ? $planet_info['NPC'] : 0); $template->assign('NumberOfNpcPlanets', $numberOfNpcPlanets); diff --git a/admin/Default/1.6/universe_create_sectors.php b/admin/Default/1.6/universe_create_sectors.php index aeafa64e5..72d7a8a68 100644 --- a/admin/Default/1.6/universe_create_sectors.php +++ b/admin/Default/1.6/universe_create_sectors.php @@ -27,10 +27,10 @@ } -$template->assignByRef('Galaxy', $galaxy); -$template->assignByRef('Galaxies', $galaxies); -$template->assignByRef('MapSectors',$mapSectors); -$template->assignByRef('Message',$var['message']); +$template->assign('Galaxy', $galaxy); +$template->assign('Galaxies', $galaxies); +$template->assign('MapSectors',$mapSectors); +$template->assign('Message',$var['message']); SmrSession::updateVar('message',null); // Only show message once if (isset($_REQUEST['connect']) && $_REQUEST['connect'] > 0) { diff --git a/admin/Default/account_edit.php b/admin/Default/account_edit.php index d616cf1c9..8ee2496eb 100644 --- a/admin/Default/account_edit.php +++ b/admin/Default/account_edit.php @@ -49,7 +49,7 @@ 'validation_code LIKE ' . $db->escape_string($var['val_code'])); if ($db->nextRecord()) { $curr_account =& SmrAccount::getAccount($db->getField('account_id')); - $template->assignByRef('EditingAccount', $curr_account); + $template->assign('EditingAccount', $curr_account); $template->assign('EditFormHREF', SmrSession::getNewHREF(create_container('account_edit_processing.php', '', array('account_id' => $curr_account->getAccountID())))); } else { @@ -64,7 +64,7 @@ while ($db->nextRecord()) { $games[] = SmrGame::getGame($db->getInt('game_id')); } - $template->assignByRef('Games', $games); + $template->assign('Games', $games); } else { $editingPlayers = array(); diff --git a/admin/Default/admin_message_send.php b/admin/Default/admin_message_send.php index 23dc125d6..cc396a2fa 100644 --- a/admin/Default/admin_message_send.php +++ b/admin/Default/admin_message_send.php @@ -13,7 +13,7 @@ while ($db->nextRecord()) { $activeGames[] = SmrGame::getGame($db->getInt('game_id')); } - $template->assignByRef('ActiveGames', $activeGames); + $template->assign('ActiveGames', $activeGames); } else { $container = create_container('admin_message_send_processing.php'); @@ -28,7 +28,7 @@ while ($db->nextRecord()) { $gamePlayers[]= array('AccountID' => $db->getField('account_id'), 'PlayerID' => $db->getField('player_id'), 'Name' => $db->getField('player_name')); } - $template->assignByRef('GamePlayers',$gamePlayers); + $template->assign('GamePlayers',$gamePlayers); } if(isset($var['preview'])) { $template->assign('Preview', $var['preview']); diff --git a/admin/Default/box_reply.php b/admin/Default/box_reply.php index acf89d4aa..7d430d5f8 100644 --- a/admin/Default/box_reply.php +++ b/admin/Default/box_reply.php @@ -6,8 +6,8 @@ transfer('game_id'); transfer('sender_id'); $template->assign('BoxReplyFormHref',SmrSession::getNewHREF($container)); -$template->assignByRef('Sender',SmrPlayer::getPlayer($var['sender_id'], $var['game_id'])); -$template->assignByRef('SenderAccount',SmrAccount::getAccount($var['sender_id'])); +$template->assign('Sender',SmrPlayer::getPlayer($var['sender_id'], $var['game_id'])); +$template->assign('SenderAccount',SmrAccount::getAccount($var['sender_id'])); if(isset($var['Preview'])) $template->assign('Preview', $var['Preview']); if(isset($var['BanPoints'])) diff --git a/admin/Default/location_edit.php b/admin/Default/location_edit.php index f696e5f7b..90425c075 100644 --- a/admin/Default/location_edit.php +++ b/admin/Default/location_edit.php @@ -31,9 +31,9 @@ } - $template->assignByRef('Location',$location); - $template->assignByRef('Ships',AbstractSmrShip::getAllBaseShips($var['game_type_id'])); - $template->assignByRef('Weapons',SmrWeapon::getAllWeapons($var['game_type_id'])); + $template->assign('Location',$location); + $template->assign('Ships',AbstractSmrShip::getAllBaseShips($var['game_type_id'])); + $template->assign('Weapons',SmrWeapon::getAllWeapons($var['game_type_id'])); $db->query('SELECT * FROM hardware_type'); @@ -42,9 +42,9 @@ $hardware[$db->getField('hardware_type_id')] = array('ID' => $db->getField('hardware_type_id'), 'Name' => $db->getField('hardware_name')); } - $template->assignByRef('AllHardware',$hardware); + $template->assign('AllHardware',$hardware); } else { - $template->assignByRef('Locations',SmrLocation::getAllLocations()); + $template->assign('Locations',SmrLocation::getAllLocations()); } ?> \ No newline at end of file diff --git a/admin/Default/log_console.php b/admin/Default/log_console.php index dff9c32c9..9f32ac5c3 100644 --- a/admin/Default/log_console.php +++ b/admin/Default/log_console.php @@ -28,10 +28,10 @@ $db->query('SELECT log_type_id FROM log_type'); while ($db->nextRecord()) $logTypes[] = $db->getInt('log_type_id'); - $template->assignByRef('LogTypes', $logTypes); + $template->assign('LogTypes', $logTypes); $template->assign('LogConsoleFormHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'log_console_detail.php'))); $template->assign('AnonAccessHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'log_anonymous_account.php'))); } -$template->assignByRef('LoggedAccounts',$loggedAccounts); +$template->assign('LoggedAccounts',$loggedAccounts); ?> diff --git a/admin/Default/notify_reply.php b/admin/Default/notify_reply.php index 9769be524..623af752b 100644 --- a/admin/Default/notify_reply.php +++ b/admin/Default/notify_reply.php @@ -11,11 +11,11 @@ $offender =& getMessagePlayer($var['offender'],$var['game_id']); $offended =& getMessagePlayer($var['offended'],$var['game_id']); if(is_object($offender)) - $template->assignByRef('OffenderAccount', SmrAccount::getAccount($var['offender'])); + $template->assign('OffenderAccount', SmrAccount::getAccount($var['offender'])); if(is_object($offended)) - $template->assignByRef('OffendedAccount', SmrAccount::getAccount($var['offended'])); -$template->assignByRef('Offender', $offender); -$template->assignByRef('Offended', $offended); + $template->assign('OffendedAccount', SmrAccount::getAccount($var['offended'])); +$template->assign('Offender', $offender); +$template->assign('Offended', $offended); if(isset($var['PreviewOffender'])) $template->assign('PreviewOffender', $var['PreviewOffender']); diff --git a/engine/Default/alliance_message.php b/engine/Default/alliance_message.php index 9791c04cf..9ed7e2cb6 100644 --- a/engine/Default/alliance_message.php +++ b/engine/Default/alliance_message.php @@ -114,7 +114,7 @@ $threads[$j]['ViewHref'] = SmrSession::getNewHREF($container); } } -$template->assignByRef('Threads',$threads); +$template->assign('Threads',$threads); if ($mbWrite || in_array($player->getAccountID(), Globals::getHiddenPlayers())) { $container = create_container('alliance_message_add_processing.php'); diff --git a/engine/Default/alliance_message_view.php b/engine/Default/alliance_message_view.php index f621c034b..940e8946f 100644 --- a/engine/Default/alliance_message_view.php +++ b/engine/Default/alliance_message_view.php @@ -84,7 +84,7 @@ $container['thread_index'] = $thread_index; $thread['CreateThreadReplyFormHref'] = SmrSession::getNewHREF($container); } -$template->assignByRef('Thread',$thread); +$template->assign('Thread',$thread); if(isset($var['preview'])) { $template->assign('Preview', $var['preview']); } diff --git a/engine/Default/alliance_roles.php b/engine/Default/alliance_roles.php index c70fa05a7..a23798586 100644 --- a/engine/Default/alliance_roles.php +++ b/engine/Default/alliance_roles.php @@ -48,7 +48,7 @@ $container['alliance_id'] = $alliance->getAllianceID(); $allianceRoles[$roleID]['HREF'] = SmrSession::getNewHREF($container); } -$template->assignByRef('AllianceRoles',$allianceRoles); +$template->assign('AllianceRoles',$allianceRoles); $container = create_container('alliance_roles_processing.php'); $container['alliance_id'] = $alliance->getAllianceID(); diff --git a/engine/Default/alliance_roster.php b/engine/Default/alliance_roster.php index 74bcbe191..427d8f5fa 100644 --- a/engine/Default/alliance_roster.php +++ b/engine/Default/alliance_roster.php @@ -7,7 +7,7 @@ } $alliance =& SmrAlliance::getAlliance($var['alliance_id'],$player->getGameID()); -$template->assignByRef('Alliance', $alliance); +$template->assign('Alliance', $alliance); $template->assign('PageTopic', $alliance->getAllianceName(false, true)); require_once(get_file_loc('menu.inc')); @@ -30,7 +30,7 @@ while ($db->nextRecord()) { $roles[$db->getInt('role_id')] = $db->getField('role'); } - $template->assignByRef('Roles', $roles); + $template->assign('Roles', $roles); $container=create_container('alliance_roles_save_processing.php'); $container['alliance_id'] = $alliance->getAllianceID(); @@ -65,7 +65,7 @@ $template->assign('CanChangeRoles', $allowed); $alliancePlayers =& SmrPlayer::getAlliancePlayers($player->getGameID(),$alliance->getAllianceID()); -$template->assignByRef('AlliancePlayers', $alliancePlayers); +$template->assign('AlliancePlayers', $alliancePlayers); if ($alliance->getAllianceID() == $player->getAllianceID()) { // Alliance members get to see active/inactive status of members diff --git a/engine/Default/alliance_stat.php b/engine/Default/alliance_stat.php index 9bf4391fd..79834cb10 100644 --- a/engine/Default/alliance_stat.php +++ b/engine/Default/alliance_stat.php @@ -19,8 +19,8 @@ $db->query('SELECT * FROM alliance_has_roles WHERE alliance_id = ' . $db->escapeNumber($alliance_id) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND role_id = ' . $db->escapeNumber($role_id)); $db->nextRecord(); -$template->assignByRef('Form', $form); -$template->assignByRef('Alliance', $alliance); +$template->assign('Form', $form); +$template->assign('Alliance', $alliance); $template->assign('CanChangeDescription', $db->getBoolean('change_mod') || $account->hasPermission(PERMISSION_EDIT_ALLIANCE_DESCRIPTION)); $template->assign('CanChangePassword', $db->getBoolean('change_pass')); diff --git a/engine/Default/bank_alliance.php b/engine/Default/bank_alliance.php index d2615c0c2..5fa88cdd4 100644 --- a/engine/Default/bank_alliance.php +++ b/engine/Default/bank_alliance.php @@ -36,7 +36,7 @@ } } } -$template->assignByRef('AlliedAllianceBanks', $alliedAllianceBanks); +$template->assign('AlliedAllianceBanks', $alliedAllianceBanks); $db->query('SELECT transaction, sum(amount) as total FROM alliance_bank_transactions WHERE alliance_id = ' . $db->escapeNumber($alliance->getAllianceID()) . ' AND game_id = ' . $db->escapeNumber($alliance->getGameID()) . ' AND payee_id = ' . $db->escapeNumber($player->getAccountID()) . ' @@ -137,7 +137,7 @@ 'Exempt' => $db->getInt('exempt') == 1 ); } - $template->assignByRef('BankTransactions', $bankTransactions); + $template->assign('BankTransactions', $bankTransactions); $template->assign('MinValue', $minValue); $template->assign('MaxValue', $maxValue); @@ -150,7 +150,7 @@ $container['maxVal'] = $maxValue; $template->assign('ExemptTransactionsFormHREF',SmrSession::getNewHREF($container)); - $template->assignByRef('Alliance', $alliance); + $template->assign('Alliance', $alliance); } $container=create_container('skeleton.php', 'bank_report.php'); diff --git a/engine/Default/bounty_view.php b/engine/Default/bounty_view.php index d151b9b50..009e8512b 100644 --- a/engine/Default/bounty_view.php +++ b/engine/Default/bounty_view.php @@ -1,5 +1,5 @@ getGameID()); $template->assign('PageTopic', 'Viewing ' . $bountyPlayer->getPlayerName()); -$template->assignByRef('BountyPlayer', $bountyPlayer); +$template->assign('BountyPlayer', $bountyPlayer); ?> \ No newline at end of file diff --git a/engine/Default/buy_message_notifications.php b/engine/Default/buy_message_notifications.php index 9b210434d..7e0efbf7a 100644 --- a/engine/Default/buy_message_notifications.php +++ b/engine/Default/buy_message_notifications.php @@ -22,6 +22,6 @@ $messageBox['BuyHref'] = SmrSession::getNewHREF($container); $messageBoxes[] = $messageBox; } -$template->assignByRef('MessageBoxes', $messageBoxes); +$template->assign('MessageBoxes', $messageBoxes); ?> \ No newline at end of file diff --git a/engine/Default/chess.php b/engine/Default/chess.php index 757f9c1a3..5657ccab6 100644 --- a/engine/Default/chess.php +++ b/engine/Default/chess.php @@ -15,7 +15,7 @@ while ($db->nextRecord()) { $players[$db->getInt('player_id')] = $db->getField('player_name'); } -$template->assignByRef('PlayerList',$players); +$template->assign('PlayerList',$players); if(ENABLE_NPCS_CHESS) { $npcs = array(); @@ -23,7 +23,7 @@ while ($db->nextRecord()) { $npcs[$db->getInt('player_id')] = $db->getField('player_name'); } - $template->assignByRef('NPCList',$npcs); + $template->assign('NPCList',$npcs); } ?> \ No newline at end of file diff --git a/engine/Default/chess_move_processing.php b/engine/Default/chess_move_processing.php index 3ae4040ea..d0082af54 100644 --- a/engine/Default/chess_move_processing.php +++ b/engine/Default/chess_move_processing.php @@ -1,7 +1,7 @@ assignByRef('ChessGame',$chessGame); +$template->assign('ChessGame',$chessGame); if(is_numeric($_REQUEST['x']) && is_numeric($_REQUEST['y']) && is_numeric($_REQUEST['toX']) && is_numeric($_REQUEST['toY'])) { $x = $_REQUEST['x']; $y = $_REQUEST['y']; diff --git a/engine/Default/chess_play.php b/engine/Default/chess_play.php index 43a0ea55e..36f36062f 100644 --- a/engine/Default/chess_play.php +++ b/engine/Default/chess_play.php @@ -1,5 +1,5 @@ assignByRef('ChessGame',ChessGame::getChessGame($var['ChessGameID'])); +$template->assign('ChessGame',ChessGame::getChessGame($var['ChessGameID'])); $template->assign('ChessMoveHREF',SmrSession::getNewHREF(create_container('chess_move_processing.php','',array('AJAX' => true, 'ChessGameID' => $var['ChessGameID'])))); ?> \ No newline at end of file diff --git a/engine/Default/combat_log_viewer.php b/engine/Default/combat_log_viewer.php index e16222fd8..8d8a96faa 100644 --- a/engine/Default/combat_log_viewer.php +++ b/engine/Default/combat_log_viewer.php @@ -33,7 +33,7 @@ $template->assign('CombatLogTimestamp',date(DATE_FULL_SHORT,$db->getField('timestamp'))); $results = unserialize(gzuncompress($db->getField('result'))); $template->assign('CombatResultsType',$db->getField('type')); - $template->assignByRef('CombatResults',$results); + $template->assign('CombatResults',$results); } else { create_error('Combat log not found'); diff --git a/engine/Default/combat_simulator.php b/engine/Default/combat_simulator.php index 4683ba88b..26a503101 100644 --- a/engine/Default/combat_simulator.php +++ b/engine/Default/combat_simulator.php @@ -28,7 +28,7 @@ for(;$i<=10;++$i) $attackers[$i] = null; -$template->assignByRef('Attackers',$attackers); +$template->assign('Attackers',$attackers); $i=1; $realDefenders = array(); @@ -50,7 +50,7 @@ for(;$i<=10;++$i) $defenders[$i] = null; -$template->assignByRef('Defenders',$defenders); +$template->assign('Defenders',$defenders); $template->assign('Duplicates',$duplicates); @@ -89,6 +89,6 @@ function runAnAttack($realAttackers,$realDefenders) { $results['Defenders']['Traders'][] =& $playerResults; $results['Defenders']['TotalDamage'] += $playerResults['TotalDamage']; } unset($teamPlayer); - $template->assignByRef('TraderCombatResults',$results); + $template->assign('TraderCombatResults',$results); } ?> \ No newline at end of file diff --git a/engine/Default/configure_hardware.php b/engine/Default/configure_hardware.php index a2ddc7c21..a14847f97 100644 --- a/engine/Default/configure_hardware.php +++ b/engine/Default/configure_hardware.php @@ -23,7 +23,7 @@ while ($db->nextRecord()) { $ships[$db->getField('ship_type_id')] = $db->getField('ship_name'); } - $template->assignByRef('IllusionShips',$ships); + $template->assign('IllusionShips',$ships); $container['action'] = 'Disable Illusion'; $template->assign('DisableIllusionHref',SmrSession::getNewHREF($container)); } diff --git a/engine/Default/council_politics.php b/engine/Default/council_politics.php index bd4a7a08d..f63986356 100644 --- a/engine/Default/council_politics.php +++ b/engine/Default/council_politics.php @@ -31,8 +31,8 @@ } } -$template->assignByRef('PeaceRaces', $peaceRaces); -$template->assignByRef('NeutralRaces', $neutralRaces); -$template->assignByRef('WarRaces', $warRaces); +$template->assign('PeaceRaces', $peaceRaces); +$template->assign('NeutralRaces', $neutralRaces); +$template->assign('WarRaces', $warRaces); ?> diff --git a/engine/Default/current_sector.php b/engine/Default/current_sector.php index 93f96c8e4..f75eb74c3 100644 --- a/engine/Default/current_sector.php +++ b/engine/Default/current_sector.php @@ -7,7 +7,7 @@ $sector =& $player->getSector(); -$template->assignByRef('ThisSector',$sector); +$template->assign('ThisSector',$sector); $template->assign('SpaceView',true); $template->assign('PageTopic','Current Sector: ' . $player->getSectorID() . ' (' .$sector->getGalaxyName() . ')'); @@ -46,7 +46,7 @@ } } -$template->assignByRef('Sectors',$links); +$template->assign('Sectors',$links); doTickerAssigns($template, $player, $db); @@ -169,7 +169,7 @@ function checkForAttackMessage(&$msg) { if($player->getSectorID()==$db->getField('sector_id')) { $results = unserialize(gzuncompress($db->getField('result'))); $template->assign('AttackResultsType',$db->getField('type')); - $template->assignByRef('AttackResults',$results); + $template->assign('AttackResults',$results); } } } diff --git a/engine/Default/edit_dummys.php b/engine/Default/edit_dummys.php index bf456abfc..608b3ccba 100644 --- a/engine/Default/edit_dummys.php +++ b/engine/Default/edit_dummys.php @@ -6,8 +6,8 @@ require_once(get_file_loc('SmrWeapon.class.inc')); //TODO add game type id $template->assign('CombatSimLink',SmrSession::getNewHREF(create_container('skeleton.php','combat_simulator.php'))); -$template->assignByRef('BaseShips',AbstractSmrShip::getAllBaseShips(0)); -$template->assignByRef('Weapons',SmrWeapon::getAllWeapons(0)); +$template->assign('BaseShips',AbstractSmrShip::getAllBaseShips(0)); +$template->assign('Weapons',SmrWeapon::getAllWeapons(0)); $template->assign('EditDummysLink',SmrSession::getNewHREF(create_container('skeleton.php','edit_dummys.php'))); @@ -31,10 +31,10 @@ } -$template->assignByRef('DummyPlayer',$dummyPlayer); -$template->assignByRef('DummyShip',$dummyShip); -$template->assignByRef('ShipWeapons',$dummyShip->getWeapons()); -$template->assignByRef('Levels',Globals::getLevelRequirements()); +$template->assign('DummyPlayer',$dummyPlayer); +$template->assign('DummyShip',$dummyShip); +$template->assign('ShipWeapons',$dummyShip->getWeapons()); +$template->assign('Levels',Globals::getLevelRequirements()); diff --git a/engine/Default/feature_request.php b/engine/Default/feature_request.php index f34b3b766..37186c763 100644 --- a/engine/Default/feature_request.php +++ b/engine/Default/feature_request.php @@ -34,7 +34,7 @@ 'Description' => $description ); } -$template->assignByRef('CategoryTable', $categoryTable); +$template->assign('CategoryTable', $categoryTable); // Can the players vote for features on the current page? $canVote = $thisStatus == 'Opened'; @@ -91,7 +91,7 @@ $commentsContainer['RequestID'] = $featureRequestID; $featureRequests[$featureRequestID]['CommentsHREF'] = SmrSession::getNewHREF($commentsContainer); } - $template->assignByRef('FeatureRequests',$featureRequests); + $template->assign('FeatureRequests',$featureRequests); } $template->assign('FeatureRequestFormHREF',SmrSession::getNewHREF(create_container('feature_request_processing.php', ''))); diff --git a/engine/Default/feature_request_comments.php b/engine/Default/feature_request_comments.php index f31919783..6aeeb53f6 100644 --- a/engine/Default/feature_request_comments.php +++ b/engine/Default/feature_request_comments.php @@ -35,7 +35,7 @@ if($featureModerator || !$db->getBoolean('anonymous')) $featureRequestComments[$commentID]['PosterAccount'] =& SmrAccount::getAccount($db->getField('poster_id')); } - $template->assignByRef('Comments', $featureRequestComments); + $template->assign('Comments', $featureRequestComments); } $container = $var; diff --git a/engine/Default/forces_attack.php b/engine/Default/forces_attack.php index 708fcc7d8..4587ff059 100644 --- a/engine/Default/forces_attack.php +++ b/engine/Default/forces_attack.php @@ -1,10 +1,10 @@ assignByRef('FullForceCombatResults',$results); +$template->assign('FullForceCombatResults',$results); if($var['owner_id']>0) - $template->assignByRef('Target',SmrForce::getForce($player->getGameID(),$player->getSectorID(),$var['owner_id'])); + $template->assign('Target',SmrForce::getForce($player->getGameID(),$player->getSectorID(),$var['owner_id'])); if(isset($var['override_death'])) $template->assign('OverrideDeath',true); diff --git a/engine/Default/game_join.php b/engine/Default/game_join.php index 1e75ed0ef..f98fb967d 100644 --- a/engine/Default/game_join.php +++ b/engine/Default/game_join.php @@ -2,7 +2,7 @@ $game = SmrGame::getGame($var['game_id']); -$template->assignByRef('Game',$game); +$template->assign('Game',$game); // do we need credits for this game? if ($game->getCreditsNeeded() > 0) { diff --git a/engine/Default/map_local.php b/engine/Default/map_local.php index cb0c78f46..35d98711e 100644 --- a/engine/Default/map_local.php +++ b/engine/Default/map_local.php @@ -86,6 +86,6 @@ $mapSectors[$i][$j] =& $thisSec; } } -$template->assignByRef('MapSectors',$mapSectors); +$template->assign('MapSectors',$mapSectors); ?> diff --git a/engine/Default/message_send.php b/engine/Default/message_send.php index a5a06c913..0c4837b85 100644 --- a/engine/Default/message_send.php +++ b/engine/Default/message_send.php @@ -10,7 +10,7 @@ $template->assign('MessageSendFormHref',SmrSession::getNewHREF($container)); if (!empty($var['receiver'])) - $template->assignByRef('Receiver', SmrPlayer::getPlayer($var['receiver'], $player->getGameID())); + $template->assign('Receiver', SmrPlayer::getPlayer($var['receiver'], $player->getGameID())); else $template->assign('Receiver', 'All Online'); if(isset($var['preview'])) diff --git a/engine/Default/message_view.php b/engine/Default/message_view.php index f18264b9b..0c66bd2b5 100644 --- a/engine/Default/message_view.php +++ b/engine/Default/message_view.php @@ -80,7 +80,7 @@ $messageBox['DeleteHref'] = SmrSession::getNewHREF($container); $messageBoxes[] = $messageBox; - $template->assignByRef('MessageBoxes', $messageBoxes); + $template->assign('MessageBoxes', $messageBoxes); $container = create_container('skeleton.php','message_blacklist.php'); $container['folder_id'] = $message_type_id; @@ -185,7 +185,7 @@ $db->query('UPDATE message SET msg_read = \'TRUE\' WHERE message_type_id = ' . $db->escapeNumber($var['folder_id']) . ' AND game_id = ' . $db->escapeNumber($player->getGameID()) . ' AND account_id = ' . $db->escapeNumber($player->getAccountID())); } - $template->assignByRef('MessageBox', $messageBox); + $template->assign('MessageBox', $messageBox); } function displayScouts(&$db, &$messageBox, &$player, $read, $group) { diff --git a/engine/Default/planet_attack.php b/engine/Default/planet_attack.php index bc2ec4210..e9fc616ac 100644 --- a/engine/Default/planet_attack.php +++ b/engine/Default/planet_attack.php @@ -2,7 +2,7 @@ require_once(get_file_loc('SmrPlanet.class.inc')); if(isset($var['results'])) { $results = unserialize($var['results']); - $template->assignByRef('FullPlanetCombatResults',$results); + $template->assign('FullPlanetCombatResults',$results); $template->assign('AlreadyDestroyed',false); } else @@ -12,5 +12,5 @@ $template->assign('OverrideDeath',true); else $template->assign('OverrideDeath',false); -$template->assignByRef('Planet',SmrPlanet::getPlanet($player->getGameID(),$var['sector_id'])); +$template->assign('Planet',SmrPlanet::getPlanet($player->getGameID(),$var['sector_id'])); ?> \ No newline at end of file diff --git a/engine/Default/planet_construction.php b/engine/Default/planet_construction.php index 63c7ed71c..477261935 100644 --- a/engine/Default/planet_construction.php +++ b/engine/Default/planet_construction.php @@ -8,7 +8,7 @@ require_once(get_file_loc('menu.inc')); create_planet_menu($planet); -$template->assignByRef('ThisPlanet', $planet); +$template->assign('ThisPlanet', $planet); $template->assign('PlanetBuildings', Globals::getPlanetBuildings()); diff --git a/engine/Default/planet_examine.php b/engine/Default/planet_examine.php index fead5a3b5..720c5d725 100644 --- a/engine/Default/planet_examine.php +++ b/engine/Default/planet_examine.php @@ -3,7 +3,7 @@ $template->assign('PageTopic','Examine Planet'); $planet =& $player->getSectorPlanet(); -$template->assignByRef('ThisPlanet', $planet); +$template->assign('ThisPlanet', $planet); $planetLand = !$planet->hasOwner() diff --git a/engine/Default/planet_financial.php b/engine/Default/planet_financial.php index 0f41ae595..009b18b3d 100644 --- a/engine/Default/planet_financial.php +++ b/engine/Default/planet_financial.php @@ -11,6 +11,6 @@ require_once(get_file_loc('menu.inc')); create_planet_menu($planet); -$template->assignByRef('ThisPlanet', $planet); +$template->assign('ThisPlanet', $planet); ?> \ No newline at end of file diff --git a/engine/Default/planet_main.php b/engine/Default/planet_main.php index e0971ca48..4f2092f93 100644 --- a/engine/Default/planet_main.php +++ b/engine/Default/planet_main.php @@ -17,7 +17,7 @@ $template->assign('Msg', bbifyMessage($var['msg'])); } -$template->assignByRef('ThisPlanet',$planet); +$template->assign('ThisPlanet',$planet); doTickerAssigns($template, $player, $db); diff --git a/engine/Default/port_attack.php b/engine/Default/port_attack.php index 43e7aa8a2..cc76d8e2b 100644 --- a/engine/Default/port_attack.php +++ b/engine/Default/port_attack.php @@ -2,7 +2,7 @@ require_once(get_file_loc('SmrPort.class.inc')); if(isset($var['results'])) { $results = unserialize($var['results']); - $template->assignByRef('FullPortCombatResults',$results); + $template->assign('FullPortCombatResults',$results); $template->assign('AlreadyDestroyed',false); } else @@ -13,5 +13,5 @@ $template->assign('OverrideDeath',true); else $template->assign('OverrideDeath',false); -$template->assignByRef('Port',$sector->getPort()); +$template->assign('Port',$sector->getPort()); ?> \ No newline at end of file diff --git a/engine/Default/port_loot.php b/engine/Default/port_loot.php index 44b8de23e..f7baec2d0 100644 --- a/engine/Default/port_loot.php +++ b/engine/Default/port_loot.php @@ -1,4 +1,4 @@ assign('PageTopic','Looting The Port'); -$template->assignByRef('ThisPort',$player->getSectorPort()); +$template->assign('ThisPort',$player->getSectorPort()); ?> \ No newline at end of file diff --git a/engine/Default/preferences.php b/engine/Default/preferences.php index a8139018c..f3ef4d50c 100644 --- a/engine/Default/preferences.php +++ b/engine/Default/preferences.php @@ -23,5 +23,5 @@ $transferAccounts[$db->getField('account_id')] = $db->getField('hof_name'); } //} -$template->assignByRef('TransferAccounts',$transferAccounts); +$template->assign('TransferAccounts',$transferAccounts); ?> diff --git a/engine/Default/rankings_alliance_death.php b/engine/Default/rankings_alliance_death.php index 519d6d304..1286f28dc 100644 --- a/engine/Default/rankings_alliance_death.php +++ b/engine/Default/rankings_alliance_death.php @@ -28,14 +28,14 @@ $db->query('SELECT alliance_id, alliance_deaths amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $numAlliances); $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT alliance_id, alliance_deaths amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectAllianceRankings($db, $player, 0)); +$template->assign('FilteredRankings', Rankings::collectAllianceRankings($db, $player, 0)); $template->assign('FilterRankingsHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'rankings_alliance_death.php'))); ?> \ No newline at end of file diff --git a/engine/Default/rankings_alliance_experience.php b/engine/Default/rankings_alliance_experience.php index 924858ecd..b0d733fdc 100644 --- a/engine/Default/rankings_alliance_experience.php +++ b/engine/Default/rankings_alliance_experience.php @@ -44,7 +44,7 @@ GROUP BY alliance_id, alliance_name ORDER BY amount DESC, alliance_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $numAlliances); @@ -56,7 +56,7 @@ GROUP BY alliance_id, alliance_name ORDER BY amount DESC, alliance_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); $template->assign('FilterRankingsHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'rankings_alliance_experience.php'))); ?> diff --git a/engine/Default/rankings_alliance_kills.php b/engine/Default/rankings_alliance_kills.php index 0c16fab05..4d77fd985 100644 --- a/engine/Default/rankings_alliance_kills.php +++ b/engine/Default/rankings_alliance_kills.php @@ -28,14 +28,14 @@ $db->query('SELECT alliance_id, alliance_kills amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $numAlliances); $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT alliance_id, alliance_kills amount FROM alliance WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, alliance_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); $template->assign('FilterRankingsHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'rankings_alliance_kills.php'))); ?> diff --git a/engine/Default/rankings_alliance_profit.php b/engine/Default/rankings_alliance_profit.php index 22e432b8b..f5d847a8d 100644 --- a/engine/Default/rankings_alliance_profit.php +++ b/engine/Default/rankings_alliance_profit.php @@ -49,7 +49,7 @@ GROUP BY alliance_id, alliance_name ORDER BY amount DESC, alliance_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectAllianceRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $numAlliances); @@ -62,7 +62,7 @@ GROUP BY alliance_id, alliance_name ORDER BY amount DESC, alliance_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectAllianceRankings($db, $player, $lowerLimit)); $template->assign('FilterRankingsHREF', SmrSession::getNewHREF(create_container('skeleton.php', 'rankings_alliance_experience.php'))); ?> diff --git a/engine/Default/rankings_player_death.php b/engine/Default/rankings_player_death.php index 7b7c91d29..6805ddf36 100644 --- a/engine/Default/rankings_player_death.php +++ b/engine/Default/rankings_player_death.php @@ -23,7 +23,7 @@ $totalPlayers = $player->getGame()->getTotalPlayers(); $db->query('SELECT account_id, deaths amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY deaths DESC, player_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $totalPlayers); @@ -31,5 +31,5 @@ $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT account_id, deaths amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY deaths DESC, player_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); ?> \ No newline at end of file diff --git a/engine/Default/rankings_player_experience.php b/engine/Default/rankings_player_experience.php index 3022bcf25..8429dff66 100644 --- a/engine/Default/rankings_player_experience.php +++ b/engine/Default/rankings_player_experience.php @@ -23,7 +23,7 @@ $totalPlayers = $player->getGame()->getTotalPlayers(); $db->query('SELECT account_id, experience amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY experience DESC, player_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $totalPlayers); @@ -31,5 +31,5 @@ $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT account_id, experience amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY experience DESC, player_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); ?> \ No newline at end of file diff --git a/engine/Default/rankings_player_kills.php b/engine/Default/rankings_player_kills.php index 1aa0e1fa4..ef09d1c17 100644 --- a/engine/Default/rankings_player_kills.php +++ b/engine/Default/rankings_player_kills.php @@ -23,7 +23,7 @@ $totalPlayers = $player->getGame()->getTotalPlayers(); $db->query('SELECT account_id, kills amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY kills DESC, player_name LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $totalPlayers); @@ -31,5 +31,5 @@ $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT account_id, kills amount FROM player WHERE game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY kills DESC, player_name LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); ?> \ No newline at end of file diff --git a/engine/Default/rankings_player_profit.php b/engine/Default/rankings_player_profit.php index 78e3804da..c346c8cf4 100644 --- a/engine/Default/rankings_player_profit.php +++ b/engine/Default/rankings_player_profit.php @@ -28,7 +28,7 @@ $totalPlayers = $player->getGame()->getTotalPlayers(); $db->query('SELECT p.account_id, COALESCE(ph.amount,0) amount FROM player p LEFT JOIN player_hof ph ON p.account_id = ph.account_id AND p.game_id = ph.game_id AND ph.type = ' . $profitTypeEscaped . ' WHERE p.game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, player_name ASC LIMIT 10'); -$template->assignByRef('Rankings', Rankings::collectRankings($db, $player, 0)); +$template->assign('Rankings', Rankings::collectRankings($db, $player, 0)); Rankings::calculateMinMaxRanks($ourRank, $totalPlayers); @@ -36,5 +36,5 @@ $lowerLimit = $var['MinRank'] - 1; $db->query('SELECT p.account_id, COALESCE(ph.amount,0) amount FROM player p LEFT JOIN player_hof ph ON p.account_id = ph.account_id AND p.game_id = ph.game_id AND ph.type = ' . $profitTypeEscaped . ' WHERE p.game_id = ' . $db->escapeNumber($player->getGameID()) . ' ORDER BY amount DESC, player_name ASC LIMIT ' . $lowerLimit . ', ' . ($var['MaxRank'] - $lowerLimit)); -$template->assignByRef('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); +$template->assign('FilteredRankings', Rankings::collectRankings($db, $player, $lowerLimit)); ?> \ No newline at end of file diff --git a/engine/Default/shop_hardware.php b/engine/Default/shop_hardware.php index 79520ddbf..c56578b1c 100644 --- a/engine/Default/shop_hardware.php +++ b/engine/Default/shop_hardware.php @@ -15,7 +15,7 @@ $container['hardware_id'] = $hardwareTypeID; $hardwareSold[$hardwareTypeID]['HREF'] = SmrSession::getNewHREF($container); } - $template->assignByRef('HardwareSold', $hardwareSold); + $template->assign('HardwareSold', $hardwareSold); } ?> \ No newline at end of file diff --git a/engine/Default/shop_weapon.php b/engine/Default/shop_weapon.php index c09b0c11e..edbf23a88 100644 --- a/engine/Default/shop_weapon.php +++ b/engine/Default/shop_weapon.php @@ -1,4 +1,4 @@ assign('PageTopic','Weapon Dealer'); -$template->assignByRef('ThisLocation', SmrLocation::getLocation($var['LocationID'])); +$template->assign('ThisLocation', SmrLocation::getLocation($var['LocationID'])); ?> \ No newline at end of file diff --git a/engine/Default/trader_attack.php b/engine/Default/trader_attack.php index c874c0e7d..849b24e2b 100644 --- a/engine/Default/trader_attack.php +++ b/engine/Default/trader_attack.php @@ -1,8 +1,8 @@ assignByRef('TraderCombatResults',$results); +$template->assign('TraderCombatResults',$results); if($var['target']) - $template->assignByRef('Target',SmrPlayer::getPlayer($var['target'],$player->getGameID())); + $template->assign('Target',SmrPlayer::getPlayer($var['target'],$player->getGameID())); if(isset($var['override_death'])) $template->assign('OverrideDeath',true); else diff --git a/engine/Default/trader_examine.php b/engine/Default/trader_examine.php index 70ffbd4ec..281976bac 100644 --- a/engine/Default/trader_examine.php +++ b/engine/Default/trader_examine.php @@ -12,5 +12,5 @@ $template->assign('PageTopic','Examine Ship'); // should we display a attack button -$template->assignByRef('TargetPlayer',$targetPlayer); +$template->assign('TargetPlayer',$targetPlayer); ?> \ No newline at end of file diff --git a/engine/Draft/alliance_pick.php b/engine/Draft/alliance_pick.php index 2c5e0e005..6b9e48eea 100644 --- a/engine/Draft/alliance_pick.php +++ b/engine/Draft/alliance_pick.php @@ -7,7 +7,7 @@ // Get the current teams require_once('alliance_pick.inc'); $teams = get_draft_teams($player->getGameID()); -$template->assignByRef('Teams', $teams); +$template->assign('Teams', $teams); // Add information about current player $template->assign('PlayerID', $player->getPlayerID()); @@ -22,7 +22,7 @@ 'HREF' => SmrSession::getNewHREF(create_container('alliance_pick_processing.php','',array('PickedAccountID'=>$pickPlayer->getAccountID())))); } -$template->assignByRef('PickPlayers', $players); +$template->assign('PickPlayers', $players); // Get the draft history $history = array(); @@ -35,5 +35,5 @@ 'Time' => $db->getInt('time')); } -$template->assignByRef('History', $history); +$template->assign('History', $history); ?> diff --git a/htdocs/login_processing.php b/htdocs/login_processing.php index c2d5ef65b..6df29e7ea 100644 --- a/htdocs/login_processing.php +++ b/htdocs/login_processing.php @@ -57,7 +57,7 @@ else { session_start(); //Pass the data in a standard session as we don't want to initialise a normal one. $_SESSION['socialLogin'] =& $socialLogin; - $template->assignByRef('SocialLogin',$socialLogin); + $template->assign('SocialLogin',$socialLogin); $template->display('socialRegister.inc'); exit; } diff --git a/htdocs/map_galaxy.php b/htdocs/map_galaxy.php index 8453e7311..86b0d8817 100644 --- a/htdocs/map_galaxy.php +++ b/htdocs/map_galaxy.php @@ -136,13 +136,13 @@ $template->assign('CSSLink', $account->getCssUrl()); $template->assign('CSSColourLink', $account->getCssColourUrl()); $template->assign('FontSize', $account->getFontSize() - 20); - $template->assignByRef('ThisGalaxy',$galaxy); - $template->assignByRef('ThisAccount',$account); - $template->assignByRef('GameGalaxies',SmrGalaxy::getGameGalaxies($player->getGameID())); - $template->assignByRef('ThisSector',$player->getSector()); - $template->assignByRef('MapSectors',$mapSectors); - $template->assignByRef('ThisShip',$player->getShip()); - $template->assignByRef('ThisPlayer',$player); + $template->assign('ThisGalaxy',$galaxy); + $template->assign('ThisAccount',$account); + $template->assign('GameGalaxies',SmrGalaxy::getGameGalaxies($player->getGameID())); + $template->assign('ThisSector',$player->getSector()); + $template->assign('MapSectors',$mapSectors); + $template->assign('ThisShip',$player->getShip()); + $template->assign('ThisPlayer',$player); // AJAX updates are not set up for the galaxy map at this time $template->assign('AJAX_ENABLE_REFRESH', false); diff --git a/lib/Default/Template.class.inc b/lib/Default/Template.class.inc index 24bfb2911..b6332fda5 100644 --- a/lib/Default/Template.class.inc +++ b/lib/Default/Template.class.inc @@ -19,17 +19,13 @@ class Template { } public function assign($var, $value) { - $this->data[$var] =& $value; + $this->data[$var] = $value; } public function unassign($var) { unset($this->data[$var]); } - public function assignByRef($var, &$value) { - $this->data[$var] =& $value; - } - public function display($templateName,$forAjax=false, $xmlResponse=false) { @ob_clean(); ob_start(); @@ -122,14 +118,12 @@ class Template { if($this->nestedIncludes > 15) { throw new Exception('Nested more than 15 template includes, is something wrong?'); } - foreach($this->data as $key => &$value) { - $$key=&$value; - unset($value); + foreach ($this->data as $key => $value) { + $$key = $value; } if($assignVars!==null) { - foreach($assignVars as $key => &$value) { - $$key=&$value; - unset($value); + foreach ($assignVars as $key => $value) { + $$key = $value; } } $this->nestedIncludes++; diff --git a/lib/Default/smr.inc b/lib/Default/smr.inc index 8eb787b10..afd2a1e30 100644 --- a/lib/Default/smr.inc +++ b/lib/Default/smr.inc @@ -641,11 +641,11 @@ function do_voodoo() { $template->assign('TemplateBody',$var['body']); if (SmrSession::$game_id > 0) { - $template->assignByRef('ThisSector',$sector); - $template->assignByRef('ThisPlayer',$player); - $template->assignByRef('ThisShip',$ship); + $template->assign('ThisSector',$sector); + $template->assign('ThisPlayer',$player); + $template->assign('ThisShip',$ship); } - $template->assignByRef('ThisAccount',$account); + $template->assign('ThisAccount',$account); if($account->getCssLink()!=null) { $template->assign('ExtraCSSLink',$account->getCssLink()); }