|
From: <be...@us...> - 2014-03-17 13:42:34
|
Revision: 12388
http://sourceforge.net/p/xoops/svn/12388
Author: beckmi
Date: 2014-03-17 13:42:27 +0000 (Mon, 17 Mar 2014)
Log Message:
-----------
Upgrading to 0.97 Final
Modified Paths:
--------------
XoopsModules/waiting/trunk/waiting/admin/about.php
XoopsModules/waiting/trunk/waiting/admin/admin_footer.php
XoopsModules/waiting/trunk/waiting/admin/admin_header.php
XoopsModules/waiting/trunk/waiting/admin/index.php
XoopsModules/waiting/trunk/waiting/admin/main.php
XoopsModules/waiting/trunk/waiting/admin/menu.php
XoopsModules/waiting/trunk/waiting/blocks/waiting_waiting.php
XoopsModules/waiting/trunk/waiting/docs/changelog.txt
XoopsModules/waiting/trunk/waiting/include/functions.php
XoopsModules/waiting/trunk/waiting/include/updateblock.inc.php
XoopsModules/waiting/trunk/waiting/language/english/admin.php
XoopsModules/waiting/trunk/waiting/language/english/blocks.php
XoopsModules/waiting/trunk/waiting/language/english/modinfo.php
XoopsModules/waiting/trunk/waiting/language/english/plugins.php
XoopsModules/waiting/trunk/waiting/plugins/AMS.php
XoopsModules/waiting/trunk/waiting/plugins/PDdownloads.php
XoopsModules/waiting/trunk/waiting/plugins/PDlinks.php
XoopsModules/waiting/trunk/waiting/plugins/TDMDownloads.php
XoopsModules/waiting/trunk/waiting/plugins/addresses.php
XoopsModules/waiting/trunk/waiting/plugins/adslight.php
XoopsModules/waiting/trunk/waiting/plugins/agendax.php
XoopsModules/waiting/trunk/waiting/plugins/articles.php
XoopsModules/waiting/trunk/waiting/plugins/catads.php
XoopsModules/waiting/trunk/waiting/plugins/eguide.php
XoopsModules/waiting/trunk/waiting/plugins/extcal.php
XoopsModules/waiting/trunk/waiting/plugins/extgallery.php
XoopsModules/waiting/trunk/waiting/plugins/myAds.php
XoopsModules/waiting/trunk/waiting/plugins/myalbum.php
XoopsModules/waiting/trunk/waiting/plugins/mydownloads.php
XoopsModules/waiting/trunk/waiting/plugins/mylinks.php
XoopsModules/waiting/trunk/waiting/plugins/newbb.php
XoopsModules/waiting/trunk/waiting/plugins/news.php
XoopsModules/waiting/trunk/waiting/plugins/piCal.php
XoopsModules/waiting/trunk/waiting/plugins/popnupblog.php
XoopsModules/waiting/trunk/waiting/plugins/publisher.php
XoopsModules/waiting/trunk/waiting/plugins/recette.php
XoopsModules/waiting/trunk/waiting/plugins/simpleblog.php
XoopsModules/waiting/trunk/waiting/plugins/smartfaq.php
XoopsModules/waiting/trunk/waiting/plugins/smartpartner.php
XoopsModules/waiting/trunk/waiting/plugins/smartsection.php
XoopsModules/waiting/trunk/waiting/plugins/system.php
XoopsModules/waiting/trunk/waiting/plugins/tutorials.php
XoopsModules/waiting/trunk/waiting/plugins/weblinks.php
XoopsModules/waiting/trunk/waiting/plugins/wfdownloads.php
XoopsModules/waiting/trunk/waiting/plugins/wflinks.php
XoopsModules/waiting/trunk/waiting/plugins/wfsection.php
XoopsModules/waiting/trunk/waiting/plugins/wordbook.php
XoopsModules/waiting/trunk/waiting/plugins/wordpress.php
XoopsModules/waiting/trunk/waiting/plugins/xcgal.php
XoopsModules/waiting/trunk/waiting/plugins/xdirectory.php
XoopsModules/waiting/trunk/waiting/plugins/xfguestbook.php
XoopsModules/waiting/trunk/waiting/plugins/xfsection.php
XoopsModules/waiting/trunk/waiting/plugins/xoopstube.php
XoopsModules/waiting/trunk/waiting/plugins/xyp4all.php
XoopsModules/waiting/trunk/waiting/plugins/yomi.php
XoopsModules/waiting/trunk/waiting/xoops_version.php
Modified: XoopsModules/waiting/trunk/waiting/admin/about.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/about.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/about.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,29 +1,29 @@
-<?php
-/**
- * Birthday module
- *
- * You may not change or alter any portion of this comment or credits
- * of supporting developers from this source code or any supporting source code
- * which is considered copyrighted (c) material of the original comment or credit authors.
- * 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.
- *
- * @copyright The XOOPS Project (http://www.xoops.org)
- * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html)
- * @package birthday
- * @since 2.5.0
- * @author XOOPS Module Team
- * @version $Id $
- **/
-
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
-$aboutAdmin = new ModuleAdmin();
-
-echo $aboutAdmin->addNavigation('about.php');
-echo $aboutAdmin->renderAbout('WKFZBRBGMYKCA', false);
-
-include 'admin_footer.php';
\ No newline at end of file
+<?php
+/**
+ * Birthday module
+ *
+ * You may not change or alter any portion of this comment or credits
+ * of supporting developers from this source code or any supporting source code
+ * which is considered copyrighted (c) material of the original comment or credit authors.
+ * 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.
+ *
+ * @copyright The XOOPS Project (http://www.xoops.org)
+ * @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html)
+ * @package birthday
+ * @since 2.5.0
+ * @author XOOPS Module Team
+ * @version $Id $
+ **/
+
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+$aboutAdmin = new ModuleAdmin();
+
+echo $aboutAdmin->addNavigation('about.php');
+echo $aboutAdmin->renderAbout('WKFZBRBGMYKCA', false);
+
+include 'admin_footer.php';
Modified: XoopsModules/waiting/trunk/waiting/admin/admin_footer.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/admin_footer.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/admin_footer.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -13,4 +13,4 @@
." " . _AM_WAITING_FOOTER . "\n"
."</div>";
-xoops_cp_footer();
\ No newline at end of file
+xoops_cp_footer();
Modified: XoopsModules/waiting/trunk/waiting/admin/admin_header.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/admin_header.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/admin_header.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,31 +1,31 @@
-<?php
-// $Id: index.php,v 1.2 2005/04/06 09:49:05 gij Exp $
-// FILE :: index.php
-// AUTHOR :: Ryuji AMANO <in...@ry...>
-// WEB :: Ryu's Planning <http://ryus.co.jp/>
-//
-
-
-$path = dirname(dirname(dirname(dirname(__FILE__))));
-include_once $path . '/mainfile.php';
-include_once $path . '/include/cp_functions.php';
-require_once $path . '/include/cp_header.php';
-
-global $xoopsModule;
-
-$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
-
-// Load language files
-xoops_loadLanguage('admin', $thisModuleDir);
-xoops_loadLanguage('modinfo', $thisModuleDir);
-xoops_loadLanguage('main', $thisModuleDir);
-
-$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
-$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
-$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
-
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
- include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
- }else{
- redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
- }
\ No newline at end of file
+<?php
+// $Id: index.php,v 1.2 2005/04/06 09:49:05 gij Exp $
+// FILE :: index.php
+// AUTHOR :: Ryuji AMANO <in...@ry...>
+// WEB :: Ryu's Planning <http://ryus.co.jp/>
+//
+
+
+$path = dirname(dirname(dirname(dirname(__FILE__))));
+include_once $path . '/mainfile.php';
+include_once $path . '/include/cp_functions.php';
+require_once $path . '/include/cp_header.php';
+
+global $xoopsModule;
+
+$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
+
+// Load language files
+xoops_loadLanguage('admin', $thisModuleDir);
+xoops_loadLanguage('modinfo', $thisModuleDir);
+xoops_loadLanguage('main', $thisModuleDir);
+
+$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
+$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
+$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
+
+if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) {
+ include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
+ } else {
+ redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false);
+ }
Modified: XoopsModules/waiting/trunk/waiting/admin/index.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/index.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/index.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,19 +1,19 @@
-<?php
-// $Id: index.php,v 1.2 2005/04/06 09:49:05 gij Exp $
-// FILE :: index.php
-// AUTHOR :: Ryuji AMANO <in...@ry...>
-// WEB :: Ryu's Planning <http://ryus.co.jp/>
-//
-
-
-require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
-include_once dirname(__FILE__) . '/admin_header.php';
-
-xoops_cp_header();
-
- $indexAdmin = new ModuleAdmin();
-
- echo $indexAdmin->addNavigation('index.php');
- echo $indexAdmin->renderIndex();
-
-include "admin_footer.php";
\ No newline at end of file
+<?php
+// $Id: index.php,v 1.2 2005/04/06 09:49:05 gij Exp $
+// FILE :: index.php
+// AUTHOR :: Ryuji AMANO <in...@ry...>
+// WEB :: Ryu's Planning <http://ryus.co.jp/>
+//
+
+
+require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
+include_once dirname(__FILE__) . '/admin_header.php';
+
+xoops_cp_header();
+
+ $indexAdmin = new ModuleAdmin();
+
+ echo $indexAdmin->addNavigation('index.php');
+ echo $indexAdmin->renderIndex();
+
+include 'admin_footer.php';
Modified: XoopsModules/waiting/trunk/waiting/admin/main.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/main.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/main.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -5,7 +5,7 @@
// WEB :: Ryu's Planning <http://ryus.co.jp/>
//
-require_once "../../../include/cp_header.php";
+require_once '../../../include/cp_header.php';
require_once dirname(dirname(__FILE__)).'/include/functions.php' ;
include_once dirname(__FILE__) . '/admin_header.php';
xoops_cp_header();
@@ -22,21 +22,13 @@
echo "<h4>"._AM_WAITING_PLUGINLIST."</h4>";
echo "<table class='outer'>";
echo "<th>"._AM_WAITING_MODNAME."</th><th>"._AM_WAITING_DIRNAME."</th><th>"._AM_WAITING_STATUS."</th>";// dirname added by cesag
-foreach( $mod_lists as $dirname => $name ) {
- $style = ( @$style == "odd" ) ? "even" : "odd" ;
- $plugin_info = waiting_get_plugin_info( $dirname ) ;
- printf( "<tr class='%s'><td>%s</td><td>%s</td><td>%s</td></tr>" , $style , htmlspecialchars( $name ) , htmlspecialchars( $dirname ) , @$plugin_info['type'] ) ;
+foreach ($mod_lists as $dirname => $name) {
+ $style = ( @$style == "odd" ) ? "even" : "odd" ;
+ $plugin_info = waiting_get_plugin_info( $dirname ) ;
+ printf( "<tr class='%s'><td>%s</td><td>%s</td><td>%s</td></tr>" , $style , htmlspecialchars( $name ) , htmlspecialchars( $dirname ) , @$plugin_info['type'] ) ;
}
echo "</table>";
echo _AM_WAITING_PLUGINLIST_DESC;
include 'admin_footer.php';
-
-
-
-
-
-
-
-
Modified: XoopsModules/waiting/trunk/waiting/admin/menu.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/admin/menu.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/admin/menu.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,34 +1,27 @@
-<?php
-/**
- * Created by JetBrains PhpStorm.
- * User: Mamba
- * Date: 1/25/12
- * Time: 7:04 AM
- * To change this template use File | Settings | File Templates.
- */
-
-defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-
-$dirname = basename(dirname(dirname(__FILE__)));
-$module_handler = xoops_gethandler('module');
-$module = $module_handler->getByDirname($dirname);
-$pathIcon32 = $module->getInfo('icons32');
-
-//xoops_loadLanguage('admin', $dirname);
-
-$adminmenu = array();
-
-$i = 1;
-$adminmenu[$i]["title"] = _MI_WAITING_MENU_HOME;
-$adminmenu[$i]["link"] = 'admin/index.php';
-$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
-
-$i++;
-$adminmenu[$i]["title"] = _MI_WAITING_MENU_PLUGINS;
-$adminmenu[$i]["link"] = 'admin/main.php';
-$adminmenu[$i]["icon"] = $pathIcon32.'/search.png';
-
-$i++;
-$adminmenu[$i]["title"] = _MI_WAITING_MENU_ABOUT;
-$adminmenu[$i]["link"] = 'admin/about.php';
-$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
\ No newline at end of file
+<?php
+
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+
+$dirname = basename(dirname(dirname(__FILE__)));
+$module_handler = xoops_gethandler('module');
+$module = $module_handler->getByDirname($dirname);
+$pathIcon32 = $module->getInfo('icons32');
+
+//xoops_loadLanguage('admin', $dirname);
+
+$adminmenu = array();
+
+$i = 1;
+$adminmenu[$i]["title"] = _MI_WAITING_MENU_HOME;
+$adminmenu[$i]["link"] = 'admin/index.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/home.png';
+
+++$i;
+$adminmenu[$i]["title"] = _MI_WAITING_MENU_PLUGINS;
+$adminmenu[$i]["link"] = 'admin/main.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/search.png';
+
+++$i;
+$adminmenu[$i]["title"] = _MI_WAITING_MENU_ABOUT;
+$adminmenu[$i]["link"] = 'admin/about.php';
+$adminmenu[$i]["icon"] = $pathIcon32.'/about.png';
Modified: XoopsModules/waiting/trunk/waiting/blocks/waiting_waiting.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/blocks/waiting_waiting.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/blocks/waiting_waiting.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -31,122 +31,130 @@
// EXTENSIBLE "waiting block" by plugins in both waiting and modules
+/**
+ * @param $options
+ *
+ * @return array
+ */
function b_waiting_waiting_show($options)
{
global $xoopsUser, $xoopsConfig;
$userlang = $xoopsConfig['language'] ;
- $sql_cache_min = empty( $options[1] ) ? 0 : intval( $options[1] ) ;
- $sql_cache_file = XOOPS_CACHE_PATH.'/waiting_touch' ;
+ $sql_cache_min = empty( $options[1] ) ? 0 : intval( $options[1] ) ;
+ $sql_cache_file = XOOPS_CACHE_PATH.'/waiting_touch' ;
- // SQL cache check (you have to use this cache with block's cache by system)
- if( file_exists( $sql_cache_file ) ) {
- $sql_cache_mtime = filemtime( $sql_cache_file ) ;
- if( time() < $sql_cache_mtime + $sql_cache_min * 60 ) return array() ;
- else {
- unlink( $sql_cache_file ) ;
- }
- }
+ // SQL cache check (you have to use this cache with block's cache by system)
+ if ( file_exists( $sql_cache_file ) ) {
+ $sql_cache_mtime = filemtime( $sql_cache_file ) ;
+ if( time() < $sql_cache_mtime + $sql_cache_min * 60 ) return array() ;
+ else {
+ unlink( $sql_cache_file ) ;
+ }
+ }
- require_once dirname(dirname(__FILE__)).'/include/functions.php' ;
+ require_once dirname(dirname(__FILE__)).'/include/functions.php' ;
- // read language files for plugins
- $lang_dir = XOOPS_ROOT_PATH . "/modules/waiting/language";
- if( file_exists( "$lang_dir/$userlang/plugins.php" ) ) {
- include_once( "$lang_dir/$userlang/plugins.php" ) ;
- } else if( file_exists( "$lang_dir/english/plugins.php" ) ) {
- include_once( "$lang_dir/english/plugins.php" ) ;
- }
+ // read language files for plugins
+ $lang_dir = XOOPS_ROOT_PATH . "/modules/waiting/language";
+ if ( file_exists( "$lang_dir/$userlang/plugins.php" ) ) {
+ include_once( "$lang_dir/$userlang/plugins.php" ) ;
+ } elseif ( file_exists( "$lang_dir/english/plugins.php" ) ) {
+ include_once( "$lang_dir/english/plugins.php" ) ;
+ }
- $plugins_path = XOOPS_ROOT_PATH . "/modules/waiting/plugins";
- $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- $module_handler =& xoops_gethandler('module');
- $block = array();
+ $plugins_path = XOOPS_ROOT_PATH . "/modules/waiting/plugins";
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ $module_handler =& xoops_gethandler('module');
+ $block = array();
- // get module's list installed
- $mod_lists = $module_handler->getList(new Criteria(1,1),true);
- foreach( $mod_lists as $dirname => $name ) {
+ // get module's list installed
+ $mod_lists = $module_handler->getList(new Criteria(1,1),true);
+ foreach ($mod_lists as $dirname => $name) {
- $plugin_info = waiting_get_plugin_info( $dirname , $xoopsConfig['language'] ) ;
- if( empty( $plugin_info ) || empty( $plugin_info['plugin_path'] ) ) continue ;
+ $plugin_info = waiting_get_plugin_info( $dirname , $xoopsConfig['language'] ) ;
+ if( empty( $plugin_info ) || empty( $plugin_info['plugin_path'] ) ) continue ;
- if( ! empty( $plugin_info['langfile_path'] ) ) {
- include_once $plugin_info['langfile_path'] ;
- }
- include_once $plugin_info['plugin_path'] ;
+ if ( ! empty( $plugin_info['langfile_path'] ) ) {
+ include_once $plugin_info['langfile_path'] ;
+ }
+ include_once $plugin_info['plugin_path'] ;
- // call the plugin
- if( function_exists( @$plugin_info['func'] ) ) {
- // get the list of waitings
- $_tmp = call_user_func( $plugin_info['func'] , $dirname ) ;
- if( isset( $_tmp["lang_linkname"] ) ) {
- if( @$_tmp["pendingnum"] > 0 || $options[0] > 0){
- $block["modules"][$dirname]["pending"][] = $_tmp;
- }
- unset( $_tmp ) ;
- } else {
- // Judging the plugin returns multiple items
- // if lang_linkname does not exist
- foreach( $_tmp as $_one ) {
- if( @$_one["pendingnum"] > 0 || $options[0] > 0){
- $block["modules"][$dirname]["pending"][] = $_one;
- }
- }
- }
- }
+ // call the plugin
+ if ( function_exists( @$plugin_info['func'] ) ) {
+ // get the list of waitings
+ $_tmp = call_user_func( $plugin_info['func'] , $dirname ) ;
+ if ( isset( $_tmp["lang_linkname"] ) ) {
+ if (@$_tmp["pendingnum"] > 0 || $options[0] > 0) {
+ $block["modules"][$dirname]["pending"][] = $_tmp;
+ }
+ unset( $_tmp ) ;
+ } else {
+ // Judging the plugin returns multiple items
+ // if lang_linkname does not exist
+ foreach ($_tmp as $_one) {
+ if (@$_one["pendingnum"] > 0 || $options[0] > 0) {
+ $block["modules"][$dirname]["pending"][] = $_one;
+ }
+ }
+ }
+ }
- // for older compatibilities
- // Hacked by GIJOE
- $i = 0 ;
- while( 1 ) {
- $function_name = "b_waiting_{$dirname}_$i" ;
- if (function_exists( $function_name )){
- $_tmp = call_user_func( $function_name ) ;
- ++ $i ;
- if($_tmp["pendingnum"] > 0 || $options[0] > 0){
- $block["modules"][$dirname]["pending"][] = $_tmp;
- }
- unset($_tmp);
- } else break ;
- }
- // End of Hack
+ // for older compatibilities
+ // Hacked by GIJOE
+ $i = 0 ;
+ while (1) {
+ $function_name = "b_waiting_{$dirname}_$i" ;
+ if (function_exists( $function_name )) {
+ $_tmp = call_user_func( $function_name ) ;
+ ++ $i ;
+ if ($_tmp["pendingnum"] > 0 || $options[0] > 0) {
+ $block["modules"][$dirname]["pending"][] = $_tmp;
+ }
+ unset($_tmp);
+ } else break ;
+ }
+ // End of Hack
- // if(count($block["modules"][$dirname]) > 0){
- if ( ! empty( $block["modules"][$dirname] ) ) {
- $block["modules"][$dirname]["name"] = $name;
- }
- }
- //print_r($block);
+ // if (count($block["modules"][$dirname]) > 0) {
+ if ( ! empty( $block["modules"][$dirname] ) ) {
+ $block["modules"][$dirname]["name"] = $name;
+ }
+ }
+ //print_r($block);
- // SQL cache touch (you have to use this cache with block's cache by system)
- if( empty( $block ) && $sql_cache_min > 0 ) {
- $fp = fopen( $sql_cache_file , "w" ) ;
- fclose( $fp ) ;
- }
+ // SQL cache touch (you have to use this cache with block's cache by system)
+ if ( empty( $block ) && $sql_cache_min > 0 ) {
+ $fp = fopen( $sql_cache_file , "w" ) ;
+ fclose( $fp ) ;
+ }
- return $block ;
+ return $block ;
}
-function b_waiting_waiting_edit($options){
+/**
+ * @param $options
+ *
+ * @return string
+ */
+function b_waiting_waiting_edit($options)
+{
+ $mod_url = XOOPS_URL."/modules/waiting" ;
- $mod_url = XOOPS_URL."/modules/waiting" ;
+ $sql_cache_min = empty( $options[1] ) ? 0 : intval( $options[1] ) ;
- $sql_cache_min = empty( $options[1] ) ? 0 : intval( $options[1] ) ;
+ $form = _MB_WAITING_NOWAITING_DISPLAY.": <input type='radio' name='options[0]' value='1'";
+ if ($options[0] == 1) {
+ $form .= " checked='checked'";
+ }
+ $form .= " /> "._YES."<input type='radio' name='options[0]' value='0'";
+ if ($options[0] == 0) {
+ $form .= " checked='checked'";
+ }
+ $form .=" /> "._NO."<br />\n";
+ $form .= sprintf( _MINUTES , _MB_WAITING_SQL_CACHE.": <input type='text' name='options[1]' value='$sql_cache_min' size='2' />" ) ;
+ $form .="<br />\n<br />\n<a href='$mod_url/admin/index.php'><img src='$mod_url/images/folder16.gif' />"._MB_WAITING_LINKTOPLUGINCHECK."</a>" ;
- $form = _MB_WAITING_NOWAITING_DISPLAY.": <input type='radio' name='options[0]' value='1'";
- if ( $options[0] == 1 ) {
- $form .= " checked='checked'";
- }
- $form .= " /> "._YES."<input type='radio' name='options[0]' value='0'";
- if ( $options[0] == 0 ) {
- $form .= " checked='checked'";
- }
- $form .=" /> "._NO."<br />\n";
- $form .= sprintf( _MINUTES , _MB_WAITING_SQL_CACHE.": <input type='text' name='options[1]' value='$sql_cache_min' size='2' />" ) ;
- $form .="<br />\n<br />\n<a href='$mod_url/admin/index.php'><img src='$mod_url/images/folder16.gif' />"._MB_WAITING_LINKTOPLUGINCHECK."</a>" ;
-
- return $form;
+ return $form;
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/docs/changelog.txt
===================================================================
--- XoopsModules/waiting/trunk/waiting/docs/changelog.txt 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/docs/changelog.txt 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,42 +1,179 @@
----------------------------------------
-1.06 Beta 1 2013-04-20
----------------------------------------
-- Converted to XOOPS 2.5.5 Admin GUI (Mamba)
-
----------------------------------------
-1.05 2008-12-08
----------------------------------------
-- updated README
-- updated mymenu
-- added language files
--- portuguesebr (thx leco1)
-
----------------------------------------
-1.04 2008-12-05
----------------------------------------
-- modified the compatibilities with XCL2.1
-- modified MySQL5 compatibility
-- changed altsys friendly module
-
----------------------------------------
-1.03 2006-07-13
----------------------------------------
-- modified xoops_version.php as hasMain=1 (thx Rollei)
-- added language files
--- persian (thx voltan) 1.03a
-
----------------------------------------
-1.02 2005-12-03
----------------------------------------
-- updated myblocksadmin 0.41 & mymenu 0.15a
-- updated module icon (thx argon)
-
----------------------------------------
-1.01 2005-07-21
----------------------------------------
-- fixed a bug in JavaScript (thx yamaichi)
-
----------------------------------------
-1.00 2005-05-25
----------------------------------------
-- the 1st release
+---------------------------------------
+0.97 beta 1 (2013/04/25)
+---------------------------------------
+- System plugin link corrected (alain 01)
+- xoopstube plugin added (alain 01)
+- Publisher and extgallery plugin added (Grom)
+- Replacing all Database::getInstance to XoopsDatabaseFactory::getDatabaseConnection (cesag)
+- language files updated for Transifex (cesag)
+- adslight plugin added (cesag)
+- define 'dirname' added, see docs/lang_diff.txt (cesag)
+
+---------------------------------------
+0.96 (2012/12/22)
+---------------------------------------
+- converted to AdminModule GUI (mamba)
+
+---------------------------------------
+0.95 (2009/4/22)
+---------------------------------------
+- added D3 module ready
+- added french (thx marco)
+- added portuguesebr (thx Izzy)
+- added persian (thx stranger) 0.95a
+- a plugin added
+-- eguide (by tes) 0.95b
+- languge files added
+-- ja_utf8 0.95c
+
+---------------------------------------
+0.94b
+---------------------------------------
+- modified the module icon (thx Argon)
+- 2 pugins added
+-- extcal (thx alain01)
+-- articles (thx twilo)
+
+---------------------------------------
+0.94a
+---------------------------------------
+- fixed a typo in plugins/yomi.php (thx yshima)
+
+---------------------------------------
+0.94
+---------------------------------------
+- removed CRs in some php files
+- a plugin added
+-- XFSection (thx Bezoops)
+
+:ver 0.93|
+- updated Italian (thx flying.tux)
+- a plugin added
+-- SmartPartner (thx mariuss)
+
+---------------------------------------
+0.92
+---------------------------------------
+- add SQL cache
+- fixed some typos (thx karedokx)
+- 2 plugin modified
+-- WF-Section (thx karedokx)
+-- catads (thx Alain01)
+- 2 plugins added
+-- WordBook (thx AgD)
+-- recette (thx karedokx)
+
+---------------------------------------
+0.91
+---------------------------------------
+- updated Italian (thx flying.tux)
+
+---------------------------------------
+0.90
+---------------------------------------
+- modified the structure of the directory for plugins
+- modified system plugin (thx gravies)
+- 3 plugins added
+-- newbb2 or CBB (thx gravies)
+-- catads (thx Alain01)
+-- WF-links (thx flying.tux)
+
+---------------------------------------
+0.86 by flying.tux
+---------------------------------------
+- Italian updated
+- 2 plug-ins added
+-- PDlinks (thx flying.tux)
+-- PDdownloads (thx flying.tux)
+
+---------------------------------------
+0.85 by GIJOE
+---------------------------------------
+- modified the dependencies of language files and constants radically
+
+---------------------------------------
+0.84 by GIJOE
+---------------------------------------
+- fixed a typo in the form for block's options (thx flying.tux)
+- fixed some Notices in "not always" mode
+- 2 plug-ins added
+-- xfguestbook (thx karedokx) (0.84a)
+-- AMS (thx karedokx) (0.84a)
+- a plug-in modified
+-- weblinks (thx Tom_G3X) (0.84b)
+
+---------------------------------------
+0.83| by GIJOE
+---------------------------------------
+- fixed missing a Creteria in getList()
+
+---------------------------------------
+0.82 by flying.tux
+---------------------------------------
+- few modifications in English
+- few modifications in Italian
+- 1 plug-in added
+-- smartsection(thx flying.tux)
+
+---------------------------------------
+0.81 by GIJOE
+---------------------------------------
+- changed the route to admin (from block's option edit)
+- modified English
+- added some protections against direct accessing
+- Italian added(thx flying.tux)
+- 1 plug-in added
+-- xyp4all(thx flying.tux)
+
+---------------------------------------
+0.8
+---------------------------------------
+-- modified as reading plug-in from module's directory if it exists
+-- multiple waitings can be returned from single function
+--- almost plug-ins are modified along this new spec by GIJOE
+-- modified the template as watings belonging modules
+--- English and Japanese text are shorten by GIJOE
+- 1 plug-in added
+-- Weblinks(by Ryuji)
+
+---------------------------------------
+0.7c
+---------------------------------------
+-- 1 plug-in added
+--- WordPress ME(by nobunobu) multiple
+
+---------------------------------------
+0.7b
+---------------------------------------
+-- 1 plug-in added
+--- SmartFAQ (by mariuss)
+
+---------------------------------------
+0.7a
+---------------------------------------
+-- 1 plug-in added
+--- WF-Downloads (by coldfire)
+
+---------------------------------------
+0.7
+---------------------------------------
+-- 2 language files added
+--- spanish (by ColdBeer)
+--- swedish (by Leif Madsen)
+-- 1 plug-in added
+--- xcGallery (by nao-pon)
+
+---------------------------------------
+0.6
+---------------------------------------
+-- An option added whether it is displayed when no wating exists
+-- 3 plug-ins added
+--- Addresses (by gruessle)
+--- MyAds (by Tom_G3X)
+--- Tutorials (by GIJOE)
+
+---------------------------------------
+0.5
+---------------------------------------
+-- some plug-ins added
+-- English document file - is this - added.
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/include/functions.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/include/functions.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/include/functions.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,68 +1,72 @@
<?php
+/**
+ * @param $dirname
+ * @param string $language
+ *
+ * @return array
+ */
function waiting_get_plugin_info( $dirname , $language = 'english' )
{
- // get $mytrustdirname for D3 modules
- $mytrustdirname = '' ;
- if( defined( 'XOOPS_TRUST_PATH' ) && file_exists( XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ) ) {
- @include XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ;
- }
+ // get $mytrustdirname for D3 modules
+ $mytrustdirname = '' ;
+ if ( defined( 'XOOPS_TRUST_PATH' ) && file_exists( XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ) ) {
+ @include XOOPS_ROOT_PATH."/modules/".$dirname."/mytrustdirname.php" ;
+ }
- $module_plugin_file = XOOPS_ROOT_PATH."/modules/".$dirname."/include/waiting.plugin.php" ;
- $d3module_plugin_file = XOOPS_TRUST_PATH."/modules/".$mytrustdirname."/include/waiting.plugin.php" ;
- $builtin_plugin_file = XOOPS_ROOT_PATH."/modules/waiting/plugins/".$dirname.".php" ;
+ $module_plugin_file = XOOPS_ROOT_PATH."/modules/".$dirname."/include/waiting.plugin.php" ;
+ $d3module_plugin_file = XOOPS_TRUST_PATH."/modules/".$mytrustdirname."/include/waiting.plugin.php" ;
+ $builtin_plugin_file = XOOPS_ROOT_PATH."/modules/waiting/plugins/".$dirname.".php" ;
- if( file_exists( $module_plugin_file ) ) {
- // module side (1st priority)
- $lang_files = array(
- XOOPS_ROOT_PATH."/modules/$dirname/language/$language/waiting.php" ,
- XOOPS_ROOT_PATH."/modules/$dirname/language/english/waiting.php" ,
- ) ;
- $langfile_path = '' ;
- foreach( $lang_files as $lang_file ) {
- if( file_exists( $lang_file ) ) {
- $langfile_path = $lang_file ;
- break ;
- }
- }
- $ret = array(
- 'plugin_path' => $module_plugin_file ,
- 'langfile_path' => $langfile_path ,
- 'func' => 'b_waiting_'.$dirname ,
- 'type' => 'module' ,
- ) ;
- } else if( ! empty( $mytrustdirname ) && file_exists( $d3module_plugin_file ) ) {
- // D3 module's plugin under xoops_trust_path (2nd priority)
- $lang_files = array(
- XOOPS_TRUST_PATH."/modules/$mytrustdirname/language/$language/waiting.php" ,
- XOOPS_TRUST_PATH."/modules/$mytrustdirname/language/english/waiting.php" ,
- ) ;
- $langfile_path = '' ;
- foreach( $lang_files as $lang_file ) {
- if( file_exists( $lang_file ) ) {
- $langfile_path = $lang_file ;
- break ;
- }
- }
- $ret = array(
- 'plugin_path' => $d3module_plugin_file ,
- 'langfile_path' => $langfile_path ,
- 'func' => 'b_waiting_'.$mytrustdirname ,
- 'type' => 'module (D3)' ,
- ) ;
- } else if( file_exists( $builtin_plugin_file ) ) {
- // built-in plugin under modules/waiting (3rd priority)
- $ret = array(
- 'plugin_path' => $builtin_plugin_file ,
- 'langfile_path' => '' ,
- 'func' => 'b_waiting_'.$dirname ,
- 'type' => 'Waiting' ,
- ) ;
- } else {
- $ret = array() ;
- }
+ if ( file_exists( $module_plugin_file ) ) {
+ // module side (1st priority)
+ $lang_files = array(
+ XOOPS_ROOT_PATH."/modules/$dirname/language/$language/waiting.php" ,
+ XOOPS_ROOT_PATH."/modules/$dirname/language/english/waiting.php" ,
+ ) ;
+ $langfile_path = '' ;
+ foreach ($lang_files as $lang_file) {
+ if ( file_exists( $lang_file ) ) {
+ $langfile_path = $lang_file ;
+ break ;
+ }
+ }
+ $ret = array(
+ 'plugin_path' => $module_plugin_file ,
+ 'langfile_path' => $langfile_path ,
+ 'func' => 'b_waiting_'.$dirname ,
+ 'type' => 'module' ,
+ ) ;
+ } elseif ( ! empty( $mytrustdirname ) && file_exists( $d3module_plugin_file ) ) {
+ // D3 module's plugin under xoops_trust_path (2nd priority)
+ $lang_files = array(
+ XOOPS_TRUST_PATH."/modules/$mytrustdirname/language/$language/waiting.php" ,
+ XOOPS_TRUST_PATH."/modules/$mytrustdirname/language/english/waiting.php" ,
+ ) ;
+ $langfile_path = '' ;
+ foreach ($lang_files as $lang_file) {
+ if ( file_exists( $lang_file ) ) {
+ $langfile_path = $lang_file ;
+ break ;
+ }
+ }
+ $ret = array(
+ 'plugin_path' => $d3module_plugin_file ,
+ 'langfile_path' => $langfile_path ,
+ 'func' => 'b_waiting_'.$mytrustdirname ,
+ 'type' => 'module (D3)' ,
+ ) ;
+ } elseif ( file_exists( $builtin_plugin_file ) ) {
+ // built-in plugin under modules/waiting (3rd priority)
+ $ret = array(
+ 'plugin_path' => $builtin_plugin_file ,
+ 'langfile_path' => '' ,
+ 'func' => 'b_waiting_'.$dirname ,
+ 'type' => 'Waiting' ,
+ ) ;
+ } else {
+ $ret = array() ;
+ }
- return $ret ;
+ return $ret ;
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/include/updateblock.inc.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/include/updateblock.inc.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/include/updateblock.inc.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,95 +1,93 @@
<?php
// $Id: updateblock.inc.php,v 1.1 2005/04/05 02:48:40 gij Exp $
- if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
+ if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
- // Keep Block option values when update (by nobunobu)
- global $xoopsDB;
- $query = "SELECT mid FROM ".$xoopsDB->prefix('modules')." WHERE dirname='".$modversion['dirname']."' ";
- $result = $xoopsDB->query($query);
- $record= $xoopsDB->fetcharray($result);
- if ($record) {
- $mid = $record['mid'];
- $count = count($modversion['blocks']);
- /* $sql = "SELECT * FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND block_type ='D'";
- $fresult = $xoopsDB->query($sql);
- $n_funcnum = $count;
- while ($fblock = $xoopsDB->fetchArray($fresult)) {
- $bnum = 0;
- for ($i = 1 ; $i <= $count ; $i++) {
- if (($modversion['blocks'][$i]['file'] == $fblock['func_file']) and ($modversion['blocks'][$i]['show_func'] == $fblock['show_func'])) {
- $bnum = $i;
- break;
- }
- }
- if($bnum) {
- $n_funcnum++;
- $modversion['blocks'][$n_funcnum]['file'] = $fblock['func_file'];
- $modversion['blocks'][$n_funcnum]['name'] = $fblock['name'];
- $modversion['blocks'][$n_funcnum]['description'] = $fblock['name'];
- $modversion['blocks'][$n_funcnum]['show_func'] = $fblock['show_func'];
- $modversion['blocks'][$n_funcnum]['edit_func'] = $fblock['edit_func'];
- $modversion['blocks'][$n_funcnum]['template'] = $fblock['template'];
- if ($fblock['options']) {
- $old_vals=explode("|",$fblock['options']);
- $def_vals=explode("|",$modversion['blocks'][$bnum]['options']);
- if (count($old_vals) == count($def_vals)) {
- // the number of parameters is not changed
- $modversion['blocks'][$n_funcnum]['options'] = $fblock['options'];
- $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept. (value = <b>".$fblock['options']."</b>)";
- } else if (count($old_vals) < count($def_vals)){
- // the number of parameters is increased
- for ($j=0; $j < count($old_vals); $j++) {
- $def_vals[$j] = $old_vals[$j];
- }
- $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals);
- $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept and new options are added. (value = <b>".$modversion['blocks'][$fblock['func_num']]['options']."</b>)";
- } else {
- $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals);
- $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be reset to the default, because of some decrease of options. (value = <b>".$modversion['blocks'][$n_funcnum]['options']."</b>)";
- }
- }
- $sql = "UPDATE ".$xoopsDB->prefix('newblocks')." SET func_num='$n_funcnum' WHERE mid=".$mid." AND bid='".$fblock['bid']."'";
- $iret = $xoopsDB->query($sql);
+ // Keep Block option values when update (by nobunobu)
+ global $xoopsDB;
+ $query = "SELECT mid FROM ".$xoopsDB->prefix('modules')." WHERE dirname='".$modversion['dirname']."' ";
+ $result = $xoopsDB->query($query);
+ $record= $xoopsDB->fetcharray($result);
+ if ($record) {
+ $mid = $record['mid'];
+ $count = count($modversion['blocks']);
+ /* $sql = "SELECT * FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND block_type ='D'";
+ $fresult = $xoopsDB->query($sql);
+ $n_funcnum = $count;
+ while ($fblock = $xoopsDB->fetchArray($fresult)) {
+ $bnum = 0;
+ for ($i = 1 ; $i <= $count ; ++$i) {
+ if (($modversion['blocks'][$i]['file'] == $fblock['func_file']) and ($modversion['blocks'][$i]['show_func'] == $fblock['show_func'])) {
+ $bnum = $i;
+ break;
+ }
+ }
+ if ($bnum) {
+ $n_funcnum++;
+ $modversion['blocks'][$n_funcnum]['file'] = $fblock['func_file'];
+ $modversion['blocks'][$n_funcnum]['name'] = $fblock['name'];
+ $modversion['blocks'][$n_funcnum]['description'] = $fblock['name'];
+ $modversion['blocks'][$n_funcnum]['show_func'] = $fblock['show_func'];
+ $modversion['blocks'][$n_funcnum]['edit_func'] = $fblock['edit_func'];
+ $modversion['blocks'][$n_funcnum]['template'] = $fblock['template'];
+ if ($fblock['options']) {
+ $old_vals=explode("|",$fblock['options']);
+ $def_vals=explode("|",$modversion['blocks'][$bnum]['options']);
+ if (count($old_vals) == count($def_vals)) {
+ // the number of parameters is not changed
+ $modversion['blocks'][$n_funcnum]['options'] = $fblock['options'];
+ $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept. (value = <b>".$fblock['options']."</b>)";
+ } elseif (count($old_vals) < count($def_vals)) {
+ // the number of parameters is increased
+ for ($j=0; $j < count($old_vals); $j++) {
+ $def_vals[$j] = $old_vals[$j];
+ }
+ $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals);
+ $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be kept and new options are added. (value = <b>".$modversion['blocks'][$fblock['func_num']]['options']."</b>)";
+ } else {
+ $modversion['blocks'][$n_funcnum]['options'] = implode("|",$def_vals);
+ $local_msgs[] = "Option's values of the cloned block <b>".$fblock['name']."</b> will be reset to the default, because of some decrease of options. (value = <b>".$modversion['blocks'][$n_funcnum]['options']."</b>)";
+ }
+ }
+ $sql = "UPDATE ".$xoopsDB->prefix('newblocks')." SET func_num='$n_funcnum' WHERE mid=".$mid." AND bid='".$fblock['bid']."'";
+ $iret = $xoopsDB->query($sql);
- }
- } */
-
- $sql = "SELECT * FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND block_type <>'D' AND func_num > $count";
- $fresult = $xoopsDB->query($sql);
- while ($fblock = $xoopsDB->fetchArray($fresult)) {
- $local_msgs[] = "Non Defined Block <b>".$fblock['name']."</b> will be deleted";
- $sql = "DELETE FROM ".$xoopsDB->prefix('newblocks')." WHERE bid='".$fblock['bid']."'";
- $iret = $xoopsDB->query($sql);
- }
-
- for ($i = 1 ; $i <= $count ; $i++) {
- $sql = "SELECT name,options FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND func_num=".$i." AND show_func='".addslashes($modversion['blocks'][$i]['show_func'])."' AND func_file='".addslashes($modversion['blocks'][$i]['file'])."'";
- $fresult = $xoopsDB->query($sql);
- $fblock = $xoopsDB->fetchArray($fresult);
- if ( isset( $fblock['options'] ) ) {
- $old_vals=explode("|",$fblock['options']);
- $def_vals=explode("|",$modversion['blocks'][$i]['options']);
- if (count($old_vals) == count($def_vals)) {
- $modversion['blocks'][$i]['options'] = $fblock['options'];
- $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be kept. (value = <b>".$fblock['options']."</b>)";
- } else if (count($old_vals) < count($def_vals)){
- for ($j=0; $j < count($old_vals); $j++) {
- $def_vals[$j] = $old_vals[$j];
- }
- $modversion['blocks'][$i]['options'] = implode("|",$def_vals);
- $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be kept and new option(s) are added. (value = <b>".$modversion['blocks'][$i]['options']."</b>)";
- } else {
- $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be reset to the default, because of some decrease of options. (value = <b>".$modversion['blocks'][$i]['options']."</b>)";
- }
- }
- }
- }
+ }
+ } */
- global $msgs , $myblocksadmin_parsed_updateblock ;
- if( ! empty( $msgs ) && empty( $myblocksadmin_parsed_updateblock ) ) {
- $msgs = array_merge( $msgs , $local_msgs ) ;
- $myblocksadmin_parsed_updateblock = true ;
- }
+ $sql = "SELECT * FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND block_type <>'D' AND func_num > $count";
+ $fresult = $xoopsDB->query($sql);
+ while ($fblock = $xoopsDB->fetchArray($fresult)) {
+ $local_msgs[] = "Non Defined Block <b>".$fblock['name']."</b> will be deleted";
+ $sql = "DELETE FROM ".$xoopsDB->prefix('newblocks')." WHERE bid='".$fblock['bid']."'";
+ $iret = $xoopsDB->query($sql);
+ }
-?>
\ No newline at end of file
+ for ($i = 1 ; $i <= $count ; ++$i) {
+ $sql = "SELECT name,options FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND func_num=".$i." AND show_func='".addslashes($modversion['blocks'][$i]['show_func'])."' AND func_file='".addslashes($modversion['blocks'][$i]['file'])."'";
+ $fresult = $xoopsDB->query($sql);
+ $fblock = $xoopsDB->fetchArray($fresult);
+ if ( isset( $fblock['options'] ) ) {
+ $old_vals=explode("|",$fblock['options']);
+ $def_vals=explode("|",$modversion['blocks'][$i]['options']);
+ if (count($old_vals) == count($def_vals)) {
+ $modversion['blocks'][$i]['options'] = $fblock['options'];
+ $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be kept. (value = <b>".$fblock['options']."</b>)";
+ } elseif (count($old_vals) < count($def_vals)) {
+ for ($j=0; $j < count($old_vals); $j++) {
+ $def_vals[$j] = $old_vals[$j];
+ }
+ $modversion['blocks'][$i]['options'] = implode("|",$def_vals);
+ $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be kept and new option(s) are added. (value = <b>".$modversion['blocks'][$i]['options']."</b>)";
+ } else {
+ $local_msgs[] = "Option's values of the block <b>".$fblock['name']."</b> will be reset to the default, because of some decrease of options. (value = <b>".$modversion['blocks'][$i]['options']."</b>)";
+ }
+ }
+ }
+ }
+
+ global $msgs , $myblocksadmin_parsed_updateblock ;
+ if ( ! empty( $msgs ) && empty( $myblocksadmin_parsed_updateblock ) ) {
+ $msgs = array_merge( $msgs , $local_msgs ) ;
+ $myblocksadmin_parsed_updateblock = true ;
+ }
Modified: XoopsModules/waiting/trunk/waiting/language/english/admin.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/language/english/admin.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/language/english/admin.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -12,4 +12,4 @@
// ModuleAdmin
define('_AM_WAITING_MISSING',"Error: The ModuleAdmin class is missing. Please install the ModuleAdmin Class into /Frameworks (see /docs/readme.txt)");
// Text for Admin footer
-define('_AM_WAITING_FOOTER',"<div class='center smallsmall italic pad5'>Waiting is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
\ No newline at end of file
+define('_AM_WAITING_FOOTER',"<div class='center smallsmall italic pad5'>Waiting is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>");
Modified: XoopsModules/waiting/trunk/waiting/language/english/blocks.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/language/english/blocks.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/language/english/blocks.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -7,4 +7,3 @@
define('_MB_WAITING_NOWAITING_DISPLAY',"Always displayed");
define('_MB_WAITING_SQL_CACHE',"SQL cache");
define('_MB_WAITING_LINKTOPLUGINCHECK',"check plugins");
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/language/english/modinfo.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/language/english/modinfo.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/language/english/modinfo.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -12,4 +12,4 @@
define('_MI_WAITING_BNAME1',"Waiting");
define('_MI_WAITING_MENU_HOME',"Home");
define('_MI_WAITING_MENU_ABOUT',"About");
-define('_MI_WAITING_MENU_PLUGINS',"Plugins");
\ No newline at end of file
+define('_MI_WAITING_MENU_PLUGINS',"Plugins");
Modified: XoopsModules/waiting/trunk/waiting/language/english/plugins.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/language/english/plugins.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/language/english/plugins.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -21,4 +21,3 @@
define('_PI_WAITING_NEWANSWERS',"New Answers");
define('_PI_WAITING_ANSWERED',"Answered");
define('_PI_WAITING_WAITINGS_FMT',"Waitings (%s)");
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/plugins/AMS.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/plugins/AMS.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/plugins/AMS.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,17 +1,19 @@
<?php
+/**
+ * @return array
+ */
function b_waiting_AMS()
{
- $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- $block = array();
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ $block = array();
- // AMS articles
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("ams_article")." WHERE published=0");
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/AMS/admin/index.php?op=newarticle";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
- }
+ // AMS articles
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("ams_article")." WHERE published=0");
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/AMS/admin/index.php?op=newarticle";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
+ }
- return $block;
+ return $block;
}
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/plugins/PDdownloads.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/plugins/PDdownloads.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/plugins/PDdownloads.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -8,42 +8,43 @@
# #
# Last modified on 21.04.2005 #
/*************************************************************************/
+/**
+ * @return array
+ */
function b_waiting_PDdownloads()
{
- $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- $ret = array() ;
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ $ret = array() ;
- // PDdownloads waiting
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_downloads")." WHERE status=0");
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/newdownloads.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
- }
- $ret[] = $block ;
+ // PDdownloads waiting
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_downloads")." WHERE status=0");
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/newdownloads.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
+ }
+ $ret[] = $block ;
- // PDdownloads broken
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_broken"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/brokendown.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_BROKENS ;
- }
- $ret[] = $block ;
+ // PDdownloads broken
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_broken"));
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/brokendown.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_BROKENS ;
+ }
+ $ret[] = $block ;
- // PDdownloads modreq
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_mod"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/modifications.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_MODREQS ;
- }
- $ret[] = $block ;
-
- return $ret;
+ // PDdownloads modreq
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDdownloads_mod"));
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDdownloads/admin/modifications.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_MODREQS ;
+ }
+ $ret[] = $block ;
+
+ return $ret;
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/plugins/PDlinks.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/plugins/PDlinks.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/plugins/PDlinks.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -8,42 +8,43 @@
# #
# Last modified on 21.04.2005 #
/*************************************************************************/
+/**
+ * @return array
+ */
function b_waiting_PDlinks()
{
- $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- $ret = array() ;
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ $ret = array() ;
- // PDlinks waiting
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_links")." WHERE status=0");
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/newlinks.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
- }
- $ret[] = $block ;
+ // PDlinks waiting
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_links")." WHERE status=0");
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/newlinks.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
+ }
+ $ret[] = $block ;
- // PDlinks broken
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_broken"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/brokenlink.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_BROKENS ;
- }
- $ret[] = $block ;
+ // PDlinks broken
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_broken"));
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/brokenlink.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_BROKENS ;
+ }
+ $ret[] = $block ;
- // PDlinks modreq
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_mod"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/index.php?op=listModReq";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_MODREQS ;
- }
- $ret[] = $block ;
+ // PDlinks modreq
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("PDlinks_mod"));
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/PDlinks/admin/index.php?op=listModReq";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_MODREQS ;
+ }
+ $ret[] = $block ;
- return $ret;
+ return $ret;
}
-
-?>
\ No newline at end of file
Modified: XoopsModules/waiting/trunk/waiting/plugins/TDMDownloads.php
===================================================================
--- XoopsModules/waiting/trunk/waiting/plugins/TDMDownloads.php 2014-03-17 00:21:17 UTC (rev 12387)
+++ XoopsModules/waiting/trunk/waiting/plugins/TDMDownloads.php 2014-03-17 13:42:27 UTC (rev 12388)
@@ -1,45 +1,47 @@
-<?php
-/*************************************************************************/
-# Waiting Contents Extensible #
-# Plugin for module TDMDownloads #
-# #
-# Author #
-# Danordesign - fly...@gm... #
-# #
-# Last modified on 19.10.2009 #
-/*************************************************************************/
-function b_waiting_tdmdownloads()
-{
- $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- $ret = array() ;
- // TDMdownloads waiting
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tdmdownloads_downloads")." WHERE status=0");
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/TDMDownloads/admin/downloads.php?op=liste&statut_display=0";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
- }
- $ret[] = $block ;
- // TDMDownloads broken
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tdmdownloads_broken"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/TDMDownloads/admin/broken.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_BROKENS ;
- }
- $ret[] = $block ;
- // TDMDownloads modreq
- $block = array();
- $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tdmdownloads_mod"));
- if ( $result ) {
- $block['adminlink'] = XOOPS_URL."/modules/TDMDownloads/admin/modified.php";
- list($block['pendingnum']) = $xoopsDB->fetchRow($result);
- $block['lang_linkname'] = _PI_WAITING_MODREQS ;
- }
- $ret[] = $block ;
-
- return $ret;
-}
-?>
\ No newline at end of file
+<?php
+/*************************************************************************/
+# Waiting Contents Extensible #
+# Plugin for module TDMDownloads #
+# #
+# Author #
+# Danordesign - fly...@gm... #
+# #
+# Last modified on 19.10.2009 #
+/*************************************************************************/
+/**
+ * @return array
+ */
+function b_waiting_tdmdownloads()
+{
+ $xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
+ $ret = array() ;
+ // TDMdownloads waiting
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tdmdownloads_downloads")." WHERE status=0");
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/TDMDownloads/admin/downloads.php?op=liste&statut_display=0";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_WAITINGS ;
+ }
+ $ret[] = $block ;
+ // TDMDownloads broken
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("tdmdownloads_broken"));
+ if ($result) {
+ $block['adminlink'] = XOOPS_URL."/modules/TDMDownloads/admin/broken.php";
+ list($block['pendingnum']) = $xoopsDB->fetchRow($result);
+ $block['lang_linkname'] = _PI_WAITING_BROKENS ;
+ }
+ $ret[] = $block ;
+ // TDMDownloads modreq
+ $block = array();
+ $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB-...
[truncated message content] |