You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(120) |
Jun
(74) |
Jul
(97) |
Aug
(35) |
Sep
(35) |
Oct
(34) |
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(18) |
Feb
(8) |
Mar
(7) |
Apr
(23) |
May
(28) |
Jun
(31) |
Jul
(27) |
Aug
(34) |
Sep
(48) |
Oct
(511) |
Nov
(197) |
Dec
(333) |
| 2005 |
Jan
(212) |
Feb
(33) |
Mar
(94) |
Apr
(51) |
May
(16) |
Jun
|
Jul
(200) |
Aug
(43) |
Sep
(88) |
Oct
(60) |
Nov
(62) |
Dec
(41) |
| 2006 |
Jan
(94) |
Feb
(49) |
Mar
(54) |
Apr
|
May
(39) |
Jun
(39) |
Jul
(61) |
Aug
(36) |
Sep
(23) |
Oct
(76) |
Nov
(73) |
Dec
(32) |
| 2007 |
Jan
|
Feb
(87) |
Mar
|
Apr
(8) |
May
(36) |
Jun
(49) |
Jul
(54) |
Aug
(8) |
Sep
(50) |
Oct
(36) |
Nov
|
Dec
(3) |
| 2008 |
Jan
(133) |
Feb
(54) |
Mar
(39) |
Apr
(2) |
May
(6) |
Jun
(74) |
Jul
(97) |
Aug
(70) |
Sep
(12) |
Oct
(20) |
Nov
(64) |
Dec
(24) |
| 2009 |
Jan
(25) |
Feb
(49) |
Mar
(18) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:15:39
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11734/class Modified Files: Image.php Log Message: RFE ["trf000"] - Image fields now handle multimedia filecabinet content (more than just pictures!) Index: Image.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Image.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Image.php 21 Aug 2008 20:17:32 -0000 1.8 --- Image.php 21 Nov 2008 06:15:30 -0000 1.9 *************** *** 31,36 **** if (!empty($link)) $file->_source->url = 'http://'.$link; - // else - // $file->allowImageLink(false); return $file->getTag(); } --- 31,34 ---- *************** *** 38,45 **** /** ! * Adds to an editing interface for a section/summary image. * * @author Eloi George <el...@NO...> - * @module Article Manager * @param object $object : Data object. * @param object $form : Form object to add to --- 36,42 ---- /** ! * Adds an editing interface for a section/summary image to a supplied form object. * * @author Eloi George <el...@NO...> * @param object $object : Data object. * @param object $form : Form object to add to *************** *** 60,68 **** PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); $manager = Cabinet::fileManager('SECTION_'.$form_id.'_image_id', $object->image_id); ! $manager->setMaxWidth($GLOBALS['Article']['val']['max_image_width']); ! $manager->setMaxHeight($GLOBALS['Article']['val']['max_image_height']); ! $manager->setMaxSize($GLOBALS['Article']['val']['max_image_size'] * 1024); $manager->forceResize(); - $manager->imageOnly(false, false); if (method_exists('FC_File_Manager', 'setPlaceholderMaxHeight')) { $manager->setPlaceholderMaxWidth(100); --- 57,64 ---- PHPWS_Core::initModClass('filecabinet', 'Cabinet.php'); $manager = Cabinet::fileManager('SECTION_'.$form_id.'_image_id', $object->image_id); ! $manager->setMaxWidth(PHPWS_Settings::get('article', 'max_image_width')); ! $manager->setMaxHeight(PHPWS_Settings::get('article', 'max_image_height')); ! $manager->setMaxSize(PHPWS_Settings::get('article', 'max_image_size') * 1024); $manager->forceResize(); if (method_exists('FC_File_Manager', 'setPlaceholderMaxHeight')) { $manager->setPlaceholderMaxWidth(100); *************** *** 93,97 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param object $object : Data object. * @param array $data : . --- 89,92 ---- |
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:13:30
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11519/docs Modified Files: Changes.txt Log Message: Moved installation auto-import of demonstration article and manual to install.php Also took out @module comments Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Changes.txt 19 Nov 2008 06:01:27 -0000 1.35 --- Changes.txt 21 Nov 2008 06:13:15 -0000 1.36 *************** *** 1,4 **** + TODO--xxxxx--AM uses the core XML-RPC library now ! + TODO--xxxxx--mod-rewite URIs now look more like the proposed spec to insure backwards compatibility ============================================= --- 1,4 ---- + TODO--xxxxx--AM uses the core XML-RPC library now ! ============================================= *************** *** 13,16 **** --- 13,20 ---- + Fixed caching of homepage summary display for visitors + If set in the AM settings, all changes to articles are now summarized in /logs/event.log + + Moved handling of configuration settings to the PHPWS_Settings class + + Moved installation auto-import of demonstration article and manual to install.php + xxxx--RFE ["trf000"] - Image fields now handle multimedia filecabinet content (more than just pictures!) + xxxx--mod-rewite URIs now look more like the proposed spec to insure backwards compatibility ======================== |
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:13:27
|
Update of /cvsroot/phpwebsite-comm/modules/article/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11519/boost Modified Files: update.php Added Files: install.php Log Message: Moved installation auto-import of demonstration article and manual to install.php Also took out @module comments --- NEW FILE: install.php --- <?php function article_install(&$content, $branchInstall=FALSE) { PHPWS_Core::initModClass('article', 'AM_Data.php'); PHPWS_Core::initModClass('article', 'Section.php'); PHPWS_Core::initModClass('article', 'Article.php'); PHPWS_Core::initModClass('article', 'Image.php'); // Import Demo Article and Operation Manual PHPWS_Core::initModClass('article', 'AM_Actions.php'); PHPWS_AM_Actions::XML_import('demo_article.xml','mod/article/docs/', 1, 1); $content[] = 'Imported Demonstration Article'; PHPWS_AM_Actions::XML_import('manual.xml','mod/article/docs/', 1, 1); $content[] = 'Imported User Guide'; return TRUE; } ?> Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/update.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** update.php 18 Nov 2008 05:08:55 -0000 1.24 --- update.php 21 Nov 2008 06:13:11 -0000 1.25 *************** *** 231,235 **** return false; } ! $content[] = '<pre> ======================== --- 231,240 ---- return false; } ! ! $settings = array('log_events' => 0); ! include(PHPWS_HOME_DIR . 'files/article/config.php'); ! PHPWS_Settings::set('article', $settings); ! $content[] = 'Configuration settings moved to the PHPWS_Settings class'; ! $content[] = '<pre> ======================== *************** *** 243,246 **** --- 248,252 ---- + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog + Fixed caching of homepage summary display for visitors + + Moved handling of configuration settings to the PHPWS_Settings class </pre>'; |
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:13:25
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11519/inc Modified Files: A_save.php xmlrpc.php runtime.php A_update.php Added Files: settings.php Log Message: Moved installation auto-import of demonstration article and manual to install.php Also took out @module comments Index: xmlrpc.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/xmlrpc.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** xmlrpc.php 10 Oct 2008 04:27:40 -0000 1.10 --- xmlrpc.php 21 Nov 2008 06:13:14 -0000 1.11 *************** *** 198,202 **** if(!empty($mt_allow_comments) && (Current_User::allow('article', 'allow_comments') ! || ($GLOBALS['Article']['val']['users_allow_comments'] && Current_User::getId()))) $article->allow_comments = $mt_allow_comments; --- 198,202 ---- if(!empty($mt_allow_comments) && (Current_User::allow('article', 'allow_comments') ! || (PHPWS_Settings::get('article', 'users_allow_comments') && Current_User::getId()))) $article->allow_comments = $mt_allow_comments; Index: A_save.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_save.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** A_save.php 21 Aug 2008 20:17:19 -0000 1.19 --- A_save.php 21 Nov 2008 06:13:14 -0000 1.20 *************** *** 134,138 **** if ($this->announce) { PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_ModSettings::reset_cache(); } } --- 134,138 ---- if ($this->announce) { PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_Data::reset_cache(); } } Index: A_update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/A_update.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** A_update.php 21 Aug 2008 20:17:19 -0000 1.10 --- A_update.php 21 Nov 2008 06:13:14 -0000 1.11 *************** *** 53,57 **** if (Current_User::allow('article', "allow_comments") ! || ($GLOBALS['Article']['val']['users_allow_comments'] && Current_User::getId())) { $this->allow_comments = (int) !empty($_POST['ARTICLE_allow_comments']); --- 53,57 ---- if (Current_User::allow('article', "allow_comments") ! || (PHPWS_Settings::get('article', 'users_allow_comments') && Current_User::getId())) { $this->allow_comments = (int) !empty($_POST['ARTICLE_allow_comments']); *************** *** 73,77 **** if (isset($_POST['ARTICLE_expiration_date'])) $this->expiration_date = strtotime($_POST['ARTICLE_expiration_date']); ! if (isset($_POST['ARTICLE_expiration_flag']) || !$GLOBALS['Article']['val']['can_expire']) $this->expiration_date = 0; if (isset($_POST['ARTICLE_template'])) --- 73,77 ---- if (isset($_POST['ARTICLE_expiration_date'])) $this->expiration_date = strtotime($_POST['ARTICLE_expiration_date']); ! if (isset($_POST['ARTICLE_expiration_flag']) || !PHPWS_Settings::get('article', 'can_expire')) $this->expiration_date = 0; if (isset($_POST['ARTICLE_template'])) --- NEW FILE: settings.php --- <?php $settings['default_article_template'] = 'Blank.tpl'; $settings['default_section_template'] = 'Centered_Image.tpl'; $settings['summaries_on_homepage'] = 5; $settings['prev_n_articles'] = 5; $settings['popular_articles'] = 5; $settings['listings_per_page'] = 20; $settings['need_approval'] = 1; $settings['default_allow_comments'] = 1; $settings['default_allow_anon'] = 0; $settings['can_expire'] = 0; $settings['expiration_years'] = 3; $settings['expiration_months'] = 0; $settings['expiration_days'] = 0; $settings['log_events'] = 0; $settings['max_image_size'] = 26; $settings['max_image_height'] = 400; $settings['max_image_width'] = 400; $settings['lock_expiration_time'] = 3600; $settings['use_comments'] = 1; $settings['long_date_format'] = '%I:%M:%S%p, %A, %B %d %Y'; $settings['short_date_format'] = '%b/%d/%y'; $settings['categorized_display'] = 0; $settings['display_columns'] = 1; $settings['summaries_per_category'] = 1; $settings['category_order'] = ''; ?> Index: runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/runtime.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** runtime.php 21 Aug 2008 20:17:19 -0000 1.16 --- runtime.php 21 Nov 2008 06:13:14 -0000 1.17 *************** *** 10,17 **** if(!isset($_REQUEST['module'])) { ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_ModSettings::init(); ! $config = $GLOBALS['Article']['val']; /* Display the homepage articles */ --- 10,19 ---- if(!isset($_REQUEST['module'])) { ! PHPWS_Core::initModClass('article', 'AM_Data.php'); ! PHPWS_Core::initModClass('article', 'Section.php'); ! PHPWS_Core::initModClass('article', 'Article.php'); ! PHPWS_Core::initModClass('article', 'Image.php'); ! $config = PHPWS_Settings::get('article'); /* Display the homepage articles */ |
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:13:24
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11519/class Modified Files: AM_Actions.php Section.php AM_Data.php AM_EditForms.php AM_DisplayForms.php AM_ModSettings.php AM_Lists.php Article.php Log Message: Moved installation auto-import of demonstration article and manual to install.php Also took out @module comments Index: Section.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Section.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Section.php 21 Aug 2008 20:17:32 -0000 1.27 --- Section.php 21 Nov 2008 06:13:14 -0000 1.28 *************** *** 38,42 **** function PHPWS_Article_Section ($data) { ! $this->template = $GLOBALS['Article']['val']['default_section_template']; PHPWS_Core::plugObject($this, $data); } --- 38,42 ---- function PHPWS_Article_Section ($data) { ! $this->template = PHPWS_Settings::get('article', 'default_section_template'); PHPWS_Core::plugObject($this, $data); } *************** *** 74,78 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $section_position : Position of this section in the page (zero-based). * @param int $total_sections : Total number of sections on this page (minus 1). --- 74,78 ---- * * @author Eloi George <el...@NO...> ! * @param int $section_position : Position of this section in the page (zero-based). * @param int $total_sections : Total number of sections on this page (minus 1). *************** *** 89,93 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $id : Id of the section data we're looking for. * @return none --- 89,93 ---- * * @author Eloi George <el...@NO...> ! * @param int $id : Id of the section data we're looking for. * @return none *************** *** 117,121 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 117,121 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none Index: AM_ModSettings.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_ModSettings.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AM_ModSettings.php 19 Nov 2008 06:01:26 -0000 1.13 --- AM_ModSettings.php 21 Nov 2008 06:13:14 -0000 1.14 *************** *** 11,112 **** class PHPWS_AM_ModSettings { - - /* Resets the module's cache. - * - * @author Eloi George <el...@NO...> - * @module Article Manager - * @param none - * @return none - */ - function reset_cache () - { - PHPWS_Cache::remove('CategorizedArticleHeadlines'); - PHPWS_Cache::remove('ChronologicalArticleHeadlines'); - } - - /* Edits the module's default settings. - * - * @author Eloi George <el...@NO...> - * @module Article Manager - * @param none - * @return none - */ - function edit_configuration () - { - PHPWS_Core::initModClass('article', 'AM_EditForms.php'); - return PHPWS_AM_EditForms::edit_configuration(); - } - - /** - * Saves the module's default settings to the database. - * - * @author Eloi George <el...@NO...> - * @module Article Manager - * @param none - * @return none - */ - function save_configuration () - { - $settings = array(); - $settings['default_article_template'] = $_POST['default_article_template']; - $settings['default_section_template'] = $_POST['default_section_template']; - $settings['summaries_on_homepage'] = $_POST['summaries_on_homepage']; - $settings['prev_n_articles'] = $_POST['prev_n_articles']; - $settings['popular_articles'] = $_POST['popular_articles']; - $settings['listings_per_page'] = $_POST['listings_per_page']; - $settings['need_approval'] = (@$_POST['need_approval'])?1:0; - $settings['default_allow_comments'] = (@$_POST['default_allow_comments'])?1:0; - $settings['default_allow_anon'] = (@$_POST['default_allow_anon'])?1:0; - $settings['can_expire'] = (@$_POST['can_expire'])?1:0; - $settings['expiration_years'] = $_POST['expiration_years']; - $settings['expiration_months'] = $_POST['expiration_months']; - $settings['expiration_days'] = $_POST['expiration_days']; - $settings['log_events'] = (@$_POST['log_events'])?1:0; - $settings['max_image_size'] = (is_numeric($_POST['max_image_size'])) - ? (int) $_POST['max_image_size'] - : $GLOBALS['Article']['val']['max_image_size']; - $settings['max_image_height'] = (is_numeric($_POST['max_image_height'])) - ? (int) $_POST['max_image_height'] - : $GLOBALS['Article']['val']['max_image_height']; - $settings['max_image_width'] = (is_numeric($_POST['max_image_width'])) - ? (int) $_POST['max_image_width'] - : $GLOBALS['Article']['val']['max_image_width']; - $settings['lock_expiration_time'] = $_POST['lock_expiration_time']; - $settings['use_comments'] = (@$_POST['use_comments'])?1:0; - $settings['long_date_format'] = $_POST['long_date_format']; - $settings['short_date_format'] = $_POST['short_date_format']; - $settings['categorized_display'] = (@$_POST['categorized_display'])?1:0; - $settings['display_columns'] = $_POST['display_columns']; - $settings['summaries_per_category'] = $_POST['summaries_per_category']; - $settings['category_order'] = $_POST['category_order']; - - $content = "<?php\n"; - foreach ($settings AS $key => $value) - $content .= "\$settings['$key'] = '$value';\n"; - $content .= "?>\n"; - $filename = PHPWS_HOME_DIR . 'files/article/config.php'; - - PHPWS_File::writeFile($filename, $content, true, true); - $GLOBALS['Article']['val'] = $settings; - PHPWS_AM_ModSettings::reset_cache(); - } - - /** - * Resets the module's default settings. - * - * @author Eloi George <el...@NO...> - * @module Article Manager - * @param none - * @return none - */ - function reset_configuration () - { - $file_origin = PHPWS_SOURCE_DIR . 'mod/article/inc/default_config.php'; - $destination_directory = PHPWS_HOME_DIR . 'files/article/'; - PHPWS_File::fileCopy($file_origin, $destination_directory, 'config.php', 1, 0); - include($file_origin); - $GLOBALS['Article']['val'] = $settings; - PHPWS_AM_ModSettings::reset_cache(); - } --- 11,14 ---- *************** *** 115,148 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param none * @return none */ function init () ! { ! $just_installed = 0; ! $sess = array(); ! $file = PHPWS_HOME_DIR . 'files/article/config.php'; ! if (!is_file($file)) { ! $file_origin = PHPWS_SOURCE_DIR . 'mod/article/inc/default_config.php'; ! $destination_directory = PHPWS_HOME_DIR . 'files/article/'; ! PHPWS_File::fileCopy($file_origin, $destination_directory, 'config.php', 1, 0); ! $just_installed = 1; ! } ! include($file); ! $GLOBALS['Article']['val'] = $settings; ! $GLOBALS['Article']['error'] = array(); ! PHPWS_Core::initModClass('article', 'AM_Data.php'); PHPWS_Core::initModClass('article', 'Section.php'); PHPWS_Core::initModClass('article', 'Article.php'); PHPWS_Core::initModClass('article', 'Image.php'); ! ! if ($just_installed) { ! // Import Demo Article and Operation Manual ! PHPWS_Core::initModClass('article', 'AM_Actions.php'); ! PHPWS_AM_Actions::XML_import('demo_article.xml','mod/article/docs/', 1, 1); ! PHPWS_AM_Actions::XML_import('manual.xml','mod/article/docs/', 1, 1); ! } // WORKFLOW "assigned to" (person or group) } --- 17,49 ---- * * @author Eloi George <el...@NO...> * @param none * @return none */ function init () ! { ! // $just_installed = 0; ! // $sess = array(); ! // $file = PHPWS_HOME_DIR . 'files/article/config.php'; ! // if (!is_file($file)) { ! // $file_origin = PHPWS_SOURCE_DIR . 'mod/article/inc/default_config.php'; ! // $destination_directory = PHPWS_HOME_DIR . 'files/article/'; ! // PHPWS_File::fileCopy($file_origin, $destination_directory, 'config.php', 1, 0); ! // $just_installed = 1; ! // } ! // include($file); ! // PHPWS_Settings::set('article', $settings); ! // $GLOBALS['Article']['error'] = array(); ! // PHPWS_Core::initModClass('article', 'AM_Data.php'); PHPWS_Core::initModClass('article', 'Section.php'); PHPWS_Core::initModClass('article', 'Article.php'); PHPWS_Core::initModClass('article', 'Image.php'); ! // ! // if ($just_installed) { ! // // Import Demo Article and Operation Manual ! // PHPWS_Core::initModClass('article', 'AM_Actions.php'); ! // PHPWS_AM_Actions::XML_import('demo_article.xml','mod/article/docs/', 1, 1); ! // PHPWS_AM_Actions::XML_import('manual.xml','mod/article/docs/', 1, 1); ! // } // WORKFLOW "assigned to" (person or group) } Index: AM_Lists.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Lists.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** AM_Lists.php 18 Nov 2008 05:00:13 -0000 1.22 --- AM_Lists.php 21 Nov 2008 06:13:14 -0000 1.23 *************** *** 16,20 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param object $db : Database object to add WHEREs to * @param array $s_arr : Array of Current Search Parameters --- 16,20 ---- * * @author Eloi George <el...@NO...> ! * @param object $db : Database object to add WHEREs to * @param array $s_arr : Array of Current Search Parameters *************** *** 182,186 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 182,186 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 372,376 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 372,376 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none Index: AM_Actions.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Actions.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AM_Actions.php 11 Oct 2008 06:13:49 -0000 1.14 --- AM_Actions.php 21 Nov 2008 06:13:14 -0000 1.15 *************** *** 15,19 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param none * @return none --- 15,18 ---- *************** *** 42,46 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param int id : Id number of the article to be cloned * @param string language : Language of the new article --- 41,44 ---- *************** *** 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; --- 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; *************** *** 93,97 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param none * @return none --- 91,94 ---- *************** *** 132,136 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param none. * @return string : HTML display --- 129,132 ---- *************** *** 196,200 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param int $id : id# of the article to export. * @return string : XML Stream --- 192,195 ---- *************** *** 223,227 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @param int $id : id# of the article to export. * @return string : XML Stream --- 218,221 ---- *************** *** 296,300 **** * * @author Eloi George <el...@NO...> - * @module Article Manager * @return bool : Success or Failiure */ --- 290,293 ---- Index: AM_Data.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Data.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** AM_Data.php 18 Nov 2008 05:00:13 -0000 1.20 --- AM_Data.php 21 Nov 2008 06:13:14 -0000 1.21 *************** *** 15,19 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 15,19 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 58,62 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param array type : Type of error that occured. Prints an appropriate error message * based on the type. --- 58,62 ---- * * @author Eloi George <el...@NO...> ! * @param array type : Type of error that occured. Prints an appropriate error message * based on the type. *************** *** 81,85 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param & $db : a reference to the db class that we are adding these where clauses to. * @return none --- 81,85 ---- * * @author Eloi George <el...@NO...> ! * @param & $db : a reference to the db class that we are adding these where clauses to. * @return none *************** *** 92,96 **** $db->addWhere('mainarticle', '0'); $db->addWhere('publication_date', $now, '<='); ! if ($GLOBALS['Article']['val']['can_expire']) { $db->addWhere('expiration_date', '0', '=', null, 'expirationgroup'); --- 92,96 ---- $db->addWhere('mainarticle', '0'); $db->addWhere('publication_date', $now, '<='); ! if (PHPWS_Settings::get('article', 'can_expire')) { $db->addWhere('expiration_date', '0', '=', null, 'expirationgroup'); *************** *** 103,107 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int id : Id number of the article to be cloned * @param int $date : Unix Timestamp. --- 103,107 ---- * * @author Eloi George <el...@NO...> ! * @param int id : Id number of the article to be cloned * @param int $date : Unix Timestamp. *************** *** 112,116 **** { if (!$type) ! $type = $GLOBALS['Article']['val']['long_date_format']; if(!is_numeric($date)) $date = (int) $date; --- 112,116 ---- { if (!$type) ! $type = PHPWS_Settings::get('article', 'long_date_format'); if(!is_numeric($date)) $date = (int) $date; *************** *** 122,126 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int id : Id number of the article to be cloned * @param int $date : Unix Timestamp. --- 122,126 ---- * * @author Eloi George <el...@NO...> ! * @param int id : Id number of the article to be cloned * @param int $date : Unix Timestamp. *************** *** 131,135 **** { if (!$type) ! $type = $GLOBALS['Article']['val']['short_date_format']; if(!is_int($date)) $date = (int) $date; --- 131,135 ---- { if (!$type) ! $type = PHPWS_Settings::get('article', 'short_date_format'); if(!is_int($date)) $date = (int) $date; *************** *** 179,183 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param array $exclusions : Arguments to exclude from the final list * @return string : hidden <input> statements --- 179,183 ---- * * @author Eloi George <el...@NO...> ! * @param array $exclusions : Arguments to exclude from the final list * @return string : hidden <input> statements *************** *** 198,202 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param object $object : Current Article * @return none --- 198,202 ---- * * @author Eloi George <el...@NO...> ! * @param object $object : Current Article * @return none *************** *** 225,229 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return array --- 225,229 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return array *************** *** 246,250 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return array --- 246,250 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return array *************** *** 268,272 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 268,272 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 369,373 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param string text : Text to parse. * @return string : Parsed text --- 369,373 ---- * * @author Eloi George <el...@NO...> ! * @param string text : Text to parse. * @return string : Parsed text *************** *** 384,388 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param string data : Text to process. * @return string : Parsed text --- 384,388 ---- * * @author Eloi George <el...@NO...> ! * @param string data : Text to process. * @return string : Parsed text *************** *** 394,397 **** --- 394,410 ---- return $data; } + + /* Resets the module's cache. + * + * @author Eloi George <el...@NO...> + * @param none + * @return none + */ + function reset_cache () + { + PHPWS_Cache::remove('CategorizedArticleHeadlines'); + PHPWS_Cache::remove('ChronologicalArticleHeadlines'); + } + } Index: AM_EditForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_EditForms.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AM_EditForms.php 19 Nov 2008 06:01:26 -0000 1.9 --- AM_EditForms.php 21 Nov 2008 06:13:14 -0000 1.10 *************** *** 15,19 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int SECT_id : Database id of the section within this article to be edited. * @return none --- 15,19 ---- * * @author Eloi George <el...@NO...> ! * @param int SECT_id : Database id of the section within this article to be edited. * @return none *************** *** 121,127 **** $form->setTag('ARTICLE_announce', 'announce'); ! if ($GLOBALS['Article']['val']['use_comments'] && (Current_User::allow('article', 'allow_comments') ! || ($GLOBALS['Article']['val']['users_allow_comments'] && Current_User::getId()))) { --- 121,127 ---- $form->setTag('ARTICLE_announce', 'announce'); ! if (PHPWS_Settings::get('article', 'use_comments') && (Current_User::allow('article', 'allow_comments') ! || (PHPWS_Settings::get('article', 'users_allow_comments') && Current_User::getId()))) { *************** *** 139,143 **** $default_comment_approval = $thread->approval; } else { ! $allow_anonymous = $GLOBALS['Article']['val']['default_allow_anon']; $default_comment_approval = PHPWS_Settings::get('comments', 'default_approval'); } --- 139,143 ---- $default_comment_approval = $thread->approval; } else { ! $allow_anonymous = PHPWS_Settings::get('article', 'default_allow_anon'); $default_comment_approval = PHPWS_Settings::get('comments', 'default_approval'); } *************** *** 180,184 **** } ! if (Current_User::allow('article', 'change_dates') && $GLOBALS['Article']['val']['can_expire']) { // $form->addTplTag('EXPIRATION_HELP', PHPWS_Help::show_link('article', 'article_expiration_date')); --- 180,184 ---- } ! if (Current_User::allow('article', 'change_dates') && PHPWS_Settings::get('article', 'can_expire')) { // $form->addTplTag('EXPIRATION_HELP', PHPWS_Help::show_link('article', 'article_expiration_date')); *************** *** 186,192 **** $expdate = $object->expiration_date; else ! $expdate = mktime(0,0,0,date('m')+$GLOBALS['Article']['val']['expiration_months'] ! , date('d')+$GLOBALS['Article']['val']['expiration_days'] ! , date('Y')+$GLOBALS['Article']['val']['expiration_years']); $form->addText('ARTICLE_expiration_date', date('Y/m/d', $expdate)); $form->setSize('ARTICLE_expiration_date', '10'); --- 186,192 ---- $expdate = $object->expiration_date; else ! $expdate = mktime(0,0,0,date('m')+PHPWS_Settings::get('article', 'expiration_months') ! , date('d')+PHPWS_Settings::get('article', 'expiration_days') ! , date('Y')+PHPWS_Settings::get('article', 'expiration_years')); $form->addText('ARTICLE_expiration_date', date('Y/m/d', $expdate)); $form->setSize('ARTICLE_expiration_date', '10'); *************** *** 206,210 **** else { $form->addTplTag('EXPIRATION_LABEL', dgettext('article', 'Expires on')); ! if ($GLOBALS['Article']['val']['can_expire'] || $object->expiration_date==0) $form->addTplTag('EXPIRATION', dgettext('article', 'Never Expires')); else --- 206,210 ---- else { $form->addTplTag('EXPIRATION_LABEL', dgettext('article', 'Expires on')); ! if (PHPWS_Settings::get('article', 'can_expire') || $object->expiration_date==0) $form->addTplTag('EXPIRATION', dgettext('article', 'Never Expires')); else *************** *** 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').'" />'; --- 262,266 ---- $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').'" />'; *************** *** 286,290 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $section_position : Position of this section in the page (zero-based). * @param int $total_sections : Total number of sections on this page (minus 1). --- 286,290 ---- * * @author Eloi George <el...@NO...> ! * @param int $section_position : Position of this section in the page (zero-based). * @param int $total_sections : Total number of sections on this page (minus 1). *************** *** 382,386 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 382,386 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 389,393 **** { $form = & new PHPWS_Form('Config'); ! $val = $GLOBALS['Article']['val']; /* Section Headers */ --- 389,393 ---- { $form = & new PHPWS_Form('Config'); ! $val = PHPWS_Settings::get('article'); /* Section Headers */ *************** *** 584,587 **** --- 584,633 ---- return PHPWS_Template::processTemplate($form->getTemplate(),'article','config.tpl'); } + + /** + * Saves the module's configuration settings to the database. + * + * @author Eloi George <el...@NO...> + * @param none + * @return none + */ + function save_configuration () + { + $settings = array(); + $settings['default_article_template'] = $_POST['default_article_template']; + $settings['default_section_template'] = $_POST['default_section_template']; + $settings['summaries_on_homepage'] = $_POST['summaries_on_homepage']; + $settings['prev_n_articles'] = $_POST['prev_n_articles']; + $settings['popular_articles'] = $_POST['popular_articles']; + $settings['listings_per_page'] = $_POST['listings_per_page']; + $settings['need_approval'] = (@$_POST['need_approval'])?1:0; + $settings['default_allow_comments'] = (@$_POST['default_allow_comments'])?1:0; + $settings['default_allow_anon'] = (@$_POST['default_allow_anon'])?1:0; + $settings['can_expire'] = (@$_POST['can_expire'])?1:0; + $settings['expiration_years'] = $_POST['expiration_years']; + $settings['expiration_months'] = $_POST['expiration_months']; + $settings['expiration_days'] = $_POST['expiration_days']; + $settings['log_events'] = (@$_POST['log_events'])?1:0; + $settings['max_image_size'] = (is_numeric($_POST['max_image_size'])) + ? (int) $_POST['max_image_size'] + : PHPWS_Settings::get('article', 'max_image_size'); + $settings['max_image_height'] = (is_numeric($_POST['max_image_height'])) + ? (int) $_POST['max_image_height'] + : PHPWS_Settings::get('article', 'max_image_height'); + $settings['max_image_width'] = (is_numeric($_POST['max_image_width'])) + ? (int) $_POST['max_image_width'] + : PHPWS_Settings::get('article', 'max_image_width'); + $settings['lock_expiration_time'] = $_POST['lock_expiration_time']; + $settings['use_comments'] = (@$_POST['use_comments'])?1:0; + $settings['long_date_format'] = $_POST['long_date_format']; + $settings['short_date_format'] = $_POST['short_date_format']; + $settings['categorized_display'] = (@$_POST['categorized_display'])?1:0; + $settings['display_columns'] = $_POST['display_columns']; + $settings['summaries_per_category'] = $_POST['summaries_per_category']; + $settings['category_order'] = $_POST['category_order']; + + PHPWS_Settings::set('article', $settings); + PHPWS_AM_Data::reset_cache(); + } } Index: AM_DisplayForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_DisplayForms.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AM_DisplayForms.php 18 Nov 2008 05:00:13 -0000 1.7 --- AM_DisplayForms.php 21 Nov 2008 06:13:14 -0000 1.8 *************** *** 17,21 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param array $s_arr : Array of current search parameters. * @param array $location : URL argumemts to execute. --- 17,21 ---- * * @author Eloi George <el...@NO...> ! * @param array $s_arr : Array of current search parameters. * @param array $location : URL argumemts to execute. *************** *** 244,248 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int new : Version # of the newer revision. * @param int old : Version # of the older revision. --- 244,248 ---- * * @author Eloi George <el...@NO...> ! * @param int new : Version # of the newer revision. * @param int old : Version # of the older revision. *************** *** 325,329 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int articleid : Id of the article to show. * @return none --- 325,329 ---- * * @author Eloi George <el...@NO...> ! * @param int articleid : Id of the article to show. * @return none Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Article.php 18 Nov 2008 05:00:13 -0000 1.56 --- Article.php 21 Nov 2008 06:13:14 -0000 1.57 *************** *** 92,96 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int id : Database id of the article to be instantiated (sp? heh). * @param string language : Language translation of the article. --- 92,96 ---- * * @author Eloi George <el...@NO...> ! * @param int id : Database id of the article to be instantiated (sp? heh). * @param string language : Language translation of the article. *************** *** 110,123 **** } $this->created_date = $this->updated_date = time(); ! $this->allow_comments = $GLOBALS['Article']['val']['default_allow_comments']; ! $this->expiration_date = ($GLOBALS['Article']['val']['can_expire']) ?mktime(0,0,0 ! ,date('m')+$GLOBALS['Article']['val']['expiration_months'] ! ,date('d')+$GLOBALS['Article']['val']['expiration_days'] ! ,date('Y')+$GLOBALS['Article']['val']['expiration_years']) :0; $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; --- 110,123 ---- } $this->created_date = $this->updated_date = time(); ! $this->allow_comments = PHPWS_Settings::get('article', 'default_allow_comments'); ! $this->expiration_date = (PHPWS_Settings::get('article', 'can_expire')) ?mktime(0,0,0 ! ,date('m')+PHPWS_Settings::get('article', 'expiration_months') ! ,date('d')+PHPWS_Settings::get('article', 'expiration_days') ! ,date('Y')+PHPWS_Settings::get('article', 'expiration_years')) :0; $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; *************** *** 177,181 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return array --- 177,181 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return array *************** *** 203,207 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return array --- 203,207 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return array *************** *** 332,336 **** /* If the Comments module is available, get comments information */ ! if($GLOBALS['Article']['val']['use_comments'] && $this->allow_comments && PHPWS_Core::initModClass('comments', 'Comments.php') && $article_tags['thread'] = Comments::getThread($this->key_id)) --- 332,336 ---- /* If the Comments module is available, get comments information */ ! if(PHPWS_Settings::get('article', 'use_comments') && $this->allow_comments && PHPWS_Core::initModClass('comments', 'Comments.php') && $article_tags['thread'] = Comments::getThread($this->key_id)) *************** *** 430,434 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 430,434 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 480,484 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 480,484 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 495,499 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 495,499 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 510,514 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return array --- 510,514 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return array *************** *** 527,531 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int page : Page within this article to be edited. * @return none --- 527,531 ---- * * @author Eloi George <el...@NO...> ! * @param int page : Page within this article to be edited. * @return none *************** *** 547,551 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 547,551 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 560,564 **** * * @author Adam Morton <ad...@NO...> ! * @module Article Manager * @param bool $autodetect_id : If false, the article will be saved as a new article with the supplied id * @return array : On success, id & versionid of article; on failure, FALSE --- 560,564 ---- * * @author Adam Morton <ad...@NO...> ! * @param bool $autodetect_id : If false, the article will be saved as a new article with the supplied id * @return array : On success, id & versionid of article; on failure, FALSE *************** *** 576,580 **** * @author Adam Morton <ad...@NO...> * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 576,580 ---- * @author Adam Morton <ad...@NO...> * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 593,597 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return int New page number. --- 593,597 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return int New page number. *************** *** 608,612 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return int New section id. --- 608,612 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return int New section id. *************** *** 625,629 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return int maximum section id found. --- 625,629 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return int maximum section id found. *************** *** 668,672 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int id : Id of the section to be found * @return array Page and Index number. --- 668,672 ---- * * @author Eloi George <el...@NO...> ! * @param int id : Id of the section to be found * @return array Page and Index number. *************** *** 689,693 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $page : Current page. * @param int $id : Id of the section to move. --- 689,693 ---- * * @author Eloi George <el...@NO...> ! * @param int $page : Current page. * @param int $id : Id of the section to move. *************** *** 710,714 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $page : Current page. * @param int $offset : Amount of spaces to move the element. Positive numbers move up. --- 710,714 ---- * * @author Eloi George <el...@NO...> ! * @param int $page : Current page. * @param int $offset : Amount of spaces to move the element. Positive numbers move up. *************** *** 728,732 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $page : Current page. * @param int $id : Id of the section to place the new section in front of. --- 728,732 ---- * * @author Eloi George <el...@NO...> ! * @param int $page : Current page. * @param int $id : Id of the section to place the new section in front of. *************** *** 751,755 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $page : Current page. * @return none --- 751,755 ---- * * @author Eloi George <el...@NO...> ! * @param int $page : Current page. * @return none *************** *** 767,771 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int SECT_id : Database id of the section to be removed. * @return id of the next section --- 767,771 ---- * * @author Eloi George <el...@NO...> ! * @param int SECT_id : Database id of the section to be removed. * @return id of the next section *************** *** 783,787 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int PAGE_id : id of the page to be removed. * @return none --- 783,787 ---- * * @author Eloi George <el...@NO...> ! * @param int PAGE_id : id of the page to be removed. * @return none *************** *** 797,801 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 797,801 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 812,816 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 812,816 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 822,828 **** if ($this->expiration_date < $now) $this->expiration_date = mktime(0,0,0 ! ,date('m')+$GLOBALS['Article']['val']['expiration_months'] ! ,date('d')+$GLOBALS['Article']['val']['expiration_days'] ! ,date('Y')+$GLOBALS['Article']['val']['expiration_years']); $this->publication_date = $now; --- 822,828 ---- if ($this->expiration_date < $now) $this->expiration_date = mktime(0,0,0 ! ,date('m')+PHPWS_Settings::get('article', 'expiration_months') ! ,date('d')+PHPWS_Settings::get('article', 'expiration_days') ! ,date('Y')+PHPWS_Settings::get('article', 'expiration_years')); $this->publication_date = $now; *************** *** 836,840 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return none --- 836,840 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return none *************** *** 854,858 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param $data array : name=>value pairs of the data to change * @return none --- 854,858 ---- * * @author Eloi George <el...@NO...> ! * @param $data array : name=>value pairs of the data to change * @return none *************** *** 874,878 **** /* Reset headline caching */ if ($this->announce) ! PHPWS_AM_ModSettings::reset_cache(); } --- 874,878 ---- /* Reset headline caching */ if ($this->announce) ! PHPWS_AM_Data::reset_cache(); } *************** *** 883,887 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int action true=set false=remove the lock. * @return none --- 883,887 ---- * * @author Eloi George <el...@NO...> ! * @param int action true=set false=remove the lock. * @return none *************** *** 915,919 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int lock : Unix time that the lock was created. * @param int ownerid : Id of the user that created the lock. --- 915,919 ---- * * @author Eloi George <el...@NO...> ! * @param int lock : Unix time that the lock was created. * @param int ownerid : Id of the user that created the lock. *************** *** 923,927 **** { /* Calculate time remaining */ ! $timeleft = $lock + $GLOBALS['Article']['val']['lock_expiration_time'] - time(); /* If there is a lock in place... */ if ($timeleft > 0) --- 923,927 ---- { /* Calculate time remaining */ ! $timeleft = $lock + PHPWS_Settings::get('article', 'lock_expiration_time') - time(); /* If there is a lock in place... */ if ($timeleft > 0) *************** *** 936,940 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param bool saving : Whether this is being called by function save() or not. */ --- 936,940 ---- * * @author Eloi George <el...@NO...> ! * @param bool saving : Whether this is being called by function save() or not. */ *************** *** 956,960 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param id : Id of the article to show. * @return none --- 956,960 ---- * * @author Eloi George <el...@NO...> ! * @param id : Id of the article to show. * @return none *************** *** 969,973 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $sourceId : Version # of the older revision. * @return array : list of article version ids in descending version order --- 969,973 ---- * * @author Eloi George <el...@NO...> ! * @param int $sourceId : Version # of the older revision. * @return array : list of article version ids in descending version order *************** *** 988,992 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param none * @return object ControlPanel --- 988,992 ---- * * @author Eloi George <el...@NO...> ! * @param none * @return object ControlPanel *************** *** 1037,1041 **** * * @author Eloi George <el...@NO...> ! * @module Article Manager * @param int $version_id : Version id to load, if known. * @return mixed : FALSE if no versions were found, Version object otherwise. --- 1037,1041 ---- * * @author Eloi George <el...@NO...> ! * @param int $version_id : Version id to load, if known. * @return mixed : FALSE if no versions were found, Version object otherwise. |
|
From: Eloi G. <ada...@us...> - 2008-11-21 06:13:22
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11519 Modified Files: index_admin.php index.php Log Message: Moved installation auto-import of demonstration article and manual to install.php Also took out @module comments Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** index_admin.php 19 Nov 2008 06:01:26 -0000 1.24 --- index_admin.php 21 Nov 2008 06:13:15 -0000 1.25 *************** *** 265,269 **** return; /* Make sure that user can approve the article */ ! if(!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('article', 'approval')) { /* This removes the [Draft] flag & approves the article. */ $article->approved = 1; --- 265,269 ---- return; /* Make sure that user can approve the article */ ! if(!PHPWS_Settings::get('article', 'need_approval') || Current_User::allow('article', 'approval')) { /* This removes the [Draft] flag & approves the article. */ $article->approved = 1; *************** *** 412,416 **** if (!empty($perm_dialog->message)) { $message = implode("<br />\n", $perm_dialog->message); ! PHPWS_AM_ModSettings::reset_cache(); } if (empty($content)) { --- 412,416 ---- if (!empty($perm_dialog->message)) { $message = implode("<br />\n", $perm_dialog->message); ! PHPWS_AM_Data::reset_cache(); } if (empty($content)) { *************** *** 589,604 **** if (!Current_User::isUnrestricted('article')) break; switch(@$_REQUEST['action']) { case 'save': ! PHPWS_AM_ModSettings::save_configuration(); break; case 'reset': ! PHPWS_AM_ModSettings::reset_configuration(); break; } $title = dgettext('article', 'Article Manager Configuration'); ! $content = PHPWS_AM_ModSettings::edit_configuration(); break; --- 589,605 ---- if (!Current_User::isUnrestricted('article')) break; + PHPWS_Core::initModClass('article', 'AM_EditForms.php'); switch(@$_REQUEST['action']) { case 'save': ! PHPWS_AM_EditForms::save_configuration(); break; case 'reset': ! PHPWS_Settings::reset('article'); break; } $title = dgettext('article', 'Article Manager Configuration'); ! $content = PHPWS_AM_EditForms::edit_configuration(); break; *************** *** 744,748 **** function log_event($message, $type = 'Notice') { ! if (!$GLOBALS['Article']['val']['log_events']) return; if (Current_User::isLogged()) --- 745,749 ---- function log_event($message, $type = 'Notice') { ! if (!PHPWS_Settings::get('article', 'log_events')) return; if (Current_User::isLogged()) Index: index.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** index.php 18 Nov 2008 05:00:16 -0000 1.24 --- index.php 21 Nov 2008 06:13:15 -0000 1.25 *************** *** 13,18 **** } ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); ! PHPWS_AM_ModSettings::init(); /* Process any mod-rewrite submissions */ --- 13,20 ---- } ! PHPWS_Core::initModClass('article', 'AM_Data.php'); ! PHPWS_Core::initModClass('article', 'Section.php'); ! PHPWS_Core::initModClass('article', 'Article.php'); ! PHPWS_Core::initModClass('article', 'Image.php'); /* Process any mod-rewrite submissions */ |
|
From: Verdon V. <ve...@us...> - 2008-11-20 22:49:42
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/inc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10816/inc Added Files: runtime.php Removed Files: init.php Log Message: 1.3 work for phpws 1.6 compatibility --- init.php DELETED --- --- NEW FILE: runtime.php --- <?php /** * rolodex - phpwebsite module * * See docs/AUTHORS and docs/COPYRIGHT for relevant info. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @version $Id: runtime.php,v 1.1 2008/11/20 22:49:34 verdonv Exp $ * @author Verdon Vaillancourt <verdonv at users dot sourceforge dot net> */ PHPWS_Core::initModClass('rolodex', 'RDX_Runtime.php'); RDX_Runtime::showBlock(); ?> |
|
From: Verdon V. <ve...@us...> - 2008-11-20 22:49:42
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10816 Modified Files: index.php Log Message: 1.3 work for phpws 1.6 compatibility Index: index.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 9 Oct 2008 19:40:44 -0000 1.3 --- index.php 20 Nov 2008 22:49:30 -0000 1.4 *************** *** 30,37 **** $rolodex = new Rolodex; - if (isset($_GET['var1'])) { - $_REQUEST['id'] = $_GET['id'] = (int)$_GET['var1']; - } - if (isset($_REQUEST['aop'])) { $rolodex->adminMenu(); --- 30,33 ---- |
|
From: Verdon V. <ve...@us...> - 2008-11-20 22:49:42
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10816/boost Modified Files: boost.php dependency.xml uninstall.php update.php Log Message: 1.3 work for phpws 1.6 compatibility Index: uninstall.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/boost/uninstall.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uninstall.php 17 Jun 2008 13:47:00 -0000 1.2 --- uninstall.php 20 Nov 2008 22:49:33 -0000 1.3 *************** *** 23,27 **** */ ! function rolodex_uninstall(&$content) { $dir = PHPWS_HOME_DIR . 'images/rolodex/'; --- 23,27 ---- */ ! public function rolodex_uninstall(&$content) { $dir = PHPWS_HOME_DIR . 'images/rolodex/'; Index: dependency.xml =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/boost/dependency.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dependency.xml 24 Jul 2008 12:40:13 -0000 1.4 --- dependency.xml 20 Nov 2008 22:49:33 -0000 1.5 *************** *** 4,8 **** <title>core</title> <properName>phpWebSite Core</properName> ! <version>1.8.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/base/</url> </module> --- 4,8 ---- <title>core</title> <properName>phpWebSite Core</properName> ! <version>1.9.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/base/</url> </module> *************** *** 10,14 **** <title>filecabinet</title> <properName>File Cabinet</properName> ! <version>2.0.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/filecabinet/</url> </module> --- 10,14 ---- <title>filecabinet</title> <properName>File Cabinet</properName> ! <version>2.2.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/filecabinet/</url> </module> *************** *** 16,20 **** <title>demographics</title> <properName>Demographics</properName> ! <version>1.1.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/demographics/</url> </module> --- 16,20 ---- <title>demographics</title> <properName>Demographics</properName> ! <version>1.2.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/demographics/</url> </module> *************** *** 22,27 **** <title>categories</title> <properName>Categories</properName> ! <version>2.2.1</version> <url>http://phpwebsite.appstate.edu/downloads/modules/categories/</url> </module> </dependency> --- 22,33 ---- <title>categories</title> <properName>Categories</properName> ! <version>2.3.0</version> <url>http://phpwebsite.appstate.edu/downloads/modules/categories/</url> </module> + <module> + <title>search</title> + <properName>Search</properName> + <version>0.4.0</version> + <url>http://phpwebsite.appstate.edu/downloads/modules/search/</url> + </module> </dependency> Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/boost/boost.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** boost.php 9 Oct 2008 19:40:47 -0000 1.8 --- boost.php 20 Nov 2008 22:49:33 -0000 1.9 *************** *** 24,28 **** $proper_name = 'Rolodex'; ! $version = '1.2.0'; $image_dir = true; $import_sql = true; --- 24,28 ---- $proper_name = 'Rolodex'; ! $version = '1.3.0'; $image_dir = true; $import_sql = true; Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/boost/update.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** update.php 9 Oct 2008 19:40:47 -0000 1.15 --- update.php 20 Nov 2008 22:49:33 -0000 1.16 *************** *** 23,27 **** */ ! function rolodex_update(&$content, $currentVersion) { $home_dir = PHPWS_Boost::getHomeDir(); --- 23,27 ---- */ ! public function rolodex_update(&$content, $currentVersion) { $home_dir = PHPWS_Boost::getHomeDir(); *************** *** 209,213 **** } ! function rolodexUpdateFiles($files, &$content) { if (PHPWS_Boost::updateFiles($files, 'rolodex')) { --- 209,213 ---- } ! public function rolodexUpdateFiles($files, &$content) { if (PHPWS_Boost::updateFiles($files, 'rolodex')) { |
Update of /cvsroot/phpwebsite-comm/modules/rolodex/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10816/class Modified Files: RDX_Feature.php RDX_Forms.php RDX_Location.php RDX_Member.php RDX_Mypage.php RDX_Runtime.php Rolodex.php Log Message: 1.3 work for phpws 1.6 compatibility Index: RDX_Forms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Forms.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** RDX_Forms.php 9 Oct 2008 19:40:47 -0000 1.25 --- RDX_Forms.php 20 Nov 2008 22:49:33 -0000 1.26 *************** *** 25,31 **** class Rolodex_Forms { ! var $rolodex = null; ! function get($type) { switch ($type) { --- 25,31 ---- class Rolodex_Forms { ! public $rolodex = null; ! public function get($type) { switch ($type) { *************** *** 136,140 **** ! function settingsPanel() { PHPWS_Core::initModClass('controlpanel', 'Panel.php'); --- 136,140 ---- ! public function settingsPanel() { PHPWS_Core::initModClass('controlpanel', 'Panel.php'); *************** *** 163,167 **** ! function listMembers($approved=null, $expired=false, $location=null, $feature=null, $category=null) { //print_r($_REQUEST); exit; --- 163,167 ---- ! public function listMembers($approved=null, $expired=false, $location=null, $feature=null, $category=null) { //print_r($_REQUEST); exit; *************** *** 414,418 **** ! function listLocations() { $ptags['TITLE_HEADER'] = dgettext('rolodex', 'Title'); --- 414,418 ---- ! public function listLocations() { $ptags['TITLE_HEADER'] = dgettext('rolodex', 'Title'); *************** *** 453,457 **** ! function listFeatures() { $ptags['TITLE_HEADER'] = dgettext('rolodex', 'Title'); --- 453,457 ---- ! public function listFeatures() { $ptags['TITLE_HEADER'] = dgettext('rolodex', 'Title'); *************** *** 490,494 **** ! function listCategories() { --- 490,494 ---- ! public function listCategories() { *************** *** 514,518 **** ! function listCatsRow($value) { $db = new PHPWS_DB('category_items'); --- 514,518 ---- ! public function listCatsRow($value) { $db = new PHPWS_DB('category_items'); *************** *** 535,539 **** ! function advSearchForm() { $form = new PHPWS_Form('rolodex_adv_search'); --- 535,539 ---- ! public function advSearchForm() { $form = new PHPWS_Form('rolodex_adv_search'); *************** *** 572,576 **** ! function editSettings() { --- 572,576 ---- ! public function editSettings() { *************** *** 827,831 **** ! function selectUser() { --- 827,831 ---- ! public function selectUser() { *************** *** 863,867 **** ! function editMember($admin=true) { //print_r($this->rolodex->member); --- 863,867 ---- ! public function editMember($admin=true) { //print_r($this->rolodex->member); *************** *** 1157,1161 **** ! function editLocation() { $form = new PHPWS_Form('rolodex_location'); --- 1157,1161 ---- ! public function editLocation() { $form = new PHPWS_Form('rolodex_location'); *************** *** 1201,1205 **** ! function editFeature() { $form = new PHPWS_Form('rolodex_feature'); --- 1201,1205 ---- ! public function editFeature() { $form = new PHPWS_Form('rolodex_feature'); *************** *** 1245,1249 **** ! function contactMember() { if (isset($_POST['name'])) { --- 1245,1249 ---- ! public function contactMember() { if (isset($_POST['name'])) { *************** *** 1315,1319 **** ! function confirmGraphic() { PHPWS_Core::initCoreClass('Captcha.php'); --- 1315,1319 ---- ! public function confirmGraphic() { PHPWS_Core::initCoreClass('Captcha.php'); *************** *** 1322,1326 **** ! function utilities() { --- 1322,1326 ---- ! public function utilities() { *************** *** 1353,1357 **** ! function showInfo() { --- 1353,1357 ---- ! public function showInfo() { *************** *** 1375,1379 **** /* not in use */ ! function categories() { --- 1375,1379 ---- /* not in use */ ! public function categories() { Index: RDX_Runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Runtime.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RDX_Runtime.php 9 Oct 2008 19:40:47 -0000 1.4 --- RDX_Runtime.php 20 Nov 2008 22:49:33 -0000 1.5 *************** *** 27,31 **** { ! function showBlock() { if (PHPWS_Settings::get('rolodex', 'show_block')) { if (PHPWS_Settings::get('rolodex', 'block_on_home_only')) { --- 27,31 ---- { ! public function showBlock() { if (PHPWS_Settings::get('rolodex', 'show_block')) { if (PHPWS_Settings::get('rolodex', 'block_on_home_only')) { *************** *** 40,44 **** } ! function showRolodexBlock() { $db = new PHPWS_DB('rolodex_member'); --- 40,44 ---- } ! public function showRolodexBlock() { $db = new PHPWS_DB('rolodex_member'); Index: RDX_Mypage.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Mypage.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RDX_Mypage.php 25 Jun 2008 02:48:43 -0000 1.8 --- RDX_Mypage.php 20 Nov 2008 22:49:33 -0000 1.9 *************** *** 27,31 **** class Rolodex_Mypage { ! function main() { Rolodex_Mypage::action($tpl['TITLE'], $tpl['CONTENT']); --- 27,31 ---- class Rolodex_Mypage { ! public function main() { Rolodex_Mypage::action($tpl['TITLE'], $tpl['CONTENT']); *************** *** 73,77 **** /* nothing below here used yet, maybe use in future */ ! function action(&$title, &$content) { if (isset($_REQUEST['uop'])) --- 73,77 ---- /* nothing below here used yet, maybe use in future */ ! public function action(&$title, &$content) { if (isset($_REQUEST['uop'])) *************** *** 87,91 **** ! function searchForm() { $form = new PHPWS_Form('rolodex_search'); --- 87,91 ---- ! public function searchForm() { $form = new PHPWS_Form('rolodex_search'); *************** *** 105,109 **** } ! function sendMessage(&$result, $success_msg, $error_msg) { $_SESSION['rolodex_message'] = (PHPWS_Error::logIfError($result) ? $error_msg : $success_msg); --- 105,109 ---- } ! public function sendMessage(&$result, $success_msg, $error_msg) { $_SESSION['rolodex_message'] = (PHPWS_Error::logIfError($result) ? $error_msg : $success_msg); *************** *** 111,115 **** } ! function sendMessageOnly($msg) { $_SESSION['rolodex_message'] = $msg; --- 111,115 ---- } ! public function sendMessageOnly($msg) { $_SESSION['rolodex_message'] = $msg; *************** *** 117,121 **** } ! function getMessage() { if (isset($_SESSION['rolodex_message'])) --- 117,121 ---- } ! public function getMessage() { if (isset($_SESSION['rolodex_message'])) Index: RDX_Location.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Location.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RDX_Location.php 26 Jul 2008 20:57:18 -0000 1.6 --- RDX_Location.php 20 Nov 2008 22:49:33 -0000 1.7 *************** *** 25,36 **** class Rolodex_Location { ! var $id = 0; ! var $title = null; ! var $description = null; ! var $image_id = 0; ! var $_error = null; ! function Rolodex_Location($id=0) { if (!$id) { --- 25,36 ---- class Rolodex_Location { ! public $id = 0; ! public $title = null; ! public $description = null; ! public $image_id = 0; ! public $_error = null; ! public function __construct($id=0) { if (!$id) { *************** *** 43,47 **** ! function init() { $db = new PHPWS_DB('rolodex_location'); --- 43,47 ---- ! public function init() { $db = new PHPWS_DB('rolodex_location'); *************** *** 56,60 **** ! function setTitle($title) { $this->title = strip_tags($title); --- 56,60 ---- ! public function setTitle($title) { $this->title = strip_tags($title); *************** *** 62,66 **** ! function setDescription($description) { $this->description = PHPWS_Text::parseInput($description); --- 62,66 ---- ! public function setDescription($description) { $this->description = PHPWS_Text::parseInput($description); *************** *** 68,72 **** ! function setImage_id($image_id) { $this->image_id = $image_id; --- 68,72 ---- ! public function setImage_id($image_id) { $this->image_id = $image_id; *************** *** 75,79 **** ! function getTitle($print=false) { if (empty($this->title)) { --- 75,79 ---- ! public function getTitle($print=false) { if (empty($this->title)) { *************** *** 89,93 **** ! function getDescription($print=false) { if (empty($this->description)) { --- 89,93 ---- ! public function getDescription($print=false) { if (empty($this->description)) { *************** *** 103,107 **** ! function getListDescription($length=60){ if (empty($this->description)) { return ''; --- 103,107 ---- ! public function getListDescription($length=60){ if (empty($this->description)) { return ''; *************** *** 111,115 **** ! function getQtyMembers() { $db = new PHPWS_DB('rolodex_location_items'); --- 111,115 ---- ! public function getQtyMembers() { $db = new PHPWS_DB('rolodex_location_items'); *************** *** 120,124 **** ! function getFile() { if (!$this->image_id) { --- 120,124 ---- ! public function getFile() { if (!$this->image_id) { *************** *** 129,133 **** ! function delete() { if (!$this->id) { --- 129,133 ---- ! public function delete() { if (!$this->id) { *************** *** 145,149 **** ! function rowTag() { $vars['location'] = $this->id; --- 145,149 ---- ! public function rowTag() { $vars['location'] = $this->id; *************** *** 168,172 **** ! function locationLinks() { $links = array(); --- 168,172 ---- ! public function locationLinks() { $links = array(); *************** *** 184,188 **** ! function save() { $db = new PHPWS_DB('rolodex_location'); --- 184,188 ---- ! public function save() { $db = new PHPWS_DB('rolodex_location'); *************** *** 195,199 **** ! function viewLink() { // return PHPWS_Text::rewriteLink($this->title, 'rolodex', $this->id); --- 195,199 ---- ! public function viewLink() { // return PHPWS_Text::rewriteLink($this->title, 'rolodex', $this->id); Index: Rolodex.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/Rolodex.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Rolodex.php 9 Oct 2008 19:40:47 -0000 1.21 --- Rolodex.php 20 Nov 2008 22:49:33 -0000 1.22 *************** *** 29,44 **** class Rolodex { ! var $forms = null; ! var $panel = null; ! var $title = null; ! var $message = null; ! var $content = null; ! var $member = null; ! var $location = null; ! var $feature = null; ! var $category = null; ! function adminMenu() { if (!Current_User::allow('rolodex')) { --- 29,44 ---- class Rolodex { ! public $forms = null; ! public $panel = null; ! public $title = null; ! public $message = null; ! public $content = null; ! public $member = null; ! public $location = null; ! public $feature = null; ! public $category = null; ! public function adminMenu() { if (!Current_User::allow('rolodex')) { *************** *** 344,353 **** ! function sendMessage() { PHPWS_Core::reroute('index.php?module=rolodex&uop=message'); } ! function forwardMessage($message, $title=null) { $_SESSION['RDX_Message']['message'] = $message; --- 344,353 ---- ! public function sendMessage() { PHPWS_Core::reroute('index.php?module=rolodex&uop=message'); } ! public function forwardMessage($message, $title=null) { $_SESSION['RDX_Message']['message'] = $message; *************** *** 358,362 **** ! function loadMessage() { if (isset($_SESSION['RDX_Message'])) { --- 358,362 ---- ! public function loadMessage() { if (isset($_SESSION['RDX_Message'])) { *************** *** 370,374 **** ! function userMenu($action=null) { $javascript = false; --- 370,374 ---- ! public function userMenu($action=null) { $javascript = false; *************** *** 633,637 **** ! function loadForm($type) { PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php'); --- 633,637 ---- ! public function loadForm($type) { PHPWS_Core::initModClass('rolodex', 'RDX_Forms.php'); *************** *** 642,646 **** ! function loadMember($user_id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); --- 642,646 ---- ! public function loadMember($user_id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); *************** *** 658,662 **** ! function loadLocation($id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Location.php'); --- 658,662 ---- ! public function loadLocation($id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Location.php'); *************** *** 676,680 **** ! function loadFeature($id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Feature.php'); --- 676,680 ---- ! public function loadFeature($id=0) { PHPWS_Core::initModClass('rolodex', 'RDX_Feature.php'); *************** *** 694,698 **** ! function loadCategory($id=0) { PHPWS_Core::initModClass('categories', 'Category.php'); --- 694,698 ---- ! public function loadCategory($id=0) { PHPWS_Core::initModClass('categories', 'Category.php'); *************** *** 711,715 **** ! function loadPanel() { PHPWS_Core::initModClass('controlpanel', 'Panel.php'); --- 711,715 ---- ! public function loadPanel() { PHPWS_Core::initModClass('controlpanel', 'Panel.php'); *************** *** 750,754 **** ! function postSettings() { --- 750,754 ---- ! public function postSettings() { *************** *** 1013,1017 **** ! function postMember() { $this->loadMember(); --- 1013,1017 ---- ! public function postMember() { $this->loadMember(); *************** *** 1269,1273 **** ! function postLocation() { $this->loadLocation(); --- 1269,1273 ---- ! public function postLocation() { $this->loadLocation(); *************** *** 1297,1301 **** ! function postFeature() { $this->loadFeature(); --- 1297,1301 ---- ! public function postFeature() { $this->loadFeature(); *************** *** 1325,1329 **** ! function checkMessage() { $this->loadMember(); --- 1325,1329 ---- ! public function checkMessage() { $this->loadMember(); *************** *** 1366,1370 **** ! function sendMail() { $this->loadMember(); --- 1366,1370 ---- ! public function sendMail() { $this->loadMember(); *************** *** 1390,1394 **** ! function resetExpired($interval) { $expires = mktime(0, 0, 0, date("m"), date("d")+$interval, date("Y")); --- 1390,1394 ---- ! public function resetExpired($interval) { $expires = mktime(0, 0, 0, date("m"), date("d")+$interval, date("Y")); *************** *** 1399,1403 **** ! function deleteExpired() { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); --- 1399,1403 ---- ! public function deleteExpired() { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); *************** *** 1415,1419 **** ! function setAllComments($num) { $db = new PHPWS_DB('rolodex_member'); --- 1415,1419 ---- ! public function setAllComments($num) { $db = new PHPWS_DB('rolodex_member'); *************** *** 1423,1427 **** ! function setAllComments_annon($num) { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); --- 1423,1427 ---- ! public function setAllComments_annon($num) { PHPWS_Core::initModClass('rolodex', 'RDX_Member.php'); *************** *** 1443,1447 **** ! function search_index_all() { --- 1443,1447 ---- ! public function search_index_all() { *************** *** 1475,1479 **** ! function search_remove_all() { --- 1475,1479 ---- ! public function search_remove_all() { *************** *** 1492,1496 **** ! function exportCSV($approved=null, $expired=false) { --- 1492,1496 ---- ! public function exportCSV($approved=null, $expired=false) { *************** *** 1558,1562 **** ! function navLinks() { --- 1558,1562 ---- ! public function navLinks() { *************** *** 1599,1603 **** } ! function alpha_click() { --- 1599,1603 ---- } ! public function alpha_click() { *************** *** 1659,1663 **** * @access public */ ! function alphabet($letter_case=NULL) { if ($letter_case == "lower") { --- 1659,1663 ---- * @access public */ ! public function alphabet($letter_case=NULL) { if ($letter_case == "lower") { *************** *** 1682,1686 **** * @access public */ ! function getItemForm($type='location', $match=null, $select_name='location', $multiple=true) { --- 1682,1686 ---- * @access public */ ! public function getItemForm($type='location', $match=null, $select_name='location', $multiple=true) { *************** *** 1700,1703 **** --- 1700,1704 ---- } + $items = null; if ($result) { foreach ($result as $item) { *************** *** 1735,1739 **** ! function getItemSelect($type='location', $match=null, $select_name='location', $multiple=true, $count=true) { --- 1736,1740 ---- ! public function getItemSelect($type='location', $match=null, $select_name='location', $multiple=true, $count=true) { *************** *** 1789,1793 **** ! function getCatSelect($match=null, $select_name='categories', $multiple=true, $count=true) { --- 1790,1794 ---- ! public function getCatSelect($match=null, $select_name='categories', $multiple=true, $count=true) { Index: RDX_Member.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Member.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RDX_Member.php 9 Oct 2008 19:40:47 -0000 1.18 --- RDX_Member.php 20 Nov 2008 22:49:33 -0000 1.19 *************** *** 29,95 **** /* new demographics fields */ ! var $tollfree_phone = null; ! var $business_name = null; /* stock demographics fields */ ! var $courtesy_title = null; ! var $honorific = null; ! var $first_name = null; ! var $last_name = null; [...1526 lines suppressed...] $str = str_replace("\r\n", '; ', $str); --- 2075,2079 ---- ! public function stripLF($str) { $str = str_replace("\r\n", '; ', $str); *************** *** 2078,2082 **** ! function sendNotification($new=true) { --- 2083,2087 ---- ! public function sendNotification($new=true) { Index: RDX_Feature.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/class/RDX_Feature.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** RDX_Feature.php 26 Jul 2008 20:57:18 -0000 1.6 --- RDX_Feature.php 20 Nov 2008 22:49:33 -0000 1.7 *************** *** 25,36 **** class Rolodex_Feature { ! var $id = 0; ! var $title = null; ! var $description = null; ! var $image_id = 0; ! var $_error = null; ! function Rolodex_Feature($id=0) { if (!$id) { --- 25,36 ---- class Rolodex_Feature { ! public $id = 0; ! public $title = null; ! public $description = null; ! public $image_id = 0; ! public $_error = null; ! public function __construct($id=0) { if (!$id) { *************** *** 43,47 **** ! function init() { $db = new PHPWS_DB('rolodex_feature'); --- 43,47 ---- ! public function init() { $db = new PHPWS_DB('rolodex_feature'); *************** *** 56,60 **** ! function setTitle($title) { $this->title = strip_tags($title); --- 56,60 ---- ! public function setTitle($title) { $this->title = strip_tags($title); *************** *** 62,66 **** ! function setDescription($description) { $this->description = PHPWS_Text::parseInput($description); --- 62,66 ---- ! public function setDescription($description) { $this->description = PHPWS_Text::parseInput($description); *************** *** 68,72 **** ! function setImage_id($image_id) { $this->image_id = $image_id; --- 68,72 ---- ! public function setImage_id($image_id) { $this->image_id = $image_id; *************** *** 75,79 **** ! function getTitle($print=false) { if (empty($this->title)) { --- 75,79 ---- ! public function getTitle($print=false) { if (empty($this->title)) { *************** *** 89,93 **** ! function getDescription($print=false) { if (empty($this->description)) { --- 89,93 ---- ! public function getDescription($print=false) { if (empty($this->description)) { *************** *** 103,107 **** ! function getListDescription($length=60) { if (empty($this->description)) { --- 103,107 ---- ! public function getListDescription($length=60) { if (empty($this->description)) { *************** *** 112,116 **** ! function getQtyMembers() { $db = new PHPWS_DB('rolodex_feature_items'); --- 112,116 ---- ! public function getQtyMembers() { $db = new PHPWS_DB('rolodex_feature_items'); *************** *** 121,125 **** ! function getFile() { if (!$this->image_id) { --- 121,125 ---- ! public function getFile() { if (!$this->image_id) { *************** *** 130,134 **** ! function delete() { if (!$this->id) { --- 130,134 ---- ! public function delete() { if (!$this->id) { *************** *** 146,150 **** ! function rowTag() { $vars['feature'] = $this->id; --- 146,150 ---- ! public function rowTag() { $vars['feature'] = $this->id; *************** *** 169,173 **** ! function featureLinks() { $links = array(); --- 169,173 ---- ! public function featureLinks() { $links = array(); *************** *** 185,189 **** ! function save() { $db = new PHPWS_DB('rolodex_feature'); --- 185,189 ---- ! public function save() { $db = new PHPWS_DB('rolodex_feature'); *************** *** 196,200 **** ! function viewLink() { // return PHPWS_Text::rewriteLink($this->title, 'rolodex', $this->id); --- 196,200 ---- ! public function viewLink() { // return PHPWS_Text::rewriteLink($this->title, 'rolodex', $this->id); |
|
From: Verdon V. <ve...@us...> - 2008-11-20 22:49:42
|
Update of /cvsroot/phpwebsite-comm/modules/rolodex/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10816/docs Modified Files: CHANGELOG Log Message: 1.3 work for phpws 1.6 compatibility Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/rolodex/docs/CHANGELOG,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CHANGELOG 9 Oct 2008 19:40:48 -0000 1.14 --- CHANGELOG 20 Nov 2008 22:49:33 -0000 1.15 *************** *** 71,75 **** + Some tweaking of users permissions and security ! Version 1.2.0 -- Aug 2008 ------------------------------------------------------------------ + Fixed bug where some list parameters were being cleared when --- 71,75 ---- + Some tweaking of users permissions and security ! Version 1.2.0 -- Aug-Sep 2008 ------------------------------------------------------------------ + Fixed bug where some list parameters were being cleared when *************** *** 84,85 **** --- 84,92 ---- priveledges will be able to edit and/or activate the related user + Version 1.3.0 -- Oct 2008 + ------------------------------------------------------------------ + + Converted to phpws 1.6 url rewriting method + + Removed old mod_rewrite code + + Begin rewriting to php5 standards + + |
|
From: Eloi G. <ada...@us...> - 2008-11-19 06:01:38
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29487/inc Modified Files: default_config.php Log Message: If set in the AM settings, all changes to articles are now summarized in /logs/event.log Index: default_config.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/default_config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default_config.php 4 Jul 2007 23:02:02 -0000 1.1 --- default_config.php 19 Nov 2008 06:01:27 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- $settings['expiration_months'] = 0; $settings['expiration_days'] = 0; + $settings['log_events'] = 0; $settings['max_image_size'] = 26; $settings['max_image_height'] = 400; |
|
From: Eloi G. <ada...@us...> - 2008-11-19 06:01:34
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29487/docs Modified Files: Changes.txt Log Message: If set in the AM settings, all changes to articles are now summarized in /logs/event.log Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Changes.txt 18 Nov 2008 05:08:55 -0000 1.34 --- Changes.txt 19 Nov 2008 06:01:27 -0000 1.35 *************** *** 12,15 **** --- 12,16 ---- + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog + Fixed caching of homepage summary display for visitors + + If set in the AM settings, all changes to articles are now summarized in /logs/event.log ======================== |
|
From: Eloi G. <ada...@us...> - 2008-11-19 06:01:34
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29487 Modified Files: index_admin.php Log Message: If set in the AM settings, all changes to articles are now summarized in /logs/event.log Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** index_admin.php 18 Nov 2008 05:00:16 -0000 1.23 --- index_admin.php 19 Nov 2008 06:01:26 -0000 1.24 *************** *** 252,258 **** $article->approved = 0; $article->draft = 1; ! $message = 'Your article is being held as an unapproved rough draft.'; ! if (AMupdate($article, $message)==true) ! AMexit($article, $panel, $title, $content); else $content = $article->edit($page); --- 252,259 ---- $article->approved = 0; $article->draft = 1; ! $message = sprintf(dgettext('article', 'Article %s ("%s") has been saved as an unapproved rough draft'), $article->id, $article->title); ! if (AMupdate($article, $message)==true) { ! AMexit($article, $panel, $title, $content); ! } else $content = $article->edit($page); *************** *** 268,274 **** $article->approved = 1; $article->draft = 0; ! $message = 'Your article is automatically approved.'; ! if (AMupdate($article, $message)==true) ! AMexit($article, $panel, $title, $content); else $content = $article->edit($page); --- 269,276 ---- $article->approved = 1; $article->draft = 0; ! $message = sprintf(dgettext('article', 'Article %s ("%s") has been saved, approved and published'), $article->id, $article->title); ! if (AMupdate($article, $message)==true) { ! AMexit($article, $panel, $title, $content); ! } else $content = $article->edit($page); *************** *** 288,294 **** $article->approved = 0; $article->draft = 0; ! $message = 'Your article is being held for approval.<br />You however, will still be able to see and edit it.'; ! if (AMupdate($article, $message)==true) ! AMexit($article, $panel, $title, $content); else $content = $article->edit($page); --- 290,297 ---- $article->approved = 0; $article->draft = 0; ! $message = sprintf(dgettext('article', 'Article %s ("%s") is being held for approval.<br />You however, will still be able to see and edit it.'), $article->id, $article->title); ! if (AMupdate($article, $message)==true) { ! AMexit($article, $panel, $title, $content); ! } else $content = $article->edit($page); *************** *** 303,307 **** { $article->setEditLock(FALSE); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been unlocked'), $article->id, $article->title)."<br />\n"; } } --- 306,310 ---- { $article->setEditLock(FALSE); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been unlocked'), $article->id, $article->title)."<br />\n"; } } *************** *** 317,321 **** if (Current_User::allow('article', 'delete_articles', $article->id)) { $article->delete(); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been deleted'), $article->id, $article->title)."<br />\n"; } else --- 320,324 ---- if (Current_User::allow('article', 'delete_articles', $article->id)) { $article->delete(); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been deleted'), $article->id, $article->title)."<br />\n"; } else *************** *** 334,338 **** { $article->expire(); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been expired'), $article->id, $article->title)."<br />\n"; } } --- 337,341 ---- { $article->expire(); ! $message .= sprintf(dgettext('article', 'Article %s ("%s") has been expired'), $article->id, $article->title)."<br />\n"; } } *************** *** 586,590 **** if (!Current_User::isUnrestricted('article')) break; ! switch($_REQUEST['action']) { case 'save': --- 589,593 ---- if (!Current_User::isUnrestricted('article')) break; ! switch(@$_REQUEST['action']) { case 'save': *************** *** 622,627 **** if (!empty($title)) $template['TITLE'] = $title; ! if (!empty($message)) ! $template['MESSAGE'] = $message; if (!empty($content)) $template['CONTENT'] = $content; --- 625,632 ---- if (!empty($title)) $template['TITLE'] = $title; ! if (!empty($message)) { ! $template['MESSAGE'] = $message; ! log_event($message); ! } if (!empty($content)) $template['CONTENT'] = $content; *************** *** 647,651 **** , 'link' => 'index.php?module=article&op=viewhistory&id='.$_REQUEST['id']); $panel->quickSetTabs($tab); ! } --- 652,656 ---- , 'link' => 'index.php?module=article&op=viewhistory&id='.$_REQUEST['id']); $panel->quickSetTabs($tab); ! } *************** *** 658,662 **** } return true; ! } --- 663,667 ---- } return true; ! } *************** *** 676,680 **** } - function AMexit (& $article, & $panel, & $title, & $content) { $article->setEditLock(0); --- 681,684 ---- *************** *** 683,687 **** $title = dgettext('article', 'Main Menu'); $content = PHPWS_AM_Lists::list_articles(); ! } function AMredirect ($id, $page, $anchor = '') { --- 687,692 ---- $title = dgettext('article', 'Main Menu'); $content = PHPWS_AM_Lists::list_articles(); ! } ! function AMredirect ($id, $page, $anchor = '') { *************** *** 691,695 **** PHPWS_Core::reroute('index.php?module=article&op=edit&id='.$id.'&page='.$page.$anchor); exit(); ! } --- 696,700 ---- PHPWS_Core::reroute('index.php?module=article&op=edit&id='.$id.'&page='.$page.$anchor); exit(); ! } *************** *** 737,741 **** return $article; } ! ?> \ No newline at end of file --- 742,758 ---- return $article; } ! ! function log_event($message, $type = 'Notice') { ! if (!$GLOBALS['Article']['val']['log_events']) ! return; ! if (Current_User::isLogged()) ! $username = Current_User::getUsername(); ! else ! $username = _('Unknown user'); ! ! $ip = $_SERVER['REMOTE_ADDR']; ! $event = sprintf('%s@%s -- %s', $username, $ip, $message); ! PHPWS_Core::log(escapeshellcmd($event), 'event.log', $type); ! } ?> \ No newline at end of file |
|
From: Eloi G. <ada...@us...> - 2008-11-19 06:01:34
|
Update of /cvsroot/phpwebsite-comm/modules/article/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29487/templates Modified Files: config.tpl Log Message: If set in the AM settings, all changes to articles are now summarized in /logs/event.log Index: config.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/templates/config.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** config.tpl 21 Aug 2008 23:40:37 -0000 1.10 --- config.tpl 19 Nov 2008 06:01:23 -0000 1.11 *************** *** 19,24 **** <br /> {EXPIRATION_LABEL} <br /> ! <br /> <h2>{IMAGE_HEADER}</h2> --- 19,26 ---- <br /> {EXPIRATION_LABEL} + <br /> + {LOG_EVENTS} {LOG_EVENTS_LABEL} <br /> ! <br /> <h2>{IMAGE_HEADER}</h2> |
|
From: Eloi G. <ada...@us...> - 2008-11-19 06:01:34
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29487/class Modified Files: AM_EditForms.php AM_ModSettings.php Log Message: If set in the AM settings, all changes to articles are now summarized in /logs/event.log Index: AM_ModSettings.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_ModSettings.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AM_ModSettings.php 21 Aug 2008 20:17:32 -0000 1.12 --- AM_ModSettings.php 19 Nov 2008 06:01:26 -0000 1.13 *************** *** 51,66 **** $settings['default_article_template'] = $_POST['default_article_template']; $settings['default_section_template'] = $_POST['default_section_template']; ! $settings['summaries_on_homepage'] = $_POST['summaries_on_homepage']; ! $settings['prev_n_articles'] = $_POST['prev_n_articles']; ! $settings['popular_articles'] = $_POST['popular_articles']; ! $settings['listings_per_page'] = $_POST['listings_per_page']; ! $settings['need_approval'] = (@$_POST['need_approval'])?1:0; ! $settings['default_allow_comments'] = (@$_POST['default_allow_comments'])?1:0; ! $settings['default_allow_anon'] = (@$_POST['default_allow_anon'])?1:0; ! $settings['can_expire'] = (@$_POST['can_expire'])?1:0; ! $settings['expiration_years'] = $_POST['expiration_years']; ! $settings['expiration_months'] = $_POST['expiration_months']; ! $settings['expiration_days'] = $_POST['expiration_days']; ! $settings['max_image_size'] = (is_numeric($_POST['max_image_size'])) ? (int) $_POST['max_image_size'] : $GLOBALS['Article']['val']['max_image_size']; --- 51,67 ---- $settings['default_article_template'] = $_POST['default_article_template']; $settings['default_section_template'] = $_POST['default_section_template']; ! $settings['summaries_on_homepage'] = $_POST['summaries_on_homepage']; ! $settings['prev_n_articles'] = $_POST['prev_n_articles']; ! $settings['popular_articles'] = $_POST['popular_articles']; ! $settings['listings_per_page'] = $_POST['listings_per_page']; ! $settings['need_approval'] = (@$_POST['need_approval'])?1:0; ! $settings['default_allow_comments'] = (@$_POST['default_allow_comments'])?1:0; ! $settings['default_allow_anon'] = (@$_POST['default_allow_anon'])?1:0; ! $settings['can_expire'] = (@$_POST['can_expire'])?1:0; ! $settings['expiration_years'] = $_POST['expiration_years']; ! $settings['expiration_months'] = $_POST['expiration_months']; ! $settings['expiration_days'] = $_POST['expiration_days']; ! $settings['log_events'] = (@$_POST['log_events'])?1:0; ! $settings['max_image_size'] = (is_numeric($_POST['max_image_size'])) ? (int) $_POST['max_image_size'] : $GLOBALS['Article']['val']['max_image_size']; *************** *** 71,82 **** ? (int) $_POST['max_image_width'] : $GLOBALS['Article']['val']['max_image_width']; ! $settings['lock_expiration_time'] = $_POST['lock_expiration_time']; ! $settings['use_comments'] = (@$_POST['use_comments'])?1:0; ! $settings['long_date_format'] = $_POST['long_date_format']; ! $settings['short_date_format'] = $_POST['short_date_format']; ! $settings['categorized_display'] = (@$_POST['categorized_display'])?1:0; ! $settings['display_columns'] = $_POST['display_columns']; ! $settings['summaries_per_category'] = $_POST['summaries_per_category']; ! $settings['category_order'] = $_POST['category_order']; $content = "<?php\n"; --- 72,83 ---- ? (int) $_POST['max_image_width'] : $GLOBALS['Article']['val']['max_image_width']; ! $settings['lock_expiration_time'] = $_POST['lock_expiration_time']; ! $settings['use_comments'] = (@$_POST['use_comments'])?1:0; ! $settings['long_date_format'] = $_POST['long_date_format']; ! $settings['short_date_format'] = $_POST['short_date_format']; ! $settings['categorized_display'] = (@$_POST['categorized_display'])?1:0; ! $settings['display_columns'] = $_POST['display_columns']; ! $settings['summaries_per_category'] = $_POST['summaries_per_category']; ! $settings['category_order'] = $_POST['category_order']; $content = "<?php\n"; Index: AM_EditForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_EditForms.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AM_EditForms.php 11 Oct 2008 06:13:49 -0000 1.8 --- AM_EditForms.php 19 Nov 2008 06:01:26 -0000 1.9 *************** *** 483,486 **** --- 483,490 ---- .$form->get('expiration_days').'</label>')); + /* log_events */ + $form->addCheckBox('log_events'); + $form->setMatch('log_events', $val['log_events']); + $form->setLabel('log_events', dgettext('article', 'Log all changes to articles at /logs/event.log')); /* max_image_size */ |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:09:01
|
Update of /cvsroot/phpwebsite-comm/modules/article/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23134/boost Modified Files: update.php Log Message: Fixed caching of homepage summary display for visitors Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/update.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** update.php 18 Nov 2008 05:00:17 -0000 1.23 --- update.php 18 Nov 2008 05:08:55 -0000 1.24 *************** *** 242,245 **** --- 242,246 ---- + RFE [ 2138556 ] - "Viewable By" and "Editable By" filters are added to the search menu + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog + + Fixed caching of homepage summary display for visitors </pre>'; |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:09:01
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23134/inc Modified Files: runtime_categorized.php runtime_chronological.php Log Message: Fixed caching of homepage summary display for visitors Index: runtime_chronological.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/runtime_chronological.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** runtime_chronological.php 21 Aug 2008 20:17:19 -0000 1.13 --- runtime_chronological.php 18 Nov 2008 05:08:55 -0000 1.14 *************** *** 1,5 **** <?php /** ! * This is the code to display articles on the homepage grouped by categories. * * @version $Id$ --- 1,5 ---- <?php /** ! * This is the code to display articles on the homepage in chronological order. * * @version $Id$ *************** *** 11,15 **** $cachekey = 'ChronologicalArticleHeadlines'; ! $s = PHPWS_Cache::get($cachekey); if (empty($s)) { /* Load records to display */ --- 11,16 ---- $cachekey = 'ChronologicalArticleHeadlines'; ! if (!Current_User::isLogged()) ! $s = PHPWS_Cache::get($cachekey); if (empty($s)) { /* Load records to display */ *************** *** 61,70 **** $GLOBALS['AMcategoryIdx'] = $idx; } ! /* Cache this so we don't have to do it for awhile */ ! $s = serialize(array('result' => $result, 'AMcategoryIdx' => $idx)); ! $lifetime = 86400; // number of seconds until cache refresh ! // default is set in CACHE_LIFETIME in the ! // config/core/config.php file ! PHPWS_Cache::save($cachekey, $s, $lifetime); } else { --- 62,73 ---- $GLOBALS['AMcategoryIdx'] = $idx; } ! /* Cache this for unlogged users so we don't have to do it for awhile */ ! if (!Current_User::isLogged()) { ! $s = serialize(array('result' => $result, 'AMcategoryIdx' => $idx)); ! $lifetime = 86400; // number of seconds until cache refresh ! // default is set in CACHE_LIFETIME in the ! // config/core/config.php file ! PHPWS_Cache::save($cachekey, $s, $lifetime); ! } } else { Index: runtime_categorized.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/runtime_categorized.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** runtime_categorized.php 21 Aug 2008 20:17:19 -0000 1.10 --- runtime_categorized.php 18 Nov 2008 05:08:55 -0000 1.11 *************** *** 1,5 **** <?php /** ! * This is the code to display articles on the homepage in chronological order. * * @version $Id$ --- 1,5 ---- <?php /** ! * This is the code to display articles on the homepage grouped by categories. * * @version $Id$ *************** *** 9,13 **** */ $cachekey = 'CategorizedArticleHeadlines'; ! $s = PHPWS_Cache::get($cachekey); if (empty($s)) { $category_index = Categories::getCategories('list'); --- 9,14 ---- */ $cachekey = 'CategorizedArticleHeadlines'; ! if (!Current_User::isLogged()) ! $s = PHPWS_Cache::get($cachekey); if (empty($s)) { $category_index = Categories::getCategories('list'); *************** *** 45,54 **** $cat_arr[] = $a; } ! /* Cache this so we don't have to do it for awhile */ ! $s = serialize(array('content' => $content, 'cat_arr' => $cat_arr)); ! $lifetime = 86400; // number of seconds until cache refresh ! // default is set in CACHE_LIFETIME in the ! // config/core/config.php file ! PHPWS_Cache::save($cachekey, $s, $lifetime); } else { --- 46,57 ---- $cat_arr[] = $a; } ! /* Cache this for unlogged users so we don't have to do it for awhile */ ! if (!Current_User::isLogged()) { ! $s = serialize(array('content' => $content, 'cat_arr' => $cat_arr)); ! $lifetime = 86400; // number of seconds until cache refresh ! // default is set in CACHE_LIFETIME in the ! // config/core/config.php file ! PHPWS_Cache::save($cachekey, $s, $lifetime); ! } } else { |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:08:59
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23134/docs Modified Files: Changes.txt Log Message: Fixed caching of homepage summary display for visitors Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Changes.txt 18 Nov 2008 05:00:16 -0000 1.33 --- Changes.txt 18 Nov 2008 05:08:55 -0000 1.34 *************** *** 11,14 **** --- 11,15 ---- + RFE [ 2138556 ] - "Viewable By" and "Editable By" filters are added to the search menu + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog + + Fixed caching of homepage summary display for visitors ======================== |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:28
|
Update of /cvsroot/phpwebsite-comm/modules/article/boost In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778/boost Modified Files: update.php boost.php Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/boost.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** boost.php 21 Aug 2008 20:17:29 -0000 1.9 --- boost.php 18 Nov 2008 05:00:17 -0000 1.10 *************** *** 10,14 **** $proper_name = 'Article Manager'; ! $version = '4.1.0'; $register = FALSE; $unregister = FALSE; --- 10,14 ---- $proper_name = 'Article Manager'; ! $version = '4.2.0'; $register = FALSE; $unregister = FALSE; Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/boost/update.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** update.php 11 Oct 2008 06:13:52 -0000 1.22 --- update.php 18 Nov 2008 05:00:17 -0000 1.23 *************** *** 214,218 **** --- 214,235 ---- case version_compare($currentVersion, '4.2.0', '<'): + $file_origin = PHPWS_SOURCE_DIR . 'mod/article/inc/default_config.php'; + $destination_directory = PHPWS_HOME_DIR . 'files/article/'; + if (PHPWS_File::fileCopy($file_origin, $destination_directory, 'config.php', 1, 0)) + $content[] = '+ Updated the module configuration file:'; + else { + $content[] = '+ Unable to update the module configuration file:'; + return false; + } + $files = array('templates/search_advanced.tpl'); + if (PHPWS_Boost::updateFiles($files, 'article')) { + $content[] = '+ Updated the following files: ' . implode("\n ", $files); + } + else { + $content[] = '+ Unable to update the following files: ' . implode("\n ", $files); + return false; + } + $content[] = '<pre> ======================== *************** *** 223,229 **** + Fixed Bug Report [ 2130663 ] - Restricted Users cannot edit their own articles + Fixed Bug Report [ 2089717 ] - Articles awaiting approval all have the date Dec. 31, 1969. ! + </pre>'; ! } // end of switch --- 240,247 ---- + Fixed Bug Report [ 2130663 ] - Restricted Users cannot edit their own articles + Fixed Bug Report [ 2089717 ] - Articles awaiting approval all have the date Dec. 31, 1969. ! + RFE [ 2138556 ] - "Viewable By" and "Editable By" filters are added to the search menu ! + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog </pre>'; ! } // end of switch |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:28
|
Update of /cvsroot/phpwebsite-comm/modules/article/templates In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778/templates Modified Files: search_advanced.tpl Added Files: edit_permissions.tpl Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: search_advanced.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/templates/search_advanced.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** search_advanced.tpl 13 Oct 2008 14:03:54 -0000 1.4 --- search_advanced.tpl 18 Nov 2008 05:00:16 -0000 1.5 *************** *** 5,10 **** <td style="background-color: rgb(255, 238, 255);">{OWNER_LABEL}</td> <td></td> ! <td>{OWNER_1}{OWNER_1_LABEL} {OWNER_2}{OWNER_2_LABEL} {OWNER_3}{OWNER_3_LBL} <br> ! </td> </tr> <!-- BEGIN CATEGORY --> --- 5,9 ---- <td style="background-color: rgb(255, 238, 255);">{OWNER_LABEL}</td> <td></td> ! <td>{OWNER_1}{OWNER_1_LABEL} {OWNER_2}{OWNER_2_LABEL} {OWNER_3}{OWNER_3_LBL}</td> </tr> <!-- BEGIN CATEGORY --> *************** *** 15,25 **** </tr> <!-- END CATEGORY --> - <!-- BEGIN GROUPOPT --> - <tr> - <td style="background-color: rgb(255, 238, 255);">{GROUPS_LABEL}</td> - <td></td> - <td>{GROUPS}</td> - </tr> - <!-- END GROUPOPT --> <!-- BEGIN LANG --> <tr> --- 14,17 ---- *************** *** 65,74 **** </tr> <tr> ! <td style="background-color: rgb(255, 238, 255);">{UPDATER_LABEL} </td> <td></td> ! <td>{UPDATER_1}{UPDATER_1_LABEL} {UPDATER_2}{UPDATER_2_LABEL} {UPDATER_3}{UPDATER_3_LBL} <br> </tr> <tr> ! <td style="background-color: rgb(255, 238, 255); white-space: nowrap;">{EDITABLE_ONLY}{EDITABLE_ONLY_LABEL} </td> </tr> <tr> --- 57,73 ---- </tr> <tr> ! <td style="background-color: rgb(255, 238, 255);">{SEARCHUPDATER}{SEARCHUPDATER_LABEL} </td> <td></td> ! <td>{UPDATER_1}{UPDATER_1_LABEL} {UPDATER_2}{UPDATER_2_LBL} </td> </tr> <tr> ! <td style="background-color: rgb(255, 238, 255); white-space: nowrap;">{SEARCHVIEW}{SEARCHVIEW_LABEL} </td> ! <td></td> ! <td>{VIEWTYPE_1}{VIEWTYPE_1_LABEL} {VIEWTYPE_2}{VIEWTYPE_2_LABEL} {VIEWTYPE_3}{VIEWGROUPS} </td> ! </tr> ! <tr> ! <td style="background-color: rgb(255, 238, 255); white-space: nowrap;">{SEARCHEDIT}{SEARCHEDIT_LABEL} </td> ! <td></td> ! <td>{EDITGROUP}</td> </tr> <tr> --- NEW FILE: edit_permissions.tpl --- <script type="text/javascript"> //<![CDATA[ var view_groups = null; var view_groups_inputs = null; window.onload = function() { view_groups = document.getElementById('view_groups'); view_groups_inputs = view_groups.getElementsByTagName("select"); for (i = 0; i < 3; i++) { current_radio = document.getElementById('choose_permissions_view_permission_' + i); if (current_radio.checked) { hideSelect(current_radio.value); return; } } } function hideSelect(radio_value) { if (!view_groups_inputs) { return; } if (radio_value != '2') { status = 'true'; } else { status = ''; } for(var x=0; x < view_groups_inputs.length; x++) { view_groups_inputs[x].disabled = status; } } //]]> </script> {START_FORM} <fieldset> <legend>{CHANGE_VIEW} {VIEW_SELECT_LABEL}</legend> <table cellpadding="4" width="100%"> <tr> <td style="width:90%"> {VIEW_PERMISSION_1} {VIEW_PERMISSION_1_LABEL}<br /> {VIEW_PERMISSION_2} {VIEW_PERMISSION_2_LABEL}<br /> {VIEW_PERMISSION_3} {VIEW_PERMISSION_3_LABEL} </td> <td> <div id="view_groups" style="border:solid 1px;line-height:2em;padding:1em;white-space:nowrap">{VIEWGROUP_COL_0}</div> </td> </tr> </table> </fieldset> <fieldset> <legend>{CHANGE_EDIT} {EDIT_SELECT_LABEL}</legend> <table style="border:none;width:97%;line-height:2em"> <tr> <td>{EDITGROUP_COL_0}</td> <td>{EDITGROUP_COL_1}</td> </tr> <tr> <td>{EDITUSERS_COL_0}</td> <td>{EDITUSERS_COL_1}</td> </tr> </table> </fieldset> {SUBMIT} {CANCEL} <br /> <table width="100%" border="0" cellspacing="0" cellpadding="2" summary="{TBL_SUMMARY}"> <tr class="bg_dark" style="white-space:nowrap"> <th scope="col" style="text-align:center" colspan="2"> {TITLE_LABEL} </th> <th scope="col" width="60%"> {VIEW_LABEL} <br /> {EDIT_LABEL} </th> </tr> <!-- BEGIN message --> <tr> <td colspan="3"> {EMPTY_MESSAGE} </td> </tr> <!-- END message --> <!-- BEGIN listrows --> <tr class="toggle{TOGGLE}"> <td class="smaller"> {SELECTION} </td> <td class="smaller" width="40%"> {TITLE} </td> <td class="smaller"> {VIEWERS} <hr style="border-style:dotted" /> {EDITORS} <br /><br /> </td> </tr> <!-- END listrows --> <tr> <td colspan="3"> {BULK_ACTION} </td> </tr> </table> {SUBMIT} {CANCEL} {END_FORM} |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:28
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778/inc Modified Files: default_parameters.php Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: default_parameters.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/default_parameters.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** default_parameters.php 13 Oct 2008 14:03:51 -0000 1.2 --- default_parameters.php 18 Nov 2008 05:00:17 -0000 1.3 *************** *** 21,25 **** $parameters['searchupd_to'] = $time; $parameters['searchupdater'] = 0; ! $parameters['updater'] = 1; $parameters['updater_name'] = ''; $parameters['editable_only'] = 0; --- 21,25 ---- $parameters['searchupd_to'] = $time; $parameters['searchupdater'] = 0; ! $parameters['updater'] = 0; $parameters['updater_name'] = ''; $parameters['editable_only'] = 0; *************** *** 27,30 **** --- 27,35 ---- $parameters['orderby'] = 'updated_date'; $parameters['orderby_dir'] = 'desc'; + $parameters['searchview'] = 0; + $parameters['viewtype'] = 0; + $parameters['viewgroups'] = 0; + $parameters['searchedit'] = 0; + $parameters['editgroup'] = 0; ?> |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:25
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778 Modified Files: index_admin.php index.php Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** index_admin.php 11 Oct 2008 06:13:52 -0000 1.22 --- index_admin.php 18 Nov 2008 05:00:16 -0000 1.23 *************** *** 399,402 **** --- 399,419 ---- $content = PHPWS_AM_Lists::list_articles(); break; + + case 'edit_permissions': + if (!Current_User::isUnrestricted('article') || empty($id_arr)) + break; + PHPWS_Core::initModClass('article', 'EditPermissions.php'); + $title = dgettext('article', 'Editing Article Access Permissions'); + $perm_dialog = new PHPWS_EditPermissions('article', $id_arr, dgettext('article', 'article')); + $content = $perm_dialog->action(); + if (!empty($perm_dialog->message)) { + $message = implode("<br />\n", $perm_dialog->message); + PHPWS_AM_ModSettings::reset_cache(); + } + if (empty($content)) { + PHPWS_Core::initModClass('article', 'AM_Lists.php'); + $content = PHPWS_AM_Lists::list_articles(); + } + break; Index: index.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** index.php 21 Aug 2008 20:17:21 -0000 1.23 --- index.php 18 Nov 2008 05:00:16 -0000 1.24 *************** *** 12,16 **** exit(); } ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); PHPWS_AM_ModSettings::init(); --- 12,16 ---- exit(); } ! PHPWS_Core::initModClass('article', 'AM_ModSettings.php'); PHPWS_AM_ModSettings::init(); |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:25
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778/docs Modified Files: Changes.txt Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Changes.txt 21 Aug 2008 20:17:17 -0000 1.32 --- Changes.txt 18 Nov 2008 05:00:16 -0000 1.33 *************** *** 2,5 **** --- 2,15 ---- + TODO--xxxxx--mod-rewite URIs now look more like the proposed spec to insure backwards compatibility + ============================================= + Changes in version 4.2.0 (The trf000 Edition) + ============================================= + + RFE [2091396] - Approval Permissions can now be given on a per-Admin basis + + ([ 2130662 ] Article Manager restricted content) + + Fixed Bug Report [ 2130663 ] - Restricted Users cannot edit their own articles + + Fixed Bug Report [ 2089717 ] - Articles awaiting approval all have the date Dec. 31, 1969. + + RFE [ 2138556 ] - "Viewable By" and "Editable By" filters are added to the search menu + + RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog + ======================== Changes in version 4.1.0 |
|
From: Eloi G. <ada...@us...> - 2008-11-18 05:00:25
|
Update of /cvsroot/phpwebsite-comm/modules/article/class In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21778/class Modified Files: AM_Data.php AM_DisplayForms.php AM_Lists.php Article.php Added Files: EditPermissions.php Log Message: RFE ["trf000"] - Approval Permissions can now be set/changed en masse via a "Editing Article Access Permissions" dialog Index: AM_Data.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Data.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** AM_Data.php 13 Oct 2008 14:03:54 -0000 1.19 --- AM_Data.php 18 Nov 2008 05:00:13 -0000 1.20 *************** *** 302,311 **** } ! if(isset($_REQUEST['groups'])) { ! $s_arr['groups'] = (int) $_REQUEST['groups']; ! if ($_REQUEST['groups']=='all') ! $s_arr['groups'] = 'all'; ! } ! if(isset($_REQUEST['language'])) $s_arr['language'] = substr($_REQUEST['language'],0,2); --- 302,315 ---- } ! $s_arr['searchview'] = !empty($_REQUEST['searchview']); ! if(isset($_REQUEST['viewtype'])) ! $s_arr['viewtype'] = (int) $_REQUEST['viewtype']; ! if(isset($_REQUEST['viewgroups'])) ! $s_arr['viewgroups'] = (int) $_REQUEST['viewgroups']; ! ! $s_arr['searchedit'] = !empty($_REQUEST['searchedit']); ! if(isset($_REQUEST['editgroup'])) ! $s_arr['editgroup'] = (int) $_REQUEST['editgroup']; ! if(isset($_REQUEST['language'])) $s_arr['language'] = substr($_REQUEST['language'],0,2); *************** *** 323,331 **** $s_arr['articleid'] = ''; ! if(isset($_REQUEST['searchpub'])) ! $s_arr['searchpub'] = $_REQUEST['searchpub']; ! else ! $s_arr['searchpub'] = 0; ! if(isset($_REQUEST['searchpub_from'])) $s_arr['searchpub_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchpub_from']); --- 327,331 ---- $s_arr['articleid'] = ''; ! $s_arr['searchpub'] = !empty($_REQUEST['searchpub']); if(isset($_REQUEST['searchpub_from'])) $s_arr['searchpub_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchpub_from']); *************** *** 333,341 **** $s_arr['searchpub_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchpub_to']); ! if(isset($_REQUEST['searchexp'])) ! $s_arr['searchexp'] = $_REQUEST['searchexp']; ! else ! $s_arr['searchexp'] = 0; ! if(isset($_REQUEST['searchexp_from'])) $s_arr['searchexp_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchexp_from']); --- 333,337 ---- $s_arr['searchpub_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchpub_to']); ! $s_arr['searchexp'] = !empty($_REQUEST['searchexp']); if(isset($_REQUEST['searchexp_from'])) $s_arr['searchexp_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchexp_from']); *************** *** 343,351 **** $s_arr['searchexp_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchexp_to']); ! if(isset($_REQUEST['searchcreated'])) ! $s_arr['searchcreated'] = $_REQUEST['searchcreated']; ! else ! $s_arr['searchcreated'] = 0; ! if(isset($_REQUEST['searchcreated_from'])) $s_arr['searchcreated_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchcreated_from']); --- 339,343 ---- $s_arr['searchexp_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchexp_to']); ! $s_arr['searchcreated'] = !empty($_REQUEST['searchcreated']); if(isset($_REQUEST['searchcreated_from'])) $s_arr['searchcreated_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchcreated_from']); *************** *** 353,361 **** $s_arr['searchcreated_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchcreated_to']); ! if(isset($_REQUEST['searchupd'])) ! $s_arr['searchupd'] = $_REQUEST['searchupd']; ! else ! $s_arr['searchupd'] = 0; ! if(isset($_REQUEST['searchupd_from'])) $s_arr['searchupd_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchupd_from']); --- 345,349 ---- $s_arr['searchcreated_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchcreated_to']); ! $s_arr['searchupd'] = !empty($_REQUEST['searchupd']); if(isset($_REQUEST['searchupd_from'])) $s_arr['searchupd_from'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchupd_from']); *************** *** 363,371 **** $s_arr['searchupd_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchupd_to']); ! if(isset($_REQUEST['searchupdater'])) ! $s_arr['searchupdater'] = $_REQUEST['searchupdater']; ! else ! $s_arr['searchupdater'] = 0; ! if(isset($_REQUEST['updater'])) $s_arr['updater'] = (int) $_REQUEST['updater']; --- 351,355 ---- $s_arr['searchupd_to'] = PHPWS_AM_Data::get_timestring($_REQUEST['searchupd_to']); ! $s_arr['searchupdater'] = !empty($_REQUEST['searchupdater']); if(isset($_REQUEST['updater'])) $s_arr['updater'] = (int) $_REQUEST['updater']; *************** *** 374,382 **** $s_arr['updater_name'] = $_REQUEST['updater_name']; - if(isset($_REQUEST['editable_only'])) - $s_arr['editable_only'] = 1; - else - $s_arr['editable_only'] = 0; - if(!empty($_REQUEST['searchtext'])) $s_arr['searchtext'] = preg_replace('/\W/', '', $_REQUEST['searchtext']);; --- 358,361 ---- --- NEW FILE: EditPermissions.php --- <?php /** * This is the PHPWS_EditPermissions class. sd * gobbls * * @abstract It contains functions to bulk edit content item permissions. * @uses It contains functions to bulk edit content item permissions. * * @version $Id: EditPermissions.php,v 1.1 2008/11/18 05:00:13 adarkling Exp $ * * @author Eloi George <el...@NO...> * @license phpWebsite LGPL license */ class PHPWS_EditPermissions { var $module = ''; var $id_arr = array(); var $item_name = ''; var $message = array(); var $keys = array(); function PHPWS_EditPermissions($module, $id_arr, $item_name) { $this->module = $module; $this->id_arr = $id_arr; $this->item_name = $item_name; // Create a list of Key objects $db = new PHPWS_DB('phpws_key'); $db->addWhere('module', $module); $db->addWhere('item_id', $id_arr); $this->keys = $db->getObjects('Key'); if (PHPWS_Error::logIfError($this->keys)) $this->keys = array(); } function action() { $content = null; // Show dialog if groups haven't been picked yet //test($_POST,0,1); if (!empty($_POST['cancel'])) $this->message .= sprintf('No changes to %s permissions were made.', $this->item_name); elseif (!empty($_POST['submit_form'])) { $this->post_view_changes(); $this->post_edit_changes(); foreach ($this->keys AS &$key) { if ($key->savePermissions()) $this->message[$key->id] = implode("<br />\n", $this->message[$key->id]); else $this->message[$key->id] = sprintf(dgettext('article', '%s #%s could not be set. Please check the error log.'), $key->item_name, $key->item_id); } } else { // Show the dialog form $content = $this->list_permissions($this->module, $this->id_arr); } return $content; } /** * Lists a set of items with restricted viewing & editing details * * @author Eloi George <el...@NO...> * @param none * @return none */ function list_permissions ($module, $id_arr) { $db = new PHPWS_DB('phpws_key'); $db->addWhere('module', $module); $db->addWhere('item_id', $id_arr); Key::restrictView($db, $module); $result = $db->getObjects('Key'); if (PHPWS_Error::logIfError($result) || empty($result)) return; // Create an indexed list of non-user groups $db = new PHPWS_DB('users_groups'); $db->addColumn('id'); $db->addColumn('name'); $db->addOrder('name'); $db->addWhere('user_id', 0); $db->setIndexBy('id'); $nonuser_groups['groups'] = $this->getNonUserGrouplist(); //test($nonuser_groups,0,1); $view_group_matchlist = $edit_group_matchlist = $row = array(); $toggle = 1; $article_count = count($result); foreach($result as $key) { $edit_groupnames = $view_groupnames = $edit_groupnames = array(); $row['TITLE'] = PHPWS_Article::get_title_link($key->item_id, $key->title); $row['SELECTION'] = '<input name="id[]" value="'.$key->item_id.'" type="checkbox" checked="checked">'; // Determine viewing restrictions if (!$key->restricted) { $row['VIEWERS'] = dgettext('article', 'All can view'); } elseif ($key->restricted == KEY_LOGGED_RESTRICTED) { $row['VIEWERS'] = dgettext('article', 'Only logged users can view'); } elseif ($key->restricted == KEY_GROUP_RESTRICTED) { $view_matches = $key->getViewGroups(); if (empty($view_matches)) $row['VIEWERS'] = dgettext('article', 'No viewing groups have been set'); else { foreach ($view_matches AS $view_group) { $view_groupnames[] = $nonuser_groups['groups'][$view_group]; $view_group_matchlist[] = $view_group; } $row['VIEWERS'] = implode(', ', $view_groupnames); } } // Determine editing restrictions $db = new PHPWS_DB('phpws_key_edit'); $db->addColumn('phpws_key_edit.group_id'); $db->addColumn('users_groups.name'); $db->addWhere('phpws_key_edit.key_id', $key->id); $db->addWhere('users_groups.id', 'phpws_key_edit.group_id'); $edit_matches = $db->select(); PHPWS_Error::logIfError($result); if (empty($edit_matches)) { $row['EDITORS'] = dgettext('article', 'No edit groups'); } else { foreach ($edit_matches AS $edit_group) { $edit_groupnames[] = $edit_group['name']; $edit_group_matchlist[] = $edit_group['group_id']; } $row['EDITORS'] = implode(', ', $edit_groupnames); } ($toggle == 1) ? $toggle = 2 : $toggle = 1; $row['TOGGLE'] = $toggle; $tags['listrows'][] = $row; } $tags['TITLE_LABEL'] = sprintf(dgettext('article', '%s Title'), ucfirst($this->module)); $tags['VIEW_LABEL'] = dgettext('article', 'Viewing Restrictions'); $tags['EDIT_LABEL'] = dgettext('article', 'Who Is Allowed To Edit'); $tags['VIEW_SELECT_LABEL'] = dgettext('article', 'Change Viewing Restrictions'); $tags['EDIT_SELECT_LABEL'] = dgettext('article', 'Change Who Is Allowed To Edit'); $form = new PHPWS_Form('choose_permissions'); $form->addHidden('module', 'article'); $form->addHidden('op', 'edit_permissions'); // View Permission option 3 --Group selection table $view_group_hash = array_count_values($view_group_matchlist); $form->mergeTemplate($this->create_form_columns($nonuser_groups, 'view', $view_group_hash, $article_count, 1)); // View Permission fieldset $form->addRadio('view_permission', array(0, 1, 2)); $form->setExtra('view_permission', 'onclick="hideSelect(this.value)"'); $form->setLabel('view_permission', array(dgettext('users', 'All visitors'), dgettext('users', 'Logged visitors'), dgettext('users', 'Specific group(s)'))); $form->setMatch('view_permission', $key->restricted); // Edit Permission table // Get list of all groups/users that have restricted edit permissions $edit_groups = $this->getRestrictedGrouplist($key->module, $key->edit_permission); if (PHPWS_Error::logIfError($edit_groups)) return 'An error has occured. Please ask an Administrator to check the error logs.'; // Create the group selection list $edit_group_hash = array_count_values($edit_group_matchlist); $form->mergeTemplate($this->create_form_columns($edit_groups, 'edit', $edit_group_hash, $article_count)); $form->addCheckBox('change_view', 1); $form->addCheckBox('change_edit', 1); $form->addSubmit('submit', dgettext('article', 'Save Changes')); $form->addSubmit('cancel', dgettext('article', 'Cancel')); $tags = $form->getTemplate(true, true, $tags); return PHPWS_Template::process($tags,'article','edit_permissions.tpl'); } function getNonUserGrouplist() { $db = new PHPWS_DB('users_groups'); $db->addColumn('id'); $db->addColumn('name'); $db->addOrder('name'); $db->addWhere('user_id', 0); $db->setIndexBy('id'); return $db->select('assoc'); } function getRestrictedGrouplist($module, $edit_permission) { if (empty($module)) { return NULL; } $permTable = Users_Permission::getPermissionTableName($module); if (!PHPWS_DB::isTable($permTable)) { return PHPWS_Error::get(USER_ERR_PERM_FILE, 'users', __CLASS__ . '::' . __FUNCTION__); } // Get list of all groups/users that have restricted item permissions for this module $db = new PHPWS_DB('users_groups'); $db->addColumn('users_groups.*'); $db->addWhere('users_groups.id', "$permTable.group_id"); $db->addWhere("$permTable.permission_level", RESTRICTED_PERMISSION); $test_db = new PHPWS_DB($permTable); if ($edit_permission) { if (!$test_db->isTableColumn($edit_permission)) { return PHPWS_Error::get(KEY_PERM_COLUMN_MISSING, 'core', 'Users_Permission::getRestrictedGroups', $edit_permission); } $db->addWhere("$permTable.$edit_permission", 1); } $db->addOrder('name'); $result = $db->select(); PHPWS_ERROR::logIfError($result); $glist['users'] = $glist['groups'] = array(); foreach ($result as $group) { if ($group['user_id']) { $glist['users'][$group['id']] = $group['name']; } else { $glist['groups'][$group['id']] = $group['name']; } } unset($result); return $glist; } function create_form_columns($group_list, $name, $hash, $itemcount, $columns = 2) { if (empty($group_list) || !is_array($hash)) { return NULL; } foreach ($group_list as $type => $section) { foreach ($section as $group_id => $groupname) { $actions = array('<option value=""></option>'); if (empty($hash[$group_id])) $hash[$group_id] = 0; // If not all items have this permission option... if ($hash[$group_id] < $itemcount) $actions[] = '<option value="add">'.dgettext('article', 'Add').'</option>'; // If any items have this permission option... if ($hash[$group_id] > 0) $actions[] = '<option value="remove">'.dgettext('article', 'Remove').'</option>'; // If there are edit options show the selection box if (count($actions) > 1) $str = sprintf('<select name="%sgroup[%s]" style="width:8em" title="%s">%s</select> %s (%s)' , $name, $group_id, dgettext('article', 'Select the desired action') , implode("\n", $actions) ,$groupname, $hash[$group_id]); if ($type == 'users') $users[] = $str; else $groups[] = $str; } } if (isset($groups)) // Divide into x columns $cols = array_chunk($groups, ceil(count($groups) / $columns)); foreach ($cols AS $key => $column) $list[strtoupper($name).'GROUP_COL_'.$key] = implode("<br />\n", $column); if (isset($users)) // Divide into x columns $cols = array_chunk($users, ceil(count($groups) / $columns)); foreach ($cols AS $key => $column) $list[strtoupper($name).'USER_COL_'.$key] = implode("<br />\n", $column); return $list; } /** * */ function post_view_changes() { if (!isset($_POST['change_view'])) return; $add_arr = $remove_arr = array(); if ((int)$_POST['view_permission'] == 2 && is_array($_POST['viewgroup'])) { foreach ($_POST['viewgroup'] AS $group_key => $group_value) { if ($group_value == 'add') $add_arr[] = $group_key; if ($group_value == 'remove') $remove_arr[] = $group_key; } } foreach ($this->keys AS &$key) { $key->restricted = (int)$_POST['view_permission']; if ( $key->restricted == 2 && is_array($_POST['viewgroup'])) { if (!empty($add_arr)) $key->_view_groups = array_unique(array_merge((array)$key->_view_groups, $add_arr)); if (!empty($remove_arr)) $key->_view_groups = array_diff((array)$key->_view_groups, $remove_arr); if (empty($key->_view_groups)) $key->_view_groups = NULL; } $this->message[$key->id]['view'] = sprintf(dgettext('article', 'Viewing restrictions are set on %s #%s'), $key->item_name, $key->item_id); } } function post_edit_changes() { if (!isset($_POST['change_edit'])) return; $add_arr = $remove_arr = array(); if (is_array($_POST['editgroup'])) { foreach ($_POST['editgroup'] AS $group_key => $group_value) { if ($group_value == 'add') $add_arr[] = $group_key; if ($group_value == 'remove') $remove_arr[] = $group_key; } } foreach ($this->keys AS &$key) { if (!empty($add_arr)) $key->_edit_groups = array_unique(array_merge((array)$key->_edit_groups, $add_arr)); if (!empty($remove_arr)) $key->_edit_groups = array_diff((array)$key->_edit_groups, $remove_arr); if (empty($key->_edit_groups)) $key->_edit_groups = NULL; // if the key is view restricted we need to make sure the people who edit can view the item elseif ($key->restricted == 2) { if (empty($key->_view_groups)) { $key->_view_groups = $key->_edit_groups; } else { $key->_view_groups = array_unique(array_merge((array)$key->_view_groups, $key->_edit_groups)); } } $this->message[$key->id]['edit'] = sprintf(dgettext('article', 'Editing permissions are set on %s #%s'), $key->item_name, $key->item_id); } } } ?> Index: AM_Lists.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_Lists.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** AM_Lists.php 13 Oct 2008 14:03:54 -0000 1.21 --- AM_Lists.php 18 Nov 2008 05:00:13 -0000 1.22 *************** *** 25,47 **** /* owner */ switch ($s_arr['owner']) { ! case 0: // "My Articles" ! $db->addWhere('created_id', Current_User::getId()); ! break; ! case 2: // "Articles Belonging To:" ! // Search for userids belonging to this name fragment ! $db1 = new PHPWS_DB('users'); ! $db1->addColumn('id'); // Not sure if we want this $db1->addWhere('display_name', '%'.$s_arr['owner_name'].'%', 'LIKE'); ! $db1->addWhere('display_name', $s_arr['owner_name']); ! $result = $db1->select('col'); ! if (!PHPWS_Error::logIfError($result) && !empty($result)) { ! if (count($result)==1) ! $db->addWhere('created_id', $result[0]); ! else ! $db->addWhere('created_id', $result, 'IN'); ! } ! break; ! default: // "All Articles" ! break; } --- 25,47 ---- /* owner */ switch ($s_arr['owner']) { ! case 0: // "My Articles" ! $db->addWhere('created_id', Current_User::getId()); ! break; ! case 2: // "Articles Belonging To:" ! // Search for userids belonging to this name fragment ! $db1 = new PHPWS_DB('users'); ! $db1->addColumn('id'); // Not sure if we want this $db1->addWhere('display_name', '%'.$s_arr['owner_name'].'%', 'LIKE'); ! $db1->addWhere('display_name', $s_arr['owner_name']); ! $result = $db1->select('col'); ! if (!PHPWS_Error::logIfError($result) && !empty($result)) { ! if (count($result)==1) ! $db->addWhere('created_id', $result[0]); ! else ! $db->addWhere('created_id', $result, 'IN'); ! } ! break; ! default: // "All Articles" ! break; } *************** *** 53,61 **** } ! /* groups */ ! if ($s_arr['groups']!='all') { ! $db->addWhere('phpws_key_view.group_id', $s_arr['groups']); ! $db->addWhere('phpws_key_view.key_id', 'article.key_id'); } /* language */ --- 53,85 ---- } ! /* searchview */ ! if ($s_arr['searchview']) { ! switch ($s_arr['viewtype']) { ! case 0: // "Everyone" ! $db->addWhere('phpws_key.restricted', 0); ! $db->addWhere('phpws_key.id', 'article.key_id'); ! break; ! case 1: // "Members Only" ! $db->addWhere('phpws_key.restricted', KEY_LOGGED_RESTRICTED); ! $db->addWhere('phpws_key.id', 'article.key_id'); ! break; ! case 2: // Restricted to group: ! $db->addWhere('phpws_key_view.group_id', $s_arr['viewgroups']); ! $db->addWhere('phpws_key_view.key_id', 'article.key_id'); ! } } + + /* searchedit */ + if (!empty($s_arr['searchedit'])) { + switch ($s_arr['editgroup']) { + case Current_User::getId(): // "Myself" + Key::restrictEdit($db, 'article', 'edit_articles', null, null, 'created_id'); + break; + default: // Selected Group/User id + $db->addWhere('phpws_key_edit.group_id', $s_arr['editgroup']); + $db->addWhere('phpws_key_edit.key_id', 'article.key_id'); + } + + } /* language */ *************** *** 132,160 **** /* updated by */ ! if ($s_arr['searchupdater']) { ! if ($s_arr['updater']==0) // "My Articles" ! $db->addWhere('updated_id', Current_User::getId()); ! else ! $db->addWhere('updated_username', $s_arr['updater_name']); ! } ! switch ($s_arr['updater']) { ! case 0: // "My Articles" ! $db->addWhere('updated_id', Current_User::getId()); ! break; ! case 2: // "Articles Belonging To:" ! $db->addWhere('updated_username', $s_arr['updater_name']); ! break; ! default: // "All Articles" ! break; } - /* editable_only */ - if (!empty($s_arr['editable_only'])) { - Key::restrictEdit($db, 'article', 'edit_articles'); - $db->addWhere('created_id', Current_User::getId(), null, 'or','key_1'); - } - else - Key::restrictView($db, 'article'); - /* text */ if (!empty($s_arr['searchtext'])) { --- 156,172 ---- /* updated by */ ! if ($s_arr['searchupdater']) { ! switch ($s_arr['updater']) { ! case 0: // "Last updated by me" ! $db->addWhere('updated_id', Current_User::getId()); ! break; ! case 1: // "Last updated by..." ! $db->addWhere('updated_username', $s_arr['updater_name']); ! break; ! default: // "All Articles" ! break; ! } } /* text */ if (!empty($s_arr['searchtext'])) { *************** *** 320,324 **** $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"; --- 332,339 ---- $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"; ! /* bulk restrictView & restrictEdit */ ! if(Current_User::isUnrestricted('article')) ! $actions .= '<option value="edit_permissions">'.dgettext('article', 'Edit Permissions')."</option>\n"; ! /* Set up Delete & Export buttons */ if(Current_User::allow('article', 'delete_articles')) { $actions .= '<option value="delete">'.dgettext('article', 'Delete')."</option>\n"; *************** *** 353,358 **** } - - /** * Lists the article summaries stored in the database --- 368,371 ---- *************** *** 410,415 **** return PHPWS_Template::process($template, 'layout', 'box.tpl'); } ! ! function http_build_query($formdata, $numeric_prefix = '') { $arr = array(); --- 423,427 ---- return PHPWS_Template::process($template, 'layout', 'box.tpl'); } ! function http_build_query($formdata, $numeric_prefix = '') { $arr = array(); Index: AM_DisplayForms.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/AM_DisplayForms.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AM_DisplayForms.php 13 Oct 2008 14:03:54 -0000 1.6 --- AM_DisplayForms.php 18 Nov 2008 05:00:13 -0000 1.7 *************** *** 54,68 **** } ! /* groups */ ! $result = Users_Permission::getGroupList(Current_User::getGroups()); ! if (!empty($result)) ! { ! $groups = array('all'=>dgettext('article', 'All Groups')) + $result; ! $form->addSelect('groups', $groups); ! $form->setMatch('groups', $s_arr['groups']); ! $tags['GROUPS_LABEL'] = dgettext('article', 'In Group'); ! unset($result, $groups); ! } ! /* language */ if (false) { --- 54,111 ---- } ! /* searchview */ ! $option3 = false; ! // Create an indexed list of non-user groups ! PHPWS_Core::initModClass('article', 'EditPermissions.php'); ! $nonuser_groups = PHPWS_EditPermissions::getNonUserGrouplist(); ! if (!empty($nonuser_groups)) { ! $view_groups = $user_groups = array(); ! if (!Current_User::isUnrestricted('article')) { ! $user_groups = Current_User::getGroups(); ! } ! foreach ($nonuser_groups AS $group_id => $groupname) { ! if(!empty($user_groups) && !in_array($group_id, $user_groups)) ! continue; ! $view_groups[$group_id] = $groupname; ! } ! if (!empty($view_groups)) ! { ! $form->addSelect('viewgroups', $view_groups); ! $form->setMatch('viewgroups', (int) $s_arr['viewgroups']); ! $option3 = true; ! } ! ! } ! $form->addCheckbox('searchview'); ! $form->setLabel('searchview', dgettext('article', 'Viewable by')); ! $form->setMatch('searchview', $s_arr['searchview']); ! if ($option3) { ! $radio = array(0, 1, 2); ! $radio_lbl = array(dgettext('article', 'Everyone'), dgettext('article', 'Members Only'), ''); ! } ! else { ! $radio = array(0, 1); ! $radio_lbl = array(dgettext('article', 'Everyone'), dgettext('article', 'Members Only')); ! } ! $form->addRadio('viewtype', $radio); ! $form->setMatch('viewtype', (int) $s_arr['viewtype']); ! $form->setLabel('viewtype', $radio_lbl); ! ! ! /* searchedit */ ! $form->addCheckbox('searchedit'); ! $form->setLabel('searchedit', dgettext('article', 'Editable by')); ! $form->setMatch('searchedit', $s_arr['searchedit']); ! // Get list of all groups/users that have restricted item permissions for this module ! PHPWS_Core::initModClass('article', 'EditPermissions.php'); ! $glist = PHPWS_EditPermissions::getRestrictedGrouplist('article', 'edit_articles'); ! $edit_groups = array(Current_User::getId() => dgettext('article', 'Myself')) + $glist['groups'] + $glist['users']; ! $form->addSelect('editgroup', $edit_groups); ! reset($glist['groups']); ! reset($glist['users']); ! $form->setOptgroup('editgroup', key($glist['groups']), dgettext('article', 'Groups')); ! $form->setOptgroup('editgroup', key($glist['users']), dgettext('article', 'Users')); ! $form->setMatch('editgroup', (int) $s_arr['editgroup']); ! /* language */ if (false) { *************** *** 154,167 **** /* updated by */ ! $form->addRadio('updater', array(0, 1, 2)); $form->setMatch('updater', (int) $s_arr['updater']); ! $form->setLabel('updater', array(dgettext('article', 'Myself'), dgettext('article', 'Everyone'), '')); ! $tags['UPDATER_LABEL'] = dgettext('article', 'Last updated by'); ! $tags['UPDATER_3_LBL'] = '<input name="updater_name" value="'.$s_arr['updater_name'].'" size="20" maxlength="30" type="text">'; ! ! /* editable_only */ ! $form->addCheckbox('editable_only'); ! $form->setMatch('editable_only', $s_arr['editable_only']); ! $form->setLabel('editable_only', dgettext('article', 'Editable articles only')); /* text search */ --- 197,207 ---- /* updated by */ ! $form->addCheckbox('searchupdater'); ! $form->setLabel('searchupdater', dgettext('article', 'Last updated by')); ! $form->setMatch('searchupdater', $s_arr['searchupdater']); ! $form->addRadio('updater', array(0, 1)); $form->setMatch('updater', (int) $s_arr['updater']); ! $form->setLabel('updater', array(dgettext('article', 'Myself'), '')); ! $tags['UPDATER_2_LBL'] = '<input name="updater_name" value="'.$s_arr['updater_name'].'" size="20" maxlength="30" type="text">'; /* text search */ Index: Article.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/class/Article.php,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Article.php 11 Oct 2008 06:13:49 -0000 1.55 --- Article.php 18 Nov 2008 05:00:13 -0000 1.56 *************** *** 137,141 **** { if(!is_array($id)) { ! $db = & new PHPWS_DB('article'); $db->addWhere('id', $id); Key::restrictView($db, 'article'); --- 137,141 ---- { if(!is_array($id)) { ! $db = new PHPWS_DB('article'); $db->addWhere('id', $id); Key::restrictView($db, 'article'); *************** *** 254,265 **** $article_tags['CREATED_TEXT'] = sprintf(dgettext('article', 'Created By %1$s'), $this->created_username); ! $article_tags['UPDATED_TEXT'] = sprintf(dgettext('article', 'Last updated by %1$s'), $this->updated_username); ! ! if (MOD_REWRITE_ENABLED && $this->id > 0) ! $article_tags['TITLE_LINK'] = sprintf('<a href="article/%d">%s</a>', $this->id, $this->title); ! else ! $article_tags['TITLE_LINK'] = sprintf('<a href="index.php?module=article&id=%d">%s</a>', $this->id, $this->title); ! if($this->wordcount>0) { if (MOD_REWRITE_ENABLED && $this->id > 0) $article_tags['READMORE'] = sprintf('<a href="article/%d">%s</a>', $this->id, dgettext('article', 'Read More')); --- 254,261 ---- $article_tags['CREATED_TEXT'] = sprintf(dgettext('article', 'Created By %1$s'), $this->created_username); ! $article_tags['UPDATED_TEXT'] = sprintf(dgettext('article', 'Last updated by %1$s'), $this->updated_username); ! $article_tags['TITLE_LINK'] = $this->get_title_link(); ! if($this->wordcount>0) { if (MOD_REWRITE_ENABLED && $this->id > 0) $article_tags['READMORE'] = sprintf('<a href="article/%d">%s</a>', $this->id, dgettext('article', 'Read More')); *************** *** 645,649 **** return $id; } ! /** * Finds a section by id. --- 641,667 ---- return $id; } ! ! /** ! * Generates a title link. ! * ! * If no parameters are given, then the method assumes that it was called from inside an active object ! * ! * @author Eloi George <el...@NO...> ! * @param int $id : (optional) article id ! * @param string $title : (optional) article title ! * @return HTML ! */ ! function get_title_link ($id = null, $title = null) ! { ! if (!$id) ! $id = $this->id; ! if (!$title) ! $title = $this->title; ! if (MOD_REWRITE_ENABLED && $id > 0) ! $link = sprintf('<a href="article/%d">%s</a>', $id, $title); ! else ! $link = sprintf('<a href="index.php?module=article&id=%d">%s</a>', $id, $title); ! return $link; ! } /** * Finds a section by id. |