From: Eloi G. <ada...@us...> - 2004-08-21 17:38:58
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8062/class Modified Files: Article.php ArticleManager.php Log Message: 2.6 Release Files Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Article.php 21 Aug 2004 17:02:08 -0000 1.19 --- Article.php 21 Aug 2004 17:38:16 -0000 1.20 *************** *** 45,48 **** --- 45,50 ---- * @param string meta_robots : Search Engine instructions for this page's metatags * @param string oldversion : Serialized copy of this article for archiving + * @param string language : 2-character code of the language that this article is written in + * @param int translation_group : All articles that are translations of each other carry the same id * */ *************** *** 82,85 **** --- 84,89 ---- var $meta_robots; var $oldversion; + var $language; + var $translation_group; /** *************** *** 102,112 **** /* If this is to be an existing article... */ ! if(substr($id,0,3)=='arc') ! { ! echo 'archive '.substr($id,4).'requested'; ! exit; ! } ! /* If this is to be an existing article... */ ! elseif($id) { /* If this is a regular (full) article, load all variables into $data */ --- 106,110 ---- /* If this is to be an existing article... */ ! if($id) { /* If this is a regular (full) article, load all variables into $data */ *************** *** 153,156 **** --- 151,156 ---- $this->meta_keywords = $data['meta_keywords']; $this->meta_robots = $data['meta_robots']; + $this->$language = $data['language']; + $this->$translation_group = $id; } // otherwise this is a new article. Load Default values. *************** *** 186,192 **** --- 186,195 ---- $this->pages = 1; $this->template = $_SESSION['SES_ART_master']->val['default_article_template']; + $this->approved = (!$_SESSION['SES_ART_master']->val['need_approval'] || $_SESSION['OBJ_user']->allow_access('approval')) ?1:0; $this->version = -1; $this->announce = 1; $this->meta_keywords = $this->meta_robots = ''; + $this->$language = $_SESSION['translate']->current_language; + $this->$translation_group = $data['translation_group']; } } *************** *** 238,242 **** $article_tags['SUMMARYTEXT'] = PHPWS_Text::parseOutput($this->summary); if(!$this->approved) ! $article_tags['SUMMARYTEXT'] .= '<br />'.$_SESSION['translate']->it('<b>NOTE:</b> This [var1] is awaiting approval. Visitors cannot see it', $_SESSION['translate']->it('article')); $article_tags['HITS'] = $this->hits; $article_tags['CREATED_DATE'] = date(PHPWS_DATE_FORMAT . ' ' . PHPWS_TIME_FORMAT, (strtotime($this->created_date)+$GLOBALS['core']->datetime->time_dif)); --- 241,245 ---- $article_tags['SUMMARYTEXT'] = PHPWS_Text::parseOutput($this->summary); if(!$this->approved) ! $article_tags['SUMMARYTEXT'] .= '<br /><span class="errortext">'.$_SESSION['translate']->it('<b>NOTE:</b> This [var1] is awaiting approval. Visitors cannot see it.', $_SESSION['translate']->it('article')).'</span>'; $article_tags['HITS'] = $this->hits; $article_tags['CREATED_DATE'] = date(PHPWS_DATE_FORMAT . ' ' . PHPWS_TIME_FORMAT, (strtotime($this->created_date)+$GLOBALS['core']->datetime->time_dif)); Index: ArticleManager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/ArticleManager.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ArticleManager.php 21 Aug 2004 17:02:08 -0000 1.13 --- ArticleManager.php 21 Aug 2004 17:38:16 -0000 1.14 *************** *** 491,495 **** { $now = date("Y-m-d H:i:s"); ! return "approved AND publication_date<='$now' AND (expiration_date IS NULL OR expiration_date>'$now')"; } --- 491,495 ---- { $now = date("Y-m-d H:i:s"); ! return '(approved OR updated_username="'.$_SESSION['OBJ_user']->username.'") AND publication_date<="'.$now.'" AND (expiration_date IS NULL OR expiration_date>"'.$now.'")'; } |