|
From: Eloi G. <ada...@us...> - 2008-10-11 06:13:57
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv704/class Modified Files: AM_EditForms.php AM_Actions.php AM_Lists.php AM_Data.php Article.php Log Message: RFE [2091396] - Approval Permissions are now given on a per-Admin basis Index: AM_EditForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_EditForms.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AM_EditForms.php 21 Aug 2008 20:17:32 -0000 1.7 --- AM_EditForms.php 11 Oct 2008 06:13:49 -0000 1.8 *************** *** 262,266 **** $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!$GLOBALS['Article']['val']['need_approval'] || Current_User::isUnrestricted('article')) $article_tags['SAVE_PUBLISH_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_approved]" value="'.dgettext('article', 'Save & Publish').'" />'; --- 262,266 ---- $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('article', 'approval')) $article_tags['SAVE_PUBLISH_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_approved]" value="'.dgettext('article', 'Save & Publish').'" />'; Index: AM_Data.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Data.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AM_Data.php 10 Oct 2008 04:27:40 -0000 1.17 --- AM_Data.php 11 Oct 2008 06:13:49 -0000 1.18 *************** *** 148,152 **** , 'link' => 'index.php?module=article&op=main_menu'); ! if (Current_User::isUnrestricted('article')) { /* Count unapproved articles (custom) */ $version_db = new PHPWS_DB('article_version'); --- 148,152 ---- , 'link' => 'index.php?module=article&op=main_menu'); ! if (Current_User::allow('article', 'approval')) { /* Count unapproved articles (custom) */ $version_db = new PHPWS_DB('article_version'); Index: AM_Lists.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Lists.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AM_Lists.php 10 Oct 2008 04:27:40 -0000 1.19 --- AM_Lists.php 11 Oct 2008 06:13:49 -0000 1.20 *************** *** 313,322 **** $actions .= '<option value="set_main">'.dgettext('article', 'Set as Main Articles')."</option>\n" . '<option value="unset_main">'.dgettext('article', 'Remove from Main Articles')."</option>\n"; ! /* Set up Delete button */ ! if(Current_User::allow('article', 'delete_articles')) $actions .= '<option value="delete">'.dgettext('article', 'Delete')."</option>\n"; ! /* Set up Export button */ ! if(Current_User::isUnrestricted('article')) ! $actions .= '<option value="xml_export">'.dgettext('article', 'Export to XML')."</option>\n"; $lbls['BULK_ACTION'] = '<select id="list_actions_edit" name="op" title="' . dgettext('article', 'Select the desired action').'">'.$actions."</select>\n "; --- 313,321 ---- $actions .= '<option value="set_main">'.dgettext('article', 'Set as Main Articles')."</option>\n" . '<option value="unset_main">'.dgettext('article', 'Remove from Main Articles')."</option>\n"; ! /* Set up Delete & Export buttons */ ! if(Current_User::allow('article', 'delete_articles')) { $actions .= '<option value="delete">'.dgettext('article', 'Delete')."</option>\n"; ! $actions .= '<option value="xml_export">'.dgettext('article', 'Export to XML')."</option>\n"; ! } $lbls['BULK_ACTION'] = '<select id="list_actions_edit" name="op" title="' . dgettext('article', 'Select the desired action').'">'.$actions."</select>\n "; Index: AM_Actions.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Actions.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AM_Actions.php 21 Aug 2008 20:17:31 -0000 1.13 --- AM_Actions.php 11 Oct 2008 06:13:49 -0000 1.14 *************** *** 69,73 **** $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('approval')) ?1:0; $new_article->version = -1; $new_article->language = $language; --- 69,73 ---- $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('article', 'approval')) ?1:0; $new_article->version = -1; $new_article->language = $language; Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Article.php 10 Oct 2008 04:27:40 -0000 1.54 --- Article.php 11 Oct 2008 06:13:49 -0000 1.55 *************** *** 119,123 **** $this->publication_date = time(); $this->template = $GLOBALS['Article']['val']['default_article_template']; ! $this->approved = (!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('approval')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; --- 119,123 ---- $this->publication_date = time(); $this->template = $GLOBALS['Article']['val']['default_article_template']; ! $this->approved = (!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('article', 'approval')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; |