From: Eloi G. <ada...@us...> - 2009-02-26 23:47:35
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16965/class Modified Files: AM_EditForms.php AM_Actions.php AM_Data.php Article.php Log Message: Fixed Bug Report [ 2631456 ] - AM 4.21 permission bug Index: AM_EditForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_EditForms.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AM_EditForms.php 26 Jan 2009 03:13:15 -0000 1.13 --- AM_EditForms.php 26 Feb 2009 23:47:29 -0000 1.14 *************** *** 264,268 **** $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!PHPWS_Settings::get('article', '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').'" />'; --- 264,268 ---- $article_tags['SAVE_DRAFT_BUTTON'] = '<input type="submit" name="ARTICLE_vars[op:save_draft]" value="'.dgettext('article', 'Save Article as Draft').'" />'; ! if (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) $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.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** AM_Data.php 21 Nov 2008 06:13:14 -0000 1.21 --- AM_Data.php 26 Feb 2009 23:47:29 -0000 1.22 *************** *** 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'); --- 148,152 ---- , 'link' => 'index.php?module=article&op=main_menu'); ! if (Current_User::allow('article', 'approve')) { /* Count unapproved articles (custom) */ $version_db = new PHPWS_DB('article_version'); Index: AM_Actions.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Actions.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AM_Actions.php 2 Feb 2009 04:42:36 -0000 1.17 --- AM_Actions.php 26 Feb 2009 23:47:29 -0000 1.18 *************** *** 67,71 **** $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) ?1:0; $new_article->version = -1; $new_article->language = $language; --- 67,71 ---- $new_article->updated_date = date("Y-m-d H:i:s"); $new_article->hits = 0; ! $new_article->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) ?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.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Article.php 24 Feb 2009 17:49:47 -0000 1.62 --- Article.php 26 Feb 2009 23:47:29 -0000 1.63 *************** *** 119,123 **** $this->publication_date = time(); $this->template = PHPWS_Settings::get('article', 'default_article_template'); ! $this->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; --- 119,123 ---- $this->publication_date = time(); $this->template = PHPWS_Settings::get('article', 'default_article_template'); ! $this->approved = (!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approve')) ?1:0; // if ($_SESSION['translate']->langActive) // $this->language = $_SESSION['translate']->current_language; |