From: Eloi G. <ada...@us...> - 2004-10-10 15:36:50
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11677/inc Modified Files: AM_list_articles.php AM_view_archives.php AM_view_news.php A_delete.php A_edit.php A_publish.php A_remove_section.php A_update.php S_commit_to_article.php S_edit.php Log Message: Version 2.8 release files Index: AM_view_news.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_news.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AM_view_news.php 30 Sep 2004 05:14:32 -0000 1.6 --- AM_view_news.php 10 Oct 2004 15:36:10 -0000 1.7 *************** *** 26,34 **** if (isset($_REQUEST['newsFilter'])) $this->news_filter['letter'] = $_REQUEST['newsFilter']; ! if ($this->news_filter['letter']!='') { $filter = ' AND title LIKE "'.$this->news_filter['letter'].'%" ORDER BY title '; $this->news_filter['order'] = 'ASC'; } else { $filter = ' ORDER BY updated_date '; $this->news_filter['order'] = 'DESC'; --- 26,35 ---- if (isset($_REQUEST['newsFilter'])) $this->news_filter['letter'] = $_REQUEST['newsFilter']; ! if (!empty($this->news_filter['letter'])) { $filter = ' AND title LIKE "'.$this->news_filter['letter'].'%" ORDER BY title '; $this->news_filter['order'] = 'ASC'; } else { + $this->news_filter['letter'] = ''; $filter = ' ORDER BY updated_date '; $this->news_filter['order'] = 'DESC'; Index: S_edit.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_edit.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** S_edit.php 30 Sep 2004 05:14:32 -0000 1.3 --- S_edit.php 10 Oct 2004 15:36:10 -0000 1.4 *************** *** 121,124 **** --- 121,126 ---- $form->add('module', 'hidden', 'article'); + $this->transact_id = rand(1,999); + $form->add('transact_id', 'hidden', $this->transact_id); $tags = $form->getTemplate(TRUE, FALSE, $tags); Index: AM_list_articles.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_list_articles.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AM_list_articles.php 30 Sep 2004 05:14:32 -0000 1.6 --- AM_list_articles.php 10 Oct 2004 15:36:10 -0000 1.7 *************** *** 62,65 **** --- 62,66 ---- else { + $where = ''; if (!$_SESSION['OBJ_user']->allow_access('article', 'change_dates') && !($_SESSION['SES_ART_master']->val['users_change_dates'] && $_SESSION['OBJ_user']->isUser())) *************** *** 90,93 **** --- 91,95 ---- /* Now create the Row HTML */ $count=1; + $tags['LIST_ROWS'] = ''; foreach($result as $value) { *************** *** 111,114 **** --- 113,120 ---- :""; /* Put extended detail in the title attribute */ + if(!empty($value['expiration_date'])) + $expires = date(PHPWS_DATE_FORMAT, (strtotime($value['expiration_date'])+$GLOBALS['core']->datetime->time_dif)); + else + $expires = $_SESSION['translate']->it('Never'); $detail = '<span style="font-size:small">' . $_SESSION['translate']->it('Detail information for article #').$value['id'].'</b><br />' *************** *** 117,121 **** . $_SESSION['translate']->it('Last updated by [var1] on [var2]',$value['updated_username'],date(PHPWS_DATE_FORMAT, (strtotime($value['updated_date'])+$GLOBALS['core']->datetime->time_dif))).'<br />' . $_SESSION['translate']->it('Publication Date').': '.date(PHPWS_DATE_FORMAT, (strtotime($value['publication_date'])+$GLOBALS['core']->datetime->time_dif)).'<br />' ! . $_SESSION['translate']->it('Expires on').': '.date(PHPWS_DATE_FORMAT, (strtotime($value['expiration_date'])+$GLOBALS['core']->datetime->time_dif)).'<br />' . $_SESSION['translate']->it('Approved').'? ' .(($value['approved'])?$_SESSION['translate']->it('Yes'):$_SESSION['translate']->it('No')).'<br />' --- 123,127 ---- . $_SESSION['translate']->it('Last updated by [var1] on [var2]',$value['updated_username'],date(PHPWS_DATE_FORMAT, (strtotime($value['updated_date'])+$GLOBALS['core']->datetime->time_dif))).'<br />' . $_SESSION['translate']->it('Publication Date').': '.date(PHPWS_DATE_FORMAT, (strtotime($value['publication_date'])+$GLOBALS['core']->datetime->time_dif)).'<br />' ! . $_SESSION['translate']->it('Expires on').': '.$expires.'<br />' . $_SESSION['translate']->it('Approved').'? ' .(($value['approved'])?$_SESSION['translate']->it('Yes'):$_SESSION['translate']->it('No')).'<br />' *************** *** 152,156 **** $row['ID'] = $value['id']; ! $row['ACTION'] = '<select name="action_list" title="' . $_SESSION['translate']->it('Select the desired action').'">'.$actions.'</select>'; $row['ACTION'] = $row['ACTION']; --- 158,162 ---- $row['ID'] = $value['id']; ! $row['ACTION'] = '<select name="edit" title="' . $_SESSION['translate']->it('Select the desired action').'">'.$actions.'</select>'; $row['ACTION'] = $row['ACTION']; Index: A_remove_section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_remove_section.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** A_remove_section.php 30 Sep 2004 05:14:32 -0000 1.3 --- A_remove_section.php 10 Oct 2004 15:36:10 -0000 1.4 *************** *** 31,46 **** .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS['CNT_article']['content'] ! = $_SESSION['translate']->it('Are you sure you want to [var1] [var2]?' ! , '<b>'.$_SESSION['translate']->it('delete').'</b>' ! , '<b><u>' .$SECT_id. $this->sections[$SECT_id]->title . '</u></b><br /><br />') . '<form name="SECT_confirm_delete" action="index.php" method="post">' . '<input name="module" value="article" type="hidden">' . '<input name="section" value="remove" type="hidden">' . '<input name="SECT_id" value="'.$SECT_id.'" type="hidden">' ! . '<input name="yes" value="'.$_SESSION['translate']->it('Yes').'" type="submit">'; . ' ' ! . '<input name="no" value="'.$_SESSION['translate']->it('No').'" type="submit">'; ! . '</form>; } ! ! ?> --- 31,45 ---- .' - '. $_SESSION['translate']->it('Confirm Action').'!'; $GLOBALS['CNT_article']['content'] ! = $_SESSION['translate']->it('Are you sure you want to <strong>[var1]</strong> "[var2]"?' ! , $_SESSION['translate']->it('delete') ! , '[id#'.$SECT_id.'] '.$this->sections[$SECT_id]->title) . '<form name="SECT_confirm_delete" action="index.php" method="post">' . '<input name="module" value="article" type="hidden">' . '<input name="section" value="remove" type="hidden">' . '<input name="SECT_id" value="'.$SECT_id.'" type="hidden">' ! . '<input name="yes" value="'.$_SESSION['translate']->it('Yes').'" type="submit">' . ' ' ! . '<input name="no" value="'.$_SESSION['translate']->it('No').'" type="submit">' ! . '</form>'; } ! ?> \ No newline at end of file Index: A_publish.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_publish.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** A_publish.php 18 Jun 2004 23:31:10 -0000 1.2 --- A_publish.php 10 Oct 2004 15:36:10 -0000 1.3 *************** *** 15,28 **** /* Make sure that the expiration date is good. */ if (!($this->expiration_date > $now || $this->expiration_date==NULL)) ! $query_data['expiration_date'] = date("Y-m-d H:i:s", mktime(0,0,0 ,date('m')+$_SESSION['SES_ART_master']->val['expiration_months'] ,date('d')+$_SESSION['SES_ART_master']->val['expiration_days'] ,date('Y')+$_SESSION['SES_ART_master']->val['expiration_years'])); ! $query_data['publication_date'] = date("Y-m-d H:i:s"); $GLOBALS['core']->sqlUpdate($query_data, 'mod_article', 'id', $this->id); PHPWS_Fatcat::activate($this->id, 'article'); - $this->publication_date = $query_data['expiration_date']; - $this->expiration_date = $query_data['publication_date']; - ?> --- 15,25 ---- /* Make sure that the expiration date is good. */ if (!($this->expiration_date > $now || $this->expiration_date==NULL)) ! $this->expiration_date = $query_data['expiration_date'] = date("Y-m-d H:i:s", mktime(0,0,0 ,date('m')+$_SESSION['SES_ART_master']->val['expiration_months'] ,date('d')+$_SESSION['SES_ART_master']->val['expiration_days'] ,date('Y')+$_SESSION['SES_ART_master']->val['expiration_years'])); ! $this->publication_date = $query_data['publication_date'] = date("Y-m-d H:i:s"); $GLOBALS['core']->sqlUpdate($query_data, 'mod_article', 'id', $this->id); PHPWS_Fatcat::activate($this->id, 'article'); ?> Index: A_edit.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_edit.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** A_edit.php 30 Sep 2004 05:14:32 -0000 1.7 --- A_edit.php 10 Oct 2004 15:36:10 -0000 1.8 *************** *** 72,76 **** /* Show a "new article" bar */ $article_body .= "<br /><div class=\"bg_medium\">" ! . $_SESSION['translate']->it("Start of Page") . " $page_counter</div>"; } /* If this is the section to be edited... */ --- 72,76 ---- /* Show a "new article" bar */ $article_body .= "<br /><div class=\"bg_medium\">" ! . $_SESSION['translate']->it("Start of Page").' '.$this->pages.'</div>'; } /* If this is the section to be edited... */ *************** *** 247,251 **** if (count($this->order)>0) $GLOBALS['CNT_article']['content'] ! .= '<form name="ARTICLE_title" action="index.php" method="post">' . $article_tags['HIDDEN'] . $titleform --- 247,251 ---- if (count($this->order)>0) $GLOBALS['CNT_article']['content'] ! = '<form name="ARTICLE_title" action="index.php" method="post">' . $article_tags['HIDDEN'] . $titleform *************** *** 260,264 **** else $GLOBALS['CNT_article']['content'] ! .= '<form name="SECT_edit" action="index.php" method="post">' . $article_tags['HIDDEN'] . $titleform . $article_body --- 260,264 ---- else $GLOBALS['CNT_article']['content'] ! = '<form name="SECT_edit" action="index.php" method="post">' . $article_tags['HIDDEN'] . $titleform . $article_body Index: A_delete.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_delete.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** A_delete.php 30 Sep 2004 05:14:32 -0000 1.4 --- A_delete.php 10 Oct 2004 15:36:10 -0000 1.5 *************** *** 93,97 **** $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('Article Manager') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; ! $GLOBALS['CNT_article']['content'] = $_SESSION['translate']->it('Are you sure you want to <b>[var1] "[var2]"</b>?' , $_SESSION['translate']->it('delete'), $this->title) . '<form name="ARTICLE_confirm_delete" action="index.php" method="post">' --- 93,97 ---- $GLOBALS['CNT_article']['title'] = $_SESSION['translate']->it('Article Manager') .' - '. $_SESSION['translate']->it('Confirm Action').'!'; ! $GLOBALS['CNT_article']['content'] = $_SESSION['translate']->it('Are you sure you want to <strong>[var1]</strong> "[var2]"?' , $_SESSION['translate']->it('delete'), $this->title) . '<form name="ARTICLE_confirm_delete" action="index.php" method="post">' Index: AM_view_archives.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_archives.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AM_view_archives.php 30 Sep 2004 05:14:32 -0000 1.4 --- AM_view_archives.php 10 Oct 2004 15:36:10 -0000 1.5 *************** *** 91,94 **** --- 91,95 ---- else { + $filter = ''; $start_date = $_SESSION['translate']->it('this lifetime'); } Index: S_commit_to_article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_commit_to_article.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** S_commit_to_article.php 18 Jun 2004 23:31:10 -0000 1.2 --- S_commit_to_article.php 10 Oct 2004 15:36:10 -0000 1.3 *************** *** 18,21 **** --- 18,28 ---- return false; } + /* If the save request carries the current transaction id... */ + if(isset($_POST['transact_id']) && $_POST['transact_id']==$this->transact_id) + /* select a new id and continue */ + $this->transact_id = rand(1,999); + else + /* otherwise, don't save anything */ + return; /* If this is a new section, add it to the article */ Index: A_update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_update.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** A_update.php 18 Jun 2004 23:31:10 -0000 1.2 --- A_update.php 10 Oct 2004 15:36:10 -0000 1.3 *************** *** 17,31 **** || ($_SESSION['SES_ART_master']->val['users_allow_comments'] && $_SESSION['OBJ_user']->isUser())) { ! $this->allow_comments = ($_POST['ARTICLE_allow_comments'])?1:0; if ($_SESSION['OBJ_user']->allow_access('article', "allow_anon")) ! $this->allow_anonymous = ($_POST['ARTICLE_allow_anonymous'])?1:0; } ! if (isset($_POST['ARTICLE_publication_date_month'])) { $this->publication_date = ! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_publication_date_month'] ! ,$_POST['ARTICLE_publication_date_day'] ! ,$_POST['ARTICLE_publication_date_year'])); if ($this->publication_date < $this->created_date) $this->publication_date = $this->created_date; --- 17,31 ---- || ($_SESSION['SES_ART_master']->val['users_allow_comments'] && $_SESSION['OBJ_user']->isUser())) { ! $this->allow_comments = (isset($_POST['ARTICLE_allow_comments']))?1:0; if ($_SESSION['OBJ_user']->allow_access('article', "allow_anon")) ! $this->allow_anonymous = (isset($_POST['ARTICLE_allow_anonymous']))?1:0; } ! if(isset($_POST['ARTICLE_publication_date_MONTH'])) { $this->publication_date = ! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_publication_date_MONTH'] ! ,$_POST['ARTICLE_publication_date_DAY'] ! ,$_POST['ARTICLE_publication_date_YEAR'])); if ($this->publication_date < $this->created_date) $this->publication_date = $this->created_date; *************** *** 34,42 **** } ! if (isset($_POST['ARTICLE_expiration_date_month'])) $this->expiration_date = ! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_expiration_date_month'] ! ,$_POST['ARTICLE_expiration_date_day'] ! ,$_POST['ARTICLE_expiration_date_year'])); if (isset($_POST['ARTICLE_expiration_flag'])) $this->expiration_date = NULL; --- 34,42 ---- } ! if (isset($_POST['ARTICLE_expiration_date_MONTH'])) $this->expiration_date = ! date("Y-m-d H:i:s", mktime(0,0,0,$_POST['ARTICLE_expiration_date_MONTH'] ! ,$_POST['ARTICLE_expiration_date_DAY'] ! ,$_POST['ARTICLE_expiration_date_YEAR'])); if (isset($_POST['ARTICLE_expiration_flag'])) $this->expiration_date = NULL; |