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: Mike N. <mh...@us...> - 2004-05-25 19:19:46
|
Update of /cvsroot/phpwebsite-comm/themes/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5359 Modified Files: theme.php theme.tpl Log Message: added addtional sugestions from Wendall Cada Index: theme.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** theme.tpl 24 May 2004 22:06:18 -0000 1.4 --- theme.tpl 25 May 2004 19:19:06 -0000 1.5 *************** *** 1,3 **** --- 1,6 ---- + {XML} + {XML_STYLE} {DOCTYPE} + {XHTML} <!-- Remove everything prior to the <head> tag --> Index: theme.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** theme.php 24 May 2004 22:06:18 -0000 1.5 --- theme.php 25 May 2004 19:19:06 -0000 1.6 *************** *** 1,15 **** <?php ! if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); ! $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ! <?xml-stylesheet alternate=\"yes\" title=\"Blue\" href=\"./themes/Default/blue-style.css\" type=\"text/css\"?> ! <?xml-stylesheet title=\"Orange\" href=\"./themes/Default/style.css\" type=\"text/css\"?> ! <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" ! \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> ! <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\">"; $_SESSION["OBJ_layout"]->meta_content = FALSE; } else { header("Content-Type: text/html; charset=UTF-8"); ! $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ! \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> ! <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"; $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"./themes/Default/style.css\" type=\"text/css\" />"; } --- 1,14 ---- <?php ! if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ ! header("Content-Type: application/xhtml+xml; charset=UTF-8"); ! header("Content-Language: en-US"); ! $THEME["XML"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ! $THEME["XML_STYLE"] = "<?xml-stylesheet alternate=\"yes\" title=\"Blue\" href=\"./themes/Default/blue-style.css\" type=\"text/css\"?>\n<?xml-stylesheet title=\"Orange\" href=\"./themes/Default/style.css\" type=\"text/css\"?>"; ! $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; ! $THEME["XHTML"] = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\">"; $_SESSION["OBJ_layout"]->meta_content = FALSE; } else { header("Content-Type: text/html; charset=UTF-8"); ! $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> ! $THEME["XHTML"] = "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">"; $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"./themes/Default/style.css\" type=\"text/css\" />"; } |
From: Ivan H. <iv...@us...> - 2004-05-24 23:33:48
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18850/templates/resources Added Files: modulerows.tpl modules.tpl settings.tpl themerows.tpl themes.tpl Log Message: Initial create --- NEW FILE: modules.tpl --- <table cellpadding="6" cellspacing="1" width="100%"> <tr class="bg_medium"> <td><b>{LBL_MOD_TITLE}</b></td> <td><b>{LBL_MOD_PNAME}</b></td> <td><b>{LBL_MOD_VERSION}</b></td> <td><b>{LBL_CODE_COMMAND}</b></td> <td><b>{LBL_LANG_COMMAND}</b></td> <td><b>{LBL_DATA_COMMAND}</b></td> </tr> {MODULE_ROWS} </table> --- NEW FILE: modulerows.tpl --- <tr<!-- BEGIN tog1 -->{TOG1}class="white"<!-- END tog1 --><!-- BEGIN tog2 -->{TOG2}class="bg_light"<!-- END tog2 -->> <td>{MOD_TITLE}</td> <td>{MOD_PNAME}</td> <td>{MOD_VERSION}</td> <td>{MOD_COMMAND}</td> <td>{LANG_COMMAND}</td> <td>{DATA_COMMAND}</td> </tr> --- NEW FILE: settings.tpl --- <h2>{TITLE}</h2> <table> <tr> <td class='white'>{CMD_VIEW_RES}</td> <td class='white'> | </td> <td class='white'>{CMD_VIEW_FEEDS}</td> </tr> </table> <table cellpadding='5' cellspacing='6'> <tr> <td colspan='2'>{IS_MASTER}</td> </tr> <tr> <td colspan='2'>{ALLOW_ANONYMOUS}</td> </tr> <tr> <td align='right'>{CMD_SAVE}</td> <td>{CMD_CANCEL}</td> </tr> </table> --- NEW FILE: themes.tpl --- <table cellpadding="6" cellspacing="1" width="100%"> <tr class="bg_medium"> <td><b>{LBL_THEME_NAME}</b></td> <td><b>{LBL_THEME_PATH}</b></td> <td><b>{LBL_LASTMOD_DATE}</b></td> <td><b>{LBL_TPL_COMMAND}</b></td> <td><b>{LBL_IMG_COMMAND}</b></td> </tr> {THEME_ROWS} </table> --- NEW FILE: themerows.tpl --- <tr<!-- BEGIN tog1 -->{TOG1}class="white"<!-- END tog1 --><!-- BEGIN tog2 -->{TOG2}class="bg_light"<!-- END tog2 -->> <td>{THEME_NAME}</td> <td>{THEME_PATH}</td> <td>{LASTMOD_DATE}</td> <td>{TPL_COMMAND}</td> <td>{IMG_COMMAND}</td> </tr> |
From: Ivan H. <iv...@us...> - 2004-05-24 23:33:45
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates/channels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18850/templates/channels Added Files: chanedit.tpl chanitem.tpl channelfeed.tpl chanresource.tpl Log Message: Initial create --- NEW FILE: chanedit.tpl --- <!-- BEGIN CHANNEL --> <table border='0' cellspacing='2' cellpadding='5' width='100%' align='center'> <tr> <td colspan='2' class="boxTitle bg_light"><b>{TITLE} : {CHAN_NAME}</b></td> </tr> <tr> <td colspan='2'>{CHAN_MSG}</td> </tr> <tr> <td align='right'>{LBL_CHAN_NAME}</td> <td>{TXT_CHAN_NAME}</td> </tr> <tr> <td align='right'>{LBL_CHAN_URL}</td> <td>{TXT_CHAN_URL}</td> </tr> <tr> <td align='right'>{CHK_CHAN_ACTIVE}</td> <td>{LBL_CHAN_ACTIVE}</td> </tr> <tr> <td align='right'> {SUB_CHANNEL_OK} </td> <td> {SUB_CHANNEL_CANCEL} </td> </tr> </table> <!-- END CHANNEL --> --- NEW FILE: channelfeed.tpl --- <!-- BEGIN CHANNEL --> <table border='0' cellspacing='1' cellpadding='5' bgcolor='black' width='100%' align='center'> <tr class='bg_dark'> <td> <form> <table width='100%'> <tr> <td><h2>{CHAN_NAME}</h2></td> <td align='right' class='bg_medium'>{CHAN_DEL_CMD} | {CHAN_EDIT_CMD} </td> </tr> </table> </form> </td> </tr> <!-- BEGIN RESOURCES --> {CHAN_RESOURCES} <!-- END RESOURCES --> </table> <!-- END CHANNEL --> --- NEW FILE: chanresource.tpl --- <!-- BEGIN RESOURCE --> <tr class='white'> <td> <h3 class='bg_medium'>{APP_NAME} : {APP_VERSION} : {RES_TYPE} : {RES_NAME}</h3> {RES_DESC} </td> </tr> <!-- BEGIN ITEMS --> {RES_ITEMS} <!-- END ITEMS --> --- NEW FILE: chanitem.tpl --- <!-- BEGIN ITEM --> <tr class='white'> <td> <form> <table width='100%' border='0' cellspacing='1' cellpadding='5'> <tr class='bg_light'> <td>{ITEM_TYPE} {ITEM_VERSION} {ITEM_DATE}</td> </tr> <tr class='white'> <td> {ITEM_CHANGES}<br> {ITEM_LINK} </td> </tr> </table> </form> </td> </tr> <!-- END ITEM --> |
From: Ivan H. <iv...@us...> - 2004-05-24 23:33:42
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18850/templates Added Files: confirm.tpl info.tpl viewfeeds.tpl viewresources.tpl Log Message: Initial create --- NEW FILE: viewresources.tpl --- <h2>{TITLE}</h2> <table> <tr> <td class='white'>{CMD_VIEW_FEEDS}</td> <td class='white'> | </td> <td class='white'>{CMD_EDIT_SETTINGS}</td> </tr> </table> <!-- BEGIN modules --> <h3>Modules</h3> {MODULES} <!-- END modules --> <!-- BEGIN themes --> <h3>Themes</h3> {THEMES} <!-- END themes --> --- NEW FILE: viewfeeds.tpl --- <h2>{TITLE}</h2> <table> <tr> <td>{CMD_NEW_CHAN}</td> <td> | </td> <td>{CMD_VIEW_RES}</td> <td> | </td> <td>{CMD_EDIT_SETTINGS}</td> </tr> </table> <br> <!-- BEGIN channels --> {CHANNELS} <!-- END channels --> --- NEW FILE: info.tpl --- <table> <tr class='box_title'> <td>{CAPTION}</td> </tr> <tr> <td>{MSG}<hr></td> </tr> <tr> <td>{OK}</td> </tr> </table> --- NEW FILE: confirm.tpl --- <table> <tr> <td colspan='3'><b>{CAPTION}</b></td> </tr> <tr> <td colspan='3'> {LINKBACK} </td> </tr> <tr> <td colspan='3'> {QUESTION}<hr> </td> </tr> <tr> <td class='white'>{YES}</td> <td class='white'> | </td> <td class='white'>{NO}</td> </tr> </table> |
From: Ivan H. <iv...@us...> - 2004-05-24 23:33:39
|
Update of /cvsroot/phpwebsite-comm/modules/ras/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18850/lang Added Files: ras.fr.lng Log Message: Initial create --- NEW FILE: ras.fr.lng --- (This appears to be a binary file; contents omitted.) |
From: Ivan H. <iv...@us...> - 2004-05-24 23:29:25
|
Update of /cvsroot/phpwebsite-comm/modules/ras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18157 Added Files: index.php Log Message: Initial create --- NEW FILE: index.php --- |
From: Ivan H. <iv...@us...> - 2004-05-24 23:16:17
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15497/resources Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/templates/resources added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:16:17
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates/channels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15497/channels Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/templates/channels added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:15:31
|
Update of /cvsroot/phpwebsite-comm/modules/ras/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328/templates Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/templates added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:14:31
|
Update of /cvsroot/phpwebsite-comm/modules/ras/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15108/lang Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/lang added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:13:28
|
Update of /cvsroot/phpwebsite-comm/modules/ras/img In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14891/img Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/img added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:10:30
|
Update of /cvsroot/phpwebsite-comm/modules/ras/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14175/docs Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/docs added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:08:18
|
Update of /cvsroot/phpwebsite-comm/modules/ras/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13541 Added Files: boost.php controlpanel.php layout.php users.php Log Message: Initial create --- NEW FILE: controlpanel.php --- <?php $image['name'] = "ras.png"; $image['alt'] = "Remote App Syndication"; $link[] = array("label"=>"Remote App Syndication", "module"=>"ras", "image"=>$image, "description"=>"This module allows sharing of modules, lang files, data and thmes between sites.", "admin"=>TRUE, "url"=>"index.php?module=ras&RAS_op=viewfeeds", "tab"=>"administration"); ?> --- NEW FILE: layout.php --- <?php $layout_info[] = array ("content_var"=>"CNT_ras", "theme_var"=>"body"); ?> --- NEW FILE: users.php --- <?php $default_admin_menu = "deity"; ?> --- NEW FILE: boost.php --- <?php $mod_title = "ras"; $mod_pname = "Remote Applicative Syndication"; $mod_directory = "ras"; $mod_filename = "index.php"; $mod_icon = "ras.png"; $priority = 50; $allow_view = "all"; $user_mod = 0; $admin_mod = 1; $deity_mod = 1; $mod_class_files = array("RemoteAppSyndication.php"); $mod_sessions = array("OBJ_ras"); $init_object = array("OBJ_ras"=>"PHPWS_RemoteAppSyndication"); $active = "on"; $version="0.0.4"; $branch_allow = 0; $install_file = "install.php"; $uninstall_file = "uninstall.php"; ?> |
From: Ivan H. <iv...@us...> - 2004-05-24 23:06:16
|
Update of /cvsroot/phpwebsite-comm/modules/ras/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13165/conf Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/conf added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-24 23:03:02
|
Update of /cvsroot/phpwebsite-comm/modules/ras/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12433 Added Files: RasArchiver.php RasBackend.php RasBase.php RasFeedParser.php RasFormManager.php RemoteAppSyndication.php Log Message: Initial create --- NEW FILE: RasBase.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - Ras Base class * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * base class to factor out some common helper functions */ class RasBase { /** * @var string $_lastError error message, read it via getLastError() */ var $_lastError = ''; //---------------------------------------------------------------------------- /** * Return the last error message * * @return string the last error message */ function getLastError() { return $this->_lastError . "<br>\n"; } //---------------------------------------------------------------------------- /** * Set the last error and always returns false * * By default, actually prepend the argument to the actuel value of $_lastError. * This method always return FALSE, so you can use it like : * <pre>return $this->setLastError('error message');</pre> * Note that you can alse ignore the return value !-) * * @param string $errMsg the error message * @param boolean $prepend prepend the error instead of replacing (default true) * @return boolean always false */ function setLastError($errMsg, $prepend=true) { if ($prepend) { $this->_lastError = $errMsg . "<br>\n" . $this->_lastError; } else { $this->_lastError = $errMsg; } return false; } } ?> --- NEW FILE: RemoteAppSyndication.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - Main class * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * The 'master' class. Handles some logic, and delegate most of the work * * TODO : (pardon my french...) * - traductions * - forms pour les infos manquantes sur les modules et themes * - exports data * - repérer les resources à mettre à jour * - validation des entrées, sécurité etc * - ménage et doc * * - Filtrer les feeds sur appli et version * - régler ce filtre dans les master settings * - créer une interface pour supprimer une archive */ // ----------------------------------------------------------------------------- require_once(PHPWS_SOURCE_DIR . "core/Array.php"); require_once(PHPWS_SOURCE_DIR . "core/Text.php"); require_once(PHPWS_SOURCE_DIR . "mod/boost/class/Boost.php"); require_once(PHPWS_SOURCE_DIR . "mod/ras/class/RasFormManager.php"); // create html forms & content require_once(PHPWS_SOURCE_DIR . "mod/ras/class/RasArchiver.php"); // create and extract tar archives require_once(PHPWS_SOURCE_DIR . "mod/ras/class/RasFeedParser.php"); // parse XML Ras Feeds from channels require_once(PHPWS_SOURCE_DIR . "mod/ras/class/RasBackend.php"); // generate XML ras feeds // ----------------------------------------------------------------------------- class PHPWS_RemoteAppSyndication { // --------------------------------------------------------------------------- function PHPWS_RemoteAppSyndication() { $this->_initSettings(); /* create the forms etc */ $this->formManager =& new RasFormManager; /* import and export resources */ $this->archiver =& new RasArchiver; } // HELPERS ------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * return a timestamp formated as a "Y-m-d H:i:s" datetime * * just an helper fun, can be call as a class method. If the * timestamp parameter is null, should use the current timestamp (not tested !) * * @param integer $timestamp the timestamp to format or null * @return string the formatted timestamp */ function timestampToDatetime($timestamp=null) { return date("Y-m-d H:i:s", $timestamp); } // --------------------------------------------------------------------------- /** * returns the modification time of the most recently modified file in the given path * * just an helper fun, can be call as a class method. * * @param string $path the path to explore * @return integer timestamp of the most recently modified file in the path */ function lastmtime($path) { $files = PHPWS_File::readDirectory($path, FALSE, TRUE, TRUE, NULL, TRUE); $lastmod = -1; foreach($files as $file) { $fmtime = filemtime($file); if ($fmtime > $lastmod) { $lastmod = $fmtime; } } return $lastmod; } // --------------------------------------------------------------------------- function error($msg, $opBack) { $GLOBALS['CNT_ras']['content'] = $this->formManager->formInfo($_SESSION['translate']->it("Error"), $msg, $opBack); return false; } // --------------------------------------------------------------------------- function info($msg, $opBack) { $GLOBALS['CNT_ras']['content'] = $this->formManager->formInfo($_SESSION['translate']->it("Done"), $msg, $opBack); return true; } // SETTINGS -------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * display the 'edit settings' form. */ function editsettings() { $this->_initSettings(); $GLOBALS['CNT_ras']['content'] = $this->formManager->formSettings($this->settings); } // --------------------------------------------------------------------------- /** * Update the settings and save them * * Callback for the 'edit settings' form. */ function updatemastersettings() { if (isset($_POST['ras_update_settings'])) { $this->_initSettings(); /* TODO sanity check */ if (isset($_POST['ras_ismaster'])) { $this->_settings['is_master'] = $_POST['ras_ismaster']; } if (isset($_POST['ras_anonymous'])) { $this->_settings['accept_anonymous'] = $_POST['ras_ismaster']; } if (! $this->_saveSettings()) { /* _saveSettings sets the error */ return; } } if (isset($_POST['ras_from']) && method_exists($this, $_POST['ras_from'])) { $this->$_POST['ras_from'](); } else { $this->viewfeeds(); } } // --------------------------------------------------------------------------- /** * Pretty obvious... * TODO : check for error when accessing db */ function _initSettings() { $this->_settings = $GLOBALS['core']->sqlSelect('mod_ras_settings'); $this->_settings = $this->_settings[0]; return true; } // --------------------------------------------------------------------------- /** * Pretty obvious too... */ function _saveSettings() { if ($GLOBALS['core']->sqlUpdate($this->_settings, 'mod_ras_settings')) { return $this->_initSettings(); } else { /* TODO : check why we failed */ return $this->error($_SESSION['translate']->it("Could not save settings")); } } // PUBLISH -------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * display the 'view resources' form */ function viewresources() { $GLOBALS['CNT_ras']['content'] = $this->formManager->formResourceList(); } // --------------------------------------------------------------------------- /** * try to 'export' a module resource (code, lang or data) */ function exportmodule() { if (isset($_POST['ras_export_module'])) { $itemType = 'code'; list($item) = each($_POST['ras_export_module']); } elseif (isset($_POST['ras_export_lang'])) { $itemType = 'lang'; list($item) = each($_POST['ras_export_lang']); } elseif (isset($_POST['ras_export_data'])) { $itemType = 'data'; list($item) = each($_POST['ras_export_data']); /* TODO */ return $this->error($_SESSION['translate']->it("Data export not yet implemented"), 'viewresources'); } else { return $this->error($_SESSION['translate']->it("Unknown export type"), 'viewresources'); } if ($this->archiver->exportModule($item, $itemType)) { return $this->info($_SESSION['translate']->it("Module succesfully exported : ") . "$item<br>\n", 'viewresources'); } else { return $this->error($_SESSION['translate']->it("Could not export module : ") . " $item :" . $this->archiver->getLastError(), 'viewresources'); } } // --------------------------------------------------------------------------- /** * try to 'export' a theme resource (code, lang or data) * Not yet implemented */ function exporttheme() { //echo "export theme called"; //return $this->error("TEST :<br> " . PHPWS_Array::testRequest() . "<br>" . PHPWS_Array::testPost()) ; if (isset($_POST['ras_export_tpl'])) { $itemType = 'tpl'; list($item) = each($_POST['ras_export_tpl']); } elseif (isset($_POST['ras_export_img'])) { $itemType = 'img'; list($item) = each($_POST['ras_export_img']); } else { return $this->error($_SESSION['translate']->it("Unknown export type"), 'viewresources'); } //echo "we are here : item = '$item', type = '$itemType'"; if ($this->archiver->exportTheme($item, $itemType)) { return $this->info($_SESSION['translate']->it("Theme succesfully exported : ") . "$item", 'viewresources'); } else { return $this->error($_SESSION['translate']->it("Could not export theme : ") . "$item<br>\n" . $this->archiver->getLastError(), 'viewresources'); } } // FEEDS ----------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * display the 'view resources' form (some more useless doc ?) */ function viewfeeds() { $this->_initSettings(); /* check if we have any channel, else say so */ $channels = unserialize($this->_settings['channels']); if (! is_array($channels)) { return $this->error($_SESSION['translate']->it("No channels found, please check your settings"), 'createchannel'); } /* ok, proceed */ $GLOBALS['CNT_ras']['content'] = $this->formManager->formFeedList($channels); } // --------------------------------------------------------------------------- /** * display a 'confirm' message when asked to import a resource */ function checkimport() { $caption = $_SESSION['translate']->it("Please confirm"); $msg = $_SESSION['translate']->it("Download and install resource:") . "<br>\n" . $_REQUEST['ras_itm_url'] . "<br>"; $kwargs['ras_itm_url'] = $_REQUEST['ras_itm_url']; $kwargs['ras_res_type'] = $_REQUEST['ras_res_type']; $GLOBALS['CNT_ras']['content'] = $this->formManager->formConfirm($caption, $msg, 'import', $kwargs, 'viewfeeds'); } // --------------------------------------------------------------------------- /** * try to import a resource * does not work yet */ function import() { if (! isset($_REQUEST['ras_itm_url'])) { return $this->error( $_SESSION['translate']->it("Internal error : url not set"), 'viewfeeds'); } if (! isset($_REQUEST['ras_res_type'])) { return $this->error( $_SESSION['translate']->it("Internal error : resource type not set"), 'viewfeeds'); } /* TODO sanity check */ $url = $_REQUEST['ras_itm_url']; $type = $_REQUEST['ras_res_type']; if ($this->archiver->import($url, $type)) { $msg = $_SESSION['translate']->it("Resource imported : ") . "$url<br>\n"; if (strcmp($type, 'module') == 0) { $msg .= $_SESSION['translate']->it("You may want to update with boost") . "<br>\n"; } return $this->info($msg, 'viewfeeds'); } else { $msg = $_SESSION['translate']->it("Import of resource failed : ") . "$url<br>\n"; $msg .= $this->archiver->getLastError(); return $this->error($msg, 'viewfeeds'); } } // BACKEND --------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * Call back for clients asking to view Ras Feeds */ function createRasFeed() { $backend =& new RasBackend(); return $backend->createFeed(); } // CHANNEL ---------------------------------------------------------------------- // --------------------------------------------------------------------------- /** * display the 'edit channel' form in creation mode */ function createchannel() { $GLOBALS['CNT_ras']['content'] = $this->formManager->formChannel(); } // --------------------------------------------------------------------------- /** * display the 'edit channel' form in edit mode */ function editchannel() { /* TODO factor this out */ $this->_initSettings(); $channels = unserialize($this->_settings['channels']); if (! isset($_REQUEST['ras_chan_id'])) { /* TODO */ return $this->error($_SESSION['translate']->it("no channel id to edit")); } $channelId = $_REQUEST['ras_chan_id']; if (! isset($channels[$channelId])) { /* TODO */ return $this->error( $_SESSION['translate']->it("channel not found : $channelId")); } $channelData = $channels[$channelId]; $GLOBALS['CNT_ras']['content'] = $this->formManager->formChannel($channelId, $channelData); } // --------------------------------------------------------------------------- /** * display a 'confirm' message when asked to delete a channel */ function checkdeletechannel() { $channelName = $_REQUEST['ras_chan_id']; $msg = "Delete channel " . $channelName . "?"; $kwargs = Array('ras_chan_id'=>$channelName); $GLOBALS['CNT_ras']["content"] = $this->formManager->formConfirm("Confirm", $msg, 'deletechannel', $kwargs, 'viewfeeds'); } // --------------------------------------------------------------------------- /** * save channel settings */ function updatechannel() { if (isset($_POST['ras_chan_ok'])) { /* TODO factor this out */ $this->_initSettings(); $channels = unserialize($this->_settings['channels']); $msg = ''; $channelId = PHPWS_Text::parseInput($_POST['ras_chan_id']); $channelName = PHPWS_Text::parseInput($_POST['ras_chan_name']); $channelUrl = PHPWS_Text::parseInput($_POST['ras_chan_url']); $channelActive = PHPWS_Text::parseInput($_POST['ras_chan_active']); $channelNew = PHPWS_Text::parseInput($_POST['ras_chan_new']); /* TODO : sanity check values*/ if ($channelId == null || strlen($channelId) == 0) { $channelId = $channelName; } if ($channelName == null || strlen($channelName) == 0) { /* TODO resend other data to editchannel form ?*/ return $this->error( $_SESSION['translate']->it("No channel name !"), 'viewfeeds'); } /* ok, let's proceed */ $channels[$channelId] = Array('name'=>$channelName, 'url'=>$channelUrl, 'active'=>$channelActive); $this->_settings['channels'] = serialize($channels); if (! $this->_saveSettings()) { /* _saveSettings sets the error */ return; }; } // Go back to channels & feeds list $this->viewfeeds(); } // --------------------------------------------------------------------------- /** * remove a channel from the settings */ function deletechannel() { $this->_initSettings(); $channels = unserialize($this->_settings['channels']); $channelId = $_REQUEST['ras_chan_id']; if (isset($channels[$channelId])) { unset($channels[$channelId]); $this->_settings['channels'] = $channels; if (!$this->_saveSettings()) { /* _saveSettings sets the error */ return; } } // Go back to channels & feeds list $this->viewfeeds(); } } ?> --- NEW FILE: RasArchiver.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - Archiver * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * Handle resources export and import * On export, get the appropriate files, create the archive, and update the * DB tables used to generate ras-feed. * On import, retrieve the archive and expand it locally. * Tar creation is delegated to PEAR/Archive_Tar * * TODO : * - module data * - form for resource and items missing infos ? * - refactor exportTheme and exportModule, too much duplicated code */ //- includes ------------------------------------------------------------------- require_once PHPWS_SOURCE_DIR . 'lib/pear/Archive/Tar.php'; require_once PHPWS_SOURCE_DIR . 'mod/ras/class/RasBase.php'; //- Globals && CONST ----------------------------------------------------------- define('PHPWS_RAS_EXPORTDIR', PHPWS_SOURCE_DIR . 'files/ras/resources/'); define('PHPWS_RAS_IMPORTDIR', PHPWS_SOURCE_DIR . 'files/ras/imports/'); //- RasArchiver ---------------------------------------------------------------- class RasArchiver extends RasBase { //---------------------------------------------------------------------------- /** * callback function for PEAR errors (used by PEAR/Archive_Tar) * * @param mixed $errObject PEAR_Error object or string */ function onError($errObject) { if (PEAR::isError($errObject)) { $this->setLastError($errObject->getMessage()); } elseif (is_string($errObject)) { $this->setLastError($errObject); } } //- MASTER --------------------------------------------------------------------- /** * TODO : export data, separate langs... */ function exportModule($modTitle, $exportType) { $this->setLastError('', false, false); /* get directory etc */ if (! $moduleInfo = $GLOBALS["core"]->getModuleInfo($modTitle)) { return $this->setLastError($_SESSION["translate"]->it("Could not get module infos for module: ") . $modTitle); } $basepath = PHPWS_SOURCE_DIR . "mod/"; $srcDir = $basepath . $moduleInfo['mod_directory'] . '/'; /* get module version * format : Array ( [mod_title] => boost [version] => 1.5.2 [update_link] => [branch_allow] => 1 ) */ $versionInfo = PHPWS_boost::getVersionInfo($modTitle); if (! $versionInfo) { return $this->setLastError($_SESSION["translate"]->it("could not get version info for module : ") . $modTitle); } /* create the archive */ switch ($exportType) { case 'code': $files = PHPWS_File::readDirectory($srcDir, TRUE, FALSE, FALSE, null, TRUE); $files = array_flip($files); /* We don't want the langs here */ unset($files[$srcDir . 'lang']); $files = array_flip($files); break; case 'lang': $files = $srcDir . 'lang'; break; case 'data': $ok = $this->_exportData($modTitle, $versionInfo, $srcDir); break; default: return $this->setLastError($_SESSION["translate"]->it("Unknown module export type : ") . $exportType); break; } $timestamp = time(); $tarName = $modTitle . '-' . $versionInfo[version] . '-' . $timestamp . '-' . $exportType . '.tar.gz'; if (! $this->_makeArchive($tarName, $files, $basepath)) { return $this->setLastError($_SESSION["translate"]->it("Could not create archive for module : ") . $modTitle); } /* store the RAS feed infos in the db * TODO : une form pour saisir les infos manuqantes dans resource et item */ $feedData = Array('itm_version'=>$versionInfo[version], 'itm_type'=>$exportType, 'itm_url'=> "http://" . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/files/ras/resources/" . $tarName, 'itm_date'=> PHPWS_RemoteAppSyndication::timestampToDatetime($timestamp), 'itm_lang'=> '', 'itm_changes'=> "no se", 'itm_md5'=> '' /* TODO md5 sum of the tarball */ ); $backend =& new RasBackend; if (! $backend->storeFeed('module', $modTitle, $feedData)) { return $this->setLastError($_SESSION["translate"]->it("Could not create feed for module : ") . $mod_title . "<br>" . $backend->getLastError()); } return true; } //---------------------------------------------------------------------------- /** * TODO : not yet implemented */ function _exportData($modTitle, $versionInfo, $srcDir) { return $this->setLastError($_SESSION["translate"]->it("Module data export not yet implemented")); } //---------------------------------------------------------------------------- /** * Try and export a theme * * first problem : there is no standard image directory. * most store images in themename/image/, some in themename/img, * and some anywhere else. * So we try the first two solutions, and fail else * * second problem : we have no version info for themes. * Note for the Theme developpers : add a VERSION file with only the version number * in your theme dir, else you will get bogus version number */ function exportTheme($themeName, $itemType) { //return $this->setLastError("NIY YOU DUMMY"); $basepath = PHPWS_SOURCE_DIR . 'themes/'; $srcDir = $basepath . $themeName .'/'; switch ($itemType) { case 'tpl': $files = PHPWS_File::readDirectory($srcDir, TRUE, FALSE, FALSE, null, TRUE); $files = array_flip($files); /* we don't want images here */ unset($files[$srcDir . 'images']); unset($files[$srcDir . 'image']); unset($files[$srcDir . 'img']); $files = array_flip($files); //echo "tpl : <br>" . PHPWS_Array::testArray($files); break; case 'img': if (file_exists($srcDir . 'images') && is_dir($srcDir . 'images')) { $files = $srcDir . 'images'; } elseif (file_exists($srcDir . 'image') && is_dir($srcDir . 'image')) { $files = $srcDir . 'image'; } elseif (file_exists($srcDir . 'img') && is_dir($srcDir . 'img')) { $files = $srcDir . 'img'; } else { return $this->setLastError($_SESSION["translate"]->it("no 'image' or 'images' or 'img' directory found for theme : ") . $item); } break; default: return $this->setLastError($_SESSION["translate"]->it("Unknown theme export type : ") . $itemType); break; } /* version info ? */ if (file_exists($srcDir . "VERSION") && is_file($srcDir . "VERSION")) { $version = @file($srcDir . "VERSION"); if (is_array($version)) { $version = $version[0]; } else { return $this->setLastError($_SESSION["translate"]->it("Invalid theme version info")); } } else { /* bogus version number, you were warned */ /* and YES I KNOW, this may pose problem when inserting feed data in the db */ /* PLEASE add a VERSION file in each theme */ $version = '42'; } $timestamp = time(); $tarName = $themeName . '-' . $version . '-' . $timestamp . '-' . $itemType . '.tar.gz'; if (! $this->_makeArchive($tarName, $files, $basepath)) { return $this->setLastError($_SESSION["translate"]->it("Could not create archive for theme : ") . $themeName); } /* store the RAS feed infos in the db * TODO : une form pour saisir les infos manquantes dans resource et item */ $feedData = Array('itm_version'=>$version, 'itm_type'=>$itemType, 'itm_url'=>$tarName, /* TODO : url complète ? sinon renommer en itm_tar_name */ 'itm_date'=> PHPWS_RemoteAppSyndication::timestampToDatetime($timestamp), 'itm_lang'=> '', 'itm_changes'=> "no se", 'itm_md5'=> '' /* TODO md5 sum of the tarball */ ); $backend =& new RasBackend; if (! $backend->storeFeed('theme', $themeName, $feedData)) { return $this->setLastError($_SESSION["translate"]->it("Could not create feed for theme : ") . $themeName . "<br>\n" . $backend->getLastError()); } return true; } //---------------------------------------------------------------------------- /** * Create the tar archive * * @param string $tarName the name of the arhive * @param mixed $files path or array of paththe name of the archive * @param string $removedir path to remove from archived files * @return boolean guess what ?-) */ function _makeArchive($tarName, $files, $removedir) { $tar =& new Archive_Tar(PHPWS_RAS_EXPORTDIR . $tarName, true); $tar->setErrorHandling(PEAR_ERROR_CALLBACK, Array(&$this, 'onError')); return $tar->createModify($files, '', $removedir); } //- CLIENT -------------------------------------------------------------------- /** * Download an archive from a master site and try to expand it in the right place * * TODO : this function is Q&D and actually doesnt works * (can't expand the archive, wrong user/group) * * @params string $url the url of the archive to download * @param string $type the type of resource ('module' or 'theme') * @return boolean guess what ? */ function import($url, $type) { $this->setLastError('', false, false); // Q&D, to be redone cleanly with parse_url and pathinfo or likes ? $dest = explode("/", $url); $dest = array_pop($dest); $dest = PHPWS_RAS_IMPORTDIR . $dest; if (file_exists($dest)) { return $this->setLastError($_SESSION["translate"]->it("Destination file already exists : ") . $dest); } if (! copy($url, $dest)) { return $this->setLastError($_SESSION["translate"]->it("Copy of remote file failed")); } /* TODO : * - check if is code, lang or whatever, or a theme, etc */ // MARCHE PAS pour le moment... // probleme de droits $tar = new Archive_Tar($dest); $tar->setErrorHandling(PEAR_ERROR_CALLBACK, Array(&$this, 'onError')); switch ($type) { case 'module': $basepath = PHPWS_SOURCE_DIR . 'mod/'; break; case 'theme': $basepath = PHPWS_SOURCE_DIR . 'themes/'; break; default: /* TODO */ return $ths->setLastError($_SESSION['translate']->it("unknown resource type : ") . $type); break; } if ( ! $tar->extract($basepath) ) { return $this->setLastError($_SESSION['translate']->it("Error while extracting archive, just pray that your PhpWebiste install is still working...")); } return true; } } ?> --- NEW FILE: RasFeedParser.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - Ras Feed Parser * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * Read and Parse a ras-feed (SAX parser) */ /* internal doc : * source XML exemple : <ras-feed> <application name='phpwebsite' version='0.9.3.2'> <resource type='module' name='NomModule'> <description>Description du module</description> <item type='code'> <version>0.0.1</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nommodule-0.0.1-code.tgz</url> <changes>Changements depuis la dernière version</changes> </item> <item type='code'> <version>0.0.0</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nommodule-0.0.0-code.tgz</url> <changes>Changements depuis la dernière version</changes> </item> <item type='lang'> <lang>fr</lang> <version>0.0.0</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nommodule-fr.AA.MM.JJ.HH-lang.tgz</url> <changes>Changements depuis la dernière version</changes> </item> <item type='data'> <version>0.0.0</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nommodule-AA.MM.JJ.HH-data.tgz</url> <changes>Changements depuis la dernière version</changes> </item> </resource> <resource type='theme' name='nomTheme'> <description>Description du thème</description> <item type='templates'> <version>>AAMMJJHH</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nomtheme-AA.MM.JJ.HH-tpl.tgz</url> <changes>Changements depuis la dernière version</changes> </item> <item type='images'> <version>>AAMMJJHH</version> <date>AAMMJJhhmm</date> <url>http://www.modulix.org/somewhere/nomtheme-AA.MM.JJ.HH-img.tgz</url> <changes>Changements depuis la dernière version</changes> </item> </resource> </application> </ras-feed> * * result exemple : [ [app_name=>name, app_version=>version, app_resources=> [resource_name=>name, resource_type=>type, resource_desc=>description, resource_items=> [item_type=>type, item_version=>version, item_date=>date, item_lang=>lang, item_changes=>changes, item_url=>url ] ] ] [app_name=>name, app_version=>version, app_resources=> [resource_name=>name, resource_type=>type, resource_desc=>description, resource_items=> [item_type=>type, item_version=>version, item_date=>date, item_lang=>lang, item_changes=>changes, item_url=>url ] ] ] ] */ //------------------------------------------------------------------------------ require_once PHPWS_SOURCE_DIR . 'mod/ras/class/RasBase.php'; //------------------------------------------------------------------------------ class RasFeedParser extends RasBase { // VARS ---------------------------------------------------------------------- /** * @var resource $_parser the SAX parser */ var $_parser = null; /** * @var array $_content stores content while parsing */ var $_content; /** * @var string $_currentApp the current app section */ var $_currentApp; /** * @var $string $_currentResource the current resource section */ var $_currentResource; /** * @var string $_currentItem the current item section */ var $_currentItem; // --------------------------------------------------------------------------- /** * init all resources before parsing */ function _init() { /* parser */ if ($this->_parser != null) { $this->_free(); } $this->_parser = xml_parser_create(); if (! is_resource($this->_parser)) { return $this->setLastError($_SESSION['translate']->it("Could not create the XML SAX Parser")); } xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, 0); xml_set_object($this->_parser, &$this); xml_set_element_handler($this->_parser, "onTagOpen", "onTagClose"); xml_set_character_data_handler($this->_parser, "onData"); return true; } // --------------------------------------------------------------------------- /** * free the parser resource when done */ function _cleanUp() { if ($this->_parser != null) { xml_parser_free($this->_parser); $this->_parser = null; } } // --------------------------------------------------------------------------- /** * read the ras-feed from the given url and parse it as an array * * @param string $url the url of the channel * @return mixed the parsed content as an array, or FALSE */ function parse($url) { /* init everything */ $this->_lastError = ''; if (! $this->_init()) { return false; } $this->_content = Array(); /* read data from channel's url (well, from any file in fact !-) */ $fp = @fopen($url, 'rb'); if (! $fp) { /* TODO : how to get more info about the error ?*/ $this->_cleanUp(); return $this->setLastError($_SESSION['translate']->it("Could not read channel : ") . $url); } $xmldata = ""; do { $buffer = fread($fp, 8192); if (strlen($buffer) == 0) { break; } $xmldata .= $buffer; } while (true); fclose($fp); /* parse feed */ $ok = xml_parse($this->_parser, $xmldata, true); if (! $ok) { $this->setLastError(xml_error_string(xml_get_error_code($this->_parser))); $this->setLastError($_SESSION['translate']->it("Error while parsing Ras Feed from ") . $url); } $this->_cleanUp(); /* and returns */ if ($ok) { return $this->_content; } else { return false; } } // --------------------------------------------------------------------------- /** * standard element open SAX event handler */ function onTagOpen($parser, $tagName, $attribs) { $this->_currentTag = $tagName; switch($tagName) { case "channel": if (isset($this->_content['chan_name'])) { /* TODO */ //return $this->setLastError("invalid feed : 2 channel tags in the same feed"); $this->setLastError("invalid feed : 2 channel tags in the same feed"); } $this->_content['chan_name'] = $attribs['name']; $this->_content['chan_url'] = $attribs['url']; $this->_content['chan_resources'] = Array(); break; case "application": $this->_currentApp = Array(); $this->_currentApp['app_name'] = $attribs['name']; $this->_currentApp['app_version'] = $attribs['version']; break; case "resource": $this->_currentResource = Array(); $this->_currentResource['res_name'] = $attribs['name']; $this->_currentResource['res_type'] = $attribs['type']; $this->_currentResource['res_desc'] = ''; break; case "item": $this->_currentItem = Array(); $this->_currentItem['item_type'] = $attribs['type']; $this->_currentItem['item_version'] = ''; $this->_currentItem['item_date'] = ''; $this->_currentItem['item_url'] = ''; $this->_currentItem['item_lang'] = ''; $this->_currentItem['item_changes'] = ''; break; } } // --------------------------------------------------------------------------- /** * standard element close SAX event handler */ function onTagClose($parser, $tagName) { switch ($tagName) { case "application": $this->_content['channel_resources'][] = $this->_currentApp; break; case "resource": $this->_currentApp['app_resources'][] = $this->_currentResource; break; case "item": $this->_currentResource['res_items'][] = $this->_currentItem; break; } $this->_currentTag=''; } // --------------------------------------------------------------------------- /** * standard cdata SAX event handler */ function onData($parser, $data) { $data = trim($data); if (strlen($data)) { switch ($this->_currentTag) { case "description": $this->_currentResource['res_desc'] .= $data; break; case "version": $this->_currentItem['item_version'] = $data; break; case "date": $this->_currentItem['item_date'] = $data; break; case "url": $this->_currentItem['item_url'] = $data; break; case "lang": $this->_currentItem['item_lang'] = $data; break; case "changes": $this->_currentItem['item_changes'] = $data; break; } } } } ?> --- NEW FILE: RasFormManager.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - form manager * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * creates all HTML content. */ class RasFormManager { // --------------------------------------------------------------------------- /** * return an html link for the Ras module * * @param string $caption link's caption * @param string $RAS_op the op to pass to the query part of the url * @param array $kwargs array of key=>values to add to the query * @return string the link as an html tag */ function _rasLink($caption, $ras_op, $kwargs=null) { $link = "<a href='index.php?module=ras&RAS_op=" . $ras_op; if (is_array($kwargs)) { foreach($kwargs as $key=>$arg) { $link .= "&{$key}={$arg}"; } } $link .= "'>{$caption}</a>"; return $link; } // DIALOG BOXES -------------------------------------------------------------- /** * return a 'confirm' dialogBox-like form * * @param string $caption caption of the dialog * @param string $question the text of the dialog * @param string $opYes the RAS_op code for the 'yes' link * @param array $kwYes array of additionnal key-value pair for the 'yes' link * @param string $opNo the RAS_op code for the 'no' link * @param string $opBack the RAS_op code for the 'go back' (ie : cancel) link */ function formConfirm($caption, $question, $opYes, $kwYes, $opNo, $opBack=null) { $vars['CAPTION'] = $caption; $vars['QUESTION'] = $question; $vars['YES'] = $this->_rasLink($_SESSION['translate']->it("Yes"), $opYes, $kwYes); $vars['NO'] = $this->_rasLink($_SESSION['translate']->it("No"), $opNo); if ($opBack != null) { $vars['LINKBACK'] = $this->_rasLink($_SESSION['translate']->it("Go back"), $opBack); } return PHPWS_Template::processTemplate($vars, "ras", "confirm.tpl"); } // --------------------------------------------------------------------------- /** * return a 'info' dialogBox-like form * * @param string $caption caption of the dialog * @param string $msg the text of the dialog * @param string $op the RAS_op code for the 'ok' link * @param array $kwargs array of additionnal key-value pair for the 'ok' link */ function formInfo($caption, $msg, $op, $kwargs=null) { $vars['CAPTION'] = $caption; $vars['MSG'] = $msg; $vars['OK'] = $this->_rasLink($_SESSION['translate']->it('Ok'), $op, $kwargs); return PHPWS_Template::processTemplate($vars, "ras", "info.tpl"); } // SETTINGS ------------------------------------------------------------------ /** * return the 'edit/create settings' form */ function formSettings() { $form = "<form action=\"index.php\" method=\"post\">\n"; $form .= PHPWS_Form::formHidden(array("module"=>"ras", "RAS_op"=>"updatemastersettings")); if (isset($_REQUEST['ras_from'])) { $form .= PHPWS_Form::formHidden('ras_from', $_REQUEST['ras_from']); } $template['TITLE'] = $_SESSION['translate']->it("Remote Applicative Syndication : Settings"); $template['CMD_VIEW_FEEDS'] = $this->_rasLink($_SESSION['translate']->it("Channels"), 'viewfeeds'); $template['CMD_VIEW_RES'] = $this->_rasLink($_SESSION['translate']->it('Publish Resources'), 'viewresources'); $template['IS_MASTER'] = PHPWS_Form::formCheckBox("ras_ismaster", "1", $settings['is_master'], NULL, $_SESSION['translate']->it('This site can be master')); $template['ALLOW_ANONYMOUS'] = PHPWS_Form::formCheckBox("ras_anonymous", "1", $settings['accept_anonymous'], NULL, $_SESSION['translate']->it('Allow anonymous downloads')); $template['CMD_SAVE'] = PHPWS_Form::formSubmit($_SESSION['translate']->it("save settings"), "ras_update_settings"); $template['CMD_CANCEL'] = PHPWS_Form::formSubmit($_SESSION['translate']->it("cancel"), "ras_cancel_settings"); $form .= PHPWS_Template::processTemplate($template, "ras", "resources/settings.tpl"); $form .= "</form>"; PHPWS_Template::refreshTemplate("ras"); return $form; } // RESOURCES ----------------------------------------------------------------- /** * return the 'viewresource' form */ function formResourceList() { $template['TITLE'] = $_SESSION['translate']->it("Remote Applicative Syndication"); $template['CMD_EDIT_SETTINGS'] = $this->_rasLink($_SESSION['translate']->it('Master Settings'), 'editsettings', Array('ras_from'=>'viewresources')); $template['CMD_VIEW_FEEDS'] = $this->_rasLink($_SESSION['translate']->it('Channels'), 'viewfeeds'); $template['MODULES'] = $this->formModuleList(); $template['THEMES'] = $this->formThemeList(); $form = PHPWS_Template::processTemplate($template, "ras", "viewresources.tpl"); PHPWS_Template::refreshTemplate("ras"); return $form; } // --------------------------------------------------------------------------- /** * return the 'module' part of the 'viewresource' form */ function formModuleList() { $form = "<form action=\"index.php\" method=\"post\">\n" . PHPWS_Form::formHidden(array("module"=>"ras", "RAS_op"=>"exportmodule")); $template['LBL_MOD_TITLE'] = "Module"; $template['LBL_MOD_PNAME'] = "..."; $template['LBL_MOD_VERSION'] = "Version"; $template['LBL_CODE_COMMAND'] = "Code"; $template['LBL_LANG_COMMAND'] = "Lang"; $template['LBL_DATA_COMMAND'] = "Data"; $mods = $GLOBALS['core']->listModules(); $is_pair = 0; foreach($mods as $modTitle) { $rowTemplate = Array(); $moduleInfo = $GLOBALS["core"]->getModuleInfo($modTitle); if (! $moduleInfo ) { $rowTemplate['MOD_PNAME'] = $_SESSION['translate']->it("Could not get module info for module : ") . $modTitle; } else { $versionInfo = phpws_boost::getVersionInfo($modTitle); if (! $versionInfo) { $rowTemplate['MOD_PNAME'] = $_SESSION['translate']->it("Could not get version info for module : ") . $modTitle; } else { $rowTemplate['MOD_TITLE'] = $modTitle; $rowTemplate['MOD_PNAME'] = $moduleInfo['mod_pname']; $rowTemplate['MOD_VERSION'] = $versionInfo['version']; $rowTemplate['MOD_COMMAND'] = PHPWS_Form::formSubmit("export", "ras_export_module[$modTitle]"); $rowTemplate['LANG_COMMAND'] = PHPWS_Form::formSubmit("export", "ras_export_lang[$modTitle]"); $rowTemplate['DATA_COMMAND'] = PHPWS_Form::formSubmit("export", "ras_export_data[$modTitle]"); } } $is_pair ? $rowTemplate["TOG2"] = " " : $rowTemplate["TOG1"] = " "; $is_pair = ! $is_pair; $moduleRows[] = PHPWS_Template::processTemplate($rowTemplate, "ras", "resources/modulerows.tpl"); } $template["MODULE_ROWS"] = implode("", $moduleRows); $form .= PHPWS_Template::processTemplate($template, "ras", "resources/modules.tpl"); $form .= "</form>"; return $form; } // --------------------------------------------------------------------------- /** * return the 'themes' part of the 'viewresource' form * TODO : this is Q&D, could be smarter */ function formThemeList() { $dir = PHPWS_File::readDirectory(PHPWS_HOME_DIR . "themes/", 1); if (! is_array($dir)) { /* TODO */ exit("Error - no themes found."); } foreach($dir as $themeName) { $themePath = PHPWS_HOME_DIR . "themes/$themeName/"; if (file_exists($themePath . "theme.tpl")) { $lastModStamp = PHPWS_RemoteAppSyndication::lastmtime($themePath); $lastModDate = PHPWS_RemoteAppSyndication::timestampToDatetime($lastModStamp); $themes[$themeName] = Array('THEME_NAME'=>$themeName, 'THEME_PATH'=>$themePath, 'LASTMOD_DATE'=>$lastModDate, 'LASTMOD_STAMP'=>$lastModStamp); } } natcasesort($themes); $form = "<form action=\"index.php\" method=\"post\">\n"; $form .= PHPWS_Form::formHidden(array("module"=>"ras", "RAS_op"=>"exporttheme")); $template['LBL_THEME_NAME'] = $_SESSION['translate']->it("Theme"); $template['LBL_THEME_PATH'] = $_SESSION['translate']->it("Path"); $template['LBL_LASTMOD_DATE'] = $_SESSION['translate']->it("Last modification"); $template['LBL_TPL_COMMAND'] = $_SESSION['translate']->it("Template"); $template['LBL_IMG_COMMAND'] = $_SESSION['translate']->it("Images"); $is_pair = 0; foreach($themes as $themeName=>$theme) { $rowTemplate = $theme; $rowTemplate['TPL_COMMAND'] = PHPWS_Form::formSubmit("export", "ras_export_tpl[$themeName]"); $rowTemplate['IMG_COMMAND'] = PHPWS_Form::formSubmit("export", "ras_export_img[$themeName]"); $is_pair ? $rowTemplate["TOG2"] = " " : $rowTemplate["TOG1"] = " "; $is_pair = ! $is_pair; $themeRows[] = PHPWS_Template::processTemplate($rowTemplate, "ras", "resources/themerows.tpl"); } $template['THEME_ROWS'] = implode("", $themeRows); $form .= PHPWS_Template::processTemplate($template, "ras", "resources/themes.tpl"); $form .= "</form>"; return $form; } // FEEDS --------------------------------------------------------------------- /** * return the 'viewfeeds' form */ function formFeedList($channels) { // assert (is_array($channel)) or die("no channels"); /* get channel list from the db */ $template['TITLE'] = $_SESSION['translate']->it("Remote Applicative Syndication : channels"); $template['CMD_NEW_CHAN'] = $this->_rasLink($_SESSION['translate']->it('New channel'),'createchannel'); $template['CMD_VIEW_RES'] = $this->_rasLink($_SESSION['translate']->it('Publish Resources'), 'viewresources'); $template['CMD_EDIT_SETTINGS'] = "<a href='index.php?module=ras&RAS_op=editsettings&ras_from=viewfeeds'>Master Settings</a>"; $template['CMD_EDIT_SETTINGS'] = $this->_rasLink( $_SESSION['translate']->it('Master Settings'), 'editsettings', Array('ras_from'=>'viewfeeds')); /* read and parse channels */ $feedParser =& new RasFeedParser; $chanRows = Array(); /* * $channels : array (id => array('name'=>name, 'url'=>'http://www.exemple.org', active=>[0|1]) * [,...]): */ foreach($channels as $channelName=>$channelData) { $chanTemplate = Array(); $chanTemplate['CHAN_NAME'] = $channelName; $chanTemplate['CHAN_EDIT_CMD'] = $this->_rasLink($_SESSION['translate']->it('Edit'), 'editchannel', Array('ras_chan_id'=>$channelName)); $chanTemplate['CHAN_DEL_CMD'] = $this->_rasLink ($_SESSION['translate']->it('Delete'), 'checkdeletechannel', Array('ras_chan_id'=>$channelName)); /* format resources from the feed */ if ($channelData['active']) { $feed = $feedParser->parse($channelData['url']); if ($feed != false) { $chanTemplate['CHAN_RESOURCES'] = $this->formFeedResources($feed['channel_resources']); } else { $chanTemplate['CHAN_RESOURCES'] = $_SESSION['translate']->it('Could not parse feed :') . "<br>\n" . $feedParser->getLastError(); } } $chanRows[] = PHPWS_Template::processTemplate($chanTemplate,'ras', 'channels/channelfeed.tpl'); } $template['CHANNELS'] = implode("", $chanRows); return PHPWS_Template::processTemplate($template, "ras", "viewfeeds.tpl"); } // --------------------------------------------------------------------------- /** * called for each channel */ function formFeedResources($channel_resources) { $resRows = Array(); foreach($channel_resources as $app) { foreach($app['app_resources'] as $res) { $resTemplate['APP_NAME'] = $app['app_name']; $resTemplate['APP_VERSION'] = $app['app_version']; $resTemplate['RES_NAME'] = $res['res_name']; $resTemplate['RES_TYPE'] = $res['res_type']; $resTemplate['RES_DESC'] = $res['res_desc']; /* feed's items */ $itemRows = Array(); foreach($res['res_items'] as $item) { $itemTemplate['ITEM_TYPE'] = $item['item_type']; $itemTemplate['ITEM_VERSION'] = $item['item_version']; $itemTemplate['ITEM_DATE'] = $item['item_date']; $itemTemplate['ITEM_CHANGES'] = $item['item_changes']; $itemTemplate['ITEM_LINK'] = $this->_rasLink($_SESSION['translate']->it("Import"), 'checkimport' , Array('ras_itm_url'=>$item['item_url'], 'ras_res_type'=>$res['res_type'])); $itemRows[] = PHPWS_Template::processTemplate($itemTemplate,'ras', 'channels/chanitem.tpl'); } $resTemplate['RES_ITEMS'] = implode("", $itemRows); $resRows[] = PHPWS_Template::processTemplate($resTemplate,'ras', 'channels/chanresource.tpl'); } } return implode("", $resRows); } // --------------------------------------------------------------------------- /** * called for each resource */ function formFeedItems($items) { $itemRows = Array(); foreach($items as $item) { $itemTemplate['ITEM_TYPE'] = $item['item_type']; $itemTemplate['ITEM_VERSION'] = $item['item_version']; $itemTemplate['ITEM_DATE'] = $item['item_date']; $itemTemplate['ITEM_CHANGES'] = $item['item_changes']; $itemTemplate['ITEM_LINK'] = $this->_rasLink($_SESSION['translate']->it("Get item"), 'checkgetitem' , Array('ras_itm_url'=>$item['item_url'])); $itemRows[] = PHPWS_Template::processTemplate($itemTemplate,'ras', 'channels/chanitem.tpl'); } return implode("", $itemRows); } // CHANNEL ------------------------------------------------------------------- /** * return the 'edit/create channel' form * * @param string $channelId the Id (actually the name of) the channel * @param array $channelData the datas for this channel (name, url, activeYN) * @param string $msg can't remember why I added this ??? */ function formChannel($channelId='', $channelData=null, $msg=null) { $hiddenData = array("module"=>"ras", "RAS_op"=>"updatechannel", "ras_chan_id"=>$channelId, "ras_channel_new"=> strlen($channelId) ? 0 : 1 ); $form = "<form action=\"index.php\" method=\"post\">\n" . PHPWS_Form::formHidden($hiddenData); $tplVars = Array(); if ($msg != null) { $tplvars['CHAN_MSG'] = $msg; } $tplVars['TITLE'] = $_SESSION['translate']->it("Remote Applicative Syndication : edit channel"); $tplVars['CHAN_NAME'] = $channelData['name']; $tplVars['LBL_CHAN_NAME'] = $_SESSION['translate']->it("Channel Name : "); $tplVars['LBL_CHAN_ACTIVE'] = $_SESSION['translate']->it("Activate channel"); $tplVars['LBL_CHAN_URL'] = $_SESSION['translate']->it("Channel Url : "); /* edit an existing channel */ if ($channelId) { $tplVars['TXT_CHAN_NAME'] = PHPWS_Form::formTextField('ras_chan_name', $channelData['name'], 30); $tplVars['TXT_CHAN_URL'] = PHPWS_Form::formTextField('ras_chan_url', $channelData['url'], 80); $tplVars['CHK_CHAN_ACTIVE'] = PHPWS_Form::formCheckBox('ras_chan_active', '1', $channelData['active']); } /* create a new channel */ else { $tplVars['TXT_CHAN_NAME'] = PHPWS_Form::formTextField('ras_chan_name', '', 30); $tplVars['TXT_CHAN_URL'] = PHPWS_Form::formTextField('ras_chan_url', 'http://', 80); $tplVars['CHK_CHAN_ACTIVE'] = PHPWS_Form::formCheckBox('ras_chan_active', '1', '1'); } $tplVars['SUB_CHANNEL_OK'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Ok'), 'ras_chan_ok'); $tplVars['SUB_CHANNEL_CANCEL'] = PHPWS_Form::formSubmit($_SESSION['translate']->it('Cancel'), 'ras_chan_cancel'); $form .= PHPWS_Template::processTemplate($tplVars, "ras", "channels/chanedit.tpl"); $form .= "</form>"; return $form; } } ?> --- NEW FILE: RasBackend.php --- <?php /* * 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, or (at your option) * any later version. */ /** * Remote App Syndication - Ras Feed backend * * @version 0.0.4 * @author Bruno Desthuilliers <br...@mo...> * * Generate the ras-feeds for clients * TODO : * - DTD * - more documentation ? */ //------------------------------------------------------------------------------ require_once PHPWS_SOURCE_DIR . 'mod/ras/class/RasBase.php'; //------------------------------------------------------------------------------ class RasBackend extends RasBase { //---------------------------------------------------------------------------- /** * read feed datas from the db and returns a ras-feed xml as string * * @return string a ras-feed xml */ function createFeed() { $content = Array(); $content[] = "<?xml version='1.0' encoding='iso-8859-1'?>"; /* TODO : DTD */ //$content[] = '<!DOCTYPE ras PUBLIC "-//Modulix//DTD RAS 0.1//EN http://modulix.org/publish/formats/ras-0.1.dtd">'; $content[] = "<ras-feed>"; $apps = $GLOBALS['core']->getAssoc('select * from mod_ras_apps'); foreach($apps as $appId=>$app) { $content[] = "<application name='" . $app['app_name'] ."' version='" . $app['app_version'] . "'>"; $content[] = $this->_feedResources($appId); $content[] = "</application>"; } $content[] = "</ras-feed>"; return implode("\n", $content); } //---------------------------------------------------------------------------- /** * called for each app */ function _feedResources($appId) { $content = Array(); $content[] = "<resources>"; $resources = $GLOBALS['core']->getAssoc("select * from mod_ras_resources where app_id=$appId"); foreach ($resources as $resId=>$res) { $content[] = "<resource type='" . $res['res_type'] . "' name='" . $res['res_name'] . "'>"; $content[] = "<description>" . $res['res_description'] . "</description>"; $content[] = $this->_feedItems($resId); $content[] = "</resource>"; } $content[] = "</resources>"; return implode("\n", $content); } //---------------------------------------------------------------------------- /** * called for each resource */ function _feedItems($resId) { $content = Array(); $items = $GLOBALS['core']->getAssoc("select * from mod_ras_items where res_id=$resId"); foreach ($items as $item) { $content[] = "<item type='" . $item['itm_type'] . "'>"; $content[] = "<version>" . $item['itm_version'] . "</version>"; //$content[] = "<url>" . "http://localhost/phpws/files/ras/resources/" . $item['itm_url'] . "</url>"; $content[] = "<url>" . $item['itm_url'] . "</url>"; $content[] = "<changes>" . $item['itm_changes'] . "</changes>"; $content[] = "<date>" . $item['itm_date'] . "</date>"; $content[] = "<lang>" . $item['itm_lang'] . "</lang>"; $content[] = "<md5>" . $item['itm_md5'] . "</md5>"; $content[] = "</item>"; } return implode("\n", $content); } //---------------------------------------------------------------------------- /** * store the RAS feed datas in the DB * * @param string $resType the type of resource ('module' or 'theme' actually) * @param string $resName the name of the resource * @param array $feedData associative array of data to insert in mod_ras_items * @return boolean guess what ? * * TODO : * - versions themes ? * - what about missing data ? */ function storeFeed($resType, $resName, $feedData) { $core =& $GLOBALS['core']; /* check if we have the app, else create it */ /* TODO : appId is returned as a string ? */ $appVersion = $core->version; $appName = 'phpWebSite'; $row = $core->getRow("select app_id from mod_ras_apps where app_name='$appName' and app_version='$appVersion'"); if ($row == null) { $data = Array('app_name'=>$appName, 'app_version'=>$appVersion); $appId = $core->sqlInsert($data, 'mod_ras_apps', TRUE, TRUE, FALSE, TRUE); if ($appId == null) { /* TODO : more error info */ return $this->setLastError($_SESSION['translate']->it("Could not add application to the database :") . "$appName - $appVersion"); } } else { $appId = $row['app_id']; } $appId = (int)$appId; /* check if resource exists, else create it */ $row = $core->getRow("select * from mod_ras_resources where app_id=$appId and res_name='$resName' and res_type='$resType'"); if ($row == null) { $data = Array('app_id'=>$appId, 'res_name'=>$resName, 'res_type'=>$resType); $resId = $core->sqlInsert($data, 'mod_ras_resources', TRUE, TRUE, FALSE, TRUE); if ($resId == null) { /* TODO : more error info */ return $this->setLastError($_SESSION['translate']->it("Could not add resource to the database : ") . "$resName - $resType"); } } else { $resId = $row['res_id']; } /* store feed data */ $feedData['res_id'] = (int)$resId; // function sqlInsert ($db_array, $table_name, $check_dup=FALSE, $returnId=FALSE, $show_sql=FALSE, $autoIncrement=TRUE) { if (! $core->sqlInsert($feedData, 'mod_ras_items', TRUE, FALSE, FALSE, TRUE)) { /* TODO : more error info */ return $this->setLastError($_SESSION['translate']->it("Could not add feed data to the database : ") . "$resName - $resType"); } return true; } } ?> |
From: Ivan H. <iv...@us...> - 2004-05-24 23:02:22
|
Update of /cvsroot/phpwebsite-comm/modules/ras/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12212 Added Files: install.php install.sql uninstall.php uninstall.sql Log Message: Initial create --- NEW FILE: install.sql --- #drop table mod_ras_settings; #drop table mod_ras_apps; #drop table mod_ras_resources; #drop table mod_ras_items; create table mod_ras_settings ( is_master BOOL, accept_anonymous BOOL, channels TEXT ); insert into mod_ras_settings(is_master, accept_anonymous, channels) values(0, 0, ''); create table mod_ras_apps ( app_id INT UNSIGNED PRIMARY KEY NOT NULL, app_name varchar(50) NOT NULL, app_version varchar(20) NOT NULL, UNIQUE INDEX ras_app_idx(app_name, app_version) ); create table mod_ras_resources ( res_id INT UNSIGNED PRIMARY KEY NOT NULL , app_id INT UNSIGNED NOT NULL REFERENCES mod_ras_app, res_name varchar(50) NOT NULL, res_type varchar(10) NOT NULL, res_description TEXT, UNIQUE INDEX ras_res_idx(res_name, res_type) ); create table mod_ras_items ( itm_id INT UNSIGNED PRIMARY KEY NOT NULL, res_id INT UNSIGNED NOT NULL REFERENCES mod_ras_resources, itm_type varchar(4) NOT NULL, itm_version varchar(20) NOT NULL default '', itm_date DATETIME NOT NULL, itm_lang varchar(2) default '', itm_url TEXT NOT NULL, itm_changes TEXT, itm_md5 char(32), UNIQUE INDEX ras_itm_idx (itm_version, itm_date, itm_lang) ); --- NEW FILE: uninstall.php --- <?php /** * Uninstall file for ras v0.0.4 */ /* return to home page if the user is not the Deity */ if (!$_SESSION["OBJ_user"]->isDeity()) { header("location:index.php"); exit(); } $status = 1; /* read sql install script, execute it, suppress errors */ if ($GLOBALS['core']->sqlImport(PHPWS_SOURCE_DIR."mod/ras/boost/uninstall.sql", TRUE, TRUE) ) { /* report success */ $content = $_SESSION['translate']->it("All Remote Application Syndication tables successfully removed.") . "<br />"; $status = 1; /* TODO */ /* uninstall Language */ if(PHPWS_Language::uninstallLanguages('ras')) { $content .= $_SESSION['translate']->it("RAS successfully updated the Language system") . "<br />"; } /* remove file directories */ $path = $GLOBALS['core']->home_dir . "/files/ras/imports"; if (file_exists($path)) { if(PHPWS_File::rmdir($path)) { $content .= $_SESSION['translate']->it("RAS imports directory was fully removed.") . "<br />"; } else { $content .= $_SESSION['translate']->it("RAS import directory could not be removed.") . "<br />"; } } $path = $GLOBALS['core']->home_dir . "/files/ras/resources"; if (file_exists($path)) { if(PHPWS_File::rmdir($path)) { $content .= $_SESSION['translate']->it("RAS resources directory was fully removed.") . "<br />"; } else { $content .= $_SESSION['translate']->it("RAS resources directory could not be removed.") . "<br />"; } } $path = $GLOBALS['core']->home_dir . "/files/ras"; if (file_exists($path)) { if(PHPWS_File::rmdir($path)) { $content .= $_SESSION['translate']->it("RAS files directory was fully removed.") . "<br />"; } else { $content .= $_SESSION['translate']->it("RAS files directory could not be removed.") . "<br />"; } } } else { $content .= $_SESSION['translate']->it("Unable to access the database.") . "<br />"; } ?> --- NEW FILE: install.php --- <?php /* instal for RAS 0.0.4 */ if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); exit(); } if ( ! $GLOBALS['core']->sqlImport(PHPWS_SOURCE_DIR."mod/ras/boost/install.sql", 1, 1)) { $content .= $_SESSION['translate']->it("Unable to write to the database.") . "<br />"; $status = 0; } else { $content = $_SESSION['translate']->it("All Ras tables successfully written.") . "<br />"; $status = 1; /* Create files directory */ if (mkdir($GLOBALS['core']->home_dir . "files/ras")) { $content .= $_SESSION['translate']->it("Ras files directory ") . $GLOBALS['core']->home_dir . "files/ras" . $_SESSION['translate']->it(" successfully created!") . "<br />"; if (mkdir($GLOBALS['core']->home_dir . "files/ras/resources")) { $content .= $_SESSION['translate']->it("Ras resources files directory ") . $GLOBALS['core']->home_dir . "files/ras/resources " . $_SESSION['translate']->it("successfully created!") . "<br />"; } else { $content .= $_SESSION['translate']->it("Ras could not create the files directory: ") . $GLOBALS['core']->home_dir . "files/ras/resources<br />" . $_SESSION['translate']->it("You will have to do this manually!") . "<br />"; } if (mkdir($GLOBALS['core']->home_dir . "files/ras/imports")) { $content .= $_SESSION['translate']->it("Ras import files directory ") . $GLOBALS['core']->home_dir . "files/ras/import " . $_SESSION['translate']->it("successfully created!") . "<br />"; } else { $content .= $_SESSION['translate']->it("Ras could not create the files directory: ") . $GLOBALS['core']->home_dir . "files/ras/import<br />" . $_SESSION['translate']->it("You will have to do this manually!") . "<br />"; } } else { $content .= $_SESSION['translate']->it("Ras could not create the files directory: ") . $GLOBALS['core']->home_dir . "files/ras<br />" . $GLOBALS['core']->home_dir . "files/ras/resources<br />" . $GLOBALS['core']->home_dir . "files/ras/imports<br />" . $_SESSION['translate']->it("You will have to do this manually!") . "<br />"; } } ?> --- NEW FILE: uninstall.sql --- drop table mod_ras_settings; drop table mod_ras_apps; drop table mod_ras_resources; drop table mod_ras_items; |
From: Mike N. <mh...@us...> - 2004-05-24 22:06:46
|
Update of /cvsroot/phpwebsite-comm/themes/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv652 Modified Files: theme.php theme.tpl Log Message: meta_content change contributed by Wendall Cada Index: theme.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** theme.tpl 22 May 2004 19:12:06 -0000 1.3 --- theme.tpl 24 May 2004 22:06:18 -0000 1.4 *************** *** 2,8 **** <!-- Remove everything prior to the <head> tag --> - {METAINFO} - <!-- Rename METATAGS to METAINFO --> - {STYLESHEET} <!-- Rename STYLE to STYLESHEET --> --- 2,5 ---- Index: theme.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** theme.php 24 May 2004 16:49:03 -0000 1.4 --- theme.php 24 May 2004 22:06:18 -0000 1.5 *************** *** 7,10 **** --- 7,11 ---- \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\">"; + $_SESSION["OBJ_layout"]->meta_content = FALSE; } else { header("Content-Type: text/html; charset=UTF-8"); $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" *************** *** 13,18 **** $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"./themes/Default/style.css\" type=\"text/css\" />"; } - $THEME["METAINFO"] = "<meta name=\"generator\" content=\"phpWebSite\" /> - <meta name=\"keywords\" content=\"phpwebsite\" /> - <meta name=\"robots\" content=\"index, follow\" />"; ?> --- 14,16 ---- |
From: Mike N. <mh...@us...> - 2004-05-24 16:49:22
|
Update of /cvsroot/phpwebsite-comm/themes/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25352 Modified Files: theme.php Added Files: blue-style.css Log Message: added alternate stylesheet example Index: theme.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** theme.php 22 May 2004 19:12:06 -0000 1.3 --- theme.php 24 May 2004 16:49:03 -0000 1.4 *************** *** 2,6 **** if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ! <?xml-stylesheet href=\"./themes/Default/style.css\" type=\"text/css\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> --- 2,7 ---- if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ! <?xml-stylesheet alternate=\"yes\" title=\"Blue\" href=\"./themes/Default/blue-style.css\" type=\"text/css\"?> ! <?xml-stylesheet title=\"Orange\" href=\"./themes/Default/style.css\" type=\"text/css\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> --- NEW FILE: blue-style.css --- BODY { font-size : 1em; font-family : Arial, Helvetica, sans-serif; font-weight : normal; color : #000000; background-color : white; margin : 0 0 0 0; padding : 0 0 0 0; width : auto; } H1 { font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : bold; font-size : 1.2em; color : #000000; background-color : transparent; } p { font-size : .9em; font-family : Arial, Helvetica, sans-serif; } .smalltext { font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; font-size : .9em; } .smalltext a:link{ font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; } .smalltext a:visited{ font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; } .noline a:link{ text-decoration : none; } .noline a:visited{ text-decoration : none; } .largetext { font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; font-size : 1.2em; } .largetext a:link{ font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; font-size : 1.2em; } .largetext a:visited{ font-family : Arial, Helvetica, sans-serif; font-style : normal; font-variant : normal; font-weight : normal; font-size : 1.2em; } .errortext { font-family : Arial, Helvetica, sans-serif; font-size : .9em; color : red; font-weight : bold; } .grid { border : #efb240 .05em solid; } .white { background-color : white; } .black { background-color : black; } .bg_dark { background-color : #006699; } .bg_medium { background-color : #3399cc; } .bg_light { background-color : #66ccff; } .alt_bg_dark { background-color : #003399; } .alt_bg_medium { background-color : #3366cc; } .alt_bg_light { background-color : #6699ff; } |
From: Mike N. <mh...@us...> - 2004-05-22 19:12:32
|
Update of /cvsroot/phpwebsite-comm/themes/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19414 Modified Files: README theme.php theme.tpl Log Message: added meta info, and adjusted other compliance issues Index: theme.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** theme.tpl 21 May 2004 19:50:05 -0000 1.2 --- theme.tpl 22 May 2004 19:12:06 -0000 1.3 *************** *** 1,7 **** {DOCTYPE} ! <!-- You should probably remove the metatags theme var --> ! <!-- You must remove the {STYLE} theme var --> {STYLESHEET} --- 1,9 ---- {DOCTYPE} + <!-- Remove everything prior to the <head> tag --> ! {METAINFO} ! <!-- Rename METATAGS to METAINFO --> {STYLESHEET} + <!-- Rename STYLE to STYLESHEET --> Index: theme.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** theme.php 21 May 2004 19:50:05 -0000 1.2 --- theme.php 22 May 2004 19:12:06 -0000 1.3 *************** *** 2,12 **** if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ! <?xml-stylesheet href=\"./themes/xxxx/style.css\" type=\"text/css\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" ! \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; } else { header("Content-Type: text/html; charset=UTF-8"); ! $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" ! \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; ! $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"themes/xxxx/style.css\" type=\"text/css\" />"; } ?> --- 2,17 ---- if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ! <?xml-stylesheet href=\"./themes/Default/style.css\" type=\"text/css\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" ! \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> ! <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\">"; } else { header("Content-Type: text/html; charset=UTF-8"); ! $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ! \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> ! <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">"; ! $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"./themes/Default/style.css\" type=\"text/css\" />"; } + $THEME["METAINFO"] = "<meta name=\"generator\" content=\"phpWebSite\" /> + <meta name=\"keywords\" content=\"phpwebsite\" /> + <meta name=\"robots\" content=\"index, follow\" />"; ?> Index: README =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 6 Apr 2004 17:35:33 -0000 1.1.1.1 --- README 22 May 2004 19:12:05 -0000 1.2 *************** *** 10,13 **** --- 10,15 ---- INSTALLATION: + Modify theme.php to match your desired content types, character set, + language, stylesheet, and meta information. Copy theme.php to your theme directory, and modify these files: *************** *** 15,21 **** define("ALLOW_THEME_PHP_INSERTION", TRUE); ! theme.tpl -- first line must be ! {DOCTYPE} ! REFERENCE: --- 17,22 ---- define("ALLOW_THEME_PHP_INSERTION", TRUE); ! theme.tpl ! Follow the recommendations outlined in theme.tpl. REFERENCE: |
From: Mike N. <mh...@us...> - 2004-05-21 19:50:16
|
Update of /cvsroot/phpwebsite-comm/themes/debug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2116 Modified Files: theme.php theme.tpl Log Message: stylesheet modification for comment Index: theme.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** theme.tpl 6 Apr 2004 17:35:33 -0000 1.1.1.1 --- theme.tpl 21 May 2004 19:50:05 -0000 1.2 *************** *** 2,4 **** --- 2,7 ---- <!-- You should probably remove the metatags theme var --> + <!-- You must remove the {STYLE} theme var --> + + {STYLESHEET} Index: theme.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/themes/debug/theme.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** theme.php 6 Apr 2004 17:35:33 -0000 1.1.1.1 --- theme.php 21 May 2004 19:50:05 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Type: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> + <?xml-stylesheet href=\"./themes/xxxx/style.css\" type=\"text/css\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; *************** *** 7,10 **** --- 8,12 ---- $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; + $THEME["STYLESHEET"] = "<link rel=\"stylesheet\" href=\"themes/xxxx/style.css\" type=\"text/css\" />"; } ?> |
From: Mike N. <mh...@us...> - 2004-05-11 14:20:58
|
Update of /cvsroot/phpwebsite-comm/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6666 Modified Files: avail Log Message: gave ivan write access to modules/ras Index: avail =================================================================== RCS file: /cvsroot/phpwebsite-comm/CVSROOT/avail,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** avail 29 Mar 2004 19:58:20 -0000 1.19 --- avail 11 May 2004 14:20:32 -0000 1.20 *************** *** 6,9 **** --- 6,10 ---- avail|cl00bie|modules/mailto avail|cl00bie|modules/quotes + avail|ivan|modules/ras avail|wendall911|modules/rssfeeds avail|gbrackett|modules/staffman |
From: Ivan H. <iv...@us...> - 2004-05-10 07:18:43
|
Update of /cvsroot/phpwebsite-comm/modules/ras/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11799/boost Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras/boost added to the repository |
From: Ivan H. <iv...@us...> - 2004-05-10 06:42:35
|
Update of /cvsroot/phpwebsite-comm/modules/ras In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6237/ras Log Message: Directory /cvsroot/phpwebsite-comm/modules/ras added to the repository |
From: Eloi G. <ada...@us...> - 2004-04-22 17:06:08
|
Update of /cvsroot/phpwebsite-comm/modules/article/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3900/docs Modified Files: Changes.txt INTRODUCTION.txt Log Message: Bug Fixes Index: Changes.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/Changes.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Changes.txt 21 Apr 2004 19:55:20 -0000 1.7 --- Changes.txt 22 Apr 2004 17:05:28 -0000 1.8 *************** *** 2,5 **** --- 2,8 ---- Changes in version 2.3 ======================== + TODO: Change all forms to use the EZForm class in preparation for 0.9.4 + TODO: NEW FEATURE! TrackBack system allows AM to be used as a blog. + TODO: - Fixed Bug Report [902591] "Bug in Image Library" - Standardized all relative links - Fixed Bug Report [ 910071 ] Main article listing was messing up row display continuity where cells had null values. *************** *** 8,17 **** Thanks, smsulliva! - Fixed double-display of section editing screen. ! TODO: Change all forms to use the EZForm class in preparation for 0.9.4 ! TODO: NEW FEATURE! TrackBack system allows AM to be used as a blog. ! TODO: - Fixed Bug Report [902591] "Bug in Image Library" ! TODO: - Fixed display of archives so that listings are shown in descending order (most recent first). The order can be changed by adding "order=ASC" to the URL. ! TODO: - Fixed display of archives so that expired listings are only shown to those authorized to re-publish them. Switch to enable display of all articles is now "all=1". "current=1" ! is now obsolete. - Some of the documentation in "MOST-USED URL EXTENSIONS" in INTRODUCTION.txt has changed to the following: ================== --- 11,16 ---- Thanks, smsulliva! - Fixed double-display of section editing screen. ! - Fixed display of archives so that listings are shown in descending order (most recent first). The order can be changed by adding "order=ASC" to the URL. ! - Fixed display of archives so that expired listings are only shown to those authorized to re-publish them. Switch to enable display of all articles is now "all=1". "current=1" is now obsolete. - Some of the documentation in "MOST-USED URL EXTENSIONS" in INTRODUCTION.txt has changed to the following: ================== Index: INTRODUCTION.txt =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/docs/INTRODUCTION.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** INTRODUCTION.txt 19 Feb 2004 21:46:45 -0000 1.5 --- INTRODUCTION.txt 22 Apr 2004 17:05:28 -0000 1.6 *************** *** 257,261 **** http://www.yoursite.com/index.php?module=article&view=archives&year=2003 ! NOTE: The above links will show ALL (expired and unexpired) articles published on these dates. If you want to see the articles created or updated on these dates, add "&datetype=created_date" or "&datetype=updated_date" to the link. ! If you don't want to see any links that are currently expired, add "¤t=1" to the link. --- 257,262 ---- http://www.yoursite.com/index.php?module=article&view=archives&year=2003 ! NOTE: The above links will show currently viewable articles published on these dates. ! If you want to see the articles created or updated on these dates, add "&datetype=created_date" or "&datetype=updated_date" to the link. ! If you want to see ALL (expired and unexpired) articles, add "&all=1" to the link. |
From: Eloi G. <ada...@us...> - 2004-04-22 17:06:08
|
Update of /cvsroot/phpwebsite-comm/modules/article/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3900/inc Modified Files: AM_view_archives.php Log Message: Bug Fixes Index: AM_view_archives.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/inc/AM_view_archives.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AM_view_archives.php 19 Feb 2004 21:46:46 -0000 1.1 --- AM_view_archives.php 22 Apr 2004 17:05:28 -0000 1.2 *************** *** 49,56 **** $this->arc_filter['datelabel']=$_SESSION['translate']->it('Published'); } ! if (isset($_REQUEST['current']) && $_REQUEST['current']==1) ! $viewable_sql = $this->get_published_sql(); ! else $viewable_sql = 'approved'; if ($this->arc_filter['year'] && $this->arc_filter['month'] && $this->arc_filter['day']) --- 49,56 ---- $this->arc_filter['datelabel']=$_SESSION['translate']->it('Published'); } ! if (isset($_REQUEST['all']) && $_REQUEST['all']==1 && $_SESSION['OBJ_user']->allow_access('article', 'edit_articles')) $viewable_sql = 'approved'; + else + $viewable_sql = $this->get_published_sql(); if ($this->arc_filter['year'] && $this->arc_filter['month'] && $this->arc_filter['day']) *************** *** 60,65 **** ,$this->arc_filter['month'],$this->arc_filter['day'],$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,$this->arc_filter['month'],($this->arc_filter['day']+1),$this->arc_filter['year'])) ! . '" ORDER BY '.$this->arc_filter['datetype'].' ASC'; $start_date = date('F j, Y', mktime(0,0,0 ,$this->arc_filter['month'],$this->arc_filter['day'],$this->arc_filter['year'])); --- 60,64 ---- ,$this->arc_filter['month'],$this->arc_filter['day'],$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,$this->arc_filter['month'],($this->arc_filter['day']+1),$this->arc_filter['year'])) . '"'; $start_date = date('F j, Y', mktime(0,0,0 ,$this->arc_filter['month'],$this->arc_filter['day'],$this->arc_filter['year'])); *************** *** 71,76 **** ,$this->arc_filter['month'],1,$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,($this->arc_filter['month']+1),1,$this->arc_filter['year'])) ! . '" ORDER BY '.$this->arc_filter['datetype'].' ASC'; $start_date = date('F, Y', mktime(0,0,0 ,$this->arc_filter['month'],1,$this->arc_filter['year'])); --- 70,74 ---- ,$this->arc_filter['month'],1,$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,($this->arc_filter['month']+1),1,$this->arc_filter['year'])) . '"'; $start_date = date('F, Y', mktime(0,0,0 ,$this->arc_filter['month'],1,$this->arc_filter['year'])); *************** *** 82,94 **** ,1,1,$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,1,1,($this->arc_filter['year']+1))) ! . '" ORDER BY '.$this->arc_filter['datetype'].' ASC'; $start_date = date('Y', mktime(0,0,0,1,1,$this->arc_filter['year'])); } $this->arc_filter['title'] = $_SESSION['translate']->it('All Articles [var1] in [var2]' , $this->arc_filter['datelabel'], $start_date); $result = $GLOBALS['core']->getCol('SELECT id FROM ' . $this->sql_article_table ! . ' WHERE ' .$viewable_sql.' AND mainarticle=0'.$this->sql_predicate . $filter); $this->pager->setData($result); $result = NULL; --- 80,96 ---- ,1,1,$this->arc_filter['year'])) . '" AND '.$this->arc_filter['datetype'].'<"'.date('Y-m-d H:i:s', mktime(0,0,0 ! ,1,1,($this->arc_filter['year']+1))) . '"'; $start_date = date('Y', mktime(0,0,0,1,1,$this->arc_filter['year'])); } + else + { + $start_date = $_SESSION['translate']->it('this lifetime'); + } $this->arc_filter['title'] = $_SESSION['translate']->it('All Articles [var1] in [var2]' , $this->arc_filter['datelabel'], $start_date); $result = $GLOBALS['core']->getCol('SELECT id FROM ' . $this->sql_article_table ! . ' WHERE ' .$viewable_sql.' AND mainarticle=0'.$this->sql_predicate . $filter ! . ' ORDER BY '.$this->arc_filter['datetype'].' DESC'); $this->pager->setData($result); $result = NULL; *************** *** 100,104 **** /* Retrieve all article listings for this page */ $sql = 'SELECT * FROM ' . $this->sql_article_table ! . ' WHERE id IN (' . $data . ') ORDER BY '.$this->arc_filter['datetype'].' ASC'; if(!$result = $GLOBALS['core']->query($sql)) return; --- 102,106 ---- /* Retrieve all article listings for this page */ $sql = 'SELECT * FROM ' . $this->sql_article_table ! . ' WHERE id IN (' . $data . ') ORDER BY '.$this->arc_filter['datetype'].' DESC'; if(!$result = $GLOBALS['core']->query($sql)) return; |