porting to PHP5-style object assignments

This commit is contained in:
real_nowhereman 2009-07-21 15:51:49 +00:00
parent 5e7f579ff5
commit a1176756a4
9 changed files with 16 additions and 16 deletions

View File

@ -23,7 +23,7 @@
function AdminPanel(&$smarty) { function AdminPanel(&$smarty) {
$this->smarty =& $smarty; $this->smarty = $smarty;
if (!$this->panelname) if (!$this->panelname)
trigger_error("Variable \$panelname is not defined!", E_USER_ERROR); trigger_error("Variable \$panelname is not defined!", E_USER_ERROR);
@ -76,13 +76,13 @@
trigger_error("No classes for action $action.", E_USER_ERROR); trigger_error("No classes for action $action.", E_USER_ERROR);
} }
$obj =& new $class($this->smarty); $obj = new $class($this->smarty);
return $obj; return $obj;
} else trigger_error("No script found for action $action", E_USER_ERROR); } else trigger_error("No script found for action $action", E_USER_ERROR);
} else { } else {
$obj =& new $class($this->smarty); $obj = new $class($this->smarty);
} }
return $obj; return $obj;
@ -101,7 +101,7 @@
var $langres = ''; var $langres = '';
function AdminPanelAction(&$smarty) { function AdminPanelAction(&$smarty) {
$this->smarty =& $smarty; $this->smarty = $smarty;
$the_action_panel = get_class($this); $the_action_panel = get_class($this);
$this->smarty->assign('admin_panel_id', $the_action_panel); $this->smarty->assign('admin_panel_id', $the_action_panel);
if (!$this->langres) if (!$this->langres)
@ -251,7 +251,7 @@
if (!$lang_loaded) { if (!$lang_loaded) {
$lang = lang_load('admin.'.ADMIN_PANEL); $lang = lang_load('admin.'.ADMIN_PANEL);
$l =& $lang['admin'][ADMIN_PANEL][ADMIN_PANEL_ACTION]; $l = $lang['admin'][ADMIN_PANEL][ADMIN_PANEL_ACTION];
} }
$errors[$field] = $l['error'][$field]; $errors[$field] = $l['error'][$field];

View File

@ -53,7 +53,7 @@
if (!class_exists($panelclass)) if (!class_exists($panelclass))
trigger_error("No class defined for requested panel", E_USER_ERROR); trigger_error("No class defined for requested panel", E_USER_ERROR);
$fp_admin =& new $panelclass($smarty); $fp_admin = new $panelclass($smarty);
} }
@ -69,7 +69,7 @@
if (!$fp_admin) if (!$fp_admin)
return; return;
$fp_admin_action =& $fp_admin->get_action($action); $fp_admin_action = $fp_admin->get_action($action);
define('ADMIN_PANEL_ACTION', $action); define('ADMIN_PANEL_ACTION', $action);
@ -179,7 +179,7 @@
theme_init($smarty); theme_init($smarty);
$smarty->register_function('controlpanel', 'showcontrolpanel'); $smarty->register_function('controlpanel', 'showcontrolpanel');
$v =& $lang['admin'][$panel][$action]; $v = $lang['admin'][$panel][$action];
$smarty->assign_by_ref('panelstrings', $v); $smarty->assign_by_ref('panelstrings', $v);

View File

@ -101,7 +101,7 @@
function cleartplcache() { function cleartplcache() {
// if theme was switched, clear tpl cache // if theme was switched, clear tpl cache
$tpl =& new tpl_deleter(); $tpl = new tpl_deleter();
$tpl->getList(); $tpl->getList();

View File

@ -43,7 +43,7 @@
function main() { function main() {
parent::main(); parent::main();
//$smarty =& $this->smarty; //$smarty = $this->smarty;
// parameters for the list // parameters for the list
// start offset and count (now defaults to 8...) // start offset and count (now defaults to 8...)

View File

@ -41,7 +41,7 @@
var $_directory = CONTENT_DIR; var $_directory = CONTENT_DIR;
function s_entry_crawler() { function s_entry_crawler() {
$this->index =& entry_init(); $this->index = entry_init();
parent::fs_filelister(); parent::fs_filelister();
} }

View File

@ -40,7 +40,7 @@ SCP;
$this->pluginid = isset($_GET['plugin'])? $_GET['plugin'] : null; $this->pluginid = isset($_GET['plugin'])? $_GET['plugin'] : null;
$pi =& new plugin_indexer; $pi = new plugin_indexer;
$plist = $pi->getList(); $plist = $pi->getList();
sort($plist); sort($plist);
$this->smarty->assign('pluginlist', $plist); $this->smarty->assign('pluginlist', $plist);

View File

@ -150,7 +150,7 @@
function cleartplcache() { function cleartplcache() {
// if theme was switched, clear tpl cache // if theme was switched, clear tpl cache
$tpl =& new tpl_deleter(); $tpl = new tpl_deleter();
$tpl->getList(); $tpl->getList();

View File

@ -24,7 +24,7 @@
function style_list() { function style_list() {
global $fp_config; global $fp_config;
$o =& new admin_themes_obj_style_idx; $o = new admin_themes_obj_style_idx;
$list = $o->getList(); $list = $o->getList();
sort($list); sort($list);
@ -88,7 +88,7 @@
function cleartplcache() { function cleartplcache() {
// if theme was switched, clear tpl cache // if theme was switched, clear tpl cache
$tpl =& new tpl_deleter(); $tpl = new tpl_deleter();
$tpl->getList(); $tpl->getList();

View File

@ -28,7 +28,7 @@
if (isset($registered_w[$newid])){ if (isset($registered_w[$newid])){
$thiswdg =& $registered_w[$newid]; $thiswdg = $registered_w[$newid];
$widget_list[$wpos][$idx]['name'] = $thiswdg['name']; $widget_list[$wpos][$idx]['name'] = $thiswdg['name'];