From: Eloi G. <ada...@us...> - 2004-06-18 23:31:25
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7283/inc Modified Files: AM_list_articles.php AM_view_archives.php AM_view_news.php A_delete.php A_edit.php A_mail.php A_publish.php A_remove_section.php A_save.php A_update.php S_commit_to_article.php S_edit.php S_save.php S_update.php editconfig.php runtime.php saveconfig.php Log Message: 2.3 Release Files Index: S_edit.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_edit.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** S_edit.php 19 Feb 2004 21:46:46 -0000 1.1 --- S_edit.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Displays an editing interface for this section. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 71,75 **** } $myelements[0] .= PHPWS_Form::formSubmit($_SESSION['translate']->it('Select an image from the library'), 'IMGLib_op') ! . PHPWS_Form::formHidden('IMGLib_linkBack', 'index.php?module=article&IMGLib_op=1&IMGLib_select=1') . CLS_help::show_link('article', 'section_lib_image') . '<br /><br />'; --- 73,77 ---- } $myelements[0] .= PHPWS_Form::formSubmit($_SESSION['translate']->it('Select an image from the library'), 'IMGLib_op') ! . PHPWS_Form::formHidden('IMGLib_return_data', 'edit') . CLS_help::show_link('article', 'section_lib_image') . '<br /><br />'; Index: S_update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_update.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** S_update.php 19 Feb 2004 21:46:46 -0000 1.1 --- S_update.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- * Assigns a free image directory. * + * @version $Id$ + * * Imagefile Storage Optimization * Most OSs optimally search & retrieve up to about 500 files per directory. Index: AM_view_news.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_news.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AM_view_news.php 19 Feb 2004 21:46:46 -0000 1.1 --- AM_view_news.php 18 Jun 2004 23:31:09 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Lists the articles stored in the database in a "News Page" * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 14,18 **** $GLOBALS['CNT_article']['content'] = ''; /* If article row datum hasn't been retrieved/viewed yet... */ ! if(!isset($this->pager) || !isset($_REQUEST['PAGER_limit']) || isset($_REQUEST['newsFilter'])) { $this->pager = new PHPWS_Pager; --- 16,21 ---- $GLOBALS['CNT_article']['content'] = ''; /* If article row datum hasn't been retrieved/viewed yet... */ ! if(!isset($this->pager) || !isset($_REQUEST['PAGER_limit']) ! || isset($_REQUEST['newsFilter']) || isset($_REQUEST['order'])) { $this->pager = new PHPWS_Pager; *************** *** 22,34 **** if (isset($_REQUEST['newsFilter'])) ! $this->filter = $_REQUEST['newsFilter']; ! ! if ($this->filter!='') ! $filter = ' AND title LIKE "'.$this->filter.'%" ORDER BY title ASC'; ! else ! $filter = ' ORDER BY updated_date DESC'; $result = $GLOBALS['core']->getCol('SELECT id FROM ' . $this->sql_article_table ! . ' WHERE ' . $this->get_published_sql().' AND mainarticle=0'.$this->sql_predicate . $filter); $this->pager->setData($result); $result = NULL; --- 25,47 ---- 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'; ! } ! /* Allow user to override display order */ ! if (isset($_REQUEST['order']) && $o = strtolower($_REQUEST['order'])) { ! if ($o=='asc') ! $this->news_filter['order'] = 'ASC'; ! if ($o=='desc') ! $this->news_filter['order'] = 'DESC'; ! } $result = $GLOBALS['core']->getCol('SELECT id FROM ' . $this->sql_article_table ! . ' WHERE ' . $this->get_published_sql().' AND mainarticle=0'.$this->sql_predicate . $filter.$this->news_filter['order']); $this->pager->setData($result); $result = NULL; *************** *** 40,44 **** /* Retrieve all article listings for this page */ $sql = 'SELECT * FROM ' . $this->sql_article_table ! . ' WHERE id IN (' . $data . ') ORDER BY updated_date DESC'; if(!$result = $GLOBALS['core']->query($sql)) return; --- 53,57 ---- /* Retrieve all article listings for this page */ $sql = 'SELECT * FROM ' . $this->sql_article_table ! . ' WHERE id IN ('.$data.')'. $filter.$this->news_filter['order']); if(!$result = $GLOBALS['core']->query($sql)) return; *************** *** 61,65 **** $tags['ALPHABET'] = PHPWS_Text::moduleLink($_SESSION['translate']->it('ALL'), 'article', array('view'=>'news', 'newsFilter'=>'') ) . " \n"; foreach ($alphabet as $alphachar) ! if ($alphachar!=$this->filter) $tags['ALPHABET'] .= PHPWS_Text::moduleLink($alphachar, 'article', array('view'=>'news', 'newsFilter'=>$alphachar) ) . " \n"; else --- 74,78 ---- $tags['ALPHABET'] = PHPWS_Text::moduleLink($_SESSION['translate']->it('ALL'), 'article', array('view'=>'news', 'newsFilter'=>'') ) . " \n"; foreach ($alphabet as $alphachar) ! if ($alphachar!=$this->news_filter['letter']) $tags['ALPHABET'] .= PHPWS_Text::moduleLink($alphachar, 'article', array('view'=>'news', 'newsFilter'=>$alphachar) ) . " \n"; else *************** *** 73,78 **** $title = $_SESSION['translate']->it('All Articles'); ! if ($this->filter!='') ! $title .= $_SESSION['translate']->it(' Starting With `[var1]`', $this->filter); $GLOBALS['Layout_title'] = $title . ' - ' . $_SESSION['OBJ_layout']->page_title; $GLOBALS['CNT_article']['title'] = '<center><b>' . $title . '</b></center>'; --- 86,91 ---- $title = $_SESSION['translate']->it('All Articles'); ! if ($this->news_filter['letter']!='') ! $title .= $_SESSION['translate']->it(' Starting With `[var1]`', $this->news_filter['letter']); $GLOBALS['Layout_title'] = $title . ' - ' . $_SESSION['OBJ_layout']->page_title; $GLOBALS['CNT_article']['title'] = '<center><b>' . $title . '</b></center>'; Index: A_publish.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_publish.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_publish.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_publish.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Immediately publishes this article so users can see it. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: AM_view_archives.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_archives.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AM_view_archives.php 22 Apr 2004 17:05:28 -0000 1.2 --- AM_view_archives.php 18 Jun 2004 23:31:09 -0000 1.3 *************** *** 6,9 **** --- 6,11 ---- * All parameters are passed via $_REQUEST * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 30,33 **** --- 32,39 ---- $this->arc_filter['month'] = (isset($_REQUEST['month'])) ?$_REQUEST['month'] :null; $this->arc_filter['day'] = (isset($_REQUEST['day'])) ?$_REQUEST['day'] :null; + if (isset($_REQUEST['order']) && strtolower($_REQUEST['order'])=='asc') + $this->arc_filter['order'] = 'ASC'; + else + $this->arc_filter['order'] = 'DESC'; if (isset($_REQUEST['datetype']) && $_REQUEST['datetype']!='publication_date') Index: S_commit_to_article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_commit_to_article.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** S_commit_to_article.php 19 Feb 2004 21:46:46 -0000 1.1 --- S_commit_to_article.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- * Applies this section to the parent Article. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/runtime.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** runtime.php 19 Feb 2004 21:46:46 -0000 1.1 --- runtime.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 3,6 **** --- 3,8 ---- * This is the runtime file for the article module. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: saveconfig.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/saveconfig.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** saveconfig.php 19 Feb 2004 21:46:46 -0000 1.4 --- saveconfig.php 18 Jun 2004 23:31:10 -0000 1.5 *************** *** 5,8 **** --- 5,10 ---- * Saves the module's new default settings. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: AM_list_articles.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_list_articles.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AM_list_articles.php 21 Apr 2004 19:55:23 -0000 1.2 --- AM_list_articles.php 18 Jun 2004 23:31:09 -0000 1.3 *************** *** 4,7 **** --- 4,9 ---- * Lists the articles stored in the database in user-selectable formats * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: A_mail.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_mail.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_mail.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_mail.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Emails this article and all associated sections to someone else * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 80,84 **** , $this->title , $_SESSION['translate']->it('sent to').' '.$_POST['ART_r_email']); ! } else $content = 'EMAIL ERROR: ' . $status->getMessage(); --- 82,88 ---- , $this->title , $_SESSION['translate']->it('sent to').' '.$_POST['ART_r_email']); ! } elseif($status===false) ! $content = 'EMAIL ERROR: '.$content = $_SESSION["translate"]->it("Email is not correctly set up on this server."); ! else $content = 'EMAIL ERROR: ' . $status->getMessage(); Index: A_remove_section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_remove_section.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_remove_section.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_remove_section.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Removes the section at SECT_id from this article. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: A_save.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_save.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_save.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_save.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Saves this article to the database. * + * @version $Id$ + * * @author Adam Morton <ad...@NO...> * @module Article Manager Index: A_edit.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_edit.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** A_edit.php 21 Apr 2004 19:55:40 -0000 1.2 --- A_edit.php 18 Jun 2004 23:31:10 -0000 1.3 *************** *** 5,8 **** --- 5,10 ---- * id provided to specify editing of a specific section within this article. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 138,144 **** $currentYear = date("Y", strtotime($this->publication_date)); $article_tags['PUBLICATION_LABEL'] = $_SESSION['translate']->it('Publish on').' :'; ! $article_tags['PUBLICATION_DATE'] = PHPWS_Form::formDate("ARTICLE_publication_date" ! ,date('Ymd', strtotime($this->publication_date)) ! ,$currentYear,$currentYear + $_SESSION['SES_ART_master']->val['default_year_count']) . CLS_help::show_link('article', "article_publication_date"); --- 140,146 ---- $currentYear = date("Y", strtotime($this->publication_date)); $article_tags['PUBLICATION_LABEL'] = $_SESSION['translate']->it('Publish on').' :'; ! $article_tags['PUBLICATION_DATE'] = PHPWS_Form::formDate('ARTICLE_publication_date' ! , date('Ymd', strtotime($this->publication_date)) ! , $currentYear, $currentYear + $_SESSION['SES_ART_master']->val['default_year_count']) . CLS_help::show_link('article', "article_publication_date"); Index: S_save.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/S_save.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** S_save.php 19 Feb 2004 21:46:46 -0000 1.1 --- S_save.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Saves this section to the database. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 18,29 **** $this->article_id = $query_data['article_id'] = $parentid; ! /* If there's an old image here... */ if ($this->old_image) { /* If WIKI is running, copy the old image to "/old" */ ! if (isset($_SESSION['OBJ_WIKI'])) ! PHPWS_File::fileCopy($_SESSION['SES_ART_master']->image_path.$this->image['directory'].$this->old_image ! , $_SESSION['SES_ART_master']->image_path.'old/' ! , $this->old_image, TRUE, FALSE); /* Get rid of it */ @unlink($_SESSION['SES_ART_master']->image_path.$this->image['directory'].$this->old_image); --- 20,31 ---- $this->article_id = $query_data['article_id'] = $parentid; ! /* If there's an old (obsolete) image here... */ if ($this->old_image) { /* If WIKI is running, copy the old image to "/old" */ ! // if (isset($_SESSION['OBJ_WIKI'])) ! // PHPWS_File::fileCopy($_SESSION['SES_ART_master']->image_path.$this->image['directory'].$this->old_image ! // , $_SESSION['SES_ART_master']->image_path.'old/' ! // , $this->old_image, TRUE, FALSE); /* Get rid of it */ @unlink($_SESSION['SES_ART_master']->image_path.$this->image['directory'].$this->old_image); *************** *** 48,58 **** /* Move any images from its holding area to its assigned space */ ! if ($this->temp_image ! && PHPWS_File::fileCopy($_SESSION['SES_ART_master']->image_path.$this->temp_image['name'] ! , $_SESSION['SES_ART_master']->image_path.$this->image['directory'] ! , $newid.strrchr($this->image['name'], '.'), TRUE, FALSE)) { ! @unlink($_SESSION['SES_ART_master']->image_path.$this->image['name']); ! $query_data['image_name'] = $this->image['name'] = $newid.strrchr($this->image['name'], '.'); } } --- 50,60 ---- /* Move any images from its holding area to its assigned space */ ! if ($this->temp_image) { ! $query_data['image_name'] = $this->image['name'] = $newid.'-'.rand(100, 999).strrchr($this->image['name'], '.'); ! if (PHPWS_File::fileCopy($_SESSION['SES_ART_master']->image_path.$this->temp_image['name'] ! , $_SESSION['SES_ART_master']->image_path.$this->image['directory'] ! , $this->image['name'], TRUE, FALSE)) ! @unlink($_SESSION['SES_ART_master']->image_path.$this->temp_image['name']); } } Index: A_delete.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_delete.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_delete.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_delete.php 18 Jun 2004 23:31:09 -0000 1.2 *************** *** 5,8 **** --- 5,10 ---- * and should be manually removed if you are sure no other article is using them. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: A_update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_update.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** A_update.php 19 Feb 2004 21:46:46 -0000 1.1 --- A_update.php 18 Jun 2004 23:31:10 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- * Updates this article's information in memory * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager Index: editconfig.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/editconfig.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** editconfig.php 19 Feb 2004 21:46:46 -0000 1.6 --- editconfig.php 18 Jun 2004 23:31:10 -0000 1.7 *************** *** 7,10 **** --- 7,12 ---- * Edits the module's default settings. * + * @version $Id$ + * * @author Eloi George <el...@NO...> * @module Article Manager *************** *** 153,157 **** $tags['DEFAULT_YEAR_COUNT'] = $_SESSION['translate']->it('Publication dates can be set up to [var1] year(s) from article creation.' , PHPWS_Form::formSelect('CONFIG_default_year_count', range(1,5) ! , $this->val['default_year_count'], NULL, NULL, NULL) ); /* max_image_size */ --- 155,159 ---- $tags['DEFAULT_YEAR_COUNT'] = $_SESSION['translate']->it('Publication dates can be set up to [var1] year(s) from article creation.' , PHPWS_Form::formSelect('CONFIG_default_year_count', range(1,5) ! , $this->val['default_year_count'], TRUE) ); /* max_image_size */ |