From: Eloi G. <ada...@us...> - 2011-01-02 23:34:34
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17872 Modified Files: index_admin.php Log Message: + Assigning the return value of new by reference is deprecated in PHP 5. Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** index_admin.php 26 Feb 2009 23:45:52 -0000 1.28 --- index_admin.php 2 Jan 2011 23:34:26 -0000 1.29 *************** *** 47,51 **** $version_id = (int) $_REQUEST['version_id']; PHPWS_Core::initModClass('version', 'Version.php'); ! $version = & new Version('article', $version_id); $article = new PHPWS_Article; $version->loadObject($article); --- 47,51 ---- $version_id = (int) $_REQUEST['version_id']; PHPWS_Core::initModClass('version', 'Version.php'); ! $version = new Version('article', $version_id); $article = new PHPWS_Article; $version->loadObject($article); *************** *** 425,429 **** $panel->setCurrentTab('approval'); PHPWS_Core::initModClass('version', 'Version.php'); ! $approval = & new Version_Approval('article', 'article', 'PHPWS_Article', 'view_approval_summary'); $approval->setEditUrl('index.php?module=article&op=edit'); $approval->setViewUrl('index.php?module=article&op=view_version'); --- 425,429 ---- $panel->setCurrentTab('approval'); PHPWS_Core::initModClass('version', 'Version.php'); ! $approval = new Version_Approval('article', 'article', 'PHPWS_Article', 'view_approval_summary'); $approval->setEditUrl('index.php?module=article&op=edit'); $approval->setViewUrl('index.php?module=article&op=view_version'); *************** *** 463,467 **** } /* Editor's Note Dialog */ ! $form = & new PHPWS_Form('Edit_Article'); $form->addTextArea('note', ''); $form->setWidth('note', '95%'); --- 463,467 ---- } /* Editor's Note Dialog */ ! $form = new PHPWS_Form('Edit_Article'); $form->addTextArea('note', ''); $form->setWidth('note', '95%'); *************** *** 483,487 **** $version_id = (int) $_REQUEST['version_id']; PHPWS_Core::initModClass('version', 'Version.php'); ! $version = & new Version('article', $version_id); /* Mail Editor's note to author */ $L1 = PHPWS_Core::getHomeHttp().'index.php?module=article&op=edit&version_id='.$version_id; --- 483,487 ---- $version_id = (int) $_REQUEST['version_id']; PHPWS_Core::initModClass('version', 'Version.php'); ! $version = new Version('article', $version_id); /* Mail Editor's note to author */ $L1 = PHPWS_Core::getHomeHttp().'index.php?module=article&op=edit&version_id='.$version_id; *************** *** 505,509 **** $sender_name = PHPWS_Core::getHomeHttp(0,0,0).' Article Manager'; $sender_email = 'noreply@'.PHPWS_Core::getHomeHttp(0,0,0); ! $recipient = & new PHPWS_User($version->source_data['updated_id']); $recipient_email = $recipient->getEmail(); PHPWS_Core::initModClass('article', 'AM_Actions.php'); --- 505,509 ---- $sender_name = PHPWS_Core::getHomeHttp(0,0,0).' Article Manager'; $sender_email = 'noreply@'.PHPWS_Core::getHomeHttp(0,0,0); ! $recipient = new PHPWS_User($version->source_data['updated_id']); $recipient_email = $recipient->getEmail(); PHPWS_Core::initModClass('article', 'AM_Actions.php'); *************** *** 511,515 **** /* If the version table isn't set up to accept edit_note, add it */ ! $version_db = & new PHPWS_DB($version->version_table); if(!$version_db->isTableColumn('vr_edit_note')) { $version_db->addTableColumn('vr_reviewer', 'smallint NOT NULL DEFAULT "0"'); --- 511,515 ---- /* If the version table isn't set up to accept edit_note, add it */ ! $version_db = new PHPWS_DB($version->version_table); if(!$version_db->isTableColumn('vr_edit_note')) { $version_db->addTableColumn('vr_reviewer', 'smallint NOT NULL DEFAULT "0"'); *************** *** 543,547 **** } PHPWS_Core::initModClass('version', 'Version.php'); ! $version = & new Version('article', (int) $_REQUEST['version_id']); $version->restore(); --- 543,547 ---- } PHPWS_Core::initModClass('version', 'Version.php'); ! $version = new Version('article', (int) $_REQUEST['version_id']); $version->restore(); *************** *** 561,565 **** } PHPWS_Core::initModClass('version', 'Version.php'); ! $version = & new Version('article', (int) $_REQUEST['version_id']); $id = $version->getSourceId(); $version->delete(); --- 561,565 ---- } PHPWS_Core::initModClass('version', 'Version.php'); ! $version = new Version('article', (int) $_REQUEST['version_id']); $id = $version->getSourceId(); $version->delete(); *************** *** 703,707 **** function load_latest_version (& $title, & $message, & $panel) { $status = false; ! $article = & new PHPWS_Article(); if(!empty($_REQUEST['id'])) $article->id = (int) $_REQUEST['id']; --- 703,707 ---- function load_latest_version (& $title, & $message, & $panel) { $status = false; ! $article = new PHPWS_Article(); if(!empty($_REQUEST['id'])) $article->id = (int) $_REQUEST['id']; *************** *** 718,722 **** if (!$status) /* No versions?!?! Load the article. */ ! $article = & new PHPWS_Article((int) $_REQUEST['id']); if (!$article->can_edit()) { Current_User::disallow(dgettext('article', 'User tried to edit an article.')); --- 718,722 ---- if (!$status) /* No versions?!?! Load the article. */ ! $article = new PHPWS_Article((int) $_REQUEST['id']); if (!$article->can_edit()) { Current_User::disallow(dgettext('article', 'User tried to edit an article.')); |