You can subscribe to this list here.
| 2012 |
Jan
|
Feb
(214) |
Mar
(139) |
Apr
(198) |
May
(187) |
Jun
(151) |
Jul
(210) |
Aug
(169) |
Sep
(58) |
Oct
(53) |
Nov
(54) |
Dec
(301) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
(348) |
Feb
(178) |
Mar
(219) |
Apr
(154) |
May
(117) |
Jun
(194) |
Jul
(61) |
Aug
(132) |
Sep
(121) |
Oct
(110) |
Nov
(11) |
Dec
(18) |
| 2014 |
Jan
(34) |
Feb
(50) |
Mar
(82) |
Apr
(98) |
May
(39) |
Jun
(111) |
Jul
(67) |
Aug
(36) |
Sep
(33) |
Oct
(26) |
Nov
(53) |
Dec
(44) |
| 2015 |
Jan
(29) |
Feb
(47) |
Mar
(25) |
Apr
(19) |
May
(23) |
Jun
(20) |
Jul
(49) |
Aug
(7) |
Sep
(10) |
Oct
(10) |
Nov
(4) |
Dec
(25) |
| 2016 |
Jan
(8) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(7) |
Dec
(5) |
| 2017 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(15) |
Jun
|
Jul
(18) |
Aug
(24) |
Sep
|
Oct
(14) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
(22) |
Mar
|
Apr
(11) |
May
(1) |
Jun
(17) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(5) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <txm...@us...> - 2013-09-10 15:17:01
|
Revision: 12018
http://sourceforge.net/p/xoops/svn/12018
Author: txmodxoops
Date: 2013-09-10 15:16:57 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
Fixed javascript attribute tag language="Javascript"
Deleted because obsolete by the W3C Validator
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-10 13:16:27 UTC (rev 12017)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopseditor/tinymce/tinymce.php 2013-09-10 15:16:57 UTC (rev 12018)
@@ -329,10 +329,10 @@
if ($isTinyMceJsLoaded) {
$ret .= "<!-- 'tiny_mce.js' SCRIPT IS ALREADY LOADED -->\n"; //debug
} else {
- $ret .= "<script language='javascript' type='text/javascript' src='" . XOOPS_URL . $this->rootpath . "/tiny_mce.js'></script>\n";
+ $ret .= "<script type='text/javascript' src='" . XOOPS_URL . $this->rootpath . "/tiny_mce.js'></script>\n";
$isTinyMceJsLoaded = true;
}
- $ret .= "<script language='javascript' type='text/javascript'>\n";
+ $ret .= "<script type='text/javascript'>\n";
$ret .= "tinyMCE.init({\n";
// set options - start
foreach ($this->setting as $key => $val) {
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-10 13:16:27 UTC (rev 12017)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formdhtmltextarea.php 2013-09-10 15:16:57 UTC (rev 12018)
@@ -167,7 +167,7 @@
}
// Load javascript
if (empty($js_loaded)) {
- $javascript = (($this->js) ? '<script language="JavaScript" type="text/javascript">' . $this->js . '</script>' : '') . '<script language="JavaScript" type="text/javascript" src="' . XOOPS_URL . '/include/formdhtmltextarea.js"></script>';
+ $javascript = (($this->js) ? '<script type="text/javascript">' . $this->js . '</script>' : '') . '<script type="text/javascript" src="' . XOOPS_URL . '/include/formdhtmltextarea.js"></script>';
$ret = $javascript . $ret;
$js_loaded = true;
}
@@ -213,7 +213,7 @@
$textarea_id = $this->getName();
$hiddentext = $this->_hiddenText;
- $fontStr = "<script type=\"text/javascript\" language=\"JavaScript\">" . "var _editor_dialog = ''" . "+ '<select id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'SIZE\'>" . _SIZE . "</option>'";
+ $fontStr = "<script type=\"text/javascript\">" . "var _editor_dialog = ''" . "+ '<select id=\'{$textarea_id}Size\' onchange=\'xoopsSetElementAttribute(\"size\", this.options[this.selectedIndex].value, \"{$textarea_id}\", \"{$hiddentext}\");\'>'" . "+ '<option value=\'SIZE\'>" . _SIZE . "</option>'";
foreach($GLOBALS["formtextdhtml_sizes"] as $_val => $_name) {
$fontStr .= " + '<option value=\'{$_val}\'>{$_name}</option>'";
}
|
|
From: <wis...@us...> - 2013-09-10 13:16:32
|
Revision: 12017
http://sourceforge.net/p/xoops/svn/12017
Author: wishcraft
Date: 2013-09-10 13:16:27 +0000 (Tue, 10 Sep 2013)
Log Message:
-----------
Xortify Server 4.15 for XOOPS 2.6 - Client 4.15 for 2.6 (Production Copy)
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php
Added Paths:
-----------
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png 2013-09-10 13:16:27 UTC (rev 12017)
Property changes on: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/arck.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
===================================================================
(Binary files differ)
Index: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png 2013-09-10 13:16:27 UTC (rev 12017)
Property changes on: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/images/chronolabs.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/language/english/modinfo.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -224,7 +224,7 @@
//Version 4.02
define('_MI_XOR_NAME', 'Xortify');
- define('_MI_XOR_VERSION', '4.14');
+ define('_MI_XOR_VERSION', '4.15');
define('_MI_XOR_MODE_CLIENT', 'Client');
define('_MI_XOR_MODE_SERVER', 'Server');
define('_MI_XOR_USER_AGENT', '%s/%s %s Sector Network Security (%s)');
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/preloads/core.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -99,6 +99,11 @@
$result['took'] = microtime(true)-$result['when'];
XoopsCache::write('xortify_cleanup_last', $result, $GLOBALS['xoops']->getModuleConfig('xortify_ip_cache', 'xortify')*2);
}
+
+ if (isset($_POST)&&isset($_POST['xortify_check']) {
+ self::doSpamCheck($_POST, 'xortify_check');
+ }
+
if (isset($_SESSION['xortify']['lid']))
if ($_SESSION['xortify']['lid']==0)
unset($GLOBALS['xortify']);
@@ -201,6 +206,186 @@
}
return $filelist;
}
+
+ static public doSpamCheck($_from = array(), $source = 'xortify_check') {
+ $GLOBALS['xoops'] = Xoops::getInstance();
+
+ if (isset($_from[$source])) {
+
+ require_once( $GLOBALS['xoops']->path('/modules/xortify/class/'.$GLOBALS['xoops']->getModuleConfig('protocol', 'xortify').'.php') );
+ $func = strtoupper($GLOBALS['xoops']->getModuleConfig('protocol', 'xortify')).'XortifyExchange';
+ $soapExchg = new $func;
+
+ foreach ($_from[$source] as $id => $field) {
+ $field = str_replace('[]', '', $field);
+ if (is_array($_from[$field])) {
+ foreach ($_from[$field] as $id => $data) {
+ $result = $apiExchange->checkForSpam($data);
+ if ($result['spam']==true) {
+
+ $xortifycookie = unserialize($_COOKIE['xortify']);
+ if (isset($xortifycookie['spams']))
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] = $xortifycookie['xortify']['spams'];
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] = $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams'] + 1;
+ unset($_COOKIE['xortify']['spams']);
+ setcookie('xortify', serialise(array_merge($xortifycookie,array('spams' => $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY][_MI_XOR_VERSION]['spams']))), time()+3600*24*7*4*3);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
+
+ $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')'), 2, xortify_getIPData());
+
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars(xortify_getIPData($ip));
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'banned');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')');
+ $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+
+ $lid = $log_handler->insert($log, true);
+ XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
+ setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
+ header('Location: '.XOOPS_URL.'/banned.php');
+ exit(0);
+
+ } else {
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars($ipdata);
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'blocked');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+ $lid = $log_handler->insert($log, true);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ $module_handler = $xoops->getHandler('module');
+ $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
+
+ $GLOBALS['xoops']->header('module:xortify|xortify_spamming_notice.html');
+
+ addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
+ addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ }
+
+ $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
+ $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
+ $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
+ $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
+ $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
+ $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($data));
+ $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
+
+ $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
+
+ $GLOBALS['xoops']->footer();
+ }
+ exit(0);
+ }
+ }
+ } else {
+ $result = $apiExchange->checkForSpam($_from[$field]);
+ if ($result['spam']==true) {
+
+ if (isset($_COOKIE['xortify']['spams']))
+ $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
+ $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
+ setcookie('xortify', array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']), time()+3600*24*7*4*3);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
+
+ $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')'), 2, xortify_getIPData());
+
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars(xortify_getIPData($ip));
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'banned');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+
+ $lid = $log_handler->insert($log, true);
+ XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
+ $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
+ setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
+ header('Location: '.XOOPS_URL.'/banned.php');
+ exit(0);
+
+ } else {
+ $log_handler = xoops_getmodulehandler('log', 'xortify');
+ $log = $log_handler->create();
+ $log->setVars($ipdata);
+ $log->setVar('provider', basename(dirname(__FILE__)));
+ $log->setVar('action', 'blocked');
+ $log->setVar('extra', _XOR_SPAM . ' :: [' . $_from[$field] . '] len('.strlen($_from[$field]).')');
+ if (isset($GLOBALS['xoopsUser'])) {
+ $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
+ $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
+ }
+ $lid = $log_handler->insert($log, true);
+
+ $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
+
+ $module_handler = $xoops->getHandler('module');
+ $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
+
+ $GLOBALS['xoops']->header('xortify|xortify_spamming_notice.html');
+
+ addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
+ addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
+ }
+
+ $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
+ $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
+ $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
+ $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
+ $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
+ $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($_from[$field]));
+ $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
+
+ $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
+ $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
+
+ $GLOBALS['xoops']->footer();
+ }
+ exit(0);
+ }
+ }
+ }
+ }
+ }
}
?>
\ No newline at end of file
Modified: XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php 2013-09-09 22:17:28 UTC (rev 12016)
+++ XoopsCore/branches/2.6.x/2.6.0_xortify/htdocs/modules/xortify/providers/xortify/post.loader.php 2013-09-10 13:16:27 UTC (rev 12017)
@@ -135,175 +135,5 @@
}
}
- $GLOBALS['xoops'] = Xoops::getInstance();
- if (isset($_REQUEST['xortify_check'])) {
- foreach ($_REQUEST['xortify_check'] as $id => $field) {
- $field = str_replace('[]', '', $field);
- if (is_array($_REQUEST[$field])) {
- foreach ($_REQUEST[$field] as $id => $data) {
- $result = $apiExchange->checkForSpam($data);
- if ($result['spam']==true) {
-
- if (isset($_COOKIE['xortify']['spams']))
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
- unset($_COOKIE['xortify']['spams']);
- setcookie('xortify', array_merge($_COOKIE['xortify'],array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'])), time()+3600*24*7*4*3);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
-
- $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')'), 2, xortify_getIPData());
-
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars(xortify_getIPData($ip));
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'banned');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $data . '] len('.strlen($data).')');
- $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
-
- $lid = $log_handler->insert($log, true);
- XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
- $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
- setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
- header('Location: '.XOOPS_URL.'/banned.php');
- exit(0);
-
- } else {
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars($ipdata);
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'blocked');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
- $lid = $log_handler->insert($log, true);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- $module_handler = $xoops->getHandler('module');
- $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
-
- $GLOBALS['xoops']->header('module:xortify|xortify_spamming_notice.html');
-
- addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
- addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- }
-
- $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
- $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
- $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
- $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
- $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
- $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($data));
- $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
-
- $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
-
- $GLOBALS['xoops']->footer();
- }
- exit(0);
- }
- }
- } else {
- $result = $apiExchange->checkForSpam($_REQUEST[$field]);
- if ($result['spam']==true) {
-
- if (isset($_COOKIE['xortify']['spams']))
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_COOKIE['xortify']['spams'];
- $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] = $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams'] + 1;
- setcookie('xortify', array('spams' => $_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']), time()+3600*24*7*4*3);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- if ($_SESSION['xortify'][XORTIFY_INSTANCE_KEY]['spams']>=$GLOBALS['xoops']->getModuleConfig('spams_allowed', 'xortify')) {
-
- $results[] = $apiExchange->sendBan(array('comment'=>_XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')'), 2, xortify_getIPData());
-
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars(xortify_getIPData($ip));
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'banned');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- $log->setVar('agent', $_SERVER['HTTP_USER_AGENT']);
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
-
- $lid = $log_handler->insert($log, true);
- XoopsCache::write('xortify_core_include_common_end', array('time'=>microtime(true)), $GLOBALS['xoops']->getModuleConfig('fault_delay', 'xortify'));
- $GLOBALS['xortify'][XORTIFY_INSTANCE_KEY] = $lid;
- setcookie('xortify', array('lid' => $lid), time()+3600*24*7*4*3);
- header('Location: '.XOOPS_URL.'/banned.php');
- exit(0);
-
- } else {
- $log_handler = xoops_getmodulehandler('log', 'xortify');
- $log = $log_handler->create();
- $log->setVars($ipdata);
- $log->setVar('provider', basename(dirname(__FILE__)));
- $log->setVar('action', 'blocked');
- $log->setVar('extra', _XOR_SPAM . ' :: [' . $_REQUEST[$field] . '] len('.strlen($_REQUEST[$field]).')');
- if (isset($GLOBALS['xoopsUser'])) {
- $log->setVar('email', $GLOBALS['xoopsUser']->getVar('email'));
- $log->setVar('uname', $GLOBALS['xoopsUser']->getVar('uname'));
- }
- $lid = $log_handler->insert($log, true);
-
- $GLOBALS['xoops']->loadLanguage('ban', 'xortify');
-
- $module_handler = $xoops->getHandler('module');
- $GLOBALS['xortifyModule'] = $module_handler->getByDirname('xortify');
-
- $GLOBALS['xoops']->header('xortify|xortify_spamming_notice.html');
-
- addmeta_googleanalytics(_XOR_MI_XOOPS_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- if (defined('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS')&&strlen(constant('_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS'))>=13) {
- addmeta_googleanalytics(_XOR_MI_CLIENT_GOOGLE_ANALYTICS_ACCOUNTID_FAILEDTOPASS, $_SERVER['HTTP_HOST']);
- }
-
- $GLOBALS['xoops']->tpl->assign('xoops_pagetitle', _XOR_SPAM_PAGETITLE);
- $GLOBALS['xoops']->tpl->assign('description', _XOR_SPAM_DESCRIPTION);
- $GLOBALS['xoops']->tpl->assign('version', $GLOBALS['xortifyModule']->getVar('version')/100);
- $GLOBALS['xoops']->tpl->assign('platform', XOOPS_VERSION);
- $GLOBALS['xoops']->tpl->assign('provider', basename(dirname(__FILE__)));
- $GLOBALS['xoops']->tpl->assign('spam', htmlspecialchars($_REQUEST[$field]));
- $GLOBALS['xoops']->tpl->assign('agent', $_SERVER['HTTP_USER_AGENT']);
-
- $GLOBALS['xoops']->tpl->assign('xoops_lblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_rblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_ccblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_clblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_crblocks', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showlblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showrblock', false);
- $GLOBALS['xoops']->tpl->assign('xoops_showcblock', false);
-
- $GLOBALS['xoops']->footer();
- }
- exit(0);
- }
- }
- }
- }
?>
\ No newline at end of file
|
|
From: <luc...@us...> - 2013-09-09 22:17:32
|
Revision: 12016
http://sourceforge.net/p/xoops/svn/12016
Author: luciorota
Date: 2013-09-09 22:17:28 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
renamed some functions
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -97,7 +97,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize') < 300) {
+ if (wfdownloads_checkModule('formulize') < 300) {
$formulize_fid = (isset($_POST["formulize_fid"])) ? (int)$_POST["formulize_fid"] : 0;
}
// Added Formulize module support (2006/05/04) jpc - end
@@ -115,7 +115,7 @@
$category->setVar('spotlighttop', $spotlighttop);
$category->setVar('imgurl', $imgurl);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$category->setVar('formulize_fid', $formulize_fid);
}
// Added Formulize module support (2006/05/04) jpc - end
@@ -127,8 +127,8 @@
if ($cid == 0) {
$newid = (int)$category->getVar('cid');
}
- wfd_save_Permissions($down_groups, $newid, 'WFDownCatPerm');
- wfd_save_Permissions($up_groups, $newid, 'WFUpCatPerm');
+ wfdownloads_savePermissions($down_groups, $newid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $newid, 'WFUpCatPerm');
/**
* Notify of new category
*/
@@ -140,8 +140,8 @@
$database_mess = _AM_WFD_CCATEGORY_CREATED;
} else {
$database_mess = _AM_WFD_CCATEGORY_MODIFIED;
- wfd_save_Permissions($down_groups, $cid, 'WFDownCatPerm');
- wfd_save_Permissions($up_groups, $cid, 'WFUpCatPerm');
+ wfdownloads_savePermissions($down_groups, $cid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $cid, 'WFUpCatPerm');
}
redirect_header($currentFile, 1, $database_mess);
break;
@@ -229,9 +229,9 @@
$adminMenu->addItemButton(_AM_WFD_CCATEGORY_CREATENEW, "{$currentFile}?op=category.add", 'add');
echo $adminMenu->renderButton();
- $totalCategories = wfd_totalcategory();
+ $totalCategories = wfdownloads_categoriesCount();
if ($totalCategories > 0) {
- $sorted_categories = wfd_sortCategories();
+ $sorted_categories = wfdownloads_sortCategories();
$GLOBALS['xoopsTpl']->assign('sorted_categories', $sorted_categories);
$GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() );
$GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_categorieslist.html");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -76,14 +76,14 @@
case "delVote":
$rating = $wfdownloads->getHandler('rating')->get($_GET['rid']);
if ($wfdownloads->getHandler('rating')->delete($rating, true)) {
- wfd_updaterating(intval($rating->getVar('lid')));
+ wfdownloads_updateRating(intval($rating->getVar('lid')));
}
redirect_header($currentFile, 1, _AM_WFD_VOTE_VOTEDELETED);
break;
// Added Formulize module support (2006/05/04) jpc - start
case "patch_formulize":
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(!isset($_POST['patch_formulize'])) {
print "<form action=\"{$currentFile}?op=patch_formulize\" method=post>";
print "<input type = submit name=patch_formulize value=\"Apply Patch for Formulize\">";
@@ -144,7 +144,7 @@
$start_expired = WfdownloadsRequest::getInt('start_expired', 0);
$start_offline = WfdownloadsRequest::getInt('start_offline', 0);
- $totalcats = wfd_totalcategory();
+ $totalcats = wfdownloads_categoriesCount();
$categories = $wfdownloads->getHandler('category')->getObjects(null, true, false);
$totalDownloadsCount = $wfdownloads->getHandler('download')->getCount();
@@ -333,7 +333,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (!wfdownload_checkModule('formulize')) {
+ if (!wfdownloads_checkModule('formulize')) {
$sform = $download->getAdminForm($title);
} elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) {
$fid = $category->getVar('formulize_fid');
@@ -348,7 +348,7 @@
$customArray['entry'] = $download->getVar('formulize_idreq');
$customArray['go_back'] = "";
$customArray['parentLinks'] = "";
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entry);
else
$owner = getEntryOwner($entry, $fid);
@@ -652,7 +652,7 @@
$category = $wfdownloads->getHandler('category')->get($cid);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$fid = $category->getVar('formulize_fid');
if($fid) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formread.php";
@@ -661,7 +661,7 @@
if ($lid) {
$entries[$fid][0] = $download->getVar('formulize_idreq');
if($entries[$fid][0]) {
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entries[$fid][0]);
else
$owner = getEntryOwner($entries[$fid][0], $fid);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -132,6 +132,6 @@
$iform->addElement($dup_tray);
}
$iform->display();
- echo wfd_serverstats();
+ echo wfdownloads_serverStats();
include_once "admin_footer.php";
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -28,7 +28,7 @@
$indexAdmin = new ModuleAdmin();
//--------------------------
-$totalcats = wfd_totalcategory();
+$totalcats = wfdownloads_categoriesCount();
$totalbrokendownloads = $wfdownloads->getHandler('report')->getCount();
$totalmodrequests = $wfdownloads->getHandler('modification')->getCount();
$newreviews = $wfdownloads->getHandler('review')->getCount();
@@ -120,7 +120,7 @@
$indexAdmin->addConfigBoxLine('');
$redirectFile = $_SERVER['PHP_SELF'];
-if (!wfdownload_checkModule('formulize'))
+if (!wfdownloads_checkModule('formulize'))
$indexAdmin->addConfigBoxLine(_AM_WFD_FORMULIZE_NOT_AVILABLE);
else
$indexAdmin->addConfigBoxLine(_AM_WFD_FORMULIZE_AVAILABLE);
@@ -156,6 +156,6 @@
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
- echo wfd_serverstats();
+ echo wfdownloads_serverStats();
include_once "admin_footer.php";
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -27,7 +27,7 @@
$rid = WfdownloadsRequest::getInt('rid', 0);
$lid = WfdownloadsRequest::getInt('lid', 0);
$wfdownloads->getHandler('rating')->deleteAll(new Criteria("ratingid", $rid), true);
- wfd_updaterating($lid);
+ wfdownloads_updateRating($lid);
redirect_header($currentFile, 1, _AM_WFD_VOTEDELETED);
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -109,7 +109,7 @@
include XOOPS_ROOT_PATH . '/header.php';
// Begin Main page Heading etc
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -83,7 +83,7 @@
$form->addElement(new XoopsFormText(_AM_WFD_FCATEGORY_TITLE, 'title', 50, 255, $this->getVar('title', 'e')), true);
- $totalcats = wfd_totalcategory();
+ $totalcats = wfdownloads_categoriesCount();
if ($totalcats > 0) {
$categories = $this->wfdownloads->getHandler('category')->getObjects();
$categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
@@ -139,7 +139,7 @@
$form->addElement($options_tray);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$fids = allowedForms();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -148,7 +148,7 @@
$download['path'] = $this->wfdownloads->getHandler('category')->getNicePath($download['cid']);
- $download['imageheader'] = wfd_imageheader();
+ $download['imageheader'] = wfdownloads_headerImage();
$download['title'] = trim($this->getVar('title'));
$download['url'] = $this->getVar('url');
@@ -159,7 +159,7 @@
$download['screenshot_full'] = $this->getVar('screenshot');
if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb'] = down_createthumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb'] = wfdownloads_createThumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
@@ -170,7 +170,7 @@
$download['screenshot_full2'] = $this->getVar('screenshot2');
if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb2'] = down_createthumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb2'] = wfdownloads_createThumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb2'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
@@ -181,7 +181,7 @@
$download['screenshot_full3'] = $this->getVar('screenshot3');
if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb3'] = down_createthumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb3'] = wfdownloads_createThumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb3'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
@@ -192,7 +192,7 @@
$download['screenshot_full4'] = $this->getVar('screenshot4');
if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb4'] = down_createthumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb4'] = wfdownloads_createThumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb4'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
@@ -223,7 +223,7 @@
} else {
$download['version'] = 0;
}
- $download['downtime'] = wfdownloads_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
+ $download['downtime'] = wfdownloads_getDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
$download['downtime'] = str_replace("|", "<br />", $download['downtime']);
$download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
@@ -312,7 +312,7 @@
$download['review_average_rating'] = $averageReviewsRating; // new
$download['review_rateimg'] = 'rate' . round(number_format($averageReviewsRating, 0) / 2) . '.gif'; // this definition is not removed for compatibility issues
- $download['icons'] = wfd_displayicons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
+ $download['icons'] = wfdownloads_displayIcons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
$sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $download['id'] . "' AND submit = '1'";
$results3 = $xoopsDB->query($sql3);
@@ -934,7 +934,7 @@
xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$download->getVar('lid'));
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') AND $download->getVar('formulize_idreq') > 0) {
include_once XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php';
//deleteFormEntries(array($download->getVar('formulize_idreq')));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -32,7 +32,7 @@
-function wfdownloads_CleanVars(&$global, $key, $default = '', $type = 'int') {
+function wfdownloads_cleanVars(&$global, $key, $default = '', $type = 'int') {
switch ($type) {
case 'array':
$ret = (isset($global[$key]) && is_array($global[$key])) ? $global[$key] : $default;
@@ -264,7 +264,7 @@
* @access public
* @author luciorota
*/
-function wfdownload_checkModule($dirname) {
+function wfdownloads_checkModule($dirname) {
if (!xoops_isActiveModule($dirname)) {
return false;
}
@@ -285,7 +285,7 @@
* @access public
* @author luciorota
*/
-function wfd_sortCategories($pid = 0, $level = 0)
+function wfdownloads_sortCategories($pid = 0, $level = 0)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -301,19 +301,16 @@
$pid = $subCategory->getVar('pid');
$cid = $subCategory->getVar('cid');
$sorted[] = array('pid' => $pid, 'cid' => $cid, 'level' => $level, 'category' => $subCategory->toArray());
- if ($subSorted = wfd_sortCategories($cid, $level)) {
+ if ($subSorted = wfdownloads_sortCategories($cid, $level)) {
$sorted = array_merge($sorted, $subSorted);
}
}
}
return $sorted;
}
-function wfdownloads_sortCategories($pid = 0, $level = 0)
-{
- wfd_sortCategories($pid, $level);
-}
+
/**
* Create download by letter choice bar/menu
* updated starting from this idea http://xoops.org/modules/news/article.php?storyid=6497
@@ -414,7 +411,7 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_TableExists($table)
+function wfdownloads_tableExists($table)
{
$bRetVal = false;
//Verifies that a MySQL table exists
@@ -445,7 +442,7 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_GetMeta($key)
+function wfdownloads_getMeta($key)
{
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
$sql = sprintf("SELECT metavalue FROM %s WHERE metakey=%s", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($key));
@@ -471,10 +468,10 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_SetMeta($key, $value)
+function wfdownloads_setMeta($key, $value)
{
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- if($ret = wfdownloads_GetMeta($key)){
+ if($ret = wfdownloads_getMeta($key)){
$sql = sprintf("UPDATE %s SET metavalue = %s WHERE metakey = %s", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key));
} else {
$sql = sprintf("INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value));
@@ -488,7 +485,7 @@
-function &wfdownloads_gethandler($name, $optional = false )
+function wfdownloads_getHandler($name, $optional = false )
{
static $handlers;
$name = strtolower(trim($name));
@@ -609,7 +606,7 @@
* @param $perm_name
* @return
**/
-function wfd_save_Permissions($groups, $id, $permName)
+function wfdownloads_savePermissions($groups, $id, $permName)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -636,7 +633,7 @@
*
* @return
**/
-function wfd_toolbar()
+function wfdownloads_toolbar()
{
global $xoopsUser;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -663,11 +660,11 @@
/**
- * wfd_serverstats()
+ * wfdownloads_serverStats()
*
* @return
**/
-function wfd_serverstats()
+function wfdownloads_serverStats()
{
global $xoopsDB;
$html = "";
@@ -724,7 +721,7 @@
* @param integer $counter
* @return
*/
-function wfd_displayicons($time, $status = 0, $counter = 0)
+function wfdownloads_displayIcons($time, $status = 0, $counter = 0)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -844,45 +841,44 @@
/**
* updaterating()
*
- * @param $sel_id
+ * @param $lid
* @return updates rating data in itemtable for a given item
**/
-function wfd_updaterating($sel_id)
+function wfdownloads_updateRating($lid)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
- $ratings = $wfdownloads->getHandler('rating')->getObjects(new Criteria("lid", intval($sel_id)));
- $votesDB = count($ratings);
- $totalrating = 0;
- foreach (array_keys($ratings) as $i) {
- $totalrating += $ratings[$i]->getVar('rating');
+ $ratings = $wfdownloads->getHandler('rating')->getObjects(new Criteria('lid', (int)$lid));
+ $ratings_count = count($ratings);
+ $totalRating = 0;
+ foreach ($ratings as $rating) {
+ $totalRating += $rating->getVar('rating');
}
- $finalrating = $totalrating / $votesDB;
- $finalrating = number_format($finalrating, 4);
- $download = $wfdownloads->getHandler('download')->get($sel_id);
- $download->setVar("rating", $finalrating);
- $download->setVar('votes', $votesDB);
+ $averageRating = $totalRating / $ratings_count;
+ $averageRating = number_format($averageRating, 4);
+ $download = $wfdownloads->getHandler('download')->get($lid);
+ $download->setVar('rating', $averageRating);
+ $download->setVar('votes', $ratings_count);
$wfdownloads->getHandler('download')->insert($download);
}
/**
- * totalcategory()
+ * wfdownloads_categoriesCount()
*
- * @param integer $pid
* @return
**/
-function wfd_totalcategory()
+function wfdownloads_categoriesCount()
{
global $xoopsUser;
+ $gperm_handler = xoops_gethandler('groupperm');
$wfdownloads = WfdownloadsWfdownloads::getInstance();
$groups = (is_object($xoopsUser)) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
- $gperm_handler = & xoops_gethandler('groupperm');
- $allowed_cats = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
- return count($allowed_cats);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+ return count($allowedDownCategoriesIds);
}
@@ -894,24 +890,23 @@
* @param integer $get_child
* @return the total number of items in items table that are accociated with a given table $table id
**/
-function wfd_getTotalItems($sel_id = 0, $ids = array())
+function wfdownloads_getTotalDownloads($cid = 0, $cids = array())
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
- $sel_id = intval($sel_id);
- $criteria = new CriteriaCompo(new Criteria("offline", 0));
+ $criteria = new CriteriaCompo(new Criteria('offline', false));
$criteria->add(new Criteria('published', 0, '>'));
- $criteria->add(new Criteria('published', time(), "<="));
- $expired_criteria = new CriteriaCompo(new Criteria('expired', 0));
- $expired_criteria->add(new Criteria("expired", time(), ">="), "OR");
- $criteria->add($expired_criteria);
- if ($sel_id > 0) {
- $criteria->add(new Criteria("cid", $sel_id));
+ $criteria->add(new Criteria('published', time(), '<='));
+ $expiredCriteria = new CriteriaCompo(new Criteria('expired', 0));
+ $expiredCriteria->add(new Criteria('expired', time(), '>='), 'OR');
+ $criteria->add($expiredCriteria);
+ if ($cid > 0) {
+ $criteria->add(new Criteria('cid', (int)$cid));
}
- if (count($ids) > 0) {
- $criteria->add(new Criteria("cid", "(".implode(',', $ids).")", "IN"));
+ if (count($cids) > 0) {
+ $criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
}
- $criteria->setGroupby("cid");
+ $criteria->setGroupby('cid');
$info['published'] = $wfdownloads->getHandler('download')->getMaxPublishdate($criteria);
$info['count'] = $wfdownloads->getHandler('download')->getCount($criteria);
@@ -920,23 +915,23 @@
-function wfd_imageheader()
+function wfdownloads_headerImage()
{
global $xoopsDB;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
$image = '';
- $result = $xoopsDB -> query("SELECT indeximage, indexheading FROM " . $xoopsDB -> prefix("wfdownloads_indexpage ") . " ");
+ $result = $xoopsDB -> query("SELECT indeximage, indexheading FROM " . $xoopsDB -> prefix('wfdownloads_indexpage') . " ");
list($indexImage, $indexHeading) = $xoopsDB -> fetchrow($result);
if (!empty($indeximage)) {
- $image = wfd_displayimage($indexImage, "'index.php'", $wfdownloads->getConfig('mainimagedir'), $indexHeading);
+ $image = wfdownloads_displayImage($indexImage, 'index.php', $wfdownloads->getConfig('mainimagedir'), $indexHeading);
}
return $image;
}
-function wfd_displayimage($image = '', $path = '', $imgSource = '', $altText = '')
+function wfdownloads_displayImage($image = '', $href = '', $imgSource = '', $altText = '')
{
global $xoopsUser;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -944,19 +939,22 @@
$showImage = '';
// Check to see if link is given
- if ($path) {
- $showImage = "<a href=" . $path . ">";
+ if ($href) {
+ $showImage = "<a href='{$href}'>";
}
// checks to see if the file is valid else displays default blank image
- if (!is_dir(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image) && file_exists(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image)) {
- $showImage .= "<img src='" . XOOPS_URL . "/" . $imgSource . "/" . $image . "' border='0' alt='" . $altText . "' /></a>";
+ if (!is_dir(XOOPS_ROOT_PATH . '/'' . $imgSource . '/'' . $image) && file_exists(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image)) {
+ $showImage .= "<img src='" . XOOPS_URL . "/{$imgSource}/{$image}' border='0' alt='{$altText}' />";
} else {
if ($xoopsUser && $xoopsUser->isAdmin($wfdownloads->getModule()->mid())) {
- $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/brokenimg.png' alt='" . _MD_WFD_ISADMINNOTICE . "' /></a>";
+ $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/brokenimg.png' alt='" . _MD_WFD_ISADMINNOTICE . "' />";
} else {
- $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/blank.png' alt=" . $altText . " /></a>";
+ $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/blank.gif' alt='{$altText}' />";
}
}
+ if ($href) {
+ $showImage.= "</a>";
+ }
clearstatcache();
return $showImage;
}
@@ -964,7 +962,7 @@
/**
- * down_createthumb()
+ * wfdownloads_createThumb()
*
* @param $img_name
* @param $img_path
@@ -976,7 +974,7 @@
* @param integer $aspect
* @return
**/
-function down_createthumb($imgName, $imgPath, $imgSavePath, $width = 100, $height = 100, $quality = 100, $update = 0, $aspect = 1)
+function wfdownloads_createThumb($imgName, $imgPath, $imgSavePath, $width = 100, $height = 100, $quality = 100, $update = 0, $aspect = 1)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -1095,7 +1093,7 @@
// This function is used to show some different download times
// BCMATH-Support in PHP needed!
// (c)02.04.04 by St@neCold, sto...@cs..., http://www.csgui.de
-function wfdownloads_GetDownloadTime($size = 0, $gmodem = 1, $gisdn = 1, $gdsl = 1, $gslan = 0, $gflan = 0)
+function wfdownloads_getDownloadTime($size = 0, $gmodem = 1, $gisdn = 1, $gdsl = 1, $gslan = 0, $gflan = 0)
{
$aflag = array();
$amtime = array();
@@ -1144,7 +1142,7 @@
-function wfd_strrrchr($haystack, $needle)
+function wfdownloads_strrrchr($haystack, $needle)
{
return substr($haystack, 0, strpos($haystack, $needle) + 1);
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -49,7 +49,7 @@
} else {
echo $feedback;
}
- wfdownloads_SetMeta("version", "3.23"); //Set meta version to current
+ wfdownloads_setMeta("version", "3.23"); //Set meta version to current
return true;
}
@@ -146,7 +146,7 @@
function update_tables_to_322($module) {
$dbupdater = new WfdownloadsDbupdater();
- if (!wfdownloads_TableExists('wfdownloads_meta')) {
+ if (!wfdownloads_tableExists('wfdownloads_meta')) {
// Create table wfdownloads_meta
$table = new WfdownloadsTable('wfdownloads_meta');
$table->setStructure("CREATE TABLE %s (
@@ -160,7 +160,7 @@
}
}
- if (!wfdownloads_TableExists('wfdownloads_mirrors')) {
+ if (!wfdownloads_tableExists('wfdownloads_mirrors')) {
// Create table wfdownloads_mirror
$table = new WfdownloadsTable('wfdownloads_mirrors');
$table->setStructure("CREATE TABLE %s (
@@ -182,7 +182,7 @@
}
}
- if (!wfdownloads_TableExists('wfdownloads_ip_log')) {
+ if (!wfdownloads_tableExists('wfdownloads_ip_log')) {
// Create table wfdownloads_ip_log
$table = new WfdownloadsTable('wfdownloads_ip_log');
$table->setStructure("CREATE TABLE %s (
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -75,7 +75,7 @@
// With custom forms, because a multi term query using AND could have some terms match only custom form fields and other terms match only native wf-downloads fields, each term must be evaluated independently, across both modules, and then if an AND operator is in effect, the intersection of the results is returned. If OR is in effect, then all results are returned.
// Determine what the custom forms are that need searching, if any
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$fids = array();
foreach($allowedDownCategoriesIds as $cid) {
$category = $wfdownloads->getHandler('category')->get($cid);
@@ -114,7 +114,7 @@
$saved_ids = array();
// Find all IDs of entries in all custom forms which match the current term
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
foreach($fids as $fid) {
if(!isset($formulizeElements_handler)) {
$formulizeElements_handler = xoops_getmodulehandler('elements', 'formulize');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -68,7 +68,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
-$catarray['imageheader'] = wfd_imageheader();
+$catarray['imageheader'] = wfdownloads_headerImage();
$catarray['indexheaderalign'] = $head_arr['indexheaderalign'];
$catarray['indexfooteralign'] = $head_arr['indexfooteralign'];
$html = ($head_arr['nohtml']) ? 1 : 0;
@@ -79,14 +79,14 @@
$catarray['indexheader'] = $myts->displayTarea($head_arr['indexheader'], $html, $smiley, $xcodes, $images, $breaks);
$catarray['indexfooter'] = $myts->displayTarea($head_arr['indexfooter'], $html, $smiley, $xcodes, $images, $breaks);
$catarray['letters'] = wfdownloads_lettersChoice();
-$catarray['toolbar'] = wfd_toolbar();
+$catarray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catarray);
// Begin Main page download info
$chcount = 0;
$countin = 0;
-$listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
+$listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
// Get total amount of categories
$total_cat = count($allowedDownCategoriesIds);
@@ -141,7 +141,7 @@
$isNewImage = wfdownloads_isNewImage($publishdate);
if (($mainCategories[$i]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
"thumbs", $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -69,7 +69,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoopsTpl->assign('category_path', $wfdownloads->getHandler('category')->getNicePath($cid));
$xoopsTpl->assign('category_id', $cid);
@@ -176,7 +176,7 @@
$breadcrumb->addLink(_MD_WFD_ADDMIRROR, '');
echo $breadcrumb->render();
- echo "<div align='center'>" . wfd_imageheader() . "</div><br />\n";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div><br />\n";
echo "<div>" . _MD_WFD_MIRROR_SNEWMNAMEDESC . "</div>\n";
// Generate form
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -30,9 +30,9 @@
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
-$catArray['imageheader'] = wfd_imageheader();
+$catArray['imageheader'] = wfdownloads_headerImage();
$catArray['letters'] = wfdownloads_lettersChoice();
-$catArray['toolbar'] = wfd_toolbar();
+$catArray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catArray);
// Breadcrumb
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -97,7 +97,7 @@
$rating->setVar('ratingtimestamp', time());
if ($wfdownloads->getHandler('rating')->insert($rating)) {
// All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB.
- wfd_updaterating($lid);
+ wfdownloads_updateRating($lid);
$thankyouMessage = _MD_WFD_VOTEAPPRE . "<br />" . sprintf(_MD_WFD_THANKYOU, $xoopsConfig['sitename']);
redirect_header("singlefile.php?cid={$cid}&lid={$lid}", 4, $thankyouMessage);
} else {
@@ -145,7 +145,7 @@
$xoopsTpl->assign('voteform', $sform->render());
$xoopsTpl->assign('download', array('lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'description' => $download->getVar('description')));
- $xoopsTpl->assign('file', array('id' => $lid, 'lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'imageheader' => wfd_imageheader())); // this definition is not removed for compatibility issues
+ $xoopsTpl->assign('file', array('id' => $lid, 'lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'imageheader' => wfdownloads_headerImage())); // this definition is not removed for compatibility issues
include 'footer.php';
}
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/review.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -66,7 +66,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoopsTpl->assign('category_path', $wfdownloads->getHandler('category')->getNicePath($cid));
$xoopsTpl->assign('category_id', $cid);
@@ -149,7 +149,7 @@
$breadcrumb->addLink(_MD_WFD_REVIEWTHISFILE, '');
echo $breadcrumb->render();
- echo "<div align='center'>" . wfd_imageheader() . "</div><br />\n";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div><br />\n";
echo "<div>" . _MD_WFD_REV_SNEWMNAMEDESC . "</div>\n";
// Generate form
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -63,7 +63,7 @@
if (
$wfdownloads->getConfig('usethumbs') &&
function_exists('gd_info')) {
- $imgurl = down_createthumb($category->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imgurl = wfdownloads_createThumb($category->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -84,7 +84,7 @@
// Added Formulize module support (2006/03/06, 2006/03/08) jpc - start
$formulize_idreq = $download->getVar('formulize_idreq');
-if(wfdownload_checkModule('formulize') && $formulize_idreq) {
+if(wfdownloads_checkModule('formulize') && $formulize_idreq) {
$xoopsTpl->assign('custom_form', 1);
include_once XOOPS_ROOT_PATH . '/modules/formulize/include/extract.php';
// get the form id and id_req of the user's entry
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -86,7 +86,7 @@
$filename = $down['filename'];
$filetype = $_FILES['userfile']['type'];
$title = $_FILES['userfile']['name'];
- $title = rtrim(wfd_strrrchr($title, "."), ".");
+ $title = rtrim(wfdownloads_strrrchr($title, "."), ".");
$title = (isset($_POST['title_checkbox']) && $_POST['title_checkbox'] == 1) ? $title : trim($_POST['title']);
}
// Load screenshot
@@ -199,7 +199,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
// Now that the $download object has been instantiated, handle the Formulize part of the submission...
$category = $wfdownloads->getHandler('category')->get($cid);
$fid = $category->getVar('formulize_fid');
@@ -210,7 +210,7 @@
if ($lid) {
$entries[$fid][0] = $download->getVar('formulize_idreq');
if ($entries[$fid][0]) {
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entries[$fid][0]);
else
$owner = getEntryOwner($entries[$fid][0], $fid);
@@ -386,7 +386,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
// Breadcrumb
@@ -395,7 +395,7 @@
$breadcrumb->addLink(_MD_WFD_SUBMITDOWNLOAD, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('image_header', wfdownloads_headerImage());
$xoopsTpl->assign('down_disclaimer', false);
$xoopsTpl->assign('disclaimer', $myts->displayTarea($wfdownloads->getConfig('disclaimer'), 1, 1, 1, 1, 1));
$xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
@@ -436,7 +436,7 @@
$category = $wfdownloads->getHandler('category')->get($cid);
$fid = $category->getVar('formulize_fid');
$customArray = array();
- if (wfdownload_checkModule('formulize') && $fid) {
+ if (wfdownloads_checkModule('formulize') && $fid) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php";
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$customArray['fid'] = $fid;
@@ -446,7 +446,7 @@
$customArray['entry'] = $download->getVar('formulize_idreq');
$customArray['go_back'] = '';
$customArray['parentLinks'] = '';
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entry);
else
$owner = getEntryOwner($entry, $fid);
@@ -454,7 +454,7 @@
$customArray['owner_groups'] = $owner_groups;
}
$sform = $download->getForm($customArray);
- } elseif (wfdownload_checkModule('formulize')) {
+ } elseif (wfdownloads_checkModule('formulize')) {
$sform = $download->getCategoryForm();
} else {
$sform = $download->getForm();
@@ -467,7 +467,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
// Breadcrumb
$breadcrumb = new WfdownloadsBreadcrumb();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -39,9 +39,9 @@
$thisselected = $action_array[$sort];
$sortDB = $list_array[$thisselected];
-$catarray['imageheader'] = wfd_imageheader();
+$catarray['imageheader'] = wfdownloads_headerImage();
$catarray['letters'] = wfdownloads_lettersChoice();
-$catarray['toolbar'] = wfd_toolbar();
+$catarray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl -> assign('catarray', $catarray);
$arr = array();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -80,7 +80,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
-if (wfdownload_checkModule('formulize')) {
+if (wfdownloads_checkModule('formulize')) {
$formulize_fid = $category->getVar('formulize_fid');
if($formulize_fid)
$xoopsTpl->assign('custom_form', true);
@@ -90,9 +90,9 @@
// Added Formulize module support (2006/05/04) jpc - end
// Generate Header
-$catArray['imageheader'] = wfd_imageheader();
+$catArray['imageheader'] = wfdownloads_headerImage();
$catArray['letters'] = wfdownloads_lettersChoice();
-$catArray['toolbar'] = wfd_toolbar();
+$catArray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catArray);
$xoopsTpl->assign('categoryPath', $wfdownloads->getHandler('category')->getNicePath($cid)); // this definition is not removed for compatibility issues
@@ -120,7 +120,7 @@
$allSubcategories = $categoriesTree->getFirstChild($cid);
if (is_array($allSubcategories) > 0 && !isset($_GET['list']) && !isset($_GET['selectdate'])) {
- $listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
+ $listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
$scount = 1;
foreach($allSubcategories as $subcategory) {
// Check if subcategory is allowed
@@ -135,7 +135,7 @@
// ----- added for subcat images -----
if (($subcategory->getVar('imgurl') != '') && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $subcategory->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($subcategory->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($subcategory->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -197,7 +197,7 @@
// Making the category image and title available in the template
if (($categories[$cid]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $categories[$cid]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($categories[$cid]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($categories[$cid]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -82,7 +82,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
// Breadcrumb
@@ -91,7 +91,7 @@
$breadcrumb->addLink(_MD_WFD_DOWNLOADNOW, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('image_header', wfdownloads_headerImage());
$xoopsTpl->assign('down_disclaimer', true);
$xoopsTpl->assign('downdisclaimer', $myts->displayTarea($wfdownloads->getConfig('downdisclaimer'), 1, 1, 1, 1, 1));
$xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
@@ -118,7 +118,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- echo "<div align='center'>" . wfd_imageheader() . "</div>";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div>";
$url = $myts->htmlSpecialChars(preg_replace('/javascript:/si' , 'javascript:', $download->getVar('url')), ENT_QUOTES);
echo "<h4><img src='" . WFDOWNLOADS_URL . "/images/icon/downloads.gif' align='middle' alt='' title='" . _MD_WFD_DOWNINPROGRESS . "' /> " . _MD_WFD_DOWNINPROGRESS . "</h4>\n";
@@ -174,7 +174,7 @@
exit();
} else {
include XOOPS_ROOT_PATH . '/header.php';
- echo "<br /><div align='center'>" . wfd_imageheader() . "</div>";
+ echo "<br /><div align='center'>" . wfdownloads_headerImage() . "</div>";
reportBroken($lid);
}
|
|
From: <luc...@us...> - 2013-09-09 18:28:47
|
Revision: 12015
http://sourceforge.net/p/xoops/svn/12015
Author: luciorota
Date: 2013-09-09 18:28:43 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
improved autosummary system
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 13:53:12 UTC (rev 12014)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 18:28:43 UTC (rev 12015)
@@ -125,11 +125,11 @@
function getDownloadInfo() {
- global $xoopsConfig, $xoopsUser, $myts;
+ global $xoopsConfig, $xoopsUser, $myts, $xoopsDB;
xoops_load('XoopsUserUtility');
- $down['id'] = $this->getVar('lid');
- $down['cid'] = $this->getVar('cid');
+ $download['id'] = $this->getVar('lid');
+ $download['cid'] = $this->getVar('cid');
$use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
$add_mirror = false;
@@ -138,191 +138,188 @@
} elseif (is_object($xoopsUser) && ($this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH || $xoopsUser->isAdmin()) && $use_mirrors == true) {
$add_mirror = true;
}
- $down['add_mirror'] = $add_mirror;
- $down['use_mirrors'] = $use_mirrors;
+ $download['add_mirror'] = $add_mirror;
+ $download['use_mirrors'] = $use_mirrors;
- $down['rateimg'] = "rate" . round(number_format($this->getVar('rating'), 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
- $down['average_rating'] = $this->getVar('rating'); // new
- $down['votes'] = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
- $down['hits'] = $this->getVar('hits');
+ $download['rateimg'] = "rate" . round(number_format($this->getVar('rating'), 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
+ $download['average_rating'] = $this->getVar('rating'); // new
+ $download['votes'] = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
+ $download['hits'] = $this->getVar('hits');
- $down['path'] = $this->wfdownloads->getHandler('category')->getNicePath($down['cid']);
+ $download['path'] = $this->wfdownloads->getHandler('category')->getNicePath($download['cid']);
- $down['imageheader'] = wfd_imageheader();
+ $download['imageheader'] = wfd_imageheader();
- $down['title'] = trim($this->getVar('title'));
- $down['url'] = $this->getVar('url');
- $down['filename'] = $this->getVar('filename');
- $down['filetype'] = $this->getVar('filetype');
+ $download['title'] = trim($this->getVar('title'));
+ $download['url'] = $this->getVar('url');
+ $download['filename'] = $this->getVar('filename');
+ $download['filetype'] = $this->getVar('filetype');
if ($this->getVar('screenshot')) {
- $down['screenshot_full'] = $this->getVar('screenshot');
+ $download['screenshot_full'] = $this->getVar('screenshot');
if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb'] = down_createthumb($down['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb'] = down_createthumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
+ $download['screenshot_thumb'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
}
}
}
if ($this->getVar('screenshot2') && $this->wfdownloads->getConfig('max_screenshot') >= 2) {
- $down['screenshot_full2'] = $this->getVar('screenshot2');
+ $download['screenshot_full2'] = $this->getVar('screenshot2');
if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb2'] = down_createthumb($down['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb2'] = down_createthumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb2'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
+ $download['screenshot_thumb2'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
}
}
}
if ($this->getVar('screenshot3') && $this->wfdownloads->getConfig('max_screenshot') >= 3) {
- $down['screenshot_full3'] = $this->getVar('screenshot3');
+ $download['screenshot_full3'] = $this->getVar('screenshot3');
if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb3'] = down_createthumb($down['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb3'] = down_createthumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb3'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
+ $download['screenshot_thumb3'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
}
}
}
if ($this->getVar('screenshot4') && $this->wfdownloads->getConfig('max_screenshot') >= 4) {
- $down['screenshot_full4'] = $this->getVar('screenshot4');
+ $download['screenshot_full4'] = $this->getVar('screenshot4');
if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb4'] = down_createthumb($down['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb4'] = down_createthumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb4'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
+ $download['screenshot_thumb4'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
}
}
}
- $down['homepage'] = (!$this->getVar('homepage') || $this->getVar('homepage') == "http://") ? '' : $myts->htmlSpecialChars(trim($this->getVar('homepage')));
+ $download['homepage'] = (!$this->getVar('homepage') || $this->getVar('homepage') == "http://") ? '' : $myts->htmlSpecialChars(trim($this->getVar('homepage')));
$homepagetitle = $this->getVar('homepagetitle');
- if ($down['homepage'] && !empty($down['homepage'])) {
- $down['homepagetitle'] = ($homepagetitle != "") ? trim($down['homepage']) : trim($homepagetitle);
- $down['homepage'] = "<a href='" . $down['homepage'] . "' target='_blank'>" . $homepagetitle . "</a>";
+ if ($download['homepage'] && !empty($download['homepage'])) {
+ $download['homepagetitle'] = ($homepagetitle != "") ? trim($download['homepage']) : trim($homepagetitle);
+ $download['homepage'] = "<a href='" . $download['homepage'] . "' target='_blank'>" . $homepagetitle . "</a>";
} else {
- $down['homepage'] = '';
+ $download['homepage'] = '';
}
if ($use_mirrors !== true) {
- $down['mirror'] = ($this->getVar('mirror') == "http://") ? '' : trim($this->getVar('mirror'));
- if ($down['mirror'] && !empty($down['mirror'])) {
- $down['mirror'] = "<a href='" . $down['mirror'] . "' target='_blank'>" . _MD_WFD_MIRRORSITE . "</a>";
+ $download['mirror'] = ($this->getVar('mirror') == "http://") ? '' : trim($this->getVar('mirror'));
+ if ($download['mirror'] && !empty($download['mirror'])) {
+ $download['mirror'] = "<a href='" . $download['mirror'] . "' target='_blank'>" . _MD_WFD_MIRRORSITE . "</a>";
} else {
- $down['mirror'] = '';
+ $download['mirror'] = '';
}
}
- $down['comments'] = $this->getVar('comments');
+ $download['comments'] = $this->getVar('comments');
$version = $this->getVar('version');
if ($version != 0) {
- $down['version'] = $this->getVar('version');
+ $download['version'] = $this->getVar('version');
} else {
- $down['version'] = 0;
+ $download['version'] = 0;
}
- $down['downtime'] = wfdownloads_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
- $down['downtime'] = str_replace("|", "<br />", $down['downtime']);
- $down['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
+ $download['downtime'] = wfdownloads_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
+ $download['downtime'] = str_replace("|", "<br />", $download['downtime']);
+ $download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
$time = ($this->getVar('updated') != 0) ? $this->getVar('updated') : $this->getVar('published');
- $down['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
+ $download['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
$is_updated = ($this->getVar('updated') != 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
- $down['lang_subdate'] = $is_updated;
+ $download['lang_subdate'] = $is_updated;
$summary = $this->getVar('summary');
- if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary))
- {
+ if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary)) {
+ // generate autosummary
$summaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
- $summaryDescription = stripslashes($this->getVar('summary'));
+ $summaryDescription = stripslashes($this->getVar('description'));
+ $download['summary'] = $myts->displayTarea($summaryDescription, 1);
if (strlen($summaryDescription) > $summaryLength) {
- $summaryDescription = substr($summaryDescription, 0, $summaryLength);
- $summaryDescription = trim(substr($summaryDescription, 0, strrpos($summaryDescription, ' '))) . ' ...';
- $down['summary'] = $myts->displayTarea($summaryDescription, 1);
+ $download['summary'] = wfdownloads_truncateHtml($download['summary'], $summaryLength, '...', false, true);
} else {
- $down['summary'] = $myts->displayTarea($summaryDescription, 1);
+ // NOP
}
} else {
- $down['summary'] = $summary;
+ $download['summary'] = $summary;
}
- $down['description'] = $this->getVar('description'); //no html
- $down['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFD_PRICEFREE;
+ $download['description'] = $this->getVar('description'); //no html
+ $download['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFD_PRICEFREE;
$limitationsArray = $this->wfdownloads->getConfig('limitations');
- $down['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
+ $download['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
$versiontypesArray = $this->wfdownloads->getConfig('versiontypes');
- $down['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
+ $download['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
$licenseArray = $this->wfdownloads->getConfig('license');
- $down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
- $down['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
+ $download['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
+ $download['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
$publisher = $this->getVar('publisher');
if (!empty($publisher)) {
- $down['publisher'] = $publisher;
+ $download['publisher'] = $publisher;
} else {
- $down['publisher'] = '';
+ $download['publisher'] = '';
}
$platformArray = $this->wfdownloads->getConfig('platform');
- $down['platform'] = $myts->htmlSpecialChars($platformArray[$this->getVar('platform')]);
+ $download['platform'] = $myts->htmlSpecialChars($platformArray[$this->getVar('platform')]);
$history = $this->getVar('dhistory', 'n');
- $down['history'] = $myts->displayTarea($history, 1);
- $down['features'] = '';
+ $download['history'] = $myts->displayTarea($history, 1);
+ $download['features'] = '';
if ($this->getVar('features')) {
- $downfeatures = explode('|', trim($this->getVar('features')));
- foreach ($downfeatures as $bi) {
- $down['features'][] = $bi;
+ $downloadfeatures = explode('|', trim($this->getVar('features')));
+ foreach ($downloadfeatures as $bi) {
+ $download['features'][] = $bi;
}
}
- $down['requirements'] = '';
+ $download['requirements'] = '';
if ($this->getVar('requirements')) {
- $downrequirements = explode('|', trim($this->getVar('requirements')));
- foreach ($downrequirements as $bi) {
- $down['requirements'][] = $bi;
+ $downloadrequirements = explode('|', trim($this->getVar('requirements')));
+ foreach ($downloadrequirements as $bi) {
+ $download['requirements'][] = $bi;
}
}
- $down['mail_subject'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']));
- $down['mail_body'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']) . ': ' . WFDOWNLOADS_URL . '/singlefile.php?cid=' . $down['cid'] . '&lid=' . $down['id']);
+ $download['mail_subject'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']));
+ $download['mail_body'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']) . ': ' . WFDOWNLOADS_URL . '/singlefile.php?cid=' . $download['cid'] . '&lid=' . $download['id']);
- $down['isadmin'] = (!empty($xoopsUser) && $xoopsUser->isAdmin($this->wfdownloads->getModule()->mid())) ? true : false;
+ $download['isadmin'] = (!empty($xoopsUser) && $xoopsUser->isAdmin($this->wfdownloads->getModule()->mid())) ? true : false;
- $down['adminlink'] = '';
- if ($down['isadmin'] == true) {
- $down['adminlink'] = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $down['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
- $down['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $down['id'] . '">' . _MD_WFD_DELETE . '</a>]';
+ $download['adminlink'] = '';
+ if ($download['isadmin'] == true) {
+ $download['adminlink'] = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $download['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
+ $download['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $download['id'] . '">' . _MD_WFD_DELETE . '</a>]';
}
$votestring = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
- $down['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
+ $download['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
- if (is_object($xoopsUser) && $down['isadmin'] != true) {
- $down['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
+ if (is_object($xoopsUser) && $download['isadmin'] != true) {
+ $download['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
}
- global $xoopsDB;
- $sql2 = "SELECT rated FROM " . $xoopsDB->prefix('wfdownloads_reviews') . " WHERE lid = '" . intval($down['id']) . "' AND submit = '1'";
+ $sql2 = "SELECT rated FROM " . $xoopsDB->prefix('wfdownloads_reviews') . " WHERE lid = '" . intval($download['id']) . "' AND submit = '1'";
$results = $xoopsDB->query($sql2);
$numrows = $xoopsDB->getRowsNum($results);
- $down['reviews_num'] = ($numrows) ? $numrows : 0;
+ $download['reviews_num'] = ($numrows) ? $numrows : 0;
$totalReviewsRating = 0;
while ($review_text = $xoopsDB->fetchArray($results)) {
$totalReviewsRating += $review_text['rated'];
}
- $averageReviewsRating = ($down['reviews_num'] > 0) ? $totalReviewsRating / $down['reviews_num'] : 0;
- $down['review_average_rating'] = $averageReviewsRating; // new
- $down['review_rateimg'] = "rate" . round(number_format($averageReviewsRating, 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
+ $averageReviewsRating = ($download['reviews_num'] > 0) ? $totalReviewsRating / $download['reviews_num'] : 0;
+ $download['review_average_rating'] = $averageReviewsRating; // new
+ $download['review_rateimg'] = 'rate' . round(number_format($averageReviewsRating, 0) / 2) . '.gif'; // this definition is not removed for compatibility issues
- $down['icons'] = wfd_displayicons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
+ $download['icons'] = wfd_displayicons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
- global $xoopsDB;
- $sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $down['id'] . "' AND submit = '1'";
+ $sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $download['id'] . "' AND submit = '1'";
$results3 = $xoopsDB->query($sql3);
$numrows2 = $xoopsDB->getRowsNum($results3);
- $down['mirrors_num'] = ($numrows2) ? $numrows2 : 0;
- return $down;
+ $download['mirrors_num'] = ($numrows2) ? $numrows2 : 0;
+ return $download;
}
@@ -351,9 +348,9 @@
$userfile_file = new XoopsFormFile(_MD_WFD_UPLOAD_FILEC, 'userfile', 0);
$maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
if (is_object($xoopsUser) && $xoopsUser->isAdmin()) {
- $criteria = new Criteria("mime_admin", true);
+ $criteria = new Criteria('mime_admin', true);
} else {
- $criteria = new Criteria("mime_user", true);
+ $criteria = new Criteria('mime_user', true);
}
$mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
$allowMimetypes = implode(' | ', $mimetypes);
@@ -369,7 +366,7 @@
$sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
} else {
$categories = $this->wfdownloads->getHandler('category')->getUserUpCategories();
- $categoriesTree = new XoopsObjectTree($categories, "cid", "pid");
+ $categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
$sform->addElement(new XoopsFormLabel(_MD_WFD_CATEGORYC, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e'))));
}
// changed - end - March 4 2006 - jpc
@@ -382,47 +379,59 @@
$sform->addElement(new XoopsFormText(_MD_WFD_PUBLISHERC, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
$sform->addElement(new XoopsFormText(_MD_WFD_FILESIZEC, 'size', 10, 20, $this->getVar('size', 'e')), false);
- $platform_array = $this->wfdownloads->getConfig('platform');
- $platform_select = new XoopsFormSelect(_MD_WFD_PLATFORMC, 'platform', $this->getVar('platform', 'e'));
- $platform_select->addOptionArray($platform_array);
+ $platform_array = $this->wfdownloads->getConfig('platform');
+ $platform_select = new XoopsFormSelect(_MD_WFD_PLATFORMC, 'platform', $this->getVar('platform', 'e'));
+ $platform_select->addOptionArray($platform_array);
$sform->addElement($platform_select);
- $license_array = $this->wfdownloads->getConfig('license');
- $license_select = new XoopsFormSelect(_MD_WFD_LICENCEC, 'license', $this->getVar('license', 'e'));
- $license_select->addOptionArray($license_array);
+ $license_array = $this->wfdownloads->getConfig('license');
+ $license_select = new XoopsFormSelect(_MD_WFD_LICENCEC, 'license', $this->getVar('license', 'e'));
+ $license_select->addOptionArray($license_array);
$sform->addElement($license_select);
- $limitations_array = $this->wfdownloads->getConfig('limitations');
- $limitations_select = new XoopsFormSelect(_MD_WFD_LIMITATIONS, 'limitations', $this->getVar('limitations', 'e'));
- $limitations_select->addOptionArray($limitations_array);
+ $limitations_array = $this->wfdownloads->getConfig('limitations');
+ $limitations_select = new XoopsFormSelect(_MD_WFD_LIMITATIONS, 'limitations', $this->getVar('limitations', 'e'));
+ $limitations_select->addOptionArray($limitations_array);
$sform->addElement($limitations_select);
- $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
- $versiontypes_select = new XoopsFormSelect(_MD_WFD_VERSIONTYPES, 'versiontypes', $this->getVar('versiontypes', 'e'));
- $versiontypes_select->addOptionArray($versiontypes_array);
+ $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
+ $versiontypes_select = new XoopsFormSelect(_MD_WFD_VERSIONTYPES, 'versiontypes', $this->getVar('versiontypes', 'e'));
+ $versiontypes_select->addOptionArray($versiontypes_array);
$sform->addElement($versiontypes_select);
$sform->addElement(new XoopsFormText(_MD_WFD_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
- $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
- $summary_dhtmltextarea->setDescription(_MD_WFD_SUMMARY_DESC);
- $sform->addElement($summary_dhtmltextarea, false);
- $sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription'), true);
+
+ if ($this->wfdownloads->getConfig('autosummary') == true) {
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFD_SUMMARY_DESC_AUTOSUMMARY_ON);
+ $summary_dhtmltextarea->setExtra('disabled', 'disabled');
+ $sform->addElement($summary_dhtmltextarea, false);
+ } else {
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFD_SUMMARY_DESC_AUTOSUMMARY_OFF);
+ $sform->addElement($summary_dhtmltextarea, false);
+ }
+
+ $description_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription');
+ $description_dhtmltextarea->setDescription(_MD_WFD_DESCRIPTION_DESC);
+ $sform->addElement($description_dhtmltextarea, true);
$features_textarea = new XoopsFormTextArea(_MD_WFD_KEYFEATURESC, 'features', $this->getVar('features', 'e'), 7, 60);
- $features_textarea->setDescription(_MD_WFD_KEYFEATURESC_DESC);
+ $features_textarea->setDescription(_MD_WFD_SUMMARY_DESC_AUTOSUMMARY_ON);
$sform->addElement($features_textarea, false);
$requirements_textarea = new XoopsFormTextArea(_MD_WFD_REQUIREMENTSC, 'requirements', $this->getVar('requirements', 'e'), 7, 60);
$requirements_textarea->setDescription(_MD_WFD_REQUIREMENTSC_DESC);
$sform->addElement($requirements_textarea, false);
- } else { // if we are using a custom form, then add in the form's elements here
+ } else {
+ // if we are using a custom form, then add in the form's elements here
$sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription'), true);
- $sform -> addElement(new XoopsFormHidden('size', $this->getVar('size', 'e')));
+ $sform->addElement(new XoopsFormHidden('size', $this->getVar('size', 'e')));
$sform = compileElements($customArray['fid'], $sform, $customArray['formulize_mgr'], $customArray['prevEntry'], $customArray['entry'], $customArray['go_back'], $customArray['parentLinks'], $customArray['owner_groups'], $customArray['groups']);
}
// Changed - end - April 22, 2006 - jwe
$sform->addElement(new XoopsFormTextArea(_MD_WFD_HISTORYC, 'dhistory', $this->getVar('dhistory', 'e'), 7, 60), false);
if (!$this->isNew() && $this->getVar('dhistory', 'n') != "") {
- $dhistoryaddedd_textarea = new XoopsFormTextArea(_MD_WFD_HISTORYD, 'dhistoryaddedd', "", 7, 60);
+ $dhistoryaddedd_textarea = new XoopsFormTextArea(_MD_WFD_HISTORYD, 'dhistoryaddedd', '', 7, 60);
$dhistoryaddedd_textarea->setDescription(_MD_WFD_HISTORYD_DESC);
$sform->addElement($dhistoryaddedd_textarea, false);
}
@@ -470,12 +479,12 @@
$use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
$sform = new XoopsThemeForm($title, "storyform", $_SERVER['REQUEST_URI']);
- $sform -> setExtra('enctype="multipart/form-data"');
+ $sform->setExtra('enctype="multipart/form-data"');
if (!$this->isNew()) {
$sform -> addElement(new XoopsFormLabel(_AM_WFD_FILE_ID, (int)$this->getVar('lid')));
}
if ($this->getVar('ipaddress') != "") {
- $sform -> addElement(new XoopsFormLabel(_AM_WFD_FILE_IP, $this->getVar('ipaddress')));
+ $sform->addElement(new XoopsFormLabel(_AM_WFD_FILE_IP, $this->getVar('ipaddress')));
}
$titles_tray = new XoopsFormElementTray(_AM_WFD_FILE_TITLE, '<br />');
@@ -484,39 +493,45 @@
$titles_checkbox = new XoopsFormCheckBox('', 'title_checkbox', 0);
$titles_checkbox -> addOption(1, _AM_WFD_FILE_USE_UPLOAD_TITLE);
$titles_tray -> addElement($titles_checkbox);
- $sform -> addElement($titles_tray);
+ $sform->addElement($titles_tray);
if (!$this->isNew()) {
//$sform -> addElement(new XoopsFormText(_AM_WFD_FILE_SUBMITTERID, 'submitter', 10, 10, $this->getVar('submitter', 'e')), true);
$submitter_select = new XoopsFormSelectUser (_AM_WFD_FILE_SUBMITTER, 'submitter', false, $this->getVar('submitter', 'e'), 1, false);
$submitter_select->setDescription(_AM_WFD_FILE_SUBMITTER_DESC);
- $sform -> addElement($submitter_select);
+ $sform->addElement($submitter_select);
} else {
- $sform -> addElement(new XoopsFormHidden('submitter', $xoopsUser->getVar('uid', 'e')));
+ $sform->addElement(new XoopsFormHidden('submitter', $xoopsUser->getVar('uid', 'e')));
}
- $sform -> addElement(new XoopsFormText(_AM_WFD_FILE_DLURL, 'url', 50, 255, $this->getVar('url', 'e')), false);
- $sform -> addElement(new XoopsFormText(_AM_WFD_FILE_FILENAME, 'filename', 50, 255, $this->getVar('filename', 'e')), false);
+ $sform->addElement(new XoopsFormText(_AM_WFD_FILE_DLURL, 'url', 50, 255, $this->getVar('url', 'e')), false);
+ $sform->addElement(new XoopsFormText(_AM_WFD_FILE_FILENAME, 'filename', 50, 255, $this->getVar('filename', 'e')), false);
/*
$filename_tray = new XoopsFormElementTray(_AM_WFD_FILE_FILENAME);
$filename_tray->addElement(new XoopsFormLabel($this->getVar('filename')));
$filename_tray->addElement(new XoopsFormHidden("filename", $this->getVar('filename', 'e')));
- $sform -> addElement($filename_tray, false);
+ $sform->addElement($filename_tray, false);
*/
- $sform -> addElement(new XoopsFormText(_AM_WFD_FILE_FILETYPE, 'filetype', 50, 100, $this->getVar('filetype', 'e')), false);
+ $sform->addElement(new XoopsFormText(_AM_WFD_FILE_FILETYPE, 'filetype', 50, 100, $this->getVar('filetype', 'e')), false);
if ($use_mirrors !== true) {
- $sform -> addElement(new XoopsFormText(_AM_WFD_FILE_MIRRORURL, 'mirror', 50, 255, $this->getVar('mirror', 'e')), false);
+ $sform->addElement(new XoopsFormText(_AM_WFD_FILE_MIRRORURL, 'mirror', 50, 255, $this->getVar('mirror', 'e')), false);
}
- $sform -> addElement(new XoopsFormFile(_AM_WFD_FILE_DUPLOAD, 'userfile', 0), false);
+ $userfile_file = new XoopsFormFile(_MD_WFD_UPLOAD_FILEC, 'userfile', 0);
+ $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
+ $criteria = new Criteria("mime_admin", true);
+ $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
+ $allowMimetypes = implode(' | ', $mimetypes);
+ $userfile_file->setDescription(sprintf(_MD_WFD_UPLOAD_FILEC_DESC, $maxFileSize, $this->wfdownloads->getConfig('maximgwidth'), $this->wfdownloads->getConfig('maximgheight'), $allowMimetypes));
+ $sform->addElement($userfile_file, false);
// changed - start - March 4 2006 - jpc
// if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
// $sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
// } else {
$categories = $this->wfdownloads->getHandler('category')->getObjects();
- $categoriesTree = new XoopsObjectTree($categories, "cid", "pid");
- $sform->addElement(new XoopsFormLabel(_AM_WFD_FILE_CATEGORY, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e'))));
+ $categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
+ $sform->addElement(new XoopsFormLabel(_AM_WFD_FILE_CATEGORY, $categoriesTree->makeSelBox('cid', 'title', '-', $this->getVar('cid', 'e'))));
// }
// changed - end - March 4 2006 - jpc
@@ -558,62 +573,52 @@
$sform->addElement(new XoopsFormText(_AM_WFD_FILE_PRICE, 'price', 10, 20, $this->getVar('price', 'e')), false);
-// $sform -> addElement(new XoopsFormDhtmlTextArea(_AM_WFD_FILE_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, "smartHiddenSummary"), false);
- $optionsTrayNote = new XoopsFormElementTray(_AM_WFD_FILE_SUMMARY, '<br />');
- if (class_exists('XoopsFormEditor')) {
- $options['name'] = 'summary';
- $options['value'] = $this->getVar('summary', 'e');
- $options['rows'] = 10;
- $options['cols'] = '100%';
- $options['width'] = '100%';
- $options['height'] = '200px';
- $formSummary = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
- $optionsTrayNote->addElement($formSummary);
- } else {
- $formSummary = new XoopsFormDhtmlTextArea('', 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
- $optionsTrayNote->addElement($formSummary);
- }
- $sform->addElement($optionsTrayNote);
+ $summary_tray = new XoopsFormElementTray(_MD_WFD_SUMMARY, '<br />');
+ $options['name'] = 'summary';
+ $options['value'] = $this->getVar('summary', 'e');
+ $options['rows'] = 10;
+ $options['cols'] = '100%';
+ $options['width'] = '100%';
+ $options['height'] = '200px';
+ $summary_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $summary_tray->addElement($summary_editor);
+ if ($this->wfdownloads->getConfig('autosummary') == true) {
+ $summary_tray->setDescription(_MD_WFD_SUMMARY_DESC_AUTOSUMMARY_ON);
+ } else {
+ $summary_tray->setDescription(_MD_WFD_SUMMARY_DESC_AUTOSUMMARY_OFF);
+ }
+ $sform->addElement($summary_tray);
-// $sform -> addElement(new XoopsFormDhtmlTextArea(_AM_WFD_FILE_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, "smartHiddenDescription"), true);
- $optionsTrayNote2 = new XoopsFormElementTray(_AM_WFD_FILE_DESCRIPTION, '<br />');
- if (class_exists('XoopsFormEditor')) {
+ $description_tray = new XoopsFormElementTray(_MD_WFD_DESCRIPTION, '<br />');
$options['name'] = 'description';
$options['value'] = $this->getVar('description', 'e');
$options['rows'] = 15;
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
- $formDescription = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
- $optionsTrayNote2->addElement($formDescription, true);
- } else {
- $formDescription = new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription');
- $optionsTrayNote2->addElement($formDescription, true);
- }
- $sform->addElement($optionsTrayNote2);
+ $description_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $description_tray->addElement($description_editor, true);
+ $description_tray->setDescription(_MD_WFD_DESCRIPTION_DESC);
+ $sform->addElement($description_tray);
$sform->addElement(new XoopsFormTextArea(_AM_WFD_FILE_KEYFEATURES, 'features', $this->getVar('features', 'e'), 7, 60), false);
$sform->addElement(new XoopsFormTextArea(_AM_WFD_FILE_REQUIREMENTS, 'requirements', $this->getVar('requirements', 'e'), 7, 60), false);
- } else { // if we are using a custom form, then add in the form's elements here
+ } else {
+ // if we are using a custom form, then add in the form's elements here
-// $sform -> addElement(new XoopsFormDhtmlTextArea(_AM_WFD_FILE_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, "smartHiddenDescription"), true);
-
- $optionsTrayNote2 = new XoopsFormElementTray(_AM_WFD_FILE_DESCRIPTION, '<br />');
- if (class_exists('XoopsFormEditor')) {
+ // $sform -> addElement(new XoopsFormDhtmlTextArea(_AM_WFD_FILE_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, "smartHiddenDescription"), true);
+ $description_tray = new XoopsFormElementTray(_MD_WFD_DESCRIPTION, '<br />');
$options['name'] = 'description';
$options['value'] = $this->getVar('description', 'e');
$options['rows'] = 15;
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
- $formDescription = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
- $optionsTrayNote2->addElement($formDescription, true);
- } else {
- $formDescription = new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), 15, 60, "smartHiddenDescription");
- $optionsTrayNote2->addElement($formDescription, true);
- }
- $sform->addElement($optionsTrayNote2);
+ $description_editor = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $description_tray->addElement($description_editor, true);
+ $description_tray->setDescription(_MD_WFD_DESCRIPTION_DESC);
+ $sform->addElement($description_tray);
$sform -> addElement(new XoopsFormHidden('size', $this->getVar('size', 'e')));
$sform = compileElements($customArray['fid'], $sform, $customArray['formulize_mgr'], $customArray['prevEntry'], $customArray['entry'], $customArray['go_back'], $customArray['parentLinks'], $customArray['owner_groups'], $customArray['groups']);
@@ -625,102 +630,102 @@
if (!$this->isNew() && $this->getVar('dhistory') != "") {
$sform -> addElement(new XoopsFormTextArea(_AM_WFD_FILE_HISTORYD, 'dhistoryaddedd', '', 7, 60), false);
}
- $graph_array = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select = new XoopsFormSelect('', 'screenshot', $this->getVar('screenshot', 'e'));
- $indeximage_select -> addOptionArray($graph_array);
- $indeximage_select -> setExtra("onchange='showImgSelected(\"image1\", \"screenshot\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select->addOptionArray($graph_array);
+ $indeximage_select->setExtra("onchange='showImgSelected(\"image1\", \"screenshot\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
- $indeximage_tray -> addElement($indeximage_select);
- if ($this->getVar('screenshot') != "") {
- $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot', 'e') . "' id='image1' alt='' title='screenshot 1' />"));
+ $indeximage_tray->addElement($indeximage_select);
+ if ($this->getVar('screenshot') != '') {
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot', 'e') . "' id='image1' alt='' title='screenshot 1' />"));
} else {
- $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image1' alt='' title='' />"));
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image1' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray);
- $graph_array2 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array2 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select2 = new XoopsFormSelect('', 'screenshot2', $this->getVar('screenshot2', 'e'));
- $indeximage_select2 -> addOptionArray($graph_array2);
- $indeximage_select2 -> setExtra("onchange='showImgSelected(\"image2\", \"screenshot2\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select2->addOptionArray($graph_array2);
+ $indeximage_select2->setExtra("onchange='showImgSelected(\"image2\", \"screenshot2\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray2 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
- $indeximage_tray2 -> addElement($indeximage_select2);
- if ($this->getVar('screenshot2') != "") {
- $indeximage_tray2 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot2', 'e') . "' id='image2' alt='' title='screenshot 2' />"));
+ $indeximage_tray2->addElement($indeximage_select2);
+ if ($this->getVar('screenshot2') != '') {
+ $indeximage_tray2->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot2', 'e') . "' id='image2' alt='' title='screenshot 2' />"));
} else {
- $indeximage_tray2 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image2' alt='' title='' />"));
+ $indeximage_tray2->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image2' alt='' title='' />"));
}
- $sform -> addElement($indeximage_tray2);
+ $sform->addElement($indeximage_tray2);
- $graph_array3 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array3 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select3 = new XoopsFormSelect('', 'screenshot3', $this->getVar('screenshot3', 'e', true));
- $indeximage_select3 -> addOptionArray($graph_array3);
- $indeximage_select3 -> setExtra("onchange='showImgSelected(\"image3\", \"screenshot3\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select3->addOptionArray($graph_array3);
+ $indeximage_select3->setExtra("onchange='showImgSelected(\"image3\", \"screenshot3\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray3 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
- $indeximage_tray3 -> addElement($indeximage_select3);
- if ($this->getVar('screenshot3') != "") {
- $indeximage_tray3 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot3', 'e') . "' id='image3' alt='' title='screenshot 3' />"));
+ $indeximage_tray3->addElement($indeximage_select3);
+ if ($this->getVar('screenshot3') != '') {
+ $indeximage_tray3->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot3', 'e') . "' id='image3' alt='' title='screenshot 3' />"));
} else {
$indeximage_tray3 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image3' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray3);
- $graph_array4 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array4 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . '/' . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select4 = new XoopsFormSelect('', 'screenshot4', $this->getVar('screenshot4', 'e'));
- $indeximage_select4 -> addOptionArray($graph_array4);
- $indeximage_select4 -> setExtra("onchange='showImgSelected(\"image4\", \"screenshot4\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select4->addOptionArray($graph_array4);
+ $indeximage_select4->setExtra("onchange='showImgSelected(\"image4\", \"screenshot4\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray4 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
- $indeximage_tray4 -> addElement($indeximage_select4);
+ $indeximage_tray4->addElement($indeximage_select4);
if ($this->getVar('screenshot4') != "") {
- $indeximage_tray4 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot4', 'e') . "' id='image4' alt='' title='screenshot 4' />"));
+ $indeximage_tray4->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . '/' . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot4', 'e') . "' id='image4' alt='' title='screenshot 4' />"));
} else {
- $indeximage_tray4 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image4' alt='' title='' />"));
+ $indeximage_tray4->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image4' alt='' title='' />"));
}
- $sform -> addElement($indeximage_tray4);
+ $sform->addElement($indeximage_tray4);
- $sform -> insertBreak(sprintf(_AM_WFD_FILE_MUSTBEVALID, "<b>" . $this->wfdownloads->getConfig('screenshots') . "</b>"), "even");
+ $sform->insertBreak(sprintf(_AM_WFD_FILE_MUSTBEVALID, "<b>" . $this->wfdownloads->getConfig('screenshots') . "</b>"), "even");
$publishtext = ($this->isNew() || $this->getVar('published') == 0) ? _AM_WFD_FILE_SETPUBLISHDATE : _AM_WFD_FILE_SETNEWPUBLISHDATE;
if ($this->getVar('published') > time()) {
$publishtext = _AM_WFD_FILE_SETPUBDATESETS;
}
- $ispublished = ($this->getVar('published') > time()) ? 1 : 0 ;
+ $ispublished = ($this->getVar('published') > time()) ? true : false;
$publishdates = ($this->getVar('published') > time()) ? _AM_WFD_FILE_PUBLISHDATESET . formatTimestamp($this->getVar('published', 'e'), "Y-m-d H:s") : _AM_WFD_FILE_SETDATETIMEPUBLISH;
$publishdate_checkbox = new XoopsFormCheckBox('', 'publishdateactivate', $ispublished);
- $publishdate_checkbox -> addOption(1, $publishdates . '<br />');
+ $publishdate_checkbox->addOption(1, $publishdates . '<br />');
if (!$this->isNew()) {
- $sform -> addElement(new XoopsFormHidden('was_published', $this->getVar('published', 'e')));
- $sform -> addElement(new XoopsFormHidden('was_expired', $this->getVar('expired', 'e')));
+ $sform->addElement(new XoopsFormHidden('was_published', $this->getVar('published', 'e')));
+ $sform->addElement(new XoopsFormHidden('was_expired', $this->getVar('expired', 'e')));
}
$publishdate_tray = new XoopsFormElementTray(_AM_WFD_FILE_PUBLISHDATE, '');
- $publishdate_tray -> addElement($publishdate_checkbox);
- $publishdate_tray -> addElement(new XoopsFormDateTime($publishtext, 'published', 15, $this->getVar('published', 'e')));
- $publishdate_tray -> addElement(new XoopsFormRadioYN(_AM_WFD_FILE_CLEARPUBLISHDATE, 'clearpublish', 0));
- $sform -> addElement($publishdate_tray);
+ $publishdate_tray->addElement($publishdate_checkbox);
+ $publishdate_tray->addElement(new XoopsFormDateTime($publishtext, 'published', 15, $this->getVar('published', 'e')));
+ $publishdate_tray->addElement(new XoopsFormRadioYN(_AM_WFD_FILE_CLEARPUBLISHDATE, 'clearpublish', 0));
+ $sform->addElement($publishdate_tray);
- $isexpired = ($this->getVar('expired', 'e') > time()) ? 1: 0 ;
+ $isexpired = ($this->getVar('expired', 'e') > time()) ? true : false;
$expiredates = ($this->getVar('expired', 'e') > time()) ? _AM_WFD_FILE_EXPIREDATESET . formatTimestamp($this->getVar('expired'), 'Y-m-d H:s') : _AM_WFD_FILE_SETDATETIMEEXPIRE;
$warning = ($this->getVar('published') > $this->getVar('expired') && $this->getVar('expired') > time()) ? _AM_WFD_FILE_EXPIREWARNING : '';
$expiredate_checkbox = new XoopsFormCheckBox('', 'expiredateactivate', $isexpired);
$expiredate_checkbox -> addOption(1, $expiredates . '<br />');
$expiredate_tray = new XoopsFormElementTray(_AM_WFD_FILE_EXPIREDATE . $warning, '');
- $expiredate_tray -> addElement($expiredate_checkbox);
- $expiredate_tray -> addElement(new XoopsFormDateTime(_AM_WFD_FILE_SETEXPIREDATE, 'expired', 15, $this->getVar('expired')));
- $expiredate_tray -> addElement(new XoopsFormRadioYN(_AM_WFD_FILE_CLEAREXPIREDATE, 'clearexpire', 0));
- $sform -> addElement($expiredate_tray);
+ $expiredate_tray->addElement($expiredate_checkbox);
+ $expiredate_tray->addElement(new XoopsFormDateTime(_AM_WFD_FILE_SETEXPIREDATE, 'expired', 15, $this->getVar('expired')));
+ $expiredate_tray->addElement(new XoopsFormRadioYN(_AM_WFD_FILE_CLEAREXPIREDATE, 'clearexpire', 0));
+ $sform->addElement($expiredate_tray);
$filestatus_radio = new XoopsFormRadioYN(_AM_WFD_FILE_FILESSTATUS, 'offline', $this->getVar('offline', 'e'));
- $sform -> addElement($filestatus_radio);
+ $sform->addElement($filestatus_radio);
- $up_dated = ($this->getVar('updated', 'e') == 0) ? 0 : 1;
+ $up_dated = ($this->getVar('updated', 'e') == 0) ? false : true;
$file_updated_radio = new XoopsFormRadioYN(_AM_WFD_FILE_SETASUPDATED, 'up_dated', $up_dated);
- $sform -> addElement($file_updated_radio);
+ $sform->addElement($file_updated_radio);
if (!$this->isNew() && $this->getVar('published') == 0) {
- $approved = ($this->getVar('published') == 0) ? 0 : 1;
- $approve_checkbox = new XoopsFormCheckBox(_AM_WFD_FILE_EDITAPPROVE, "approved", 1);
+ $approved = ($this->getVar('published') == 0) ? false : true;
+ $approve_checkbox = new XoopsFormCheckBox(_AM_WFD_FILE_EDITAPPROVE, 'approved', true);
$approve_checkbox -> addOption(1, " ");
$sform->addElement($approve_checkbox);
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-09 13:53:12 UTC (rev 12014)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-09 18:28:43 UTC (rev 12015)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-08-29)</u></b>
+<b><u>=> Version 3.23 Beta (2013-09-09)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
@@ -11,12 +11,14 @@
- fixed: deprecated "XoopsTree" (luciorota)
- fixed: html errors in templates (luciorota)
- fixed: deprecated XoopsTree (mamba)
+- added: breadcrumb class (luciorota)
+- added: html tags compatible autosummary generator (luciorota)
- added: sort subcategories by cid or title or weight (luciorota)
- added: improved letters choice bar (luciorota)
- added: wfdownloads_submit.html template for submit.php (luciorota)
- added: folder checker (mamba + luciorota)
- added: file checker (luciorota)
-- removed: unapgraded languages (luciorota)
+- removed: unupgraded languages from repository (luciorota)
- removed: unused templates (luciorota)
- removed: unused images files (luciorota)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 13:53:12 UTC (rev 12014)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 18:28:43 UTC (rev 12015)
@@ -1309,6 +1309,111 @@
+/**
+ * truncateHtml can truncate a string up to a number of characters while preserving whole words and HTML tags
+ * www.gsdesign.ro/blog/cut-html-string-without-breaking-the-tags
+ * www.cakephp.org
+ *
+ * @param string $text String to truncate.
+ * @param integer $length Length of returned string, including ellipsis.
+ * @param string $ending Ending to be appended to the trimmed string.
+ * @param boolean $exact If false, $text will not be cut mid-word
+ * @param boolean $considerHtml If true, HTML tags would be handled correctly
+ *
+ * @return string Trimmed string.
+ */
+function wfdownloads_truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true) {
+ if ($considerHtml) {
+ // if the plain text is shorter than the maximum length, return the whole text
+ if (strlen(preg_replace('/<.*?>/', '', $text)) <= $length) {
+ return $text;
+ }
+ // splits all html-tags to scanable lines
+ preg_match_all('/(<.+?>)?([^<>]*)/s', $text, $lines, PREG_SET_ORDER);
+ $total_length = strlen($ending);
+ $open_tags = array();
+ $truncate = '';
+ foreach ($lines as $line_matchings) {
+ // if there is any html-tag in this line, handle it and add it (uncounted) to the output
+ if (!empty($line_matchings[1])) {
+ // if it's an "empty element" with or without xhtml-conform closing slash
+ if (preg_match('/^<(\s*.+?\/\s*|\s*(img|br|input|hr|area|base|basefont|col|frame|isindex|link|meta|param)(\s.+?)?)>$/is', $line_matchings[1])) {
+ // do nothing
+ // if tag is a closing tag
+ } else if (preg_match('/^<\s*\/([^\s]+?)\s*>$/s', $line_matchings[1], $tag_matchings)) {
+ // delete tag from $open_tags list
+ $pos = array_search($tag_matchings[1], $open_tags);
+ if ($pos !== false) {
+ unset($open_tags[$pos]);
+ }
+ // if tag is an opening tag
+ } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {
+ // add tag to the beginning of $open_tags list
+ array_unshift($open_tags, strtolower($tag_matchings[1]));
+ }
+ // add html-tag to $truncate'd text
+ $truncate .= $line_matchings[1];
+ }
+ // calculate the length of the plain text part of the line; handle entities as one character
+ $content_length = strlen(preg_replace('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', ' ', $line_matchings[2]));
+ if ($total_length+$content_length> $length) {
+ // the number of characters which are left
+ $left = $length - $total_length;
+ $entities_length = 0;
+ // search for html entities
+ if (preg_match_all('/&[0-9a-z]{2,8};|&#[0-9]{1,7};|[0-9a-f]{1,6};/i', $line_matchings[2]...
[truncated message content] |
|
From: <txm...@us...> - 2013-09-09 13:53:15
|
Revision: 12014
http://sourceforge.net/p/xoops/svn/12014
Author: txmodxoops
Date: 2013-09-09 13:53:12 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
Updated errorpage.php
Compatible to CSS Version 3 and W3C Validator xoops.css and xoops.min.css
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/errorpage.php
XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.min.css
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.css
Modified: XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/errorpage.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/errorpage.php 2013-09-09 02:30:14 UTC (rev 12013)
+++ XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/errorpage.php 2013-09-09 13:53:12 UTC (rev 12014)
@@ -71,9 +71,7 @@
$errordesc = _XO_ER_DESC;
break;
}
-
-$array_keys = explode(" ", $errortitle);
-$keywords = implode(",", $array_keys);
+$keywords = str_replace(" ", ", ", $errortitle);
$xoTheme->addMeta('meta', 'keywords', $keywords);
$xoTheme->addMeta('meta', 'description', $errordesc);
// Display error
Added: XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.css
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.css (rev 0)
+++ XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.css 2013-09-09 13:53:12 UTC (rev 12014)
@@ -0,0 +1,1186 @@
+/*
+ * Compatible to CSS Version 3 and W3C Validator
+ * $Id: xoops.css 12012 2013-09-09 12:24:59Z timgno $
+ */
+/*=== FORMAT BASIC ELEMENTS, can be overwritten in theme styles ===*/
+table {
+ width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+strong, b, dfn {
+ font-weight: bold;
+}
+
+u {
+ text-decoration: underline;
+}
+
+i, em {
+ font-style: italic;
+}
+
+del {
+ text-decoration: line-through;
+}
+
+sup {
+ vertical-align: text-top;
+}
+
+sub {
+ vertical-align: text-bottom;
+}
+
+ins {
+ text-decoration: none;
+}
+
+img {
+ border: 0;
+}
+
+img.center {
+ text-align: center;
+ margin: 6px auto;
+ display: block;
+ margin-bottom: 4px;
+}
+
+img.left {
+ text-align: left;
+ float: left;
+ margin: 2px 6px 2px 0;
+ clear: left;
+}
+
+img.right {
+ float: right;
+ text-align: right;
+ margin: 2px 0 2px 6px;
+ clear: right;
+}
+
+acronym, abbr, dfn {
+ cursor: help;
+}
+
+pre {
+ overflow: auto;
+}
+
+#xoopsHiddenText {
+ visibility: hidden;
+ background-color: transparent;
+ color: #000;
+ font-weight: normal;
+ font-style: normal;
+ text-decoration: none;
+}
+
+.pagneutral {
+ font-size: 10px;
+ width: 16px;
+ height: 19px;
+ text-align: center;
+ background-image: url(./images/pagneutral.gif);
+}
+
+.pagact {
+ font-size: 10px;
+ width: 16px;
+ height: 19px;
+ text-align: center;
+ background-image: url(./images/pagact.gif);
+}
+
+.paginact {
+ font-size: 10px;
+ width: 16px;
+ height: 19px;
+ text-align: center;
+ background-image: url(./images/paginact.gif);
+}
+
+.xoops-form-element-caption .caption-marker {
+ display: none;
+}
+
+.xoops-form-element-caption-required .caption-marker {
+ background-color: inherit;
+ padding-left: 2px;
+ color: #ff0000;
+}
+
+.xoops-form-element-help {
+ font-size: 0.9em;
+ padding-top: 5px;
+ font-weight: normal;
+}
+
+fieldset {
+ border: 0;
+}
+
+input, textarea, select {
+ background-color: #fff;
+ color: #000;
+}
+
+input [ type = "submit" ], input [ type = "reset" ], input [ type = "button" ], .xo-formbuttons, .formButton, button {
+ background-color: #D3D2D6;
+ color: #405A80;
+ padding: 3px;
+}
+
+#xo-fixbanner a {
+ display: block;
+ position: absolute;
+ z-index: 102;
+ width: 468px;
+ height: 60px;
+}
+
+div.jGrowl {
+ padding: 1em;
+ z-index: 9999;
+}
+
+body > div.jGrowl {
+ position: fixed;
+}
+
+body > div.jGrowl .top-right {
+ right: 25%;
+ left: 25%;
+ top: 2px;
+}
+
+body > div.jGrowl .bottom-left {
+ left: 0;
+ bottom: 0;
+}
+
+body > div.jGrowl .bottom-right {
+ right: 0;
+ bottom: 0;
+}
+
+body > div.jGrowl .center {
+ top: 0;
+ width: 50%;
+ left: 25%;
+}
+
+body > div.jGrowl .top-left {
+ left: 0;
+ top: 0;
+}
+
+div.center div.jGrowl-notification, div.center div.jGrowl-closer {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
+ background-color: #EBFBFE;
+ color: #000080;
+ width: 100%;
+ padding: 0.5em;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ font-family: Tahoma, Geneva, sans-serif;
+ font-size: 1.2em;
+ text-align: center;
+ border: #6699FF solid 1px;
+ display: none;
+ border-radius: 5px;
+}
+
+div.jGrowl div.jGrowl-notification {
+ min-height: 40px;
+}
+
+div.jGrowl div.jGrowl-notification div.jGrowl-header {
+ font-weight: bold;
+ font-size: 10px;
+}
+
+div.jGrowl div.jGrowl-notification div.jGrowl-close {
+ float: right;
+ font-weight: bold;
+ font-size: 12px;
+ cursor: pointer;
+}
+
+div.jGrowl div.jGrowl-closer {
+ height: 15px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ cursor: pointer;
+ font-size: 11px;
+ font-weight: bold;
+ text-align: center;
+}
+
+.floatleft {
+ float: left;
+ margin: 0;
+ padding-left: 4px;
+ border: 0;
+}
+
+.floatright {
+ float: right;
+ margin: 0;
+ padding: 2px;
+ border: 0;
+}
+
+.floatcenter0 {
+ margin: 0 auto;
+}
+
+.floatcenter1 {
+ margin: 1em auto;
+}
+
+.clear {
+ clear: both;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+
+.clearleft {
+ clear: left;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+
+.clearright {
+ clear: right;
+ height: 0;
+ font-size: 0;
+ line-height: 0;
+}
+
+.block {
+ display: block;
+}
+
+.inline {
+ display: inline;
+}
+
+.blockinline {
+ display: inline-block;
+}
+
+.left, .txtleft {
+ text-align: left;
+}
+
+.right, .txtright {
+ text-align: right;
+}
+
+.center, .txtcenter {
+ text-align: center;
+}
+
+.justify, .txtjustify {
+ text-align: justify;
+}
+
+.middle, .alignmiddle {
+ vertical-align: middle;
+}
+
+.top, .aligntop {
+ vertical-align: top;
+}
+
+.bottom, .alignbottom {
+ vertical-align: bottom;
+}
+
+.positop {
+ margin-top: 0;
+ padding-top: 0;
+}
+
+.posibottom {
+ margin-bottom: 0;
+ padding-bottom: 0;
+}
+
+.table {
+ display: table;
+}
+
+.tcaption1 {
+ display: block;
+ width: 100%;
+}
+
+.tcaption2 {
+ display: block;
+ width: 200%;
+}
+
+.tcaption3 {
+ display: block;
+ width: 300%;
+}
+
+.tcaption4 {
+ display: block;
+ width: 400%;
+}
+
+.tcaption5 {
+ display: block;
+ width: 500%;
+}
+
+.tcaption6 {
+ display: block;
+ width: 600%;
+}
+
+.tbody {
+ display: table-row-group;
+}
+
+.trow {
+ display: table-row;
+}
+
+.tcell {
+ display: table-cell;
+}
+
+.tfootend {
+ width: auto;
+}
+
+.collapse {
+ border-collapse: collapse;
+}
+
+.separate {
+ border-collapse: separate;
+}
+
+.bspacing1 {
+ border-spacing: 1px;
+}
+
+.bspacing2 {
+ border-spacing: 2px;
+}
+
+.bspacing3 {
+ border-spacing: 3px;
+}
+
+.bspacing4 {
+ border-spacing: 4px;
+}
+
+.bspacing5 {
+ border-spacing: 5px;
+}
+
+.bspacing10 {
+ border-spacing: 10px;
+}
+
+.widthauto {
+ width: auto;
+}
+
+.width100 {
+ width: 100%;
+}
+
+.width90 {
+ width: 90%;
+}
+
+.width80 {
+ width: 80%;
+}
+
+.width75 {
+ width: 75%;
+}
+
+.width70 {
+ width: 70%;
+}
+
+.width66 {
+ width: 66.6%;
+}
+
+.width60 {
+ width: 60%;
+}
+
+.width50 {
+ width: 49%;
+}
+
+.width45 {
+ width: 45%;
+}
+
+.width40 {
+ width: 40%;
+}
+
+.width33 {
+ width: 33.3%;
+}
+
+.width30 {
+ width: 30%;
+}
+
+.width25 {
+ width: 25%;
+}
+
+.width20 {
+ width: 20%;
+}
+
+.width15 {
+ width: 15%;
+}
+
+.width10 {
+ width: 10%;
+}
+
+.width5 {
+ width: 5%;
+}
+
+.width3 {
+ width: 3%;
+}
+
+.width2 {
+ width: 2%;
+}
+
+.width1 {
+ width: 1%;
+}
+
+.pad2 {
+ padding: 2px;
+}
+
+.pad3 {
+ padding: 3px;
+}
+
+.pad5 {
+ padding: 5px;
+}
+
+.pad7 {
+ padding: 7px;
+}
+
+.pad10 {
+ padding: 10px;
+}
+
+.marg2 {
+ margin: 2px;
+}
+
+.marg3 {
+ margin: 3px;
+}
+
+.marg5 {
+ margin: 5px;
+}
+
+.marg7 {
+ margin: 8px;
+}
+
+.marg10 {
+ margin: 10px;
+}
+
+.verysmall, .xx-small {
+ font-size: 0.7em;
+}
+
+.smallsmall, .x-small {
+ font-size: 0.8em;
+}
+
+.small {
+ font-size: 0.92em;
+}
+
+.normal {
+ font-size: 1em;
+}
+
+.big {
+ font-size: 1.17em;
+}
+
+.maxi {
+ font-size: 1.5em;
+}
+
+.bold {
+ font-weight: bold;
+}
+
+.bolder {
+ font-weight: bolder;
+}
+
+.lighter {
+ font-weight: lighter;
+}
+
+.normal {
+ font-weight: normal;
+ font-style: normal;
+}
+
+.italic {
+ font-style: italic;
+}
+
+.oblique {
+ font-style: oblique;
+}
+
+.underline {
+ text-decoration: underline;
+}
+
+.expanded {
+ letter-spacing: 0.5em;
+}
+
+.condensed {
+ letter-spacing: -0.1em;
+}
+
+.uppercase {
+ text-transform: uppercase;
+}
+
+.lowercase {
+ text-transform: lowercase;
+}
+
+.capitalize {
+ text-transform: capitalize;
+}
+
+.line100 {
+ line-height: 1em;
+}
+
+.line120 {
+ line-height: 1.2em;
+}
+
+.line140 {
+ line-height: 1.4em;
+}
+
+.line160 {
+ line-height: 1.6em;
+}
+
+.line170 {
+ line-height: 1.7em;
+}
+
+.line180 {
+ line-height: 1.8em;
+}
+
+.line200 {
+ line-height: 2em;
+}
+
+.line220 {
+ line-height: 2.2em;
+}
+
+.line240 {
+ line-height: 2.4em;
+}
+
+.red {
+ background-color: transparent;
+ color: #ff0000;
+}
+
+.blue {
+ background-color: transparent;
+ color: #0000ff;
+}
+
+.black {
+ background-color: transparent;
+ color: #000;
+}
+
+.white {
+ background-color: transparent;
+ color: #fff;
+}
+
+.yellow {
+ background-color: transparent;
+ color: #ffff00;
+}
+
+.orange {
+ background-color: transparent;
+ color: #ffa500;
+}
+
+.green {
+ background-color: transparent;
+ color: #008000;
+}
+
+.silver {
+ background-color: transparent;
+ color: #c0c0c0;
+}
+
+.hide {
+ display: none;
+}
+
+.hidden {
+ visibility: hidden;
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+.spacer {
+ padding: 0 0 3px 0;
+}
+
+.separator {
+ clear: both;
+ float: left;
+ height: 1px;
+ width: 100%;
+}
+
+.cursordefault {
+ cursor: default;
+}
+
+.cursormove {
+ cursor: move;
+}
+
+.cursorpointer {
+ cursor: pointer;
+}
+
+.cursorhelp {
+ cursor: help;
+}
+
+.opac5 {
+ opacity: 0.5 !important ;
+}
+
+.opac5:hover {
+ opacity: 1 !important ;
+}
+
+.opac7 {
+ opacity: 0.699999988079071044921875 !important ;
+}
+
+.opac7:hover {
+ opacity: 1 !important ;
+}
+
+.opac1 {
+ opacity: 1 !important ;
+}
+
+.opac1:hover {
+ opacity: 0.5 !important ;
+}
+
+.bradius3 {
+ border-radius: 3px;
+}
+
+.bradius5 {
+ border-radius: 5px;
+}
+
+.bradius10 {
+ border-radius: 10px;
+}
+
+.bradius15 {
+ border-radius: 15px;
+}
+
+.bnone {
+ border: 0;
+}
+
+.border {
+ border: #000 solid 1px;
+}
+
+.dotted {
+ border: #000 dotted 1px;
+}
+
+.dashed {
+ border: #000 dashed 1px;
+}
+
+.solidblack {
+ border: #000 solid 1px;
+}
+
+.solidwhite {
+ border: #fff solid 1px;
+}
+
+.solidred {
+ border: #ff0000 solid 1px;
+}
+
+.solidyellow {
+ border: #ffff00 solid 1px;
+}
+
+.solidblue {
+ border: #0000ff solid 1px;
+}
+
+.solidorange {
+ border: #ffa500 solid 1px;
+}
+
+.solidgreen {
+ border: #008000 solid 1px;
+}
+
+.solidbrown {
+ border: #a52a2a solid 1px;
+}
+
+.solidsilver {
+ border: #c0c0c0 solid 1px;
+}
+
+.dottedblack {
+ border: #000 dotted 1px;
+}
+
+.dottedwhite {
+ border: #fff dotted 1px;
+}
+
+.dottedred {
+ border: #ff0000 dotted 1px;
+}
+
+.dottedyellow {
+ border: #ffff00 dotted 1px;
+}
+
+.dottedblue {
+ border: #0000ff dotted 1px;
+}
+
+.dottedorange {
+ border: #ffa500 dotted 1px;
+}
+
+.dottedgreen {
+ border: #008000 dotted 1px;
+}
+
+.dottedbrown {
+ border: #a52a2a dotted 1px;
+}
+
+.dottedsilver {
+ border: #c0c0c0 dotted 1px;
+}
+
+.dashedblack {
+ border: #000 dashed 1px;
+}
+
+.dashedwhite {
+ border: #fff dashed 1px;
+}
+
+.dashedred {
+ border: #ff0000 dashed 1px;
+}
+
+.dashedyellow {
+ border: #ffff00 dashed 1px;
+}
+
+.dashedblue {
+ border: #0000ff dashed 1px;
+}
+
+.dashedorange {
+ border: #ffa500 dashed 1px;
+}
+
+.dashedgreen {
+ border: #008000 dashed 1px;
+}
+
+.dashedbrown {
+ border: #a52a2a dashed 1px;
+}
+
+.dashedsilver {
+ border: #c0c0c0 dashed 1px;
+}
+
+.doubleblack {
+ border: #000 double 4px;
+}
+
+.doublewhite {
+ border: #fff double 4px;
+}
+
+.doublered {
+ border: #ff0000 double 4px;
+}
+
+.doubleyellow {
+ border: #ffff00 double 4px;
+}
+
+.doubleblue {
+ border: #0000ff double 4px;
+}
+
+.doubleorange {
+ border: #ffa500 double 4px;
+}
+
+.doublegreen {
+ border: #008000 double 4px;
+}
+
+.doublebrown {
+ border: #a52a2a double 4px;
+}
+
+.doublesilver {
+ border: #c0c0c0 double 4px;
+}
+
+.grooveblack {
+ border: #000 groove 3px;
+}
+
+.groovewhite {
+ border: #fff groove 3px;
+}
+
+.groovered {
+ border: #ff0000 groove 3px;
+}
+
+.grooveyellow {
+ border: #ffff00 groove 3px;
+}
+
+.grooveblue {
+ border: #0000ff groove 3px;
+}
+
+.grooveorange {
+ border: #ffa500 groove 3px;
+}
+
+.groovegreen {
+ border: #008000 groove 3px;
+}
+
+.groovebrown {
+ border: #a52a2a groove 3px;
+}
+
+.groovesilver {
+ border: #c0c0c0 groove 3px;
+}
+
+.ridgeblack {
+ border: #000 ridge 3px;
+}
+
+.ridgewhite {
+ border: #fff ridge 3px;
+}
+
+.ridgered {
+ border: #ff0000 ridge 3px;
+}
+
+.ridgeyellow {
+ border: #ffff00 ridge 3px;
+}
+
+.ridgeblue {
+ border: #0000ff ridge 3px;
+}
+
+.ridgeorange {
+ border: #ffa500 ridge 3px;
+}
+
+.ridgegreen {
+ border: #008000 ridge 3px;
+}
+
+.ridgebrown {
+ border: #a52a2a ridge 3px;
+}
+
+.ridgesilver {
+ border: #c0c0c0 ridge 3px;
+}
+
+.insetblack1 {
+ border: #000 inset 1px;
+}
+
+.insetblack {
+ border: #000 inset 3px;
+}
+
+.insetwhite1 {
+ border: #fff inset 1px;
+}
+
+.insetwhite {
+ border: #fff inset 3px;
+}
+
+.insetred {
+ border: #ff0000 inset 3px;
+}
+
+.insetyellow {
+ border: #ffff00 inset 3px;
+}
+
+.insetblue {
+ border: #0000ff inset 3px;
+}
+
+.insetorange {
+ border: #ffa500 inset 3px;
+}
+
+.insetgreen {
+ border: #008000 inset 3px;
+}
+
+.insetbrown {
+ border: #a52a2a inset 3px;
+}
+
+.insetsilver1 {
+ border: #c0c0c0 inset 1px;
+}
+
+.insetsilver {
+ border: #c0c0c0 inset 3px;
+}
+
+.outsetblack1 {
+ border: #000 outset 1px;
+}
+
+.outsetblack {
+ border: #000 outset 3px;
+}
+
+.outsetwhite1 {
+ border: #fff outset 1px;
+}
+
+.outsetwhite {
+ border: #fff outset 3px;
+}
+
+.outsetred {
+ border: #ff0000 outset 3px;
+}
+
+.outsetyellow {
+ border: #ffff00 outset 3px;
+}
+
+.outsetblue {
+ border: #0000ff outset 3px;
+}
+
+.outsetorange {
+ border: #ffa500 outset 3px;
+}
+
+.outsetgreen {
+ border: #008000 outset 3px;
+}
+
+.outsetbrown {
+ border: #a52a2a outset 3px;
+}
+
+.outsetsilver1 {
+ border: #c0c0c0 outset 1px;
+}
+
+.outsetsilver {
+ border: #c0c0c0 outset 3px;
+}
+
+.arial {
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+.courierNew {
+ font-family: 'Courier New', Courier, monospace;
+}
+
+.georgia {
+ font-family: Georgia, 'Times New Roman', Times, serif;
+}
+
+.lucidaConsole {
+ font-family: 'Lucida Console', Monaco, monospace;
+}
+
+.lucidaSansUnicode {
+ font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
+}
+
+.tahoma {
+ font-family: Tahoma, Geneva, sans-serif;
+}
+
+.times {
+ font-family: 'Times New Roman', Times, serif;
+}
+
+.trebuchet {
+ font-family: 'Trebuchet MS', Helvetica, sans-serif;
+}
+
+.verdana {
+ font-family: Verdana, Geneva, sans-serif;
+}
+
+.msSans {
+ font-family: 'MS Sans Serif', Geneva, sans-serif;
+}
+
+.msSerif {
+ font-family: 'MS Serif', 'New York', serif;
+}
+
+.helvetica {
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
+}
+
+.impact {
+ font-family: Impact, Charcoal, sans-serif;
+}
+
+.century {
+ font-family: 'Century Gothic', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;
+}
+
+.shadow {
+ text-shadow: 2px 2px 3px #aaa;
+}
+
+.shadowlight {
+ text-shadow: 1px 1px 2px #aaa;
+}
+
+.boxshadow {
+ box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.5);
+}
+
+.boxinset {
+ box-shadow: 0 3px 8px rgba(0, 0, 0, 0.24) inset;
+}
+
+.twocolumn {
+ column-count: 2;
+ column-gap: 1.5em;
+}
+
+.threecolumn {
+ column-count: 3;
+ column-gap: 1.2em;
+}
+
+.forcolumn {
+ column-count: 4;
+ column-gap: 1.2em;
+}
+
+.column10 {
+ column-width: 10em;
+ column-gap: 1.2em;
+}
+
+.column15 {
+ column-width: 15em;
+ column-gap: 1.2em;
+}
+
+.column20 {
+ column-width: 20em;
+ column-gap: 1.2em;
+}
+
+.column25 {
+ column-width: 25em;
+ column-gap: 1.2em;
+}
\ No newline at end of file
Modified: XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.min.css
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.min.css 2013-09-09 02:30:14 UTC (rev 12013)
+++ XoopsCore/branches/2.5.x/2.5.7_timgno/htdocs/xoops.min.css 2013-09-09 13:53:12 UTC (rev 12014)
@@ -1,4 +1,7 @@
-/* $Id: xoops.min.css 11812 2013-07-06 23:19:19Z timgno $ */
+/*
+ * Compatible to CSS Version 3 and W3C Validator
+ * $Id: xoops.css 12012 2013-09-09 12:24:59Z timgno $
+ */
/*=== FORMAT BASIC ELEMENTS, can be overwritten in theme styles ===*/
-table{width:100%;border-collapse:collapse;border-spacing:0}del{text-decoration:line-through}sup{vertical-align:text-top}sub{vertical-align:text-bottom}ins{text-decoration:none}img.center{text-align:center;display:block;margin:6px auto 4px}img.left{text-align:left;float:left;clear:left;margin:2px 6px 2px 0}img.right{float:right;text-align:right;clear:right;margin:2px 0 2px 6px}pre{overflow:auto}#xoopsHiddenText{visibility:hidden;background-color:transparent;color:#000;font-weight:400;font-style:normal;text-decoration:none}.pagneutral{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagneutral.gif)}.pagact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagact.gif)}.paginact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/paginact.gif)}.xoops-form-element-caption-required .caption-marker{background-color:inherit;padding-left:2px;color:red}.xoops-form-element-help{font-size:.9em;padding-top:5px;font-weight:400}input,textarea,select{background-color:#fff;color:#000}input[type=submit],input[type=reset],input[type=button],.xo-formbuttons,.formButton,button{background-color:#d3d2d6;color:#405a80;padding:3px}#xo-fixbanner a{display:block;position:absolute;z-index:102;width:468px;height:60px}div.jGrowl{z-index:9999;padding:1em}body>div.jGrowl{position:fixed}body>div.jGrowl.top-right{right:25%;left:25%;top:2px}body>div.jGrowl.bottom-left{left:0;bottom:0}body>div.jGrowl.bottom-right{right:0;bottom:0}body>div.jGrowl.center{top:0;width:50%;left:25%}body>div.jGrowl.top-left{left:0;top:0}div.center div.jGrowl-notification,div.center div.jGrowl-closer{margin-left:auto;margin-right:auto}div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#ebfbfe;color:navy;width:100%;margin-top:.5em;margin-bottom:.5em;font-family:Tahoma,Geneva,sans-serif;font-size:1.2em;text-align:center;border:1px solid #69F;display:none;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-khtml-border-radius:5px;padding:.5em}div.jGrowl div.jGrowl-notification{min-height:40px}div.jGrowl div.jGrowl-notification div.jGrowl-header{font-weight:700;font-size:10px}div.jGrowl div.jGrowl-notification div.jGrowl-close{float:right;font-weight:700;font-size:12px;cursor:pointer}div.jGrowl div.jGrowl-closer{height:15px;padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:11px;font-weight:700;text-align:center}.floatleft{float:left;padding-left:4px;border:0;margin:0}.floatright{float:right;border:0;margin:0;padding:2px}.floatcenter0{margin:0 auto}.floatcenter1{margin:1em auto}.clear{clear:both;height:0;font-size:0;line-height:0}.clearleft{clear:left;height:0;font-size:0;line-height:0}.clearright{clear:right;height:0;font-size:0;line-height:0}.block{display:block}.inline{display:inline}.blockinline{display:inline-block}.left,.txtleft{text-align:left}.right,.txtright{text-align:right}.center,.txtcenter{text-align:center}.justify,.txtjustify{text-align:justify}.middle,.alignmiddle{vertical-align:middle}.top,.aligntop{vertical-align:top}.bottom,.alignbottom{vertical-align:bottom}.positop{margin-top:0;padding-top:0}.posibottom{margin-bottom:0;padding-bottom:0}.table{display:table}.tcaption1{display:block;width:100%}.tcaption2{display:block;width:200%}.tcaption3{display:block;width:300%}.tcaption4{display:block;width:400%}.tcaption5{display:block;width:500%}.tcaption6{display:block;width:600%}.tbody{display:table-row-group}.trow{display:table-row}.tcell{display:table-cell}.collapse{border-collapse:collapse}.separate{border-collapse:separate}.bspacing1{border-spacing:1px}.bspacing2{border-spacing:2px}.bspacing3{border-spacing:3px}.bspacing4{border-spacing:4px}.bspacing5{border-spacing:5px}.bspacing10{border-spacing:10px}.width100{width:100%}.width90{width:90%}.width80{width:80%}.width75{width:75%}.width70{width:70%}.width66{width:66.6%}.width60{width:60%}.width50{width:49%}.width45{width:45%}.width40{width:40%}.width33{width:33.3%}.width30{width:30%}.width25{width:25%}.width20{width:20%}.width15{width:15%}.width10{width:10%}.width5{width:5%}.width3{width:3%}.width2{width:2%}.width1{width:1%}.pad2{padding:2px}.pad3{padding:3px}.pad5{padding:5px}.pad7{padding:7px}.pad10{padding:10px}.marg2{margin:2px}.marg3{margin:3px}.marg5{margin:5px}.marg7{margin:8px}.marg10{margin:10px}.verysmall,.xx-small{font-size:.7em}.smallsmall,.x-small{font-size:.8em}.small{font-size:.92em}.normal{font-size:1em;font-weight:400;font-style:normal}.big{font-size:1.17em}.maxi{font-size:1.5em}.bolder{font-weight:bolder}.lighter{font-weight:lighter}.oblique{font-style:oblique}.expanded{letter-spacing:.5em}.condensed{letter-spacing:-.1em}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.line100{line-height:1em}.line120{line-height:1.2em}.line140{line-height:1.4em}.line160{line-height:1.6em}.line170{line-height:1.7em}.line180{line-height:1.8em}.line200{line-height:2em}.line220{line-height:2.2em}.line240{line-height:2.4em}.red{background-color:transparent;color:red}.blue{background-color:transparent;color:#00f}.black{background-color:transparent;color:#000}.white{background-color:transparent;color:#fff}.yellow{background-color:transparent;color:#ff0}.orange{background-color:transparent;color:orange}.green{background-color:transparent;color:green}.silver{background-color:transparent;color:silver}.hidden{visibility:hidden;position:absolute;top:0;left:0}.spacer{padding:0 0 3px}.separator{clear:both;float:left;height:1px;width:100%}.cursordefault{cursor:default}.cursormove{cursor:move}.cursorpointer{cursor:pointer}.opac7{opacity:.7 !important;filter:alpha(opacity=70) !important}.bradius3{border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.bradius5{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px}.bradius10{border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.bradius15{border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px}.solidwhite{border:1px solid #fff}.solidred{border:1px solid red}.solidyellow{border:1px solid #ff0}.solidblue{border:1px solid #00f}.solidorange{border:1px solid orange}.solidgreen{border:1px solid green}.solidbrown{border:1px solid #a52a2a}.solidsilver{border:1px solid silver}.dottedwhite{border:1px dotted #fff}.dottedred{border:1px dotted red}.dottedyellow{border:1px dotted #ff0}.dottedblue{border:1px dotted #00f}.dottedorange{border:1px dotted orange}.dottedgreen{border:1px dotted green}.dottedbrown{border:1px dotted #a52a2a}.dottedsilver{border:1px dotted silver}.dashedwhite{border:1px dashed #fff}.dashedred{border:1px dashed red}.dashedyellow{border:1px dashed #ff0}.dashedblue{border:1px dashed #00f}.dashedorange{border:1px dashed orange}.dashedgreen{border:1px dashed green}.dashedbrown{border:1px dashed #a52a2a}.dashedsilver{border:1px dashed silver}.doubleblack{border:4px double #000}.doublewhite{border:4px double #fff}.doublered{border:4px double red}.doubleyellow{border:4px double #ff0}.doubleblue{border:4px double #00f}.doubleorange{border:4px double orange}.doublegreen{border:4px double green}.doublebrown{border:4px double #a52a2a}.doublesilver{border:4px double silver}.grooveblack{border:3px groove #000}.groovewhite{border:3px groove #fff}.groovered{border:3px groove red}.grooveyellow{border:3px groove #ff0}.grooveblue{border:3px groove #00f}.grooveorange{border:3px groove orange}.groovegreen{border:3px groove green}.groovebrown{border:3px groove #a52a2a}.groovesilver{border:3px groove silver}.ridgeblack{border:3px ridge #000}.ridgewhite{border:3px ridge #fff}.ridgered{border:3px ridge red}.ridgeyellow{border:3px ridge #ff0}.ridgeblue{border:3px ridge #00f}.ridgeorange{border:3px ridge orange}.ridgegreen{border:3px ridge green}.ridgebrown{border:3px ridge #a52a2a}.ridgesilver{border:3px ridge silver}.insetblack1{border:1px inset #000}.insetblack{border:3px inset #000}.insetwhite1{border:1px inset #fff}.insetwhite{border:3px inset #fff}.insetred{border:3px inset red}.insetyellow{border:3px inset #ff0}.insetblue{border:3px inset #00f}.insetorange{border:3px inset orange}.insetgreen{border:3px inset green}.insetbrown{border:3px inset #a52a2a}.insetsilver1{border:1px inset silver}.insetsilver{border:3px inset silver}.outsetblack1{border:1px outset #000}.outsetblack{border:3px outset #000}.outsetwhite1{border:1px outset #fff}.outsetwhite{border:3px outset #fff}.outsetred{border:3px outset red}.outsetyellow{border:3px outset #ff0}.outsetblue{border:3px outset #00f}.outsetorange{border:3px outset orange}.outsetgreen{border:3px outset green}.outsetbrown{border:3px outset #a52a2a}.outsetsilver1{border:1px outset silver}.outsetsilver{border:3px outset silver}.arial{font-family:Arial,Helvetica,sans-serif}.courierNew{font-family:'Courier New',Courier,monospace}.georgia{font-family:Georgia,'Times New Roman',Times,serif}.lucidaConsole{font-family:'Lucida Console',Monaco,monospace}.lucidaSansUnicode{font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif}.tahoma{font-family:Tahoma,Geneva,sans-serif}.times{font-family:'Times New Roman',Times,serif}.trebuchet{font-family:'Trebuchet MS',Helvetica,sans-serif}.verdana{font-family:Verdana,Geneva,sans-serif}.msSans{font-family:'MS Sans Serif',Geneva,sans-serif}.msSerif{font-family:'MS Serif','New York',serif}.helvetica{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif}.impact{font-family:Impact,Charcoal,sans-serif}.century{font-family:'Century Gothic','Lucida Grande','Lucida Sans Unicode',sans-serif}.shadow{text-shadow:2px 2px 3px #aaa}.shadowlight{text-shadow:1px 1px 2px #aaa}.boxshadow{box-shadow:1px 2px 3px rgba(0,0,0,0.5);-moz-box-shadow:1px 2px 3px rgba(0,0,0,0.5);-webkit-box-shadow:1px 2px 3px rgba(0,0,0,0.5)}.boxshadow1{box-shadow:0 0 20px #787878;-webkit-box-shadow:0 0 20px #787878;-moz-box-shadow:0 0 20px #787878;filter:progid:DXImageTransform.Microsoft.Shadow(color='#bbbbbb',Direction=135,Strength=5);zoom:1}.boxrelief{box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-moz-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset;-webkit-box-shadow:0 20px 10px -10px rgba(255,255,255,0.3) inset}.boxinset{box-shadow:0 3px 8px rgba(0,0,0,.24) inset;-moz-box-shadow:0 3px 8px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 3px 8px rgba(0,0,0,.4) inset}.twocolumn{column-count:2;column-gap:1.5em;-moz-column-count:2;-moz-column-gap:1.5em;-webkit-column-count:2;-webkit-column-gap:1.5em}.threecolumn{column-count:3;column-gap:1.2em;-moz-column-count:3;-moz-column-gap:1.2em;-webkit-column-count:3;-webkit-column-gap:1.2em}.forcolumn{column-count:4;column-gap:1.2em;-moz-column-count:4;-moz-column-gap:1.2em;-webkit-column-count:4;-webkit-column-gap:1.2em}.column10{column-width:10em;column-gap:1.2em;-moz-column-width:10em;-moz-column-gap:1.2em;-webkit-column-width:10em;-webkit-column-gap:1.2em}.column15{column-width:15em;column-gap:1.2em;-moz-column-width:15em;-moz-column-gap:1.2em;-webkit-column-width:15em;-webkit-column-gap:1.2em}.column20{column-width:20em;column-gap:1.2em;-moz-column-width:20em;-moz-column-gap:1.2em;-webkit-column-width:20em;-webkit-column-gap:1.2em}.column25{column-width:25em;column-gap:1.2em;-moz-column-width:25em;-moz-column-gap:1.2em;-webkit-column-width:25em;-webkit-column-gap:1.2em}strong,b,dfn,.bold{font-weight:700}u,.underline{text-decoration:underline}i,em,.italic{font-style:italic}img,fieldset,.bnone{border:0}acronym,abbr,dfn,.cursorhelp{cursor:help}.xoops-form-element-caption .caption-marker,.hide{display:none}.tfootend,.widthauto{width:auto}.opac5,.opac1:hover{opacity:.5 !important;filter:alpha(opacity=50) !important}.opac5:hover,.opac7:hover,.opac1{opacity:1 !important;filter:alpha(opacity=100) !important}.border,.solidblack{border:1px solid #000}.dotted,.dottedblack{border:1px dotted #000}.dashed,.dashedblack{border:1px dashed #000}
\ No newline at end of file
+table{width:100%;border-collapse:collapse;border-spacing:0}strong,b,dfn{font-weight:bold}u{text-decoration:underline}i,em{font-style:italic}del{text-decoration:line-through}sup{vertical-align:text-top}sub{vertical-align:text-bottom}ins{text-decoration:none}img{border:0}img.center{text-align:center;margin:6px auto;display:block;margin-bottom:4px}img.left{text-align:left;float:left;margin:2px 6px 2px 0;clear:left}img.right{float:right;text-align:right;margin:2px 0 2px 6px;clear:right}acronym,abbr,dfn{cursor:help}pre{overflow:auto}#xoopsHiddenText{visibility:hidden;background-color:transparent;color:#000;font-weight:normal;font-style:normal;text-decoration:none}.pagneutral{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagneutral.gif)}.pagact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/pagact.gif)}.paginact{font-size:10px;width:16px;height:19px;text-align:center;background-image:url(./images/paginact.gif)}.xoops-form-element-caption .caption-marker{display:none}.xoops-form-element-caption-required .caption-marker{background-color:inherit;padding-left:2px;color:red}.xoops-form-element-help{font-size:.9em;padding-top:5px;font-weight:normal}fieldset{border:0}input,textarea,select{background-color:#fff;color:#000}input[type="submit"],input[type="reset"],input[type="button"],.xo-formbuttons,.formButton,button{background-color:#d3d2d6;color:#405a80;padding:3px}#xo-fixbanner a{display:block;position:absolute;z-index:102;width:468px;height:60px}div.jGrowl{padding:1em;z-index:9999}body>div.jGrowl{position:fixed}body>div.jGrowl.top-right{right:25%;left:25%;top:2px}body>div.jGrowl.bottom-left{left:0;bottom:0}body>div.jGrowl.bottom-right{right:0;bottom:0}body>div.jGrowl.center{top:0;width:50%;left:25%}body>div.jGrowl.top-left{left:0;top:0}div.center div.jGrowl-notification,div.center div.jGrowl-closer{margin-left:auto;margin-right:auto}div.jGrowl div.jGrowl-notification,div.jGrowl div.jGrowl-closer{background-color:#ebfbfe;color:navy;width:100%;padding:.5em;margin-top:.5em;margin-bottom:.5em;font-family:Tahoma,Geneva,sans-serif;font-size:1.2em;text-align:center;border:#69f solid 1px;display:none;border-radius:5px}div.jGrowl div.jGrowl-notification{min-height:40px}div.jGrowl div.jGrowl-notification div.jGrowl-header{font-weight:bold;font-size:10px}div.jGrowl div.jGrowl-notification div.jGrowl-close{float:right;font-weight:bold;font-size:12px;cursor:pointer}div.jGrowl div.jGrowl-closer{height:15px;padding-top:4px;padding-bottom:4px;cursor:pointer;font-size:11px;font-weight:bold;text-align:center}.floatleft{float:left;margin:0;padding-left:4px;border:0}.floatright{float:right;margin:0;padding:2px;border:0}.floatcenter0{margin:0 auto}.floatcenter1{margin:1em auto}.clear{clear:both;height:0;font-size:0;line-height:0}.clearleft{clear:left;height:0;font-size:0;line-height:0}.clearright{clear:right;height:0;font-size:0;line-height:0}.block{display:block}.inline{display:inline}.blockinline{display:inline-block}.left,.txtleft{text-align:left}.right,.txtright{text-align:right}.center,.txtcenter{text-align:center}.justify,.txtjustify{text-align:justify}.middle,.alignmiddle{vertical-align:middle}.top,.aligntop{vertical-align:top}.bottom,.alignbottom{vertical-align:bottom}.positop{margin-top:0;padding-top:0}.posibottom{margin-bottom:0;padding-bottom:0}.table{display:table}.tcaption1{display:block;width:100%}.tcaption2{display:block;width:200%}.tcaption3{display:block;width:300%}.tcaption4{display:block;width:400%}.tcaption5{display:block;width:500%}.tcaption6{display:block;width:600%}.tbody{display:table-row-group}.trow{display:table-row}.tcell{display:table-cell}.tfootend{width:auto}.collapse{border-collapse:collapse}.separate{border-collapse:separate}.bspacing1{border-spacing:1px}.bspacing2{border-spacing:2px}.bspacing3{border-spacing:3px}.bspacing4{border-spacing:4px}.bspacing5{border-spacing:5px}.bspacing10{border-spacing:10px}.widthauto{width:auto}.width100{width:100%}.width90{width:90%}.width80{width:80%}.width75{width:75%}.width70{width:70%}.width66{width:66.6%}.width60{width:60%}.width50{width:49%}.width45{width:45%}.width40{width:40%}.width33{width:33.3%}.width30{width:30%}.width25{width:25%}.width20{width:20%}.width15{width:15%}.width10{width:10%}.width5{width:5%}.width3{width:3%}.width2{width:2%}.width1{width:1%}.pad2{padding:2px}.pad3{padding:3px}.pad5{padding:5px}.pad7{padding:7px}.pad10{padding:10px}.marg2{margin:2px}.marg3{margin:3px}.marg5{margin:5px}.marg7{margin:8px}.marg10{margin:10px}.verysmall,.xx-small{font-size:.7em}.smallsmall,.x-small{font-size:.8em}.small{font-size:.92em}.normal{font-size:1em}.big{font-size:1.17em}.maxi{font-size:1.5em}.bold{font-weight:bold}.bolder{font-weight:bolder}.lighter{font-weight:lighter}.normal{font-weight:normal;font-style:normal}.italic{font-style:italic}.oblique{font-style:oblique}.underline{text-decoration:underline}.expanded{letter-spacing:.5em}.condensed{letter-spacing:-0.1em}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.line100{line-height:1em}.line120{line-height:1.2em}.line140{line-height:1.4em}.line160{line-height:1.6em}.line170{line-height:1.7em}.line180{line-height:1.8em}.line200{line-height:2em}.line220{line-height:2.2em}.line240{line-height:2.4em}.red{background-color:transparent;color:red}.blue{background-color:transparent;color:#00f}.black{background-color:transparent;color:#000}.white{background-color:transparent;color:#fff}.yellow{background-color:transparent;color:#ff0}.orange{background-color:transparent;color:orange}.green{background-color:transparent;color:#008000}.silver{background-color:transparent;color:silver}.hide{display:none}.hidden{visibility:hidden;position:absolute;top:0;left:0}.spacer{padding:0 0 3px 0}.separator{clear:both;float:left;height:1px;width:100%}.cursordefault{cursor:default}.cursormove{cursor:move}.cursorpointer{cursor:pointer}.cursorhelp{cursor:help}.opac5{opacity:.5 !important}.opac5:hover{opacity:1 !important}.opac7{opacity:.699999988079071044921875 !important}.opac7:hover{opacity:1 !important}.opac1{opacity:1 !important}.opac1:hover{opacity:.5 !important}.bradius3{border-radius:3px}.bradius5{border-radius:5px}.bradius10{border-radius:10px}.bradius15{border-radius:15px}.bnone{border:0}.border{border:#000 solid 1px}.dotted{border:#000 dotted 1px}.dashed{border:#000 dashed 1px}.solidblack{border:#000 solid 1px}.solidwhite{border:#fff solid 1px}.solidred{border:#f00 solid 1px}.solidyellow{border:#ff0 solid 1px}.solidblue{border:#00f solid 1px}.solidorange{border:#ffa500 solid 1px}.solidgreen{border:#008000 solid 1px}.solidbrown{border:#a52a2a solid 1px}.solidsilver{border:#c0c0c0 solid 1px}.dottedblack{border:#000 dotted 1px}.dottedwhite{border:#fff dotted 1px}.dottedred{border:#f00 dotted 1px}.dottedyellow{border:#ff0 dotted 1px}.dottedblue{border:#00f dotted 1px}.dottedorange{border:#ffa500 dotted 1px}.dottedgreen{border:#008000 dotted 1px}.dottedbrown{border:#a52a2a dotted 1px}.dottedsilver{border:#c0c0c0 dotted 1px}.dashedblack{border:#000 dashed 1px}.dashedwhite{border:#fff dashed 1px}.dashedred{border:#f00 dashed 1px}.dashedyellow{border:#ff0 dashed 1px}.dashedblue{border:#00f dashed 1px}.dashedorange{border:#ffa500 dashed 1px}.dashedgreen{border:#008000 dashed 1px}.dashedbrown{border:#a52a2a dashed 1px}.dashedsilver{border:#c0c0c0 dashed 1px}.doubleblack{border:#000 double 4px}.doublewhite{border:#fff double 4px}.doublered{border:#f00 double 4px}.doubleyellow{border:#ff0 double 4px}.doubleblue{border:#00f double 4px}.doubleorange{border:#ffa500 double 4px}.doublegreen{border:#008000 double 4px}.doublebrown{border:#a52a2a double 4px}.doublesilver{border:#c0c0c0 double 4px}.grooveblack{border:#000 groove 3px}.groovewhite{border:#fff groove 3px}.groovered{border:#f00 groove 3px}.grooveyellow{border:#ff0 groove 3px}.grooveblue{border:#00f groove 3px}.grooveorange{border:#ffa500 groove 3px}.groovegreen{border:#008000 groove 3px}.groovebrown{border:#a52a2a groove 3px}.groovesilver{border:#c0c0c0 groove 3px}.ridgeblack{border:#000 ridge 3px}.ridgewhite{border:#fff ridge 3px}.ridgered{border:#f00 ridge 3px}.ridgeyellow{border:#ff0 ridge 3px}.ridgeblue{border:#00f ridge 3px}.ridgeorange{border:#ffa500 ridge 3px}.ridgegreen{border:#008000 ridge 3px}.ridgebrown{border:#a52a2a ridge 3px}.ridgesilver{border:#c0c0c0 ridge 3px}.insetblack1{border:#000 inset 1px}.insetblack{border:#000 inset 3px}.insetwhite1{border:#fff inset 1px}.insetwhite{border:#fff inset 3px}.insetred{border:#f00 inset 3px}.insetyellow{border:#ff0 inset 3px}.insetblue{border:#00f inset 3px}.insetorange{border:#ffa500 inset 3px}.insetgreen{border:#008000 inset 3px}.insetbrown{border:#a52a2a inset 3px}.insetsilver1{border:#c0c0c0 inset 1px}.insetsilver{border:#c0c0c0 inset 3px}.outsetblack1{border:#000 outset 1px}.outsetblack{border:#000 outset 3px}.outsetwhite1{border:#fff outset 1px}.outsetwhite{border:#fff outset 3px}.outsetred{border:#f00 outset 3px}.outsetyellow{border:#ff0 outset 3px}.outsetblue{border:#00f outset 3px}.outsetorange{border:#ffa500 outset 3px}.outsetgreen{border:#008000 outset 3px}.outsetbrown{border:#a52a2a outset 3px}.outsetsilver1{border:#c0c0c0 outset 1px}.outsetsilver{border:#c0c0c0 outset 3px}.arial{font-family:Arial,Helvetica,sans-serif}.courierNew{font-family:'Courier New',Courier,monospace}.georgia{font-family:Georgia,'Times New Roman',Times,serif}.lucidaConsole{font-family:'Lucida Console',Monaco,monospace}.lucidaSansUnicode{font-family:'Lucida Sans Unicode','Lucida Grande',sans-serif}.tahoma{font-family:Tahoma,Geneva,sans-serif}.times{font-family:'Times New Roman',Times,serif}.trebuchet{font-family:'Trebuchet MS',Helvetica,sans-serif}.verdana{font-family:Verdana,Geneva,sans-serif}.msSans{font-family:'MS Sans Serif',Geneva,sans-serif}.msSerif{font-family:'MS Serif','New York',serif}.helvetica{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif}.impact{font-family:Impact,Charcoal,sans-serif}.century{font-family:'Century Gothic','Lucida Grande','Lucida Sans Unicode',sans-serif}.shadow{text-shadow:2px 2px 3px #aaa}.shadowlight{text-shadow:1px 1px 2px #aaa}.boxshadow{box-shadow:1px 2px 3px rgba(0,0,0,0.5)}.boxinset{box-shadow:0 3px 8px rgba(0,0,0,0.24) inset}.twocolumn{column-count:2;column-gap:1.5em}.threecolumn{column-count:3;column-gap:1.2em}.forcolumn{column-count:4;column-gap:1.2em}.column10{column-width:10em;column-gap:1.2em}.column15{column-width:15em;column-gap:1.2em}.column20{column-width:20em;column-gap:1.2em}.column25{column-width:25em;column-gap:1.2em}
\ No newline at end of file
|
|
From: <be...@us...> - 2013-09-09 02:30:20
|
Revision: 12013
http://sourceforge.net/p/xoops/svn/12013
Author: beckmi
Date: 2013-09-09 02:30:14 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
Enhancing Help with multi-page (https://sourceforge.net/p/xoops/feature-requests/421/)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/help.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/help.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/help.php 2013-09-08 17:33:02 UTC (rev 12012)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/help.php 2013-09-09 02:30:14 UTC (rev 12013)
@@ -18,135 +18,192 @@
// Include header
include 'header.php';
-$page = system_CleanVars ( $_REQUEST, 'page', '', 'string' );
-$mid = system_CleanVars ( $_REQUEST, 'mid', 0, 'int' );
+$page = system_CleanVars($_REQUEST, 'page', '', 'string');
+$mid = system_CleanVars($_REQUEST, 'mid', 0, 'int');
// Define main template
$xoopsOption['template_main'] = 'system_help.html';
xoops_cp_header();
// Define Stylesheet
-$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/admin.css' );
-$xoTheme->addStylesheet( XOOPS_URL . '/modules/system/css/help.css' );
+$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css');
+$xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/help.css');
// Define Breadcrumb and tips
-$xoBreadCrumb->addLink( _AM_SYSTEM_HELP, 'help.php' );
+$xoBreadCrumb->addLink(_AM_SYSTEM_HELP, 'help.php');
-if ( $mid > 0 ) {
+// If $mid > 0, we're in a module's help section.
+if ($mid > 0) {
$module_handler =& xoops_gethandler('module');
- $module = $module_handler->get($mid);
+ $module = $module_handler->get($mid);
- $xoBreadCrumb->addLink( $module->getVar('name'), 'help.php?mid=' . $module->getVar('mid', 's') );
- $xoBreadCrumb->addLink( system_adminVersion( $page, 'name' ) );
+ $xoBreadCrumb->addLink($module->getVar('name'), 'help.php?mid=' . $module->getVar('mid', 's'));
+ $xoBreadCrumb->addLink(system_adminVersion($page, 'name'));
$xoBreadCrumb->render();
- if ( $module->getVar('dirname', 'e') == 'system' ) {
-
+ // Special handling for the System Module
+ if ($module->getVar('dirname', 'e') == 'system') {
xoops_load('xoopslists');
-
$admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
- $dirlist = XoopsLists::getDirListAsArray($admin_dir);
-
- foreach($dirlist as $directory) {
- if ( file_exists( $admin_dir . '/' . $directory . '/xoops_version.php' ) ) {
-
+ $dirlist = XoopsLists::getDirListAsArray($admin_dir);
+ foreach ($dirlist as $directory) {
+ if (file_exists($admin_dir . '/' . $directory . '/xoops_version.php')) {
require $admin_dir . '/' . $directory . '/xoops_version.php';
-
if ($modversion['help']) {
- $help['name'] = system_adminVersion( $directory, 'name' );
- $help['link'] = 'help.php?mid=' . $mid . '&' . system_adminVersion( $directory, 'help' );;
- $xoopsTpl->append_by_ref( 'help', $help );
+ $help['name'] = system_adminVersion($directory, 'name');
+ $help['link'] = 'help.php?mid=' . $mid . '&' . system_adminVersion($directory, 'help');
+ $xoopsTpl->append_by_ref('help', $help);
unset($help);
}
unset($modversion);
}
}
unset($dirlist);
+
+ // Handling for all other modules.
} else {
- $help = $module->toArray();
- //$help['name'] = $module->getVar('dirname', 's');
- $help['link'] = 'help.php?mid=' . $mid . '&' . $module->getInfo('help');
- $xoopsTpl->append_by_ref( 'help', $help );
+ $list_help = array();
+ $listed_mods[0] = $module->toArray();
+ $helplist = $module->getInfo('helpsection');
+ $j = 0;
+ if (is_array($helplist)) {
+ foreach ($helplist as $helpitem) {
+ if (($helpitem['name'] != '') && ($helpitem['link'] != '')) {
+ $list_help[$j]['name'] = $helpitem['name'];
+ $list_help[$j]['link'] = 'help.php?mid=' . $mid . '&' . $helpitem['link'];
+ $j++;
+ }
+ }
+ $listed_mods[0]['help_page'] = $list_help;
+ $xoopsTpl->assign('list_mods', $listed_mods);
+ }
+ unset ($helplist);
+ if (($module->getInfo('help') != '') && ($j == 0)) {
+ $help['name'] = $module->getInfo('name');
+ $help['link'] = 'help.php?mid=' . $mid . '&' . $module->getInfo('help');
+ $xoopsTpl->append_by_ref('help', $help);
+ }
unset($help);
}
- $xoopsTpl->assign( 'modname', $module->getVar('name') );
-
- if ( $page != '' ) {
+ $xoopsTpl->assign('modname', $module->getVar('name'));
+
+ if ($page != '') {
// Call template
- if ( file_exists( XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html' ) ) {
- $helpcontent = $xoopsTpl->fetch( XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html' );
- }else{
- if ( file_exists( XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html' ) ) {
- $helpcontent = $xoopsTpl->fetch(XOOPS_ROOT_PATH.'/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html');
+ if (file_exists(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'
+ )
+ ) {
+ $helpcontent = $xoopsTpl->fetch(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/' . $page . '.html'
+ );
+ } else {
+ if (file_exists(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'
+ )
+ ) {
+ $helpcontent = $xoopsTpl->fetch(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/english/help/' . $page . '.html'
+ );
} else {
$xoopsTpl->assign('load_error', 1);
}
}
-
$xoopsTpl->assign('helpcontent', $helpcontent);
-
- } else {
- if ( file_exists( XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html' ) ) {
- $helpcontent = $xoopsTpl->fetch( XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html' );
- }else{
- $helpcontent = $module->getInfo('description');
- $helpcontent = '<div id="non-modhelp">' . $helpcontent . '</div>';
- }
-
- $xoopsTpl->assign('helpcontent', $helpcontent);
-
- }
-
+ } else {
+ if (file_exists(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/' . $xoopsConfig['language'] . '/help/module_index.html'
+ )
+ ) {
+ $helpcontent = $xoopsTpl->fetch(
+ XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname', 'e') . '/language/'
+ . $xoopsConfig['language'] . '/help/module_index.html'
+ );
+ } else {
+ $helpcontent = $module->getInfo('description');
+ $helpcontent = '<div id="non-modhelp">' . $helpcontent . '</div>';
+ }
+ $xoopsTpl->assign('helpcontent', $helpcontent);
+ }
+
+ // This section is called if we're in the general help area.
} else {
$xoBreadCrumb->render();
+
// Get Module Handler
$module_handler =& xoops_gethandler('module');
- $criteria = new CriteriaCompo();
+ $criteria = new CriteriaCompo();
$criteria->setOrder('weight');
+
// Get all installed modules
- $installed_mods = $module_handler->getObjects( $criteria );
- $listed_mods = array();
- $i = 0;
- $j = 0;
- foreach ( $installed_mods as $module ) {
- $list_help = array();
- $listed_mods[$i] = $module->toArray();
+ $installed_mods = $module_handler->getObjects($criteria);
+ $listed_mods = array();
+ $i = 0;
+ $j = 0;
+ foreach ($installed_mods as $module) {
+ $list_help = array();
+ $listed_mods[$i] = $module->toArray();
$listed_mods[$i]['image'] = $module->getInfo('image');
$listed_mods[$i]['adminindex'] = $module->getInfo('adminindex');
- $listed_mods[$i]['version'] = round( $module->getVar('version') / 100, 2 );
- $listed_mods[$i]['last_update'] = formatTimestamp( $module->getVar('last_update'), 'm' );
+ $listed_mods[$i]['version'] = round($module->getVar('version') / 100, 2);
+ $listed_mods[$i]['last_update'] = formatTimestamp($module->getVar('last_update'), 'm');
$listed_mods[$i]['author'] = $module->getInfo('author');
$listed_mods[$i]['credits'] = $module->getInfo('credits');
$listed_mods[$i]['license'] = $module->getInfo('license');
$listed_mods[$i]['description'] = $module->getInfo('description');
- if ( $module->getVar('dirname', 'e') == 'system' ) {
+ // Special handling for the System module
+ if ($module->getVar('dirname', 'e') == 'system') {
xoops_load('xoopslists');
-
$admin_dir = XOOPS_ROOT_PATH . '/modules/system/admin';
- $dirlist = XoopsLists::getDirListAsArray($admin_dir);
-
- foreach($dirlist as $directory) {
- if ( file_exists( $admin_dir . '/' . $directory . '/xoops_version.php' ) ) {
-
+ $dirlist = XoopsLists::getDirListAsArray($admin_dir);
+ foreach ($dirlist as $directory) {
+ if (file_exists($admin_dir . '/' . $directory . '/xoops_version.php')) {
require $admin_dir . '/' . $directory . '/xoops_version.php';
-
if ($modversion['help']) {
- $list_help[$j]['name'] = system_adminVersion( $directory, 'name' );
- $list_help[$j]['link'] = 'help.php?mid=' . $module->getVar('mid', 'e') . '&' . system_adminVersion( $directory, 'help' );
+ $list_help[$j]['name'] = system_adminVersion($directory, 'name');
+ $list_help[$j]['link']
+ =
+ 'help.php?mid=' . $module->getVar('mid', 'e') . '&' . system_adminVersion(
+ $directory,
+ 'help'
+ );
}
unset($modversion);
$j++;
}
}
unset($dirlist);
+
+ // Handling for all other modules
} else {
- if ( $module->getInfo('help') != '' ) {
- $list_help[$j]['name'] = $module->getVar('dirname', 's');
- $list_help[$j]['link'] = 'help.php?mid=' . $module->getVar('mid', 'e') . '&' . $module->getInfo('help');
+ $helplist = $module->getInfo('helpsection');
+ $k = 0;
+
+ // Only build the list if one has been defined.
+ if (is_array($helplist)) {
+ foreach ($helplist as $helpitem) {
+ if (($helpitem['name'] != '') && ($helpitem['link'] != '')) {
+ $list_help[$j]['name'] = $helpitem['name'];
+ $list_help[$j]['link']
+ =
+ 'help.php?mid=' . $module->getVar('mid', 'e') . '&' . $helpitem['link'];
+ $j++;
+ $k++;
+ }
+ }
}
+ unset($helplist);
+
+ // If there is no help section ($k=0), and a lone help parameter has been defined.
+ if (($module->getInfo('help') != '') && ($k == 0)) {
+ $list_help[$j]['name'] = $module->getInfo('name');
+ $list_help[$j]['link']
+ =
+ 'help.php?mid=' . $module->getVar('mid', 'e') . '&' . $module->getInfo('help');
+ }
}
+
$listed_mods[$i]['help_page'] = $list_help;
- if ( $module->getInfo('help') == '' ) {
+ if ($module->getInfo('help') == '') {
unset($listed_mods[$i]);
}
unset($list_help);
@@ -155,15 +212,19 @@
$j++;
}
$xoopsTpl->assign('list_mods', $listed_mods);
-
- if ( file_exists( XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html' ) ) {
- $helpcontent = $xoopsTpl->fetch( XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html' );
- }else{
- $helpcontent = '<div id="non-modhelp">' . _MD_CPANEL_HELPCENTER . '</div>';
- }
-
+
+ if (file_exists(
+ XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html'
+ )
+ ) {
+ $helpcontent = $xoopsTpl->fetch(
+ XOOPS_ROOT_PATH . '/modules/system/language/' . $xoopsConfig['language'] . '/help/help_center.html'
+ );
+ } else {
+ $helpcontent = '<div id="non-modhelp">' . _MD_CPANEL_HELPCENTER . '</div>';
+ }
+
$xoopsTpl->assign('helpcontent', $helpcontent);
}
+
xoops_cp_footer();
-
-?>
\ No newline at end of file
|
|
From: <txm...@us...> - 2013-09-08 17:33:05
|
Revision: 12012
http://sourceforge.net/p/xoops/svn/12012
Author: txmodxoops
Date: 2013-09-08 17:33:02 +0000 (Sun, 08 Sep 2013)
Log Message:
-----------
fixed db date string italian/global.php
Modified Paths:
--------------
XoopsLanguages/italian/core/2.5.6/htdocs/language/italian/global.php
Modified: XoopsLanguages/italian/core/2.5.6/htdocs/language/italian/global.php
===================================================================
--- XoopsLanguages/italian/core/2.5.6/htdocs/language/italian/global.php 2013-09-08 15:51:55 UTC (rev 12011)
+++ XoopsLanguages/italian/core/2.5.6/htdocs/language/italian/global.php 2013-09-08 17:33:02 UTC (rev 12012)
@@ -248,6 +248,6 @@
/**
* Additions to 2.5.5
**/
-define('_DBDATESTRING','Y-m-d');
+define('_DBDATESTRING','d-m-Y');
define('_DBTIMESTRING','H:i:s');
-define('_DBTIMESTAMPSTRING','Y-m-d H:i:s');
\ No newline at end of file
+define('_DBTIMESTAMPSTRING','d-m-Y H:i:s');
\ No newline at end of file
|
|
From: <be...@us...> - 2013-09-08 15:51:59
|
Revision: 12011
http://sourceforge.net/p/xoops/svn/12011
Author: beckmi
Date: 2013-09-08 15:51:55 +0000 (Sun, 08 Sep 2013)
Log Message:
-----------
Bug fix: replacing Description with Summary
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-05 20:53:03 UTC (rev 12010)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-08 15:51:55 UTC (rev 12011)
@@ -236,7 +236,7 @@
if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary))
{
$summaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
- $summaryDescription = stripslashes($this->getVar('description'));
+ $summaryDescription = stripslashes($this->getVar('summary'));
if (strlen($summaryDescription) > $summaryLength) {
$summaryDescription = substr($summaryDescription, 0, $summaryLength);
$summaryDescription = trim(substr($summaryDescription, 0, strrpos($summaryDescription, ' '))) . ' ...';
|
|
From: <luc...@us...> - 2013-09-05 20:53:07
|
Revision: 12010
http://sourceforge.net/p/xoops/svn/12010
Author: luciorota
Date: 2013-09-05 20:53:03 +0000 (Thu, 05 Sep 2013)
Log Message:
-----------
classes search blocks
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/ip_log.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mimetype.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/rating.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/report.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/blocks/wfdownloads_block_top_by_cat.html
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php 2013-09-05 16:13:31 UTC (rev 12009)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top.php 2013-09-05 20:53:03 UTC (rev 12010)
@@ -27,49 +27,41 @@
* $options[1] = How many downloads are displayes
* Output : Returns the most recent or most popular downloads
*/
-//include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
-
+defined("XOOPS_ROOT_PATH") or die('XOOPS root path not defined');
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
function wfdownloads_top_show($options)
{
global $xoopsUser;
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
- $module_handler = xoops_gethandler('module');
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
$gperm_handler = xoops_gethandler('groupperm');
- $download_handler = xoops_getmodulehandler('download', 'wfdownloads');
- $category_handler = xoops_getmodulehandler('category', 'wfdownloads');
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
$block = array();
- $wfModule = $module_handler->getByDirname("wfdownloads");
- $config_handler = xoops_gethandler('config');
- $wfModule_mid = $wfModule->getVar('mid');
- $wfModule_config = $config_handler->getConfigsByCat(0, $wfModule_mid);
-
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
- $allowed_cats = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfModule_mid);
-
// get downloads
- $criteria = new Criteria("cid", implode(',', $allowed_cats), "IN");
- $criteria = new CriteriaCompo(new Criteria('offline', 0)); // false
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
+ $criteria->add(new Criteria('offline', 0)); // false
$criteria->setSort($options[0]);
$criteria->setOrder('DESC');
$criteria->setLimit($options[1]);
- $downloads = $download_handler->getObjects($criteria);
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
foreach (array_keys($downloads) as $i) {
$download = $downloads[$i]->toArray();
- if (!in_array((int)$download['cid'], $allowed_cats)){
+ if (!in_array((int)$download['cid'], $allowedDownCategoriesIds)) {
continue;
}
-
$download['title'] = xoops_substr($download['title'], 0, ($options[2] -1));
$download['id'] = (int)$download['lid'];
if ($options[0] == 'published') {
- $download['date'] = formatTimestamp($download['published'], $wfModule_config['dateformat']);
+ $download['date'] = formatTimestamp($download['published'], $wfdownloads->getConfig('dateformat'));
} else {
- $download['date'] = formatTimestamp($download['date'], $wfModule_config['dateformat']);
+ $download['date'] = formatTimestamp($download['date'], $wfdownloads->getConfig('dateformat'));
}
- $download['dirname'] = $wfModule->dirname();
+ $download['dirname'] = $wfdownloads->getModule()->dirname();
$block['downloads'][] = $download;
}
return $block;
@@ -78,14 +70,9 @@
function wfdownloads_top_edit($options)
{
$form = "" . _MB_WFD_DISP . " ";
- $form .= "<input type='hidden' name='options[]' value='";
- if ($options[0] == 'published') {
- $form .= "published'";
- } else {
- $form .= "hits'";
- }
- $form .= " />";
+ $form .= "<input type='hidden' name='options[]' value='". ($options[0] == 'published') ? 'published' : 'hits' . "' />";
$form .= "<input type='text' name='options[]' value='" . $options[1] . "' /> " . _MB_WFD_FILES . "";
- $form .= " <br />" . _MB_WFD_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "' /> " . _MB_WFD_LENGTH . "";
+ $form .= "<br />";
+ $form .= "" . _MB_WFD_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "' /> " . _MB_WFD_LENGTH . "";
return $form;
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php 2013-09-05 16:13:31 UTC (rev 12009)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/blocks/top_by_cat.php 2013-09-05 20:53:03 UTC (rev 12010)
@@ -27,60 +27,54 @@
* $options[1] = How many downloads are displayes
* Output : Returns the most recent or most popular downloads
*/
-//include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
-
+defined("XOOPS_ROOT_PATH") or die('XOOPS root path not defined');
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
function wfdownloads_top_by_cat_show($options)
{
global $xoopsUser;
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
- $module_handler = xoops_gethandler('module');
$gperm_handler = xoops_gethandler('groupperm');
- $download_handler = xoops_getmodulehandler('download', 'wfdownloads');
- $category_handler = xoops_getmodulehandler('category', 'wfdownloads');
+ $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
$block = array();
- $wfModule = $module_handler->getByDirname("wfdownloads");
- $config_handler = xoops_gethandler('config');
- $wfModule_mid = $wfModule->getVar('mid');
- $wfModule_config = $config_handler->getConfigsByCat(0, $wfModule_mid);
-
- $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
- $allowed_cats = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfModule_mid);
-
// get downloads
$criteria = new CriteriaCompo();
- $criteria->add(new Criteria("cid", '(' . implode(',', $allowed_cats) . ')', "IN"));
+ $criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
$criteria->add(new Criteria('offline', 0)); // false
$criteria->setSort('date');
$criteria->setOrder('DESC');
$criteria->setLimit($options[1]);
- $downloads = $download_handler->getObjects($criteria);
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
foreach (array_keys($downloads) as $i) {
$download = $downloads[$i]->toArray();
- if (!in_array((int)$download['cid'], $allowed_cats)) {
+ if (!in_array((int)$download['cid'], $allowedDownCategoriesIds)) {
continue;
}
-
$download['title'] = xoops_substr($download['title'], 0, ($options[2] -1));
- $download['id'] = (int)($download['lid']);
+ $download['id'] = (int)$download['lid'];
if ($options[0] == 'published') {
- $download['date'] = formatTimestamp($download['published'], $wfModule_config['dateformat']);
+ $download['date'] = formatTimestamp($download['published'], $wfdownloads->getConfig('dateformat'));
+ } else {
+ $download['date'] = formatTimestamp($download['date'], $wfdownloads->getConfig('dateformat'));
}
- $download['dirname'] = $wfModule->dirname();
+ $download['dirname'] = $wfdownloads->getModule()->dirname();
$block['downloads'][] = $download;
}
- $allsubcats_linked_totop = $category_handler->getAllSubcatsTopParentCid();
+ $allsubcats_linked_totop = $wfdownloads->getHandler('category')->getAllSubcatsTopParentCid();
- foreach($category_handler->topCategories as $topcid) {
- $block['topcats'][$topcid]['title'] = $category_handler->allCategories[$topcid]->getVar('title');
- $block['topcats'][$topcid]['imgurl'] = $category_handler->allCategories[$topcid]->getVar('imgurl');
+ foreach($wfdownloads->getHandler('category')->topCategories as $cid) {
+ $block['topcats'][$cid]['title'] = $wfdownloads->getHandler('category')->allCategories[$cid]->getVar('title');
+ $block['topcats'][$cid]['cid'] = $cid;
+ $block['topcats'][$cid]['imgurl'] = $wfdownloads->getHandler('category')->allCategories[$cid]->getVar('imgurl');
}
- foreach($block['downloads'] as $k=>$v) {
- $block['topcats'][$allsubcats_linked_totop[$v['cid']]]['downloads'][] = $v;
+ foreach($block['downloads'] as $key => $value) {
+ $block['topcats'][$allsubcats_linked_totop[$value['cid']]]['downloads'][] = $value;
}
return $block;
@@ -89,13 +83,7 @@
function wfdownloads_top_by_cat_edit($options)
{
$form = "" . _MB_WFD_DISP . " ";
- $form .= "<input type='hidden' name='options[]' value='";
- if ($options[0] == 'published') {
- $form .= "published'";
- } else {
- $form .= "hits'";
- }
- $form .= " />";
+ $form .= "<input type='hidden' name='options[]' value='". ($options[0] == 'published') ? 'published' : 'hits' . "' />";
$form .= "<input type='text' name='options[]' value='" . $options[1] . "' /> " . _MB_WFD_FILES . "";
$form .= "<br />";
$form .= "" . _MB_WFD_CHARS . " <input type='text' name='options[]' value='" . $options[2] . "' /> " . _MB_WFD_LENGTH . "";
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-05 16:13:31 UTC (rev 12009)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-05 20:53:03 UTC (rev 12010)
@@ -18,12 +18,22 @@
* @author Xoops Development Team
* @version svn:$id$
*/
-if (!class_exists("XoopsPersistableObjectHandler")) {
- include_once XOOPS_ROOT_PATH."/modules/wfdownloads/class/object.php";
-}
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
+class WfdownloadsCategory extends XoopsObject {
+ /**
+ * @var WfdownloadsWfdownloads
+ * @access public
+ */
+ public $wfdownloads = null;
-class WfdownloadsCategory extends XoopsObject {
- function WfdownloadsCategory() {
+ /**
+ * constructor
+ */
+ public function __construct()
+ {
+ $this->wfdownloads = WfdownloadsWfdownloads::getInstance();
+ $this->db = XoopsDatabaseFactory::getDatabaseConnection();
$this->initVar('cid', XOBJ_DTYPE_INT);
$this->initVar('pid', XOBJ_DTYPE_INT, 0);
$this->initVar('title', XOBJ_DTYPE_TXTBOX, '');
@@ -44,9 +54,20 @@
// Added Formulize module support (2006/05/04) jpc - end
}
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return mixed
+ */
+ public function __call($method, $args)
+ {
+ $arg = isset($args[0]) ? $args[0] : null;
+ return $this->getVar($method, $arg);
+ }
+
function getForm($action = false)
{
- global $xoopsDB, $xoopsModule, $wfdownloads;
$gperm_handler = xoops_gethandler('groupperm');
if ($action === false) {
@@ -60,62 +81,62 @@
$form = new XoopsThemeForm($title, 'form_error', $action, 'post', true);
$form->setExtra('enctype="multipart/form-data"');
- $form -> addElement(new XoopsFormText(_AM_WFD_FCATEGORY_TITLE, 'title', 50, 255, $this->getVar('title', 'e')), true);
+ $form->addElement(new XoopsFormText(_AM_WFD_FCATEGORY_TITLE, 'title', 50, 255, $this->getVar('title', 'e')), true);
$totalcats = wfd_totalcategory();
if ($totalcats > 0) {
- $categories = $wfdownloads->getHandler('category')->getObjects();
- $mytree = new XoopsObjectTree($categories, "cid", "pid");
- $form->addElement(new XoopsFormLabel(_AM_WFD_FCATEGORY_SUBCATEGORY, $mytree->makeSelBox('pid', 'title', "-", $this->getVar('pid', 'e'),true)));
+ $categories = $this->wfdownloads->getHandler('category')->getObjects();
+ $categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
+ $form->addElement(new XoopsFormLabel(_AM_WFD_FCATEGORY_SUBCATEGORY, $categoriesTree->makeSelBox('pid', 'title', "-", $this->getVar('pid', 'e'),true)));
}
- $form -> addElement(new XoopsFormText(_AM_WFD_FCATEGORY_WEIGHT, 'weight', 10, 80, $this->getVar('weight')), false);
+ $form->addElement(new XoopsFormText(_AM_WFD_FCATEGORY_WEIGHT, 'weight', 10, 80, $this->getVar('weight')), false);
- $groups = $gperm_handler -> getGroupIds('WFDownCatPerm', $this->getVar('cid'), $xoopsModule->mid());
+ $groups = $gperm_handler -> getGroupIds('WFDownCatPerm', $this->getVar('cid'), $this->wfdownloads->getModule()->mid());
$groups_down_select = new XoopsFormSelectGroup(_AM_WFD_FCATEGORY_GROUPPROMPT, "groups", true, $groups, 5, true);
$groups_down_select->setDescription(_AM_WFD_FCATEGORY_GROUPPROMPT_DESC);
- $form -> addElement($groups_down_select);
- $up_groups = $gperm_handler -> getGroupIds('WFUpCatPerm', $this->getVar('cid'), $xoopsModule -> mid());
+ $form->addElement($groups_down_select);
+ $up_groups = $gperm_handler->getGroupIds('WFUpCatPerm', $this->getVar('cid'), $this->wfdownloads->getModule()->mid());
$groups_up_select = new XoopsFormSelectGroup(_AM_WFD_FCATEGORY_GROUPPROMPT_UP, "up_groups", true, $up_groups, 5, true);
$groups_up_select->setDescription(_AM_WFD_FCATEGORY_GROUPPROMPT_UP_DESC);
- $form -> addElement($groups_up_select);
+ $form->addElement($groups_up_select);
- $graph_array = & WfsLists::getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage'), $type = "images");
+ $graph_array = & WfsLists::getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('catimage'), $type = "images");
$indeximage_select = new XoopsFormSelect('', 'imgurl', $this->getVar('imgurl'));
- $indeximage_select -> addOptionArray($graph_array);
- $indeximage_select -> setExtra("onchange='showImgSelected(\"image\", \"imgurl\", \"" . $wfdownloads->getConfig('catimage') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select->addOptionArray($graph_array);
+ $indeximage_select->setExtra("onchange='showImgSelected(\"image\", \"imgurl\", \"" . $this->wfdownloads->getConfig('catimage') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray = new XoopsFormElementTray(_AM_WFD_FCATEGORY_CIMAGE, ' ');
- $indeximage_tray -> addElement($indeximage_select);
+ $indeximage_tray->addElement($indeximage_select);
if ($this->getVar('imgurl') != "") {
- $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $this->getVar('imgurl') . "' name='image' id='image' alt='' title='image' />"));
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('catimage') . "/" . $this->getVar('imgurl') . "' name='image' id='image' alt='' title='image' />"));
} else {
- $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' name='image' id='image' alt='' title='image' />"));
+ $indeximage_tray->addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' name='image' id='image' alt='' title='image' />"));
}
- $form -> addElement($indeximage_tray);
+ $form->addElement($indeximage_tray);
$description_textarea = new XoopsFormDhtmlTextArea(_AM_WFD_FCATEGORY_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60);
- $form -> addElement($description_textarea, true);
+ $form->addElement($description_textarea, true);
$summary_textarea = new XoopsFormTextArea(_AM_WFD_FCATEGORY_SUMMARY, 'summary', $this->getVar('summary'), 10, 60);
- $form -> addElement($summary_textarea);
+ $form->addElement($summary_textarea);
$options_tray = new XoopsFormElementTray(_AM_WFD_TEXTOPTIONS, '<br />');
$html_checkbox = new XoopsFormCheckBox('', 'dohtml', $this->getVar('dohtml'));
- $html_checkbox -> addOption(1, _AM_WFD_ALLOWHTML);
- $options_tray -> addElement($html_checkbox);
+ $html_checkbox->addOption(1, _AM_WFD_ALLOWHTML);
+ $options_tray->addElement($html_checkbox);
$smiley_checkbox = new XoopsFormCheckBox('', 'dosmiley', $this->getVar('dosmiley'));
- $smiley_checkbox -> addOption(1, _AM_WFD_ALLOWSMILEY);
- $options_tray -> addElement($smiley_checkbox);
+ $smiley_checkbox->addOption(1, _AM_WFD_ALLOWSMILEY);
+ $options_tray->addElement($smiley_checkbox);
$xcodes_checkbox = new XoopsFormCheckBox('', 'doxcode', $this->getVar('doxcode'));
- $xcodes_checkbox -> addOption(1, _AM_WFD_ALLOWXCODE);
- $options_tray -> addElement($xcodes_checkbox);
+ $xcodes_checkbox->addOption(1, _AM_WFD_ALLOWXCODE);
+ $options_tray->addElement($xcodes_checkbox);
$noimages_checkbox = new XoopsFormCheckBox('', 'doimage', $this->getVar('doimage'));
- $noimages_checkbox -> addOption(1, _AM_WFD_ALLOWIMAGES);
+ $noimages_checkbox->addOption(1, _AM_WFD_ALLOWIMAGES);
$options_tray -> addElement($noimages_checkbox);
$breaks_checkbox = new XoopsFormCheckBox('', 'dobr', $this->getVar('dobr'));
- $breaks_checkbox -> addOption(1, _AM_WFD_ALLOWBREAK);
+ $breaks_checkbox->addOption(1, _AM_WFD_ALLOWBREAK);
$options_tray -> addElement($breaks_checkbox);
- $form -> addElement($options_tray);
+ $form->addElement($options_tray);
// Added Formulize module support (2006/05/04) jpc - start
if (wfdownload_checkModule('formulize')) {
@@ -129,7 +150,7 @@
$formulize_forms = new XoopsFormSelect(_AM_WFD_FFS_CUSTOM_FORM, "formulize_fid", $this->getVar('formulize_fid') );
$formulize_forms->addOptionArray( $fids_select );
- $form -> addElement($formulize_forms);
+ $form->addElement($formulize_forms);
}
}
// Added Formulize module support (2006/05/04) jpc - end
@@ -165,17 +186,27 @@
}
class WfdownloadsCategoryHandler extends XoopsPersistableObjectHandler {
+ /**
+ * @var WfdownloadsWfdownloads
+ * @access public
+ */
+ public $wfdownloads = null;
var $allCategories = false;
var $topCategories = false;
- function WfdownloadsCategoryHandler($db) {
- $this->XoopsPersistableObjectHandler($db, 'wfdownloads_cat', 'WfdownloadsCategory', 'cid', 'title');
+ /**
+ * @param null|object $db
+ */
+ public function __construct(&$db)
+ {
+ parent::__construct($db, 'wfdownloads_cat', 'WfdownloadsCategory', 'cid', 'title');
+ $this->wfdownloads = WfdownloadsWfdownloads::getInstance();
}
function getNicePath($cid, $root_filename = "index.php", $item_filename = "viewcat.php?op=") {
- include_once WFDOWNLOADS_ROOT_PATH . '"/class/xoopstree.php';
- $mytree = new WfdownloadsXoopsTree($this->table, $this->keyName, "pid");
+ include_once WFDOWNLOADS_ROOT_PATH . '/class/xoopstree.php';
+ $mytree = new WfdownloadsXoopsTree($this->table, $this->keyName, 'pid');
$pathstring = $mytree->getNicePathFromId($cid, $this->identifierName, $item_filename);
/**
@@ -196,12 +227,12 @@
* @return array
*/
function getUserCategories($id_as_key = false, $as_object = true) {
- global $xoopsUser, $xoopsModule;
+ global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
- $categoryids = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $xoopsModule->mid());
- return $this->getObjects(new Criteria('cid', "(" . implode(',', $categoryids) . ")", "IN"), $id_as_key, $as_object);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+ return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
/**
@@ -212,27 +243,27 @@
* @return array
*/
function getUserDownCategories($id_as_key = false, $as_object = true) {
- global $xoopsUser, $xoopsModule;
+ global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
- $categoryids = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $xoopsModule->mid());
- return $this->getObjects(new Criteria('cid', "(" . implode(',', $categoryids) . ")", "IN"), $id_as_key, $as_object);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+ return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
function getUserUpCategories($id_as_key = false, $as_object = true) {
- global $xoopsUser, $xoopsModule;
+ global $xoopsUser;
$gperm_handler = xoops_gethandler('groupperm');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $categoryids = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $xoopsModule->mid());
- return $this->getObjects(new Criteria('cid', "(" . implode(',', $categoryids) . ")", "IN"), $id_as_key, $as_object);
+ $allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $this->wfdownloads->getModule()->mid());
+ return $this->getObjects(new Criteria('cid', '(' . implode(',', $allowedUpCategoriesIds) . ')', 'IN'), $id_as_key, $as_object);
}
function getChildCats($category) {
$allcats = $this->getObjects();
- include_once(XOOPS_ROOT_PATH . "/class/tree.php");
- $tree = new XoopsObjectTree($allcats, $this->keyName, "pid");
+ include_once XOOPS_ROOT_PATH . '/class/tree.php';
+ $tree = new XoopsObjectTree($allcats, $this->keyName, 'pid');
return $tree->getAllChild($category->getVar($this->keyName));
}
@@ -241,8 +272,8 @@
$this->allCategories = $this->getObjects(null, true);
}
- include_once(XOOPS_ROOT_PATH . "/class/tree.php");
- $tree = new XoopsObjectTree($this->allCategories, $this->keyName, "pid");
+ include_once XOOPS_ROOT_PATH . '/class/tree.php';
+ $tree = new XoopsObjectTree($this->allCategories, $this->keyName, 'pid');
$treeobj = $tree->getTree();
/**
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-05 16:13:31 UTC (rev 12009)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-05 20:53:03 UTC (rev 12010)
@@ -18,13 +18,28 @@
* @author Xoops Development Team
* @version svn:$id$
*/
-if (!class_exists("XoopsPersistableObjectHandler")) {
- include_once XOOPS_ROOT_PATH . "/modules/wfdownloads/class/object.php";
-}
-
+defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
class WfdownloadsDownload extends XoopsObject {
+ /**
+ * @var WfdownloadsWfdownloads
+ * @access public
+ */
+ public $wfdownloads = null;
- function WfdownloadsDownload() {
+ /**
+ * @var WfdownloadsCategory
+ * @access public
+ */
+ public $_category = null;
+
+ /**
+ * @param int|null $id
+ */
+ public function __construct($id = null)
+ {
+ $this->wfdownloads = WfdownloadsWfdownloads::getInstance();
+ $this->db = XoopsDatabaseFactory::getDatabaseConnection();
$this->initVar('lid', XOBJ_DTYPE_INT);
$this->initVar('cid', XOBJ_DTYPE_INT, 0);
$this->initVar('title', XOBJ_DTYPE_TXTBOX, '');
@@ -76,23 +91,51 @@
// Added Formulize module support (2006/05/04) jpc - start
$this->initVar('formulize_idreq', XOBJ_DTYPE_INT, 0);
// Added Formulize module support (2006/05/04) jpc - end
+
+ if (isset($id)) {
+ $item = $this->wfdownloads->getHandler('item')->get($id);
+ foreach ($item->vars as $k => $v) {
+ $this->assignVar($k, $v['value']);
+ }
}
+ }
+ /**
+ * @param string $method
+ * @param array $args
+ *
+ * @return mixed
+ */
+ public function __call($method, $args)
+ {
+ $arg = isset($args[0]) ? $args[0] : null;
+ return $this->getVar($method, $arg);
+ }
+ /**
+ * @return null|PublisherCategory
+ */
+ public function category()
+ {
+ if (!isset($this->_category)) {
+ $this->_category = $this->wfdownloads->getHandler('category')->get($this->getVar('cid'));
+ }
+ return $this->_category;
+ }
+
function getDownloadInfo() {
global $xoopsConfig, $xoopsUser, $myts;
xoops_load('XoopsUserUtility');
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
$down['id'] = $this->getVar('lid');
$down['cid'] = $this->getVar('cid');
- $use_mirrors = $wfdownloads->getConfig('enable_mirrors');
+ $use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
$add_mirror = false;
- if (!is_object($xoopsUser) && ($wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_MIRROR || $wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH) && $use_mirrors == true) {
+ if (!is_object($xoopsUser) && ($this->wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_MIRROR || $this->wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) && ($this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH) && $use_mirrors == true) {
$add_mirror = true;
- } elseif (is_object($xoopsUser) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH || $xoopsUser->isAdmin()) && $use_mirrors == true) {
+ } elseif (is_object($xoopsUser) && ($this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $this->wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH || $xoopsUser->isAdmin()) && $use_mirrors == true) {
$add_mirror = true;
}
$down['add_mirror'] = $add_mirror;
@@ -103,7 +146,7 @@
$down['votes'] = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
$down['hits'] = $this->getVar('hits');
- $down['path'] = $wfdownloads->getHandler('category')->getNicePath($down['cid']);
+ $down['path'] = $this->wfdownloads->getHandler('category')->getNicePath($down['cid']);
$down['imageheader'] = wfd_imageheader();
@@ -114,45 +157,45 @@
if ($this->getVar('screenshot')) {
$down['screenshot_full'] = $this->getVar('screenshot');
- if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
- if ($wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb'] = down_createthumb($down['screenshot_full'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
- $wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
+ if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
+ if ($this->wfdownloads->getConfig('usethumbs') == true) {
+ $down['screenshot_thumb'] = down_createthumb($down['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb'] = XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
+ $down['screenshot_thumb'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
}
}
}
- if ($this->getVar('screenshot2') && $wfdownloads->getConfig('max_screenshot') >= 2) {
+ if ($this->getVar('screenshot2') && $this->wfdownloads->getConfig('max_screenshot') >= 2) {
$down['screenshot_full2'] = $this->getVar('screenshot2');
- if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
- if ($wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb2'] = down_createthumb($down['screenshot_full2'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
- $wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
+ if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
+ if ($this->wfdownloads->getConfig('usethumbs') == true) {
+ $down['screenshot_thumb2'] = down_createthumb($down['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb2'] = XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
+ $down['screenshot_thumb2'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
}
}
}
- if ($this->getVar('screenshot3') && $wfdownloads->getConfig('max_screenshot') >= 3) {
+ if ($this->getVar('screenshot3') && $this->wfdownloads->getConfig('max_screenshot') >= 3) {
$down['screenshot_full3'] = $this->getVar('screenshot3');
- if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
- if ($wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb3'] = down_createthumb($down['screenshot_full3'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
- $wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
+ if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
+ if ($this->wfdownloads->getConfig('usethumbs') == true) {
+ $down['screenshot_thumb3'] = down_createthumb($down['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb3'] = XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
+ $down['screenshot_thumb3'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
}
}
}
- if ($this->getVar('screenshot4') && $wfdownloads->getConfig('max_screenshot') >= 4) {
+ if ($this->getVar('screenshot4') && $this->wfdownloads->getConfig('max_screenshot') >= 4) {
$down['screenshot_full4'] = $this->getVar('screenshot4');
- if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
- if ($wfdownloads->getConfig('usethumbs') == true) {
- $down['screenshot_thumb4'] = down_createthumb($down['screenshot_full4'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
- $wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
+ if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
+ if ($this->wfdownloads->getConfig('usethumbs') == true) {
+ $down['screenshot_thumb4'] = down_createthumb($down['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
- $down['screenshot_thumb4'] = XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
+ $down['screenshot_thumb4'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
}
}
}
@@ -180,19 +223,19 @@
} else {
$down['version'] = 0;
}
- $down['downtime'] = wfd_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
+ $down['downtime'] = wfdownloads_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
$down['downtime'] = str_replace("|", "<br />", $down['downtime']);
$down['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
$time = ($this->getVar('updated') != 0) ? $this->getVar('updated') : $this->getVar('published');
- $down['updated'] = formatTimestamp($time, $wfdownloads->getConfig('dateformat'));
+ $down['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
$is_updated = ($this->getVar('updated') != 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
$down['lang_subdate'] = $is_updated;
$summary = $this->getVar('summary');
- if ($wfdownloads->getConfig('autosummary') == true || empty($summary))
+ if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary))
{
- $summaryLength = (int)$wfdownloads->getConfig('autosumlength');
+ $summaryLength = (int)$this->wfdownloads->getConfig('autosumlength');
$summaryDescription = stripslashes($this->getVar('description'));
if (strlen($summaryDescription) > $summaryLength) {
$summaryDescription = substr($summaryDescription, 0, $summaryLength);
@@ -207,11 +250,11 @@
$down['description'] = $this->getVar('description'); //no html
$down['price'] = ($this->getVar('price') != 0) ? $this->getVar('price') : _MD_WFD_PRICEFREE;
- $limitationsArray = $wfdownloads->getConfig('limitations');
+ $limitationsArray = $this->wfdownloads->getConfig('limitations');
$down['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
- $versiontypesArray = $wfdownloads->getConfig('versiontypes');
+ $versiontypesArray = $this->wfdownloads->getConfig('versiontypes');
$down['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
- $licenseArray = $wfdownloads->getConfig('license');
+ $licenseArray = $this->wfdownloads->getConfig('license');
$down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
$down['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
$publisher = $this->getVar('publisher');
@@ -220,7 +263,7 @@
} else {
$down['publisher'] = '';
}
- $platformArray = $wfdownloads->getConfig('platform');
+ $platformArray = $this->wfdownloads->getConfig('platform');
$down['platform'] = $myts->htmlSpecialChars($platformArray[$this->getVar('platform')]);
$history = $this->getVar('dhistory', 'n');
$down['history'] = $myts->displayTarea($history, 1);
@@ -242,7 +285,7 @@
$down['mail_subject'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']));
$down['mail_body'] = rawurlencode(sprintf(_MD_WFD_INTFILEFOUND, $xoopsConfig['sitename']) . ': ' . WFDOWNLOADS_URL . '/singlefile.php?cid=' . $down['cid'] . '&lid=' . $down['id']);
- $down['isadmin'] = (!empty($xoopsUser) && $xoopsUser->isAdmin($wfdownloads->getModule()->mid())) ? true : false;
+ $down['isadmin'] = (!empty($xoopsUser) && $xoopsUser->isAdmin($this->wfdownloads->getModule()->mid())) ? true : false;
$down['adminlink'] = '';
if ($down['isadmin'] == true) {
@@ -290,11 +333,10 @@
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
include_once XOOPS_ROOT_PATH . '/class/tree.php';
- $wfdownloads = WfdownloadsWfdownloads::getInstance();
$groups = $xoopsUser->getGroups();
- $use_mirrors = $wfdownloads->getConfig('enable_mirrors');
+ $use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
$sform = new XoopsThemeForm(_MD_WFD_SUBMITCATHEAD, 'storyform', $_SERVER['REQUEST_URI']);
$sform->setExtra('enctype="multipart/form-data"');
@@ -305,17 +347,17 @@
$sform->addElement(new XoopsFormHidden('filename', $this->getVar('filename', 'e')));
$sform->addElement(new XoopsFormHidden('filetype', $this->getVar('filetype', 'e')));
}
- if (($wfdownloads->getConfig('useruploads') && array_intersect($wfdownloads->getConfig('useruploadsgroup'), $groups)) || (is_object($xoopsUser) && $xoopsUser->isAdmin()) ) {
+ if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups)) || (is_object($xoopsUser) && $xoopsUser->isAdmin()) ) {
$userfile_file = new XoopsFormFile(_MD_WFD_UPLOAD_FILEC, 'userfile', 0);
- $maxFileSize = wfdownloads_bytesToSize1024($wfdownloads->getConfig('maxfilesize'));
+ $maxFileSize = wfdownloads_bytesToSize1024($this->wfdownloads->getConfig('maxfilesize'));
if (is_object($xoopsUser) && $xoopsUser->isAdmin()) {
$criteria = new Criteria("mime_admin", true);
} else {
$criteria = new Criteria("mime_user", true);
}
- $mimetypes = $wfdownloads->getHandler('mimetype')->getList($criteria);
+ $mimetypes = $this->wfdownloads->getHandler('mimetype')->getList($criteria);
$allowMimetypes = implode(' | ', $mimetypes);
- $userfile_file->setDescription(sprintf(_MD_WFD_UPLOAD_FILEC_DESC, $maxFileSize, $wfdownloads->getConfig('maximgwidth'), $wfdownloads->getConfig('maximgheight'), $allowMimetypes));
+ $userfile_file->setDescription(sprintf(_MD_WFD_UPLOAD_FILEC_DESC, $maxFileSize, $this->wfdownloads->getConfig('maximgwidth'), $this->wfdownloads->getConfig('maximgheight'), $allowMimetypes));
$sform->addElement($userfile_file, false);
}
if ($use_mirrors !== true) {
@@ -326,7 +368,7 @@
if(file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php')) {
$sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
} else {
- $categories = $wfdownloads->getHandler('category')->getUserUpCategories();
+ $categories = $this->wfdownloads->getHandler('category')->getUserUpCategories();
$categoriesTree = new XoopsObjectTree($categories, "cid", "pid");
$sform->addElement(new XoopsFormLabel(_MD_WFD_CATEGORYC, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e'))));
}
@@ -340,22 +382,22 @@
$sform->addElement(new XoopsFormText(_MD_WFD_PUBLISHERC, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
$sform->addElement(new XoopsFormText(_MD_WFD_FILESIZEC, 'size', 10, 20, $this->getVar('size', 'e')), false);
- $platform_array = $wfdownloads->getConfig('platform');
+ $platform_array = $this->wfdownloads->getConfig('platform');
$platform_select = new XoopsFormSelect(_MD_WFD_PLATFORMC, 'platform', $this->getVar('platform', 'e'));
$platform_select->addOptionArray($platform_array);
$sform->addElement($platform_select);
- $license_array = $wfdownloads->getConfig('license');
+ $license_array = $this->wfdownloads->getConfig('license');
$license_select = new XoopsFormSelect(_MD_WFD_LICENCEC, 'license', $this->getVar('license', 'e'));
$license_select->addOptionArray($license_array);
$sform->addElement($license_select);
- $limitations_array = $wfdownloads->getConfig('limitations');
+ $limitations_array = $this->wfdownloads->getConfig('limitations');
$limitations_select = new XoopsFormSelect(_MD_WFD_LIMITATIONS, 'limitations', $this->getVar('limitations', 'e'));
$limitations_select->addOptionArray($limitations_array);
$sform->addElement($limitations_select);
- $versiontypes_array = $wfdownloads->getConfig('versiontypes');
+ $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
$versiontypes_select = new XoopsFormSelect(_MD_WFD_VERSIONTYPES, 'versiontypes', $this->getVar('versiontypes', 'e'));
$versiontypes_select->addOptionArray($versiontypes_array);
$sform->addElement($versiontypes_select);
@@ -384,15 +426,15 @@
$dhistoryaddedd_textarea->setDescription(_MD_WFD_HISTORYD_DESC);
$sform->addElement($dhistoryaddedd_textarea, false);
}
- if (($wfdownloads->getConfig('useruploads') && array_intersect($wfdownloads->getConfig('useruploadsgroup'), $groups)) || (is_object($xoopsUser) && $xoopsUser->isAdmin()) ) {
+ if (($this->wfdownloads->getConfig('useruploads') && array_intersect($this->wfdownloads->getConfig('useruploadsgroup'), $groups)) || (is_object($xoopsUser) && $xoopsUser->isAdmin()) ) {
$sform->addElement(new XoopsFormFile(_MD_WFD_DUPLOADSCRSHOT, 'screenshot', 0), false);
- if ($wfdownloads->getConfig('max_screenshot') >= 2) {
+ if ($this->wfdownloads->getConfig('max_screenshot') >= 2) {
$sform->addElement(new XoopsFormFile(_MD_WFD_DUPLOADSCRSHOT, 'screenshot2', 0), false);
}
- if ($wfdownloads->getConfig('max_screenshot') >= 3) {
+ if ($this->wfdownloads->getConfig('max_screenshot') >= 3) {
$sform->addElement(new XoopsFormFile(_MD_WFD_DUPLOADSCRSHOT, 'screenshot3', 0), false);
}
- if ($wfdownloads->getConfig('max_screenshot') >= 4) {
+ if ($this->wfdownloads->getConfig('max_screenshot') >= 4) {
$sform->addElement(new XoopsFormFile(_MD_WFD_DUPLOADSCRSHOT, 'screenshot4', 0), false);
}
}
@@ -420,12 +462,12 @@
function getAdminForm($title, $customArray=array()) { // $custom array added April 22, 2006 by jwe
- global $xoopsUser, $wfdownloads;
+ global $xoopsUser;
include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
include_once WFDOWNLOADS_ROOT_PATH . '/class/wfd_lists.php';
- $use_mirrors = $wfdownloads->getConfig('enable_mirrors');
+ $use_mirrors = $this->wfdownloads->getConfig('enable_mirrors');
$sform = new XoopsThemeForm($title, "storyform", $_SERVER['REQUEST_URI']);
$sform -> setExtra('enctype="multipart/form-data"');
@@ -472,7 +514,7 @@
// if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
// $sform->addElement(new XoopsFormHidden('cid', $this->getVar('cid', 'e')));
// } else {
- $categories = $wfdownloads->getHandler('category')->getObjects();
+ $categories = $this->wfdownloads->getHandler('category')->getObjects();
$categoriesTree = new XoopsObjectTree($categories, "cid", "pid");
$sform->addElement(new XoopsFormLabel(_AM_WFD_FILE_CATEGORY, $categoriesTree->makeSelBox('cid', 'title', "-", $this->getVar('cid', 'e'))));
// }
@@ -486,28 +528,28 @@
$sform->addElement(new XoopsFormText(_AM_WFD_FILE_PUBLISHER, 'publisher', 50, 255, $this->getVar('publisher', 'e')), false);
$sform->addElement(new XoopsFormText(_AM_WFD_FILE_SIZE, 'size', 10, 20, $this->getVar('size', 'e')), false);
- $platform_array = $wfdownloads->getConfig('platform');
+ $platform_array = $this->wfdownloads->getConfig('platform');
$platform_select = new XoopsFormSelect('', 'platform', $this->getVar('platform', 'e'), '', '', 0);
$platform_select->addOptionArray($platform_array);
$platform_tray = new XoopsFormElementTray(_AM_WFD_FILE_PLATFORM, ' ');
$platform_tray->addElement($platform_select);
$sform->addElement($platform_tray);
- $license_array = $wfdownloads->getConfig('license');
+ $license_array = $this->wfdownloads->getConfig('license');
$license_select = new XoopsFormSelect('', 'license', $this->getVar('license', 'e'), '', '', 0);
$license_select->addOptionArray($license_array);
$license_tray = new XoopsFormElementTray(_AM_WFD_FILE_LICENCE, ' ');
$license_tray->addElement($license_select);
$sform->addElement($license_tray);
- $limitations_array = $wfdownloads->getConfig('limitations');
+ $limitations_array = $this->wfdownloads->getConfig('limitations');
$limitations_select = new XoopsFormSelect('', 'limitations', $this->getVar('limitations', 'e'), '', '', 0);
$limitations_select->addOptionArray($limitations_array);
$limitations_tray = new XoopsFormElementTray(_AM_WFD_FILE_LIMITATIONS, ' ');
$limitations_tray->addElement($limitations_select);
$sform->addElement($limitations_tray);
- $versiontypes_array = $wfdownloads->getConfig('versiontypes');
+ $versiontypes_array = $this->wfdownloads->getConfig('versiontypes');
$versiontypes_select = new XoopsFormSelect('', 'versiontypes', $this->getVar('versiontypes', 'e'), '', '', 0);
$versiontypes_select->addOptionArray($versiontypes_array);
$versiontypes_tray = new XoopsFormElementTray(_AM_WFD_FILE_VERSIONTYPES, ' ');
@@ -525,7 +567,7 @@
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
- $formSummary = new XoopsFormEditor('', $wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $formSummary = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
$optionsTrayNote->addElement($formSummary);
} else {
$formSummary = new XoopsFormDhtmlTextArea('', 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
@@ -542,7 +584,7 @@
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
- $formDescription = new XoopsFormEditor('', $wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $formDescription = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
$optionsTrayNote2->addElement($formDescription, true);
} else {
$formDescription = new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription');
@@ -565,7 +607,7 @@
$options['cols'] = '100%';
$options['width'] = '100%';
$options['height'] = '200px';
- $formDescription = new XoopsFormEditor('', $wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
+ $formDescription = new XoopsFormEditor('', $this->wfdownloads->getConfig('editor_options'), $options, $nohtml = false, $onfailure = 'textarea');
$optionsTrayNote2->addElement($formDescription, true);
} else {
$formDescription = new XoopsFormDhtmlTextArea('', 'description', $this->getVar('description', 'e'), 15, 60, "smartHiddenDescription");
@@ -583,59 +625,59 @@
if (!$this->isNew() && $this->getVar('dhistory') != "") {
$sform -> addElement(new XoopsFormTextArea(_AM_WFD_FILE_HISTORYD, 'dhistoryaddedd', '', 7, 60), false);
}
- $graph_array = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select = new XoopsFormSelect('', 'screenshot', $this->getVar('screenshot', 'e'));
$indeximage_select -> addOptionArray($graph_array);
- $indeximage_select -> setExtra("onchange='showImgSelected(\"image1\", \"screenshot\", \"" . $wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select -> setExtra("onchange='showImgSelected(\"image1\", \"screenshot\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
$indeximage_tray -> addElement($indeximage_select);
if ($this->getVar('screenshot') != "") {
- $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot', 'e') . "' id='image1' alt='' title='screenshot 1' />"));
+ $indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot', 'e') . "' id='image1' alt='' title='screenshot 1' />"));
} else {
$indeximage_tray -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image1' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray);
- $graph_array2 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array2 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select2 = new XoopsFormSelect('', 'screenshot2', $this->getVar('screenshot2', 'e'));
$indeximage_select2 -> addOptionArray($graph_array2);
- $indeximage_select2 -> setExtra("onchange='showImgSelected(\"image2\", \"screenshot2\", \"" . $wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select2 -> setExtra("onchange='showImgSelected(\"image2\", \"screenshot2\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray2 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
$indeximage_tray2 -> addElement($indeximage_select2);
if ($this->getVar('screenshot2') != "") {
- $indeximage_tray2 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot2', 'e') . "' id='image2' alt='' title='screenshot 2' />"));
+ $indeximage_tray2 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot2', 'e') . "' id='image2' alt='' title='screenshot 2' />"));
} else {
$indeximage_tray2 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image2' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray2);
- $graph_array3 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array3 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select3 = new XoopsFormSelect('', 'screenshot3', $this->getVar('screenshot3', 'e', true));
$indeximage_select3 -> addOptionArray($graph_array3);
- $indeximage_select3 -> setExtra("onchange='showImgSelected(\"image3\", \"screenshot3\", \"" . $wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select3 -> setExtra("onchange='showImgSelected(\"image3\", \"screenshot3\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray3 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
$indeximage_tray3 -> addElement($indeximage_select3);
if ($this->getVar('screenshot3') != "") {
- $indeximage_tray3 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot3', 'e') . "' id='image3' alt='' title='screenshot 3' />"));
+ $indeximage_tray3 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot3', 'e') . "' id='image3' alt='' title='screenshot 3' />"));
} else {
$indeximage_tray3 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image3' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray3);
- $graph_array4 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots'), $type = "images");
+ $graph_array4 = & WfsLists :: getListTypeAsArray(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots'), $type = "images");
$indeximage_select4 = new XoopsFormSelect('', 'screenshot4', $this->getVar('screenshot4', 'e'));
$indeximage_select4 -> addOptionArray($graph_array4);
- $indeximage_select4 -> setExtra("onchange='showImgSelected(\"image4\", \"screenshot4\", \"" . $wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
+ $indeximage_select4 -> setExtra("onchange='showImgSelected(\"image4\", \"screenshot4\", \"" . $this->wfdownloads->getConfig('screenshots') . "\", \"\", \"" . XOOPS_URL . "\")'");
$indeximage_tray4 = new XoopsFormElementTray(_AM_WFD_FILE_SHOTIMAGE, ' ');
$indeximage_tray4 -> addElement($indeximage_select4);
if ($this->getVar('screenshot4') != "") {
- $indeximage_tray4 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot4', 'e') . "' id='image4' alt='' title='screenshot 4' />"));
+ $indeximage_tray4 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . $this->getVar('screenshot4', 'e') . "' id='image4' alt='' title='screenshot 4' />"));
} else {
$indeximage_tray4 -> addElement(new XoopsFormLabel('', "<br /><br /><img src='" . XOOPS_URL . "/uploads/blank.gif' id='image4' alt='' title='' />"));
}
$sform -> addElement($indeximage_tray4);
- $sform -> insertBreak(sprintf(_AM_WFD_FILE_MUSTBEVALID, "<b>" . $wfdownloads->getConfig('screenshots') . "</b>"), "even");
+ $sform -> insertBreak(spri...
[truncated message content] |
|
From: <dj...@us...> - 2013-09-05 16:13:35
|
Revision: 12009
http://sourceforge.net/p/xoops/svn/12009
Author: djculex
Date: 2013-09-05 16:13:31 +0000 (Thu, 05 Sep 2013)
Log Message:
-----------
BUG: Missing enclosed prefixing
Modified Paths:
--------------
XoopsModules/xim/trunk/modules/xim/chat.php
Modified: XoopsModules/xim/trunk/modules/xim/chat.php
===================================================================
--- XoopsModules/xim/trunk/modules/xim/chat.php 2013-09-05 09:40:26 UTC (rev 12008)
+++ XoopsModules/xim/trunk/modules/xim/chat.php 2013-09-05 16:13:31 UTC (rev 12009)
@@ -62,7 +62,7 @@
// Function to be used in setInterval. This function do all the essential
function xim_chatHeartbeat() {
global $xoopsDB, $xoopsUser,$soundUrl;
- $sql = "select * from ".$xoopsDB->prefix('xim_chat')." where (".$xoopsDB->prefix(xim_chat).".to = '".mysql_real_escape_string($_SESSION['xoopsUserId'])."' AND recd = 0) order by id ASC";
+ $sql = "select * from ".$xoopsDB->prefix('xim_chat')." where (".$xoopsDB->prefix('xim_chat').".to = '".mysql_real_escape_string($_SESSION['xoopsUserId'])."' AND recd = 0) order by id ASC";
$query = $xoopsDB->query($sql);
$items = '';
$chatBoxes = array();
@@ -74,7 +74,7 @@
}
$chat['message'] = xim_sanitize($chat['message']);
- $user = new xoopsUser($chat['from']);
+ $user = new XoopsUser($chat['from']);
// changed to show link to user info for user "from"
if ($chat['sys'] != '-1') {
$uname = "<a href='".XOOPS_URL."/userinfo.php?uid=".$chat['from']."' title='".$user->uname()."'>".$user->uname()."</a>";
@@ -155,7 +155,7 @@
}
}
- $sql = "update ".$xoopsDB->prefix(xim_chat)." set recd = 1 where ".$xoopsDB->prefix(xim_chat).".to = '".mysql_real_escape_string($_SESSION['xoopsUserId'])."' and recd = 0";
+ $sql = "update ".$xoopsDB->prefix('xim_chat')." set recd = 1 where ".$xoopsDB->prefix('xim_chat').".to = '".mysql_real_escape_string($_SESSION['xoopsUserId'])."' and recd = 0";
$query = $xoopsDB->queryF($sql);
if ($items != '') {
@@ -224,7 +224,7 @@
$to = $_POST['to'];
xoops_xim_checkStatus ($to, $from);
$message = $_POST['message'];
- $user = new xoopsUser($from);
+ $user = new XoopsUser($from);
$uname = $user->uname();
$avatar =$user->user_avatar();
if ($avatar!='blank.gif') {
@@ -251,7 +251,7 @@
unset($_SESSION['xim_tsChatBoxes'][$_POST['to']]);
- $sql = "insert into ".$xoopsDB->prefix(xim_chat)." (".$xoopsDB->prefix(xim_chat).".from,".$xoopsDB->prefix(xim_chat).".to,message,sent) values ('".mysql_real_escape_string($from)."', '".mysql_real_escape_string($to)."','".mysql_real_escape_string($message)."',NOW())";
+ $sql = "insert into ".$xoopsDB->prefix('xim_chat')." (".$xoopsDB->prefix('xim_chat').".from,".$xoopsDB->prefix('xim_chat').".to,message,sent) values ('".mysql_real_escape_string($from)."', '".mysql_real_escape_string($to)."','".mysql_real_escape_string($message)."',NOW())";
$query = $xoopsDB->queryF($sql);
exit(0);
}
@@ -263,9 +263,9 @@
}
function xoops_xim_checkStatus ($to, $from) {
- global $xoopsDB, $xoopsUser;
- $user_to = new xoopsUser($to);
- $user_from = new xoopsUser($from);
+ global $xoopsDB, $XoopsUser;
+ $user_to = new XoopsUser($to);
+ $user_from = new XoopsUser($from);
$recieverName = $user_to->uname();
$senderName = $user_from->uname();
@@ -282,25 +282,25 @@
if ($status == '0') {
// User is away
$sysmessage = _XIM_SYSTEM_AWAY;
- $sql = "insert into ".$xoopsDB->prefix(xim_chat)." (".$xoopsDB->prefix(xim_chat).".from,".$xoopsDB->prefix(xim_chat).".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
+ $sql = "insert into ".$xoopsDB->prefix('xim_chat')." (".$xoopsDB->prefix('xim_chat').".from,".$xoopsDB->prefix('xim_chat').".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
$query = $xoopsDB->queryF($sql);
}
if ($status == '1') {
// User is busy
$sysmessage = _XIM_SYSTEM_BUSY;
- $sql = "insert into ".$xoopsDB->prefix(xim_chat)." (".$xoopsDB->prefix(xim_chat).".from,".$xoopsDB->prefix(xim_chat).".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
+ $sql = "insert into ".$xoopsDB->prefix('xim_chat')." (".$xoopsDB->prefix('xim_chat').".from,".$xoopsDB->prefix('xim_chat').".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
$query = $xoopsDB->queryF($sql);
}
if ($status == '3') {
// User is offline
$sysmessage = _XIM_SYSTEM_OFFLINE;
- $sql = "insert into ".$xoopsDB->prefix(xim_chat)." (".$xoopsDB->prefix(xim_chat).".from,".$xoopsDB->prefix(xim_chat).".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
+ $sql = "insert into ".$xoopsDB->prefix('xim_chat')." (".$xoopsDB->prefix('xim_chat').".from,".$xoopsDB->prefix('xim_chat').".to,message,sent) values ('".mysql_real_escape_string($to)."', '".mysql_real_escape_string($from)."','".mysql_real_escape_string($sysmessage)."',NOW())";
$query = $xoopsDB->queryF($sql);
}
}
function xim_getAvatar(){
- $user = new xoopsUser($_GET['uid']);
+ $user = new XoopsUser($_GET['uid']);
$avatar =$user->user_avatar();
if ($avatar!='blank.gif') {
$avatarURL = XOOPS_URL."/uploads/".$avatar;
|
|
From: <be...@us...> - 2013-09-05 09:40:29
|
Revision: 12008
http://sourceforge.net/p/xoops/svn/12008
Author: beckmi
Date: 2013-09-05 09:40:26 +0000 (Thu, 05 Sep 2013)
Log Message:
-----------
replaced extract($_POST) in /include/comment_delete.php with filters
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/comment_delete.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-05 09:12:59 UTC (rev 12007)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-05 09:40:26 UTC (rev 12008)
@@ -22,6 +22,7 @@
- assigning "static" to functions in XoopsUserUtility class (mamba)
- solved bug into PM module readpmsg.php (escrime-info/slider84)
- fixed missing check on variable in userinfo.php (cesag/mamba)
+- replaced extract($_POST) in /include/comment_delete.php with filters (mamba)
Updated:
- jGrowl to 1.2.13 (mamba)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/comment_delete.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/comment_delete.php 2013-09-05 09:12:59 UTC (rev 12007)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/comment_delete.php 2013-09-05 09:40:26 UTC (rev 12008)
@@ -24,18 +24,28 @@
include_once $GLOBALS['xoops']->path('include/comment_constants.php');
$op = 'delete';
+
+$filters = array
+ (
+ "com_mode" => FILTER_SANITIZE_FULL_SPECIAL_CHARS ,
+ "op" => FILTER_SANITIZE_FULL_SPECIAL_CHARS ,
+ "com_order" => FILTER_VALIDATE_INT,
+ "com_id"=> FILTER_VALIDATE_INT
+ );
+
if (!empty($_POST)) {
- extract($_POST);
- $com_mode = isset($com_mode) ? htmlspecialchars(trim($com_mode), ENT_QUOTES) : 'flat';
- $com_order = isset($com_order) ? intval($com_order) : XOOPS_COMMENT_OLD1ST;
- $com_id = isset($com_id) ? intval($com_id) : 0;
+ $result = filter_input_array(INPUT_POST, $filters);
} else {
- $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : 'flat';
- $com_order = isset($_GET['com_order']) ? intval($_GET['com_order']) : XOOPS_COMMENT_OLD1ST;
- $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
-
+ $result = filter_input_array(INPUT_GET, $filters);
}
+$com_mode = $result['com_mode'] ? $result['com_mode'] : 'flat';
+$com_order = $result['com_order'] ? $result['com_order'] : XOOPS_COMMENT_OLD1ST;
+$com_id = $result['com_id'] ? $result['com_id'] : 0;
+if ($result['op']) {
+ $op = $result['op'];
+}
+
if ('system' == $xoopsModule->getVar('dirname')) {
$comment_handler =& xoops_gethandler('comment');
$comment =& $comment_handler->get($com_id);
@@ -62,10 +72,14 @@
// for the confirmation page
$comment_confirm_extra[$extra_param] = ${$extra_param};
} elseif (isset($_GET[$extra_param])) {
- $redirect_page .= $extra_param . '=' . $_GET[$extra_param] . '&';
+// $redirect_page .= $extra_param . '=' . $_GET[$extra_param] . '&';
+ $redirect_page .= $extra_param . '=' . filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING) . '&';
+
+
// for the confirmation page
- $comment_confirm_extra[$extra_param] = $_GET[$extra_param];
+// $comment_confirm_extra[$extra_param] = $_GET[$extra_param];
+ $comment_confirm_extra[$extra_param] = filter_input(INPUT_GET, $extra_param, FILTER_SANITIZE_STRING);
}
}
}
@@ -271,4 +285,4 @@
break;
}
-?>
\ No newline at end of file
+?>
|
|
From: <be...@us...> - 2013-09-05 09:13:02
|
Revision: 12007
http://sourceforge.net/p/xoops/svn/12007
Author: beckmi
Date: 2013-09-05 09:12:59 +0000 (Thu, 05 Sep 2013)
Log Message:
-----------
Fixing comment_functions.php
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php 2013-09-04 19:25:07 UTC (rev 12006)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/comment_functions.php 2013-09-05 09:12:59 UTC (rev 12007)
@@ -18,9 +18,16 @@
* @author Xoops Development Team
* @version svn:$id$
*/
+
+if (!defined("XOOPS_ROOT_PATH")) {
+ die("XOOPS root path not defined");
+}
+include_once dirname(__FILE__) . '/common.php';
+
// comment callback functions
function wfdownloads_com_update($download_id, $total_num){
+ $wfdownloads = WfdownloadsWfdownloads::getInstance();
$wfdownloads->getHandler('download')->updateAll("comments", intval($total_num), new Criteria("lid", intval($download_id)));
}
|
|
From: <al...@us...> - 2013-09-04 19:25:11
|
Revision: 12006
http://sourceforge.net/p/xoops/svn/12006
Author: alain91
Date: 2013-09-04 19:25:07 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
add files to SVN
Added Paths:
-----------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class.xml
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/kernel.xml
Added: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class.xml (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class.xml 2013-09-04 19:25:07 UTC (rev 12006)
@@ -0,0 +1,36 @@
+<phpunit
+ colors="false"
+ verbose="false"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ bootstrap="bootstrap.php"
+ >
+
+<testsuites>
+ <testsuite name="My Test Suite">
+ <directory>class</directory>
+ </testsuite>
+</testsuites>
+
+<groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+</groups>
+
+<filter>
+ <whitelist>
+ <directory suffix=".php">../class</directory>
+ <exclude>
+ <directory suffix=".php">../class/HTMLPurifier</directory>
+ </exclude>
+ </whitelist>
+</filter>
+
+<logging>
+ <log type="coverage-html" target="test-report-class" charset="UTF-8" yui="true" />
+</logging>
+
+</phpunit>
Added: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/kernel.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/kernel.xml (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/kernel.xml 2013-09-04 19:25:07 UTC (rev 12006)
@@ -0,0 +1,36 @@
+<phpunit
+ colors="false"
+ verbose="false"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ bootstrap="bootstrap.php"
+ >
+
+<testsuites>
+ <testsuite name="My Test Suite">
+ <directory>kernel</directory>
+ </testsuite>
+</testsuites>
+
+<groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+</groups>
+
+<filter>
+ <whitelist>
+ <directory suffix=".php">../kernel</directory>
+ <exclude>
+ <directory suffix=".php">../kernel/HTMLPurifier</directory>
+ </exclude>
+ </whitelist>
+</filter>
+
+<logging>
+ <log type="coverage-html" target="test-report-kernel" charset="UTF-8" yui="true" />
+</logging>
+
+</phpunit>
|
|
From: <al...@us...> - 2013-09-04 19:06:18
|
Revision: 12005
http://sourceforge.net/p/xoops/svn/12005
Author: alain91
Date: 2013-09-04 19:06:13 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
test from jenkins server
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/xoops_lib.xml
Added Paths:
-----------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_class.xml
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_kernel.xml
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_xoops_lib.xml
Added: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_class.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_class.xml (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_class.xml 2013-09-04 19:06:13 UTC (rev 12005)
@@ -0,0 +1,14 @@
+<project name="class" default="build" basedir=".">
+ <property name="basedir" value="${project.basedir}" />
+ <target name="clean">
+ </target>
+ <target name="prepare">
+ </target>
+ <target name="phpunit">
+ <exec executable="/usr/local/bin/phpunit">
+ <arg value="--configuration=${basedir}/ant_class.xml" />
+ </exec>
+ </target>
+ <target name="build" depends="clean,prepare,phpunit" />
+</project>
+
Added: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_kernel.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_kernel.xml (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_kernel.xml 2013-09-04 19:06:13 UTC (rev 12005)
@@ -0,0 +1,14 @@
+<project name="kernel" default="build" basedir=".">
+ <property name="basedir" value="${project.basedir}" />
+ <target name="clean">
+ </target>
+ <target name="prepare">
+ </target>
+ <target name="phpunit">
+ <exec executable="/usr/local/bin/phpunit">
+ <arg value="--configuration=${basedir}/ant_kernel.xml" />
+ </exec>
+ </target>
+ <target name="build" depends="clean,prepare,phpunit" />
+</project>
+
Added: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_xoops_lib.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_xoops_lib.xml (rev 0)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/ant_xoops_lib.xml 2013-09-04 19:06:13 UTC (rev 12005)
@@ -0,0 +1,14 @@
+<project name="xoops_lib" default="build" basedir=".">
+ <property name="basedir" value="${project.basedir}" />
+ <target name="clean">
+ </target>
+ <target name="prepare">
+ </target>
+ <target name="phpunit">
+ <exec executable="/usr/local/bin/phpunit">
+ <arg value="--configuration=${basedir}/ant_xoops_lib.xml" />
+ </exec>
+ </target>
+ <target name="build" depends="clean,prepare,phpunit" />
+</project>
+
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml 2013-09-04 18:17:39 UTC (rev 12004)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/phpunit.xml 2013-09-04 19:06:13 UTC (rev 12005)
@@ -1,35 +1,37 @@
-<phpunit
- colors="false"
- verbose="false"
- stopOnError="false"
- stopOnFailure="false"
- stopOnIncomplete="false"
- stopOnSkipped="false"
- bootstrap="bootstrap.php"
- >
-
-<testsuites>
- <testsuite name="My Test Suite">
- <directory>class</directory>
- <directory>kernel</directory>
- </testsuite>
-</testsuites>
-
-<groups>
- <exclude>
- <group>slow</group>
- </exclude>
-</groups>
-
-<filter>
- <whitelist>
- <directory suffix=".php">../htdocs/class</directory>
- <directory suffix=".php">../htdocs/kernel</directory>
- </whitelist>
-</filter>
-
-<logging>
- <log type="coverage-html" target="test-report" charset="UTF-8" yui="true" />
-</logging>
-
-</phpunit>
\ No newline at end of file
+<phpunit
+ colors="false"
+ verbose="false"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ bootstrap="bootstrap.php"
+ >
+
+<testsuites>
+ <testsuite name="My XOOPS Test Suite">
+ <directory>class</directory>
+ <directory>kernel</directory>
+ <directory>xoops_lib</directory>
+ </testsuite>
+</testsuites>
+
+<groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+</groups>
+
+<filter>
+ <whitelist>
+ <directory suffix=".php">class</directory>
+ <directory suffix=".php">kernel</directory>
+ <directory suffix=".php">xoops_lib</directory>
+ </whitelist>
+</filter>
+
+<logging>
+ <log type="coverage-html" target="test-report" charset="UTF-8" yui="true" />
+</logging>
+
+</phpunit>
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/xoops_lib.xml
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/xoops_lib.xml 2013-09-04 18:17:39 UTC (rev 12004)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/xoops_lib.xml 2013-09-04 19:06:13 UTC (rev 12005)
@@ -1,38 +1,38 @@
-<phpunit
- colors="false"
- verbose="false"
- stopOnError="false"
- stopOnFailure="false"
- stopOnIncomplete="false"
- stopOnSkipped="false"
- bootstrap="bootstrap.php"
- >
-
-<testsuites>
- <testsuite name="My Test Suite">
- <directory>xoops_lib</directory>
- </testsuite>
-</testsuites>
-
-<groups>
- <exclude>
- <group>slow</group>
- </exclude>
-</groups>
-
-<filter>
- <whitelist>
- <directory suffix=".php">../htdocs/xoops_lib</directory>
- <exclude>
- <directory suffix=".php">../htdocs/xoops_lib/HTMLPurifier</directory>
- <directory suffix=".php">../htdocs/xoops_lib/modules</directory>
- <directory suffix=".php">../htdocs/xoops_lib/smarty</directory>
- </exclude>
- </whitelist>
-</filter>
-
-<logging>
- <log type="coverage-html" target="xoops_lib-test-report" charset="UTF-8" yui="true" />
-</logging>
-
-</phpunit>
\ No newline at end of file
+<phpunit
+ colors="false"
+ verbose="false"
+ stopOnError="false"
+ stopOnFailure="false"
+ stopOnIncomplete="false"
+ stopOnSkipped="false"
+ bootstrap="bootstrap.php"
+ >
+
+<testsuites>
+ <testsuite name="My Test Suite">
+ <directory>xoops_lib</directory>
+ </testsuite>
+</testsuites>
+
+<groups>
+ <exclude>
+ <group>slow</group>
+ </exclude>
+</groups>
+
+<filter>
+ <whitelist>
+ <directory suffix=".php">../xoops_lib</directory>
+ <exclude>
+ <directory suffix=".php">../xoops_lib/HTMLPurifier</directory>
+ <directory suffix=".php">../xoops_lib/modules</directory>
+ <directory suffix=".php">../xoops_lib/smarty</directory>
+ </exclude>
+ </whitelist>
+</filter>
+
+<logging>
+ <log type="coverage-html" target="test-report-xoops_lib" charset="UTF-8" yui="true" />
+</logging>
+
+</phpunit>
|
|
From: <luc...@us...> - 2013-09-04 18:17:44
|
Revision: 12004
http://sourceforge.net/p/xoops/svn/12004
Author: luciorota
Date: 2013-09-04 18:17:39 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
code/template refactory but still rss bugs...
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/rss.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/mirrors.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -161,7 +161,7 @@
//Include page navigation
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
$pagenav_published = new XoopsPageNav($published_count, $wfdownloads->getConfig('admin_perpage') , $start_published, 'start_published');
- $GLOBALS['xoopsTpl']->assign('mirrors_published_pagenav', $pagenav_published -> renderNav());
+ $GLOBALS['xoopsTpl']->assign('mirrors_published_pagenav', $pagenav_published->renderNav());
}
$GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_mirrorslist.html");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -98,9 +98,8 @@
$down['add_mirror'] = $add_mirror;
$down['use_mirrors'] = $use_mirrors;
- $rating = round(number_format($this->getVar('rating'), 0) / 2);
- $rateImage = "rate{$rating}.gif";
- $down['rateimg'] = $rateImage;
+ $down['rateimg'] = "rate" . round(number_format($this->getVar('rating'), 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
+ $down['average_rating'] = $this->getVar('rating'); // new
$down['votes'] = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
$down['hits'] = $this->getVar('hits');
@@ -264,19 +263,14 @@
$down['reviews_num'] = ($numrows) ? $numrows : 0;
- $finalRating = 0;
- $totalRating = 0;
-
+ $totalReviewsRating = 0;
while ($review_text = $xoopsDB->fetchArray($results)) {
- $totalRating += $review_text['rated'];
+ $totalReviewsRating += $review_text['rated'];
}
+ $averageReviewsRating = ($down['reviews_num'] > 0) ? $totalReviewsRating / $down['reviews_num'] : 0;
+ $down['review_average_rating'] = $averageReviewsRating; // new
+ $down['review_rateimg'] = "rate" . round(number_format($averageReviewsRating, 0) / 2) . ".gif"; // this definition is not removed for compatibility issues
- if ($down['reviews_num'] > 0) {
- $finalRating = $totalRating / $down['reviews_num'];
- $finalRating = round(number_format($finalRating, 0) / 2);
- }
- $down['review_rateimg'] = "rate{$finalRating}.gif";;
-
$down['icons'] = wfd_displayicons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
global $xoopsDB;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -215,10 +215,11 @@
$xoopsTpl->assign('lang_thereare', sprintf($lang_ThereAre, $count, array_sum($listings['count'])));
-if($wfdownloads->getConfig('enablerss') == 1) {
- //$rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s' title='%s'></a>", WFDOWNLOADS_URL . "/rss.php", _MD_WFD_LEGENDTEXTRSS, XOOPS_URL . "/" . $wfdownloads->getConfig('mainimagedir') . "/icon/rss.gif", _MD_WFD_LEGENDTEXTRSS); $xoopsTpl->assign('full_rssfeed_link', $rsslink);
- $rsslink=sprintf("<a href='%s' title='%s'><img src='%s' border=0 alt='%s' title='%s'></a>", WFDOWNLOADS_URL . "/rss.php", _MD_WFD_LEGENDTEXTRSS, XOOPS_URL . "/" . $wfdownloads->getConfig('mainimagedir') . "/icon/rss.gif", _MD_WFD_LEGENDTEXTRSS, _MD_WFD_LEGENDTEXTRSS, '' ); //changed by Zyspec
-
+if($wfdownloads->getConfig('enablerss') == true) {
+ $rsslink_URL = WFDOWNLOADS_URL . "/rss.php";
+ $xoopsTpl->assign('full_rssfeed_URL', $rsslink_URL);
+ $rsslink = "<a href='" . $rsslink_URL . "' title='" . _MD_WFD_LEGENDTEXTRSS . "'><img src='" . XOOPS_URL . "/modules/" . $wfdownloads->getModule()->getVar('dirname') . "/images/icon/rss.gif' border='0' alt='" . _MD_WFD_LEGENDTEXTRSS . "' title='" . _MD_WFD_LEGENDTEXTRSS . "'></a>";
+ $xoopsTpl->assign('full_rssfeed_link', $rsslink); // this definition is not removed for compatibility issues
}
include 'footer.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/rss.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/rss.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/rss.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -18,34 +18,35 @@
* @author Xoops Development Team
* @version svn:$id$
*/
-include "../../mainfile.php";
+$currentFile = basename(__FILE__);
+include 'header.php';
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
+
+
$feed_type = 'rss';
$contents = ob_get_clean();
header ('Content-Type:text/xml; charset=utf-8');
$xoopsOption['template_main'] = 'system_' . $feed_type . '.html';
-//error_reporting(0);
+error_reporting(0);
-
-$member_handler =& xoops_gethandler('member');
-$gperm_handler = &xoops_gethandler('groupperm');
-
-include_once(XOOPS_ROOT_PATH."/class/template.php");
+include_once(XOOPS_ROOT_PATH . "/class/template.php");
$xoopsTpl = new XoopsTpl();
// Find case
$case = "all";
-$category = $wfdownloads->getHandler('category')->get(intval($_REQUEST['cid']));
+$category = $wfdownloads->getHandler('category')->get((int)$_REQUEST['cid']);
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
-$allowed_cats = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+// Get download permissions
+$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+
if (!$category->isNew()) {
- if (!in_array($category->getVar('cid'), $allowed_cats)) {
+ if (!in_array($category->getVar('cid'), $allowedDownCategoriesIds)) {
exit();
}
$case = "category";
@@ -54,11 +55,11 @@
switch ($case) {
// Set cache_prefix
default:
- case "all":
+ case "all" :
$cache_prefix = 'wfd|feed|' . $feed_type;
break;
- case "category":
+ case "category" :
$cache_prefix = 'wfd|catfeed|' . $feed_type. '|' . (int)$category->getVar('cid');
break;
}
@@ -77,25 +78,25 @@
switch ($case) {
default:
- case "all":
- $shorthand = "all";
+ case "all" :
+ $shorthand = 'all';
$title = $xoopsConfig['sitename'] . ' - ' . htmlspecialchars($wfdownloads->getModule()->getVar('name'), ENT_QUOTES);
$desc = $xoopsConfig['slogan'] ;
- $channel_url = XOOPS_URL . '/modules/wfdownloads/rss.php';
+ $channel_url = XOOPS_URL . '/modules/' . $wfdownloads->getModule()->getVat('dirname') . '/rss.php';
- $criteria->add(new Criteria("cid", '(' . implode(',', $allowed_cats) . ')', "IN"));
- $items = $wfdownloads->getHandler('download')->getObjects($criteria);
+ $criteria->add(new Criteria('cid', '(' . implode(',', $allowedDownCategoriesIds) . ')', 'IN'));
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
$id = 0;
break;
- case "category":
- $shorthand = "cat";
+ case "category" :
+ $shorthand = 'cat';
$title = $xoopsConfig['sitename'] . ' - ' . htmlspecialchars($category->getVar('title'), ENT_QUOTES);
$desc = $xoopsConfig['slogan'] . ' - ' . htmlspecialchars($category->getVar('title'), ENT_QUOTES);
- $channel_url = XOOPS_URL . '/modules/wfdownloads/rss.php?cid=' . (int)$category->getVar('cid');
+ $channel_url = XOOPS_URL . '/modules/' . $wfdownloads->getModule()->getVat('dirname') . '/rss.php?cid=' . (int)$category->getVar('cid');
- $criteria->add(new Criteria("cid", intval($category->getVar('cid'))));
- $items = $wfdownloads->getHandler('download')->getObjects($criteria);
+ $criteria->add(new Criteria('cid', (int)$category->getVar('cid')));
+ $downloads = $wfdownloads->getHandler('download')->getObjects($criteria);
$id = $category->getVar('categoryid');
break;
}
@@ -113,20 +114,20 @@
$xoopsTpl->assign('channel_language', _LANGCODE);
// Assign items to template style array
- $url = XOOPS_URL . '/modules/wfdownloads/';
- if(count($items) > 0){
- // Get users for items
+ $url = XOOPS_URL . '/modules/' . $wfdownloads->getModule()->getVat('dirname') . '/';
+ if(count($downloads) > 0){
+ // Get users for downloads
$uids = array();
- foreach(array_keys($items) AS $i){
- $uids[] = $items[$i]->getVar('submitter');
+ foreach($downloads as $download){
+ $uids[] = $download->getVar('submitter');
}
if (count($uids) > 0) {
- $users = $member_handler->getUserList(new Criteria('uid', '(' . implode(',', array_unique($uids)) . ')', "IN"));
+ $users = $member_handler->getUserList(new Criteria('uid', '(' . implode(',', array_unique($uids)) . ')', 'IN'));
}
- //Assign items to template
- foreach(array_keys($items) AS $i){
- $item = $items[$i];
+ // Assign items to template
+ foreach($downloads as $download){
+ $item = $download;
$link = $url . 'singlefile.php?lid=' . (int)$item->getVar('lid');
$title = htmlspecialchars($item->getVar('title', 'n'));
$teaser = htmlspecialchars($item->getVar('summary', 'n'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-04 18:17:39 UTC (rev 12004)
@@ -55,10 +55,10 @@
</div>
<{/if}>
-<{if $full_rssfeed_link !== ""}>
- <div>
- <{$full_rssfeed_link}> <{$smarty.const._MD_WFD_LEGENDTEXTRSS}>
- </div>
+<{if $full_rssfeed_URL != ''}>
+ <a href='<{$full_rssfeed_URL}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTRSS}>'>
+ <img src='images/icon/rss.gif' alt='<{$smarty.const._MD_WFD_LEGENDTEXTRSS}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTRSS}>' />
+ </a>
<{/if}>
<br />
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-04 18:17:39 UTC (rev 12004)
@@ -39,11 +39,11 @@
<br />
<div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
- <div><b><{$smarty.const._MD_WFD_RATINGC}></b> <img src="images/icon/<{$download.rateimg}>" alt="" title="" align="middle" /> (<{$download.votes}>)</div>
+ <div><b><{$smarty.const._MD_WFD_RATINGC}></b> <img src="images/icon/<{$download.rateimg}>" alt="<{$download.average_rating|string_format:'%.2f'}>" title="<{$download.average_rating|string_format:'%.2f'}>" align="middle" /> (<{$download.votes}>)</div>
</div>
<br />
<div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
- <div><b><{$smarty.const._MD_WFD_REVIEWS}></b> <img src="images/icon/<{$download.review_rateimg}>" alt="" title="" align="middle" /> (<{$download.reviews_num}>)</div>
+ <div><b><{$smarty.const._MD_WFD_REVIEWS}></b> <img src="images/icon/<{$download.review_rateimg}>" alt="<{$download.review_average_rating|string_format:'%.2f'}>" title="<{$download.review_average_rating|string_format:'%.2f'}>" /> (<{$download.reviews_num}>)</div>
</div>
<br />
<{if $download.use_mirrors == 1}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html 2013-09-04 18:17:39 UTC (rev 12004)
@@ -1,7 +1,10 @@
<{include file='db:wfdownloads_header.html'}>
+
<div>
-<{if $cat_rssfeed_link != ""}>
- <{$cat_rssfeed_link}>
+<{if $category_rssfeed_URL != ''}>
+ <a href='<{$category_rssfeed_URL}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>'>
+ <img src='images/icon/rss.gif' alt='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>' />
+ </a>
<{/if}>
<{if $category_image_URL}>
<img src="<{$category_image_URL}>" alt="<{$category_title}>" title="<{$category_title}>" />
@@ -77,11 +80,7 @@
</div>
<{/if}>
<br />
-<{if $page_nav == true}>
- <div class="wfd_pagenav">
- <{$smarty.const._MD_WFD_PAGES}>: <{$pagenav}>
- </div>
-<{/if}>
+ <{$pagenav}>
<!-- Start link loop -->
<{foreach item=download from=$downloads}>
<div>
@@ -91,12 +90,14 @@
<{/foreach}>
<!-- End link loop -->
<div style="clear:both"></div>
-<{if $page_nav == true}>
- <div class="wfd_pagenav">
- <{$smarty.const._MD_WFD_PAGES}>: <{$pagenav}>
- </div>
-<{/if}>
+ <{$pagenav}>
</div>
<{/if}>
+<{if $category_rssfeed_URL != ""}>
+ <a href='<{$category_rssfeed_URL}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>'>
+ <img src='images/icon/rss.gif' alt='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>' title='<{$smarty.const._MD_WFD_LEGENDTEXTCATRSS}>' />
+ </a>
+<{/if}>
+
<{include file='db:wfdownloads_footer.html'}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -104,14 +104,14 @@
$criteria = new CriteriaCompo();
$criteria->setSort('weight ASC, title');
$categories = $wfdownloads->getHandler('category')->getObjects($criteria, true);
-include_once XOOPS_ROOT_PATH . "/class/tree.php";
+include_once XOOPS_ROOT_PATH . '/class/tree.php';
$categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
// Breadcrumb
$breadcrumb = new WfdownloadsBreadcrumb();
$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
foreach(array_reverse($categoriesTree->getAllParent($cid)) as $parentCategory) {
- $breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
+ $breadcrumb->addLink($parentCategory->getVar('title'), 'viewcat.php?cid=' . $parentCategory->getVar('cid'));
}
$breadcrumb->addLink($category->getVar('title'), '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
@@ -133,23 +133,23 @@
$subsubCategories = $categoriesTree->getAllChild($subcategory->getVar('cid'));
// ----- added for subcat images -----
- if (($subcategory->getVar('imgurl') != '') && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $subcategory->getVar('imgurl'))) {
+ if (($subcategory->getVar('imgurl') != '') && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $subcategory->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
$imageURL = down_createthumb($subcategory->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
- $imageURL = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $subcategory->getVar('imgurl');
+ $imageURL = XOOPS_URL . '/' . $wfdownloads->getConfig('catimage') . '/' . $subcategory->getVar('imgurl');
}
} else {
- $imageURL = ''; //XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/blank.gif";
+ $imageURL = ''; //XOOPS_URL . '/' . $wfdownloads->getConfig('catimage') . '/blank.gif';
}
// ----- end subcat images -----
if (count($subsubCategories) > 0) {
foreach (array_keys($subsubCategories) as $k) {
if (in_array($subsubCategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
- $download_count += isset($listings["count"][$subsubCategories[$k]->getVar('cid')]) ? $listings["count"][$subsubCategories[$k]->getVar('cid')] : 0;
+ $download_count += isset($listings['count'][$subsubCategories[$k]->getVar('cid')]) ? $listings['count'][$subsubCategories[$k]->getVar('cid')] : 0;
$infercategories[] = array(
'cid' => $subsubCategories[$k]->getVar('cid'),
'id' => $subsubCategories[$k]->getVar('cid'), // this definition is not removed for compatibility issues
@@ -195,13 +195,13 @@
$xoopsTpl->assign('category_allowed_upload', in_array($cid, $allowedUpCategoriesIds));
// Making the category image and title available in the template
- if (($categories[$cid]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $categories[$cid]->getVar('imgurl'))) {
+ if (($categories[$cid]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $categories[$cid]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
$imageURL = down_createthumb($categories[$cid]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
- $imageURL = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $categories[$cid]->getVar('imgurl');
+ $imageURL = XOOPS_URL . '/' . $wfdownloads->getConfig('catimage') . '/' . $categories[$cid]->getVar('imgurl');
}
} else {
$imageURL = '';
@@ -213,26 +213,27 @@
}
// Extract Download information from database
-$xoopsTpl->assign('show_category_title', true);
+$xoopsTpl->assign('show_category_title', false);
if (isset($_GET['selectdate'])) {
- $criteria->add(new Criteria('', "TO_DAYS(FROM_UNIXTIME(" . (int)$_GET['selectdate'] . "))", "=", "", "TO_DAYS(FROM_UNIXTIME(published))"));
+ $criteria->add(new Criteria('', 'TO_DAYS(FROM_UNIXTIME(' . (int)$_GET['selectdate'] . '))', '=', '', 'TO_DAYS(FROM_UNIXTIME(published))'));
+ $xoopsTpl->assign('show_categort_title', true);
} elseif (isset($_GET['list'])) {
$criteria->setSort("{$orderby}, title");
- $criteria->add(new Criteria('title', $myts->addSlashes($_GET['list']) . "%", "LIKE"));
+ $criteria->add(new Criteria('title', $myts->addSlashes($_GET['list']) . '%', 'LIKE'));
$xoopsTpl->assign('categoryPath', sprintf(_MD_WFD_DOWNLOADS_LIST, htmlspecialchars($_GET['list'])));
+ $xoopsTpl->assign('show_categort_title', true);
} else {
$criteria->setSort("{$orderby}, title");
$criteria->add(new Criteria('cid', $cid));
- $xoopsTpl->assign('show_categort_title', false);
}
-$total_numrows = $wfdownloads->getHandler('download')->getActiveCount($criteria);
+$downloads_count = $wfdownloads->getHandler('download')->getActiveCount($criteria);
$criteria->setLimit($wfdownloads->getConfig('perpage'));
$criteria->setStart($start);
$downloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
// Show Downloads by file
-if ($total_numrows > 0) {
+if ($downloads_count > 0) {
foreach (array_keys($downloads) as $i) {
$downloadInfo = $downloads[$i]->getDownloadInfo();
$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $downloadInfo['hits']));
@@ -243,7 +244,7 @@
// Show order box
$xoopsTpl->assign('show_links', false);
- if ($total_numrows > 1 && $cid != 0) {
+ if ($downloads_count > 1 && $cid != 0) {
$xoopsTpl->assign('show_links', true);
$orderbyTrans = convertorderbytrans($orderby);
$xoopsTpl->assign('lang_cursortedby', sprintf(_MD_WFD_CURSORTBY, convertorderbytrans($orderby)));
@@ -262,20 +263,22 @@
// Nav page render
include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
if (isset($_GET['selectdate'])) {
- $pagenav = new XoopsPageNav($total_numrows, $wfdownloads->getConfig('perpage') , $start, 'start', 'list=' . urlencode($_GET['selectdate']));
+ $pagenav = new XoopsPageNav($downloads_count, $wfdownloads->getConfig('perpage'), $start, 'start', 'list=' . urlencode($_GET['selectdate']));
} elseif (isset($_GET['list'])) {
- $pagenav = new XoopsPageNav($total_numrows, $wfdownloads->getConfig('perpage') , $start, 'start', 'list=' . urlencode($_GET['list']));
+ $pagenav = new XoopsPageNav($downloads_count, $wfdownloads->getConfig('perpage'), $start, 'start', 'list=' . urlencode($_GET['list']));
} else {
- $pagenav = new XoopsPageNav($total_numrows, $wfdownloads->getConfig('perpage') , $start, 'start', 'cid=' . $cid);
+ $pagenav = new XoopsPageNav($downloads_count, $wfdownloads->getConfig('perpage'), $start, 'start', 'cid=' . $cid);
}
$page_nav = $pagenav->renderNav();
- $istrue = (isset($page_nav) && !empty($page_nav)) ? true : false;
- $xoopsTpl->assign('page_nav', $istrue);
- $xoopsTpl->assign('pagenav', $page_nav);
+ $xoopsTpl->assign('page_nav', (isset($page_nav) && !empty($page_nav))); // this definition is not removed for compatibility issues
+ $xoopsTpl->assign('pagenav', $pagenav->renderNav());
}
-if($wfdownloads->getConfig('enablerss') == 1 && $total_numrows > 0) {
- $rsslink = sprintf("<a href='%s' title='%s'><img src='%s' border='0' alt='%s' title='%s'></a>" ,WFDOWNLOADS_URL . "/rss.php?cid=" . (int)($cid), _MD_WFD_LEGENDTEXTCATRSS, XOOPS_URL . "/" . $wfdownloads->getConfig('mainimagedir') . "/icon/rss.gif", _MD_WFD_LEGENDTEXTCATRSS, ''); //changed by Zyspec
-}
+if($wfdownloads->getConfig('enablerss') == true && $downloads_count > 0) {
+ $rsslink_URL = WFDOWNLOADS_URL . "/rss.php?cid={$cid}";
+ $xoopsTpl->assign('category_rssfeed_URL', $rsslink_URL);
+ $rsslink = "<a href='" . $rsslink_URL . "' title='" . _MD_WFD_LEGENDTEXTCATRSS . "'><img src='" . XOOPS_URL . "/modules/" . $wfdownloads->getModule()->getVar('dirname') . "/images/icon/rss.gif' border='0' alt='" . _MD_WFD_LEGENDTEXTCATRSS . "' title='" . _MD_WFD_LEGENDTEXTCATRSS . "'></a>";
+ $xoopsTpl->assign('cat_rssfeed_link', $rsslink); // this definition is not removed for compatibility issues
+}
include 'footer.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-04 07:58:38 UTC (rev 12003)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-04 18:17:39 UTC (rev 12004)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-08-29';
-$modversion['release_date'] = '2013/08/29';
-$modversion['releasedate'] = "2013-08-29";
+$modversion['date'] = '2013-09-04';
+$modversion['release_date'] = '2013/09/04';
+$modversion['releasedate'] = "2013-09-04";
$modversion['status'] = "BETA";
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|
|
From: <be...@us...> - 2013-09-04 07:58:41
|
Revision: 12003
http://sourceforge.net/p/xoops/svn/12003
Author: beckmi
Date: 2013-09-04 07:58:38 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
Couple more checks to see if values are set
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-04 07:55:43 UTC (rev 12002)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-04 07:58:38 UTC (rev 12003)
@@ -129,8 +129,12 @@
$lids_waiting[] = $review_waiting->getVar('lid');
$uids_waiting[] = $review_waiting->getVar('uid');
}
+ if (isset($lids_waiting)){
$downloads = $wfdownloads->getHandler('download')->getObjects(new Criteria("lid", "(" . implode(',', array_unique($lids_waiting)) . ")", "IN"), true, false);
+ }
+ if (isset($uids_waiting)){
$users = $member_handler->getUserList(new Criteria("uid", "(" . implode(',', $uids_waiting) . ")"));
+ }
foreach ($reviews_waiting as $review_waiting) {
$review_waiting_array = $review_waiting->toArray();
$review_waiting_array['download_title'] = isset($downloads[$review_waiting->getVar('lid')]) ? $downloads[$review_waiting->getVar('lid')]['title'] : "";
|
|
From: <be...@us...> - 2013-09-04 07:55:47
|
Revision: 12002
http://sourceforge.net/p/xoops/svn/12002
Author: beckmi
Date: 2013-09-04 07:55:43 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
Adding checks if values are set for $lids_published and $uids_published
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-03 21:04:58 UTC (rev 12001)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reviews.php 2013-09-04 07:55:43 UTC (rev 12002)
@@ -149,8 +149,12 @@
$lids_published[] = $review_published->getVar('lid');
$uids_published[] = $review_published->getVar('uid');
}
+ if (isset($lids_published)){
$downloads = $wfdownloads->getHandler('download')->getObjects(new Criteria("lid", "(" . implode(',', array_unique($lids_published)) . ")", "IN"), true, false);
+ }
+ if (isset($uids_published)){
$users = $member_handler->getUserList(new Criteria("uid", "(" . implode(',', $uids_published) . ")"));
+ }
foreach ($reviews_published as $review_published) {
$review_published_array = $review_published->toArray();
$review_published_array['download_title'] = isset($downloads[$review_published->getVar('lid')]) ? $downloads[$review_published->getVar('lid')]['title'] : "";
|
|
From: <luc...@us...> - 2013-09-03 21:05:04
|
Revision: 12001
http://sourceforge.net/p/xoops/svn/12001
Author: luciorota
Date: 2013-09-03 21:04:58 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
improved templates
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_viewcat.html
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -89,11 +89,11 @@
$down['cid'] = $this->getVar('cid');
$use_mirrors = $wfdownloads->getConfig('enable_mirrors');
- $add_mirror = 0;
+ $add_mirror = false;
if (!is_object($xoopsUser) && ($wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_MIRROR || $wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH) && $use_mirrors == true) {
- $add_mirror = 1;
+ $add_mirror = true;
} elseif (is_object($xoopsUser) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_MIRROR || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH || $xoopsUser->isAdmin()) && $use_mirrors == true) {
- $add_mirror = 1;
+ $add_mirror = true;
}
$down['add_mirror'] = $add_mirror;
$down['use_mirrors'] = $use_mirrors;
@@ -116,7 +116,7 @@
if ($this->getVar('screenshot')) {
$down['screenshot_full'] = $this->getVar('screenshot');
if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb'] = down_createthumb($down['screenshot_full'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -127,7 +127,7 @@
if ($this->getVar('screenshot2') && $wfdownloads->getConfig('max_screenshot') >= 2) {
$down['screenshot_full2'] = $this->getVar('screenshot2');
if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb2'] = down_createthumb($down['screenshot_full2'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -138,7 +138,7 @@
if ($this->getVar('screenshot3') && $wfdownloads->getConfig('max_screenshot') >= 3) {
$down['screenshot_full3'] = $this->getVar('screenshot3');
if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb3'] = down_createthumb($down['screenshot_full3'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -149,7 +149,7 @@
if ($this->getVar('screenshot4') && $wfdownloads->getConfig('max_screenshot') >= 4) {
$down['screenshot_full4'] = $this->getVar('screenshot4');
if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
- if ($wfdownloads->getConfig('usethumbs') == 1) {
+ if ($wfdownloads->getConfig('usethumbs') == true) {
$down['screenshot_thumb4'] = down_createthumb($down['screenshot_full4'], $wfdownloads->getConfig('screenshots'), "thumbs", $wfdownloads->getConfig('shotwidth'), $wfdownloads->getConfig('shotheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -191,16 +191,16 @@
$down['lang_subdate'] = $is_updated;
$summary = $this->getVar('summary');
- if ($wfdownloads->getConfig('autosummary') == 1 || empty($summary))
+ if ($wfdownloads->getConfig('autosummary') == true || empty($summary))
{
- $sumlength = (int)$wfdownloads->getConfig('autosumlength');
- $sumdesc = stripslashes($this->getVar('description'));
- if (strlen($sumdesc) > $sumlength) {
- $sumdesc = substr($sumdesc, 0, $sumlength);
- $sumdesc = trim(substr($sumdesc, 0, strrpos($sumdesc, ' '))).' ...';
- $down['summary'] = $myts->displayTarea($sumdesc, 1);
+ $summaryLength = (int)$wfdownloads->getConfig('autosumlength');
+ $summaryDescription = stripslashes($this->getVar('description'));
+ if (strlen($summaryDescription) > $summaryLength) {
+ $summaryDescription = substr($summaryDescription, 0, $summaryLength);
+ $summaryDescription = trim(substr($summaryDescription, 0, strrpos($summaryDescription, ' '))) . ' ...';
+ $down['summary'] = $myts->displayTarea($summaryDescription, 1);
} else {
- $down['summary'] = $myts->displayTarea($sumdesc, 1);
+ $down['summary'] = $myts->displayTarea($summaryDescription, 1);
}
} else {
$down['summary'] = $summary;
@@ -212,8 +212,8 @@
$down['limitations'] = ($this->getVar('limitations') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($limitationsArray[$this->getVar('limitations')]));
$versiontypesArray = $wfdownloads->getConfig('versiontypes');
$down['versiontypes'] = ($this->getVar('versiontypes') == "") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($versiontypesArray[$this->getVar('versiontypes')]));
- $licenceArray = $wfdownloads->getConfig('license');
- $down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenceArray[$this->getVar('license')]));
+ $licenseArray = $wfdownloads->getConfig('license');
+ $down['license'] = ($this->getVar('license')=="") ? _MD_WFD_NOTSPECIFIED : $myts->htmlSpecialChars(trim($licenseArray[$this->getVar('license')]));
$down['submitter'] = XoopsUserUtility::getUnameFromId($this->getVar('submitter'));
$publisher = $this->getVar('publisher');
if (!empty($publisher)) {
@@ -247,14 +247,14 @@
$down['adminlink'] = '';
if ($down['isadmin'] == true) {
- $down['adminlink'] = '[ <a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $down['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
- $down['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $down['id'] . '">' . _MD_WFD_DELETE . '</a> ]';
+ $down['adminlink'] = '[<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.edit&lid=' . $down['id'] . '">' . _MD_WFD_EDIT . '</a> | ';
+ $down['adminlink'] .= '<a href="' . WFDOWNLOADS_URL . '/admin/downloads.php?op=download.delete&lid=' . $down['id'] . '">' . _MD_WFD_DELETE . '</a>]';
}
$votestring = ($this->getVar('votes') == 1) ? _MD_WFD_ONEVOTE : sprintf(_MD_WFD_NUMVOTES, $this->getVar('votes'));
$down['is_updated'] = ($this->getVar('updated') > 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
if (is_object($xoopsUser) && $down['isadmin'] != true) {
- $down['useradminlink'] = (intval($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
+ $down['useradminlink'] = ((int)($xoopsUser->getvar('uid')) == $this->getVar('submitter')) ? true : false;
}
global $xoopsDB;
@@ -367,7 +367,9 @@
$sform->addElement($versiontypes_select);
$sform->addElement(new XoopsFormText(_MD_WFD_PRICEC, 'price', 10, 20, $this->getVar('price', 'e')), false);
- $sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary'), false);
+ $summary_dhtmltextarea = new XoopsFormDhtmlTextArea(_MD_WFD_SUMMARY, 'summary', $this->getVar('summary', 'e'), 10, 60, 'smartHiddenSummary');
+ $summary_dhtmltextarea->setDescription(_MD_WFD_SUMMARY_DESC);
+ $sform->addElement($summary_dhtmltextarea, false);
$sform->addElement(new XoopsFormDhtmlTextArea(_MD_WFD_DESCRIPTION, 'description', $this->getVar('description', 'e'), 15, 60, 'smartHiddenDescription'), true);
$features_textarea = new XoopsFormTextArea(_MD_WFD_KEYFEATURESC, 'features', $this->getVar('features', 'e'), 7, 60);
$features_textarea->setDescription(_MD_WFD_KEYFEATURESC_DESC);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1065,25 +1065,25 @@
-function wfd_isnewimage($published)
+function wfdownloads_isNewImage($published)
{
- $oneDay = (time() - (86400 * 1));
- $threeDays = (time() - (86400 * 3));
- $week = (time() - (86400 * 7));
+ $oneDay = (time() - (86400 * 1)); // 1 day
+ $threeDays = (time() - (86400 * 3)); // 3 days
+ $week = (time() - (86400 * 7)); // 1 week
if ($published > 0 && $published < $week) {
- $indicator['image'] = "images/icon/download4.gif";
+ $indicator['image'] = 'images/icon/download4.gif';
$indicator['alttext'] = _MD_WFD_NEWLAST;
} elseif ($published >= $week && $published < $threeDays) {
- $indicator['image'] = "images/icon/download3.gif";
+ $indicator['image'] = 'images/icon/download3.gif';
$indicator['alttext'] = _MD_WFD_NEWTHIS;
} elseif ($published >= $threeDays && $published < $oneDay) {
- $indicator['image'] = "images/icon/download2.gif";
+ $indicator['image'] = 'images/icon/download2.gif';
$indicator['alttext'] = _MD_WFD_THREE;
} elseif ($published >= $oneDay) {
- $indicator['image'] = "images/icon/download1.gif";
+ $indicator['image'] = 'images/icon/download1.gif';
$indicator['alttext'] = _MD_WFD_TODAY;
} else {
- $indicator['image'] = "images/icon/download.gif";
+ $indicator['image'] = 'images/icon/download.gif';
$indicator['alttext'] = _MD_WFD_NO_FILES;
}
return $indicator;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -21,6 +21,27 @@
$currentFile = basename(__FILE__);
include 'header.php';
+$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
+
+// Check if submission is allowed
+$isSubmissionAllowed = false;
+if (is_object($xoopsUser) && ($wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_DOWNLOAD || $wfdownloads->getConfig('submissions') == _WFD_SUBMISSIONS_BOTH)) {
+ // if user is a registered user
+ $groups = $xoopsUser->getGroups();
+ if (array_intersect($xoopsModuleConfig['submitarts'], $groups)) {
+ $isSubmissionAllowed = true;
+ }
+} else {
+ // if user is anonymous
+ if ($wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_DOWNLOAD || $wfdownloads->getConfig('anonpost') == _WFD_ANONPOST_BOTH) {
+ $isSubmissionAllowed = true;
+ }
+}
+
+// Get download/upload permissions
+$allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+$allowedUpCategoriesIds = $gperm_handler->getItemIds('WFUpCatPerm', $groups, $wfdownloads->getModule()->mid());
+
$xoopsOption['template_main'] = 'wfdownloads_index.html';
include XOOPS_ROOT_PATH . '/header.php';
@@ -65,13 +86,10 @@
$chcount = 0;
$countin = 0;
-$userGroups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
+$listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
-$allowedCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $userGroups, $wfdownloads->getModule()->mid());
-$listings = wfd_getTotalItems(0, $allowedCategoriesIds);
-
// Get total amount of categories
-$total_cat = count($allowedCategoriesIds);
+$total_cat = count($allowedDownCategoriesIds);
// Get all main categories
$mainCategories = $categoriesTree->getFirstChild(0);
$count = 0;
@@ -91,87 +109,105 @@
}
// Foreach main category
foreach (array_keys($mainCategories) as $i) {
- if (in_array($mainCategories[$i]->getVar('cid'), $allowedCategoriesIds)) {
+ if (in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds)) {
// Get this category image
// Get this category subcategories
- $allSubCategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
+ $allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
// Sort subcategories by: cid or title or weight
switch($wfdownloads->getConfig('subcatssortby')) {
case 'cid' :
- uasort($allSubCategories, 'categoriesCompareCid');
+ uasort($allSubcategories, 'categoriesCompareCid');
break;
case 'title' :
- uasort($allSubCategories, 'categoriesCompareTitle');
+ uasort($allSubcategories, 'categoriesCompareTitle');
break;
case 'weight' :
default :
- uasort($allSubCategories, 'categoriesCompareWeight');
+ uasort($allSubcategories, 'categoriesCompareWeight');
break;
}
// Get this category indicator image
$publishdate = isset($listings['published'][$mainCategories[$i]->getVar('cid')]) ? $listings['published'][$mainCategories[$i]->getVar('cid')] : 0;
- if (count($allSubCategories) > 0) {
+ if (count($allSubcategories) > 0) {
// Foreach subcategory
- foreach (array_keys($allSubCategories) as $k) {
- if (in_array($allSubCategories[$k]->getVar('cid'), $allowedCategoriesIds)) {
- $publishdate = (isset($listings['published'][$allSubCategories[$k]->getVar('cid')]) AND $listings['published'][$allSubCategories[$k]->getVar('cid')] > $publishdate) ? $listings['published'][$allSubCategories[$k]->getVar('cid')] : $publishdate;
+ foreach (array_keys($allSubcategories) as $k) {
+ if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
+ $publishdate = (isset($listings['published'][$allSubcategories[$k]->getVar('cid')]) AND $listings['published'][$allSubcategories[$k]->getVar('cid')] > $publishdate) ? $listings['published'][$allSubcategories[$k]->getVar('cid')] : $publishdate;
}
}
}
- $indicator = wfd_isnewimage($publishdate);
+ $isNewImage = wfdownloads_isNewImage($publishdate);
if (($mainCategories[$i]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imgurl = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
"thumbs", $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
- $imgurl = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl');
+ $imageURL = XOOPS_URL . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl');
}
} else {
- $imgurl = $indicator['image'];
+ $imageURL = $isNewImage['image'];
}
// Get this category subcategories id and title
- $subCategories = array();
+ $subcategories = array();
$count++;
$download_count = isset($listings['count'][$mainCategories[$i]->getVar('cid')]) ? $listings['count'][$mainCategories[$i]->getVar('cid')] : 0;
// modified July 5 2006 by Freeform Solutions (jwe)
// make download count recursive, to include all sub categories that the user has permission to view
- //$allSubCategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
- if (count($allSubCategories) > 0) {
- foreach (array_keys($allSubCategories) as $k) {
- if (in_array($allSubCategories[$k]->getVar('cid'), $allowedCategoriesIds)) {
- $download_count += isset($listings['count'][$allSubCategories[$k]->getVar('cid')]) ? $listings['count'][$allSubCategories[$k]->getVar('cid')] : 0;
- if($wfdownloads->getConfig('subcats') == 1 AND $allSubCategories[$k]->getVar('pid') == $mainCategories[$i]->getVar('cid')) {
+ //$allSubcategories = $categoriesTree->getAllChild($mainCategories[$i]->getVar('cid'));
+ if (count($allSubcategories) > 0) {
+ foreach (array_keys($allSubcategories) as $k) {
+ if (in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
+ $download_count += isset($listings['count'][$allSubcategories[$k]->getVar('cid')]) ? $listings['count'][$allSubcategories[$k]->getVar('cid')] : 0;
+ if($wfdownloads->getConfig('subcats') == 1 AND $allSubcategories[$k]->getVar('pid') == $mainCategories[$i]->getVar('cid')) {
// if we are collecting subcat info for displaying, and this subcat is a first level child...
- $subCategories[] = array("id" => $allSubCategories[$k]->getVar('cid'), "title" => $allSubCategories[$k]->getVar('title'));
+ $subcategories[] = array(
+ 'id' => $allSubcategories[$k]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => $allSubcategories[$k]->getVar('cid'),
+ 'allowed_download' => in_array($allSubcategories[$k]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($allSubcategories[$k]->getVar('cid'), $allowedUpCategoriesIds)),
+ 'title' => $allSubcategories[$k]->getVar('title')
+ );
}
}
}
}
- if($wfdownloads->getConfig('subcats') != 1) {
- unset($subCategories);
+ if($wfdownloads->getConfig('subcats') != true) {
+ unset($subcategories);
$xoopsTpl->append('categories', array(
- 'image' => $imgurl,
- 'id' => (int)$mainCategories[$i]->getVar('cid'),
+ 'image' => $imageURL, // this definition is not removed for compatibility issues
+ 'image_URL' => $imageURL,
+ 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => (int)$mainCategories[$i]->getVar('cid'),
+ 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
'title' => $mainCategories[$i]->getVar('title'),
'summary' => $mainCategories[$i]->getVar('summary'),
- 'totaldownloads' => (int)$download_count,
+ 'totaldownloads' => (int)$download_count, // this definition is not removed for compatibility issues
+ 'downloads_count' => (int)$download_count,
'count' => (int)$count,
- 'alttext' => $indicator['alttext']));
+ 'alttext' => $isNewImage['alttext'])
+ );
} else {
$xoopsTpl->append('categories', array(
- 'image' => $imgurl,
- 'id' => (int)$mainCategories[$i]->getVar('cid'),
+ 'image' => $imageURL, // this definition is not removed for compatibility issues
+ 'image_URL' => $imageURL,
+ 'id' => (int)$mainCategories[$i]->getVar('cid'), // this definition is not removed for compatibility issues
+ 'cid' => (int)$mainCategories[$i]->getVar('cid'),
+ 'allowed_download' => in_array($mainCategories[$i]->getVar('cid'), $allowedDownCategoriesIds),
+ 'allowed_upload' => ($isSubmissionAllowed && in_array($mainCategories[$i]->getVar('cid'), $allowedUpCategoriesIds)),
'title' => $mainCategories[$i]->getVar('title'),
'summary' => $mainCategories[$i]->getVar('summary'),
- 'subcategories' => $subCategories,
- 'totaldownloads' => (int)$download_count,
+ 'subcategories' => $subcategories,
+ 'totaldownloads' => (int)$download_count, // this definition is not removed for compatibility issues
+ 'downloads_count' => (int)$download_count,
'count' => (int)$count,
- 'alttext' => $indicator['alttext']));
+ 'alttext' => $isNewImage['alttext'])
+ );
}
}
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/main.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -21,7 +21,7 @@
define("_MD_WFD_THANKSFORHELP","Thank-you for helping to maintain this directory's integrity.");
define("_MD_WFD_FORSECURITY","For security reasons your user name and IP address will also be temporarily recorded.");
define("_MD_WFD_NOPERMISETOLINK","This file doesn't belong to the site you came from <br /><br />Please e-mail the webmaster of the site you came from and tell him: <br /><b>NOT TO LEECH OTHER SITES LINKS!!</b> <br /><br /><b>Definition of a Leecher:</b> One who is to lazy to link from his own server or steals other peoples hard work and makes it look like his own <br /><br /> Your IP address <b>has been logged</b>.");
-define("_MD_WFD_SUMMARY","Summary<br /><br /><span style='font-weight: normal;'>You can leave this blank<br />A summary will be created if empty</span>");
+define("_MD_WFD_SUMMARY","Summary");
define("_MD_WFD_DESCRIPTION","Description");
define("_MD_WFD_SUBMITCATHEAD","Submit download form");
define("_MD_WFD_MAIN","HOME");
@@ -36,7 +36,7 @@
define("_MD_WFD_DATENEW","Date (new files listed first)");
define("_MD_WFD_RATINGLTOH","Rating (lowest to highest score)");
define("_MD_WFD_RATINGHTOL","Rating (highest to lowest score)");
-define("_MD_WFD_DESCRIPTIONC","Description: ");
+define("_MD_WFD_DESCRIPTIONC","Description");
define("_MD_WFD_CATEGORYC","Category");
define("_MD_WFD_VERSION","Version");
define("_MD_WFD_SUBMITDATE","Released");
@@ -84,7 +84,7 @@
define("_MD_WFD_UPDATEDON","Updated on");
define("_MD_WFD_PRICEFREE","Free");
define("_MD_WFD_VIEWDETAILS","View full details");
-define("_MD_WFD_OPTIONS", 'Options: ');
+define("_MD_WFD_OPTIONS", 'Options');
define("_MD_WFD_NOTIFYAPPROVE", 'Notify me when this file is approved');
define("_MD_WFD_VOTEAPPRE","Your vote is appreciated.");
define("_MD_WFD_THANKYOU","Thank you for taking the time to vote here at %s"); // %s is your site name
@@ -104,7 +104,7 @@
define("_MD_WFD_DATE","Date");
define("_MD_WFD_POPULARITY","Popularity");
define("_MD_WFD_TOPRATED","Rating");
-define("_MD_WFD_CURSORTBY","Files currently sorted by: %s");
+define("_MD_WFD_CURSORTBY","Downloads currently sorted by: %s");
define("_MD_WFD_CANCEL","Cancel");
define("_MD_WFD_ALREADYREPORTED","You have already submitted a broken report for this resource.");
define("_MD_WFD_MUSTREGFIRST","Sorry, you don't have the permission to perform this action.<br />Please register or login first!");
@@ -126,21 +126,21 @@
define("_MD_WFD_AGREE","I Agree");
define("_MD_WFD_DOYOUAGREE","Do you agree to the above terms?");
define("_MD_WFD_DISCLAIMERAGREEMENT","Disclaimer");
-define("_MD_WFD_DUPLOADSCRSHOT","Upload screenshot image:");
-define("_MD_WFD_RESOURCEID","Resource id#: ");
-define("_MD_WFD_REPORTER","Original reporter: ");
-define("_MD_WFD_DATEREPORTED","Date reported: ");
+define("_MD_WFD_DUPLOADSCRSHOT","Upload screenshot image");
+define("_MD_WFD_RESOURCEID","Resource id#");
+define("_MD_WFD_REPORTER","Original reporter");
+define("_MD_WFD_DATEREPORTED","Date reported");
define("_MD_WFD_RESOURCEREPORTED","Resource reported broken");
define("_MD_WFD_BROWSETOTOPIC","<b>Browse downloads by alphabetical listing</b>");
-define("_MD_WFD_WEBMASTERACKNOW","Broken report acknowledged: ");
-define("_MD_WFD_WEBMASTERCONFIRM","Broken report confirmed: ");
+define("_MD_WFD_WEBMASTERACKNOW","Broken report acknowledged");
+define("_MD_WFD_WEBMASTERCONFIRM","Broken report confirmed");
define("_MD_WFD_DELETE","Delete");
define("_MD_WFD_DISPLAYING","Displayed by: ");
define("_MD_WFD_LEGENDTEXTNEW","New today");
define("_MD_WFD_LEGENDTEXTNEWTHREE","New 3 days");
define("_MD_WFD_LEGENDTEXTTHISWEEK","New this week");
define("_MD_WFD_LEGENDTEXTNEWLAST","Over 1 week");
-define("_MD_WFD_THISFILEDOESNOTEXIST","Error: this file does not exist!");
+define("_MD_WFD_THISFILEDOESNOTEXIST","ERROR: this file does not exist!");
define("_MD_WFD_BROKENREPORTED","Broken file reported");
define("_MD_WFD_LEGENDTEXTRSS","RSS feeds");
define("_MD_WFD_LEGENDTEXTCATRSS","RSS category feed");
@@ -166,7 +166,7 @@
define("_MD_WFD_REV_RATING","Review rating");
define("_MD_WFD_REV_DESCRIPTION","Review");
define("_MD_WFD_REV_SUBMITREV","Submit review");
-define("_MD_WFD_ERROR_CREATEREVIEW","Error when creating a review");
+define("_MD_WFD_ERROR_CREATEREVIEW","ERROR: unable to create a review");
define("_MD_WFD_REV_SNEWMNAMEDESC","
Please completely fill out the form below, and we'll add your review as soon as possible.<br /><br />
@@ -202,7 +202,7 @@
define("_MD_WFD_USERREVIEWSTITLE","User reviews");
define("_MD_WFD_USERREVIEWS","Read User reviews on %s");
define("_MD_WFD_NOUSERREVIEWS","Be the first person to review %s");
-define("_MD_WFD_ERROR","Error updating database: information not saved");
+define("_MD_WFD_ERROR","ERROR: error updating database, information not saved");
define("_MD_WFD_COPYRIGHT","copyright");
define("_MD_WFD_INFORUM","Discuss in forum");
@@ -246,7 +246,7 @@
define("_MD_WFD_MIRROR_LOCATION","Location");
define("_MD_WFD_MIRROR_DOWNURL","Download URL");
define("_MD_WFD_MIRROR_SUBMITMIRROR","Submit mirror");
-define("_MD_WFD_ERROR_CREATEMIRROR","Error when creating mirror");
+define("_MD_WFD_ERROR_CREATEMIRROR","ERROR: unable to create a mirror");
define("_MD_WFD_MIRROR_SNEWMNAMEDESC","
Please completely fill out the form below, and we'll add your mirror as soon as possible.<br /><br />
Thank you for your assistance in providing another location to download these files. We want to give our users a possibility to find quality software faster.<br /><br />All mirror submissions will be reviewed by one of our webmasters before they are put up on the web site.
@@ -268,7 +268,7 @@
define("_MD_WFD_CONT7","Oceania");
-define("_MD_WFD_ADMIN_PAGE",":: Administrative section ::");
+define("_MD_WFD_ADMIN_PAGE","Administrative section");
define("_MD_WFD_DOWNLOADS_LIST","Downloads list (%s)");
define("_MD_WFD_NEWDOWNLOADS_ALL","All");
define("_MD_WFD_NEWDOWNLOADS_INTHELAST","In the last %s days");
@@ -303,4 +303,9 @@
define("_MD_WFD_KEYFEATURESC_DESC","Separate each key feature with a |");
define("_MD_WFD_REQUIREMENTSC_DESC","Separate each requirement with |");
define("_MD_WFD_HISTORYD_DESC","The submit date will automatically be added to this.");
-define("_MD_WFD_UPLOAD_FILEC_DESC","Max file size: %s<br />Max image width: %dpx<br />Max image height: %dpx<br />Allowed mimetypes: %s");
\ No newline at end of file
+define("_MD_WFD_UPLOAD_FILEC_DESC","Max file size: %s<br />Max image width: %dpx<br />Max image height: %dpx<br />Allowed extensions: %s");
+
+define("_MD_WFD_SUMMARY_DESC","You can leave this blank<br />A summary will be created if empty");
+
+define("_MD_WFD_SUBCATEGORIESLISTING","Subcategories listing");
+define("_MD_WFD_DOWNLOADSLISTING","Downloads listing");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -95,7 +95,7 @@
define("_MI_WFD_REVIEWANONPOST","[reviews] Anonymous user reviews");
define("_MI_WFD_REVIEWANONPOSTDSC","Allow Anonymous users to submit new reviews to your website.");
-define('_MI_WFD_MAXFILESIZE','[upload files] Upload size (kilobytes)');
+define('_MI_WFD_MAXFILESIZE','[upload files] Max file size (bytes)');
define('_MI_WFD_MAXFILESIZEDSC','Maximum file size permitted with file uploads.');
define('_MI_WFD_IMGWIDTH','[upload files] Max upload image width (pixels)');
define('_MI_WFD_IMGWIDTHDSC','Maximum image width permitted when uploading image files.');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -68,11 +68,12 @@
$criteria->setLimit($wfdownloads->getConfig('perpage'));
$criteria->setStart(0);
$downloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
-foreach (array_keys($downloads) as $i) {
- $down = $downloads[$i]->getDownloadInfo();
- $xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $down['hits']));
- $xoopsTpl->assign('lang_subdate' , $down['is_updated']);
- $xoopsTpl->append('file', $down);
+foreach ($downloads as $download) {
+ $downloadInfo = $download->getDownloadInfo();
+ $xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $downloadInfo['hits']));
+ $xoopsTpl->assign('lang_subdate' , $downloadInfo['is_updated']);
+ $xoopsTpl->append('file', $downloadInfo);
+ $xoopsTpl->append('downloads', $downloadInfo); // this definition is not removed for compatibility issues
}
// Screenshots display
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -160,11 +160,11 @@
// Get download informations
-$down = $download->getDownloadInfo();
-$xoopsTpl->assign('categoryPath', $down['path'] . " > " . $down['title']); // this definition is not removed for compatibility issues
-$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $down['hits']));
-$xoopsTpl->assign('lang_subdate' , $down['is_updated']);
-$xoopsTpl->append('file', $down);
+$downloadInfo = $download->getDownloadInfo();
+$xoopsTpl->assign('categoryPath', $downloadInfo['path'] . " > " . $downloadInfo['title']); // this definition is not removed for compatibility issues
+$xoopsTpl->assign('lang_dltimes', sprintf(_MD_WFD_DLTIMES, $downloadInfo['hits']));
+$xoopsTpl->assign('lang_subdate' , $downloadInfo['is_updated']);
+$xoopsTpl->append('file', $downloadInfo);
$xoopsTpl->assign('show_screenshot', false);
if ($wfdownloads->getConfig('screenshot') == 1) {
$xoopsTpl->assign('shots_dir', $wfdownloads->getConfig('screenshots'));
@@ -182,7 +182,7 @@
$breadcrumb->addLink($parentCategory->getVar('title'), "viewcat.php?cid=" . $parentCategory->getVar('cid'));
}
$breadcrumb->addLink($category->getVar('title'), "viewcat.php?cid=" . $category->getVar('cid'));
-$breadcrumb->addLink($down['title'], '');
+$breadcrumb->addLink($downloadInfo['title'], '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
// Show other author downloads
@@ -192,12 +192,13 @@
$criteria->setSort('published');
$criteria->setOrder('DESC');
$downloads = $wfdownloads->getHandler('download')->getActiveDownloads($criteria);
-foreach (array_keys($downloads) as $i) {
- $downuid['title'] = $downloads[$i]->getVar('title');
- $downuid['lid'] = (int)$downloads[$i]->getVar('lid');
- $downuid['cid'] = (int)$downloads[$i]->getVar('cid');
- $downuid['published'] = formatTimestamp($downloads[$i]->getVar('published'), $wfdownloads->getConfig('dateformat'));
- $xoopsTpl->append('down_uid', $downuid);
+foreach ($downloads as $download) {
+ $downloadByUser['title'] = $download->getVar('title');
+ $downloadByUser['lid'] = (int)$download->getVar('lid');
+ $downloadByUser['cid'] = (int)$download->getVar('cid');
+ $downloadByUser['published'] = formatTimestamp($download->getVar('published'), $wfdownloads->getConfig('dateformat'));
+ $xoopsTpl->append('down_uid', $downloadByUser); // this definition is not removed for compatibility issues
+ $xoopsTpl->append('downloads_by_user', $downloadByUser);
}
$cid = (int)$download->getVar('cid');
@@ -221,7 +222,7 @@
/**
* User mirrors
*/
-$down['add_mirror'] = $add_mirror;
+$downloadInfo['add_mirror'] = $add_mirror;
$criteria = new CriteriaCompo(new Criteria("lid", $lid));
$criteria->add(new Criteria("submit", 1));
$mirrorsCount = $wfdownloads->getHandler('mirror')->getCount($criteria);
@@ -238,7 +239,8 @@
if ($wfdownloads->getConfig('copyright') == true) {
$xoopsTpl->assign('lang_copyright', $download->getVar('title') . " © " . _MD_WFD_COPYRIGHT . " " . date("Y"));
}
-$xoopsTpl->assign('down', $down);
+$xoopsTpl->assign('down', $downloadInfo); // this definition is not removed for compatibility issues
+$xoopsTpl->assign('download', $downloadInfo);
include XOOPS_ROOT_PATH . '/include/comment_view.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-03 21:04:58 UTC (rev 12001)
@@ -387,26 +387,28 @@
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
$catarray['imageheader'] = wfd_imageheader();
-
+ $xoopsTpl->assign('catarray', $catarray);
+
// Breadcrumb
$breadcrumb = new WfdownloadsBreadcrumb();
$breadcrumb->addLink($wfdownloads->getModule()->getVar('name'), WFDOWNLOADS_URL);
$breadcrumb->addLink(_MD_WFD_SUBMITDOWNLOAD, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl -> assign('catarray', $catarray);
- $xoopsTpl->assign('categoryPath', _MD_WFD_DISCLAIMERAGREEMENT);
- $xoopsTpl->assign('module_home', wfdownloads_module_home(true));
$xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('down_disclaimer', false);
$xoopsTpl->assign('disclaimer', $myts->displayTarea($wfdownloads->getConfig('disclaimer'), 1, 1, 1, 1, 1));
- $xoopsTpl->assign('down_disclaimer', false);
- $xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php');
+ $xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
if (!isset($_REQUEST['lid'])) {
$xoopsTpl->assign('agree_location', WFDOWNLOADS_URL . "/{$currentFile}?agree=1");
- } elseif (isset($_REQUEST['lid'])) {
+ } else {
$lid = WfdownloadsRequest::getInt('lid');
$xoopsTpl->assign('agree_location', WFDOWNLOADS_URL . "/{$currentFile}?agree=1&lid={$lid}");
}
+
+ $xoopsTpl->assign('categoryPath', _MD_WFD_DISCLAIMERAGREEMENT);
+ $xoopsTpl->assign('module_home', wfdownloads_module_home(true));
+
include XOOPS_ROOT_PATH . '/footer.php';
exit();
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_disclaimer.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -23,7 +23,7 @@
<br />
<input type='button' onclick='location="<{$agree_location}>"' class='formButton' value='<{$smarty.const._MD_WFD_AGREE}>' alt='<{$smarty.const._MD_WFD_AGREE}>' />
- <input type='button' onclick='location="<{$cancel_location}>"' class='formButton' value='<{$smarty.const._CANCEL}>' alt='<{$smarty.const._CANCEL}>' />
+ <input type='button' onclick='javascript:history.go(-1)' class='formButton' value='<{$smarty.const._CANCEL}>' alt='<{$smarty.const._CANCEL}>' />
<{if $down_disclaimer == true}>
<input type='hidden' name='lid' value='1' />
<input type='hidden' name='cid' value='1' />
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,141 +1,72 @@
-<div class="wfd_container">
- <div class="wfd_down_title">
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>"><span class="itemTitle"><{$down.title}> </span></a><{$down.icons}>
- </div>
- <div class="wfd_down_top_r">
- <b><{$lang_subdate}>:</b> <{$down.updated}>
- </div>
- <div class="wfd_down_top_l">
- <b><{$smarty.const._MD_WFD_SUBMITTER}>:</b> <{$down.submitter}> <{$down.adminlink}>
- </div>
- <div class="wfd_down_main_l">
+<div>
+ <b><a href="singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>" title="<{$smarty.const._MD_WFD_VIEWDETAILS}>"><{$download.title}></a></b> <{$download.icons}>
+<{if ($download.isadmin == true)}>
+ <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+<{/if}>
+</div>
+
<{if $show_screenshot == true}>
-<{if $down.screenshot_full != ''}>
+<div>
+<{if $download.screenshot_full != ''}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full2 != '' && $viewcat !== true}>
+<{if $download.screenshot_full2 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full2}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb2}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full2}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb2}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full3 != '' && $viewcat !== true}>
+<{if $download.screenshot_full3 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full3}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb3}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full3}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb3}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
-<{if $down.screenshot_full4 != '' && $viewcat !== true}>
+<{if $download.screenshot_full4 != '' && $viewcat != true}>
<div>
- <a href="<{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full4}>" class="thickbox" rel="<{$down.title}>">
- <img src="<{$down.screenshot_thumb4}>" alt="<{$down.title}>" title="<{$down.title}>" style='border: 1px solid black' />
+ <a href="<{$xoops_url}>/<{$shots_dir}>/<{$download.screenshot_full4}>" class="thickbox" rel="<{$download.title}>">
+ <img src="<{$download.screenshot_thumb4}>" alt="<{$download.title}>" title="<{$download.title}>" style='border: 1px solid black' />
</a>
</div>
<{/if}>
+</div>
<{/if}>
- <p>
- <a href="<{$xoops_url}>/modules/wfdownloads/visit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
- <{$smarty.const._MD_WFD_DOWNLOADNOW}>
- </a>
- <{if $down.use_mirrors == 1 && $down.mirrors_num >= 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?op=list&cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
- </a>
- <{/if}>
- <{if $down.use_mirrors !== 1 && $down.mirror != ''}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" /> <{$down.mirror}>
- <{/if}>
- </p>
- <p>
- <{$down.summary}>
- </p>
- <div class="wfd_down_viewdetails">
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>"><{$smarty.const._MD_WFD_VIEWDETAILS}></a>
- </div>
- </div>
-
- <div class="wfd_down_main_r">
- <div class="wfd_down_info_top">
- <{if $down.version != 0}>
- <div><b><{$smarty.const._MD_WFD_VERSION}>:</b> <{$down.version}></div>
- <{/if}>
- <div><b><{$smarty.const._MD_WFD_VERSIONTYPES}>:</b> <{$down.versiontypes}></div>
- <div>
- <div><b><{$smarty.const._MD_WFD_DOWNLOADHITS}>:</b> <{$down.hits}></div>
- <div><b><{$smarty.const._MD_WFD_FILESIZE}>:</b> <{$down.size}></div>
- <{if $down.homepage != ''}>
- <div><b><{$smarty.const._MD_WFD_HOMEPAGE}>:</b> <{$down.homepage|wordwrap:50:"\n":true}></div>
- <{/if}>
- </div>
- </div>
- <br />
-
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_RATINGC}></b> <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/<{$down.rateimg}>" alt="" title="" align="middle" /> (<{$down.votes}>)
- </div>
- <br />
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_REVIEWS}></b> <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/<{$down.review_rateimg}>" alt="" title="" align="middle" /> (<{$down.reviews_num}>)
- </div>
- <br />
- <{if $down.use_mirrors == 1}>
- <div class="wfd_down_info_bottom">
- <b><{$smarty.const._MD_WFD_MIRROR_AVAILABLE}></b> <{$down.mirrors_num}>
- </div>
- <{/if}>
- </div>
+<div title="<{$smarty.const._MD_WFD_SUMMARY}>">
+ <{$download.summary}>
</div>
-
-<{if !$custom_form}>
-<div class="wfd_down_main_bottom">
- <br />
- <b><{$smarty.const._MD_WFD_PRICE}>:</b> <{$down.price}> |
- <b><{$smarty.const._MD_WFD_SUPPORTEDPLAT}>:</b> <{$down.platform}> |
- <b><{$smarty.const._MD_WFD_DOWNLICENSE}>:</b> <{$down.license}> |
- <b><{$smarty.const._MD_WFD_LIMITS}>:</b> <{$down.limitations}>
+<div>
+ <a href="singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>"><{$smarty.const._MD_WFD_VIEWDETAILS}></a>
</div>
-<{/if}>
-<div class="wfd_down_main_bottom2">
-<{if $down.use_mirrors == 1 && $down.add_mirror == 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_ADDMIRROR}>
+<div>
+ <a href="visit.php?cid=<{$download.cid}>&lid=<{$download.id}>">
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
+ <{$smarty.const._MD_WFD_DOWNLOADNOW}>
+ </a>
+<{if $download.use_mirrors == 1 && $download.mirrors_num >= 1}>
+ <a href="mirror.php?op=list&cid=<{$download.cid}>&lid=<{$download.id}>">
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
+
+ <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
</a>
- |
<{/if}>
- <a href="<{$xoops_url}>/modules/wfdownloads/review.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_REVIEWTHISFILE}>
- </a>
- |
- <a href="<{$xoops_url}>/modules/wfdownloads/ratefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_RATETHISFILE}>
- </a>
- |
-<{if $down.useradminlink == true}>
- <a href="<{$xoops_url}>/modules/wfdownloads/submit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_MODIFY}>
- </a>
- |
+<{if $download.use_mirrors != 1 && $download.mirror != ''}>
+ <img src="<{xoModuleIcons16 download.png}>" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" /> <{$download.mirror}>
<{/if}>
- <a href="<{$xoops_url}>/modules/wfdownloads/brokenfile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._MD_WFD_REPORTBROKEN}>
- </a>
- |
- <a target="_top" href="mailto:?subject=<{$down.mail_subject}>&body=<{$down.mail_body}>">
- <{$smarty.const._MD_WFD_TELLAFRIEND}>
- </a>
- |
- <a href="<{$xoops_url}>/modules/wfdownloads/singlefile.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <{$smarty.const._COMMENTS}> (<{$down.comments}>)
- </a>
</div>
+
+<div>
+ <small>
+ <{$smarty.const._MD_WFD_SUBMITTER}>: <{$download.submitter}>
+ <br />
+ <{$lang_subdate}>: <{$download.updated}>
+ </small>
+</div>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_footer.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,4 +1,4 @@
-<{if $isAdmin == 1}>
+<{if $isAdmin == true}>
<div class="wfdownloads_adminlinks"><{$wfdownloads_adminpage}></div>
<{/if}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_index.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -1,63 +1,66 @@
<{include file='db:wfdownloads_header.html'}>
<{if count($categories) gt 0}>
-<div class="even">
- <b><{$smarty.const._MD_WFD_MAINLISTING}></b>
-</div>
-<br />
-<table border="0" cellspacing="5" cellpadding="0">
- <tr>
+<div>
+ <h3><{$smarty.const._MD_WFD_MAINLISTING}></h3>
+ <br />
<!-- Start category loop -->
<{foreach item=category from=$categories}>
- <td>
- <a href="<{$xoops_url}>/modules/wfdownloads/viewcat.php?cid=<{$category.id}>">
- <img src="<{$category.image}>" alt="<{$category.alttext}>" title="<{$category.alttext}>" />
-
- <b><{$category.title}></b>
- </a>
- (<{$category.totaldownloads}>)
- <br />
- <div style="margin-bottom: 3px; margin-left: 10px;">
+ <div>
+ <div>
+ <a href="viewcat.php?cid=<{$category.id}>">
+ <img src="<{$category.image_URL}>" alt="<{$category.alttext}>" title="<{$category.alttext}>" />
+ <b><{$category.title}></b></a> (<{$category.downloads_count}>)
+ <{if $isAdmin == true}>
+ <a href="admin/categories.php?op=category.edit&cid=<{$category.cid}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/categories.php?op=category.delete&cid=<{$category.cid}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+ <{/if}>
+ <{if $category.allowed_upload == true}>
+ <a href="submit.php?cid=<{$category.cid}>"><img src="<{xoModuleIcons16 up.png}>" title="<{$smarty.const._MD_WFD_SUBMITDOWNLOAD}>" alt="<{$smarty.const._MD_WFD_SUBMITDOWNLOAD}>" /></a>
+ <{/if}>
+ </div>
+ <div title="<{$smarty.const._MD_WFD_CSUMMARY}>">
<{$category.summary}>
+ </div>
+ <{if $category.subcategories}>
+ <div>
+ <{foreach item=subcategory from=$category.subcategories}>
+ <div>
+ <small><a href="viewcat.php?cid=<{$subcategory.cid}>"><{$subcategory.title}></a></small>
</div>
- <{if $category.subcategories}>
- <{foreach item=subcat from=$category.subcategories}>
- <div style="margin-bottom: 3px; margin-left: 16px;">
- <small><a href="<{$xoops_url}>/modules/wfdownloads/viewcat.php?cid=<{$subcat.id}>"><{$subcat.title}></a></small>
- </div>
<{/foreach}>
- <{/if}>
- </td>
-<{if $category.count is div by 2}>
- </tr>
- <tr>
-<{/if}>
+ </div>
+ <{/if}>
+ </div>
+ <br />
<{/foreach}>
<!-- End category loop -->
- </tr>
-</table>
+</div>
<br />
-<div class="odd" style="line-height: 8px;">
+<div>
<small><{$lang_thereare}></small>
</div>
<br />
-<div style="margin-bottom: 1px;">
+<div>
<small>
-<{if $full_rssfeed_link !== ""}>
- <{$full_rssfeed_link}> <{$smarty.const._MD_WFD_LEGENDTEXTRSS}>
-<{/if}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download1.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEW}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download2.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWTHREE}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download3.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTTHISWEEK}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/download4.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWLAST}>
+ <img src="images/icon/download1.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEW}>
+ <img src="images/icon/download2.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWTHREE}>
+ <img src="images/icon/download3.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTTHISWEEK}>
+ <img src="images/icon/download4.gif" alt="" title="" /> <{$smarty.const._MD_WFD_LEGENDTEXTNEWLAST}>
</small>
</div>
<{/if}>
+<{if $full_rssfeed_link !== ""}>
+ <div>
+ <{$full_rssfeed_link}> <{$smarty.const._MD_WFD_LEGENDTEXTRSS}>
+ </div>
+<{/if}>
+
<br />
<div align="<{$catarray.indexfooteralign}>">
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_newlistindex.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -20,7 +20,7 @@
<br />
<!-- Start link loop -->
-<{foreach item=down from=$file}>
+<{foreach item=download from=$file}>
<{include file="db:wfdownloads_download.html"}>
<br />
<{/foreach}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-03 18:25:36 UTC (rev 12000)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-03 21:04:58 UTC (rev 12001)
@@ -3,242 +3,227 @@
<h1><{$category_title}></h1>
<img src="<{$category_image}>" alt="<{$category_title}>" title="<{$category_title}>" />
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td style="line-height: 12px;">
- <div>
- <h3 style="color: #2F5376;"><{$down.title}></h3>
- <div style="margin-left: 6px;">
- <a href="<{$xoops_url}>/modules/wfdownloads/visit.php?cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" title="<{$smarty.const._MD_WFD_DOWNLOADNOW}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADNOW}>
- </a>
-
- <{if $down.use_mirrors == 1 && $down.mirrors_num >= 1}>
- <a href="<{$xoops_url}>/modules/wfdownloads/mirror.php?op=mirrors.list&cid=<{$down.cid}>&lid=<{$down.id}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" title="<{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>" />
-
- <{$smarty.const._MD_WFD_DOWNLOADMIRRORS}>
- </a>
- <{/if}>
- <{if $down.use_mirrors != 1 && $down.mirror != ''}>
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/downloads02.gif" alt="<{$down.mirror}>" title="<{$down.mirror}>" />
-
- <{$down.mirror}>
- <{/if}>
- </div>
+<div>
+ <h3>
+ <{$download.title}> <{$download.icons}>
+ <{if ($download.isadmin == true)}>
+ <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
+ <{/if}>
+ </h3>
+ <div style="float:right; width:35%">
+ <small>
+ <div style="margin-left: 10px; margin-right: 10px; padding: 4px; background-color:#e6e6e6; border-color:#999999;" class="outer">
+ <div><b><{$smarty.const._MD_WFD_SUBMITTER}>:</b> <{$download.submitter}></div>
+ <{if $download.publisher != ''}>
+ <div><b><{$smarty.const._MD_WFD_PUBLISHER}>:</b> <{$download.publisher}></div>
+ <{/if}>
+ <div><b><{$lang_subdate}>:</b> <{$download.updated}></div>
<br />
- <{$down.adminlink}>
- <{if $down.forumid > 0}>
- <a href="<{$xoops_url}>/modules/newbb/viewforum.php?forum=<{$down.forumid}>">
- <img src="<{$xoops_url}>/modules/wfdownloads/images/icon/forum.gif" alt="<{$smarty.const._MD_WFD_INFORUM}>" title="<{$smarty.const._MD_WFD_INFORUM}>" />
-
- <{$smarty.const._MD_WFD_INFORUM}>
- </a>
+ <{if $download.version != 0}>
+ <div><b><{$smarty.const._MD_WFD_VERSION}>:</b> <{$download.version}></div>
<{/if}>
+ <div><b><{$smarty.const._MD_WFD_VERSIONTYPES}>:</b...
[truncated message content] |
|
From: <al...@us...> - 2013-09-03 18:25:40
|
Revision: 12000
http://sourceforge.net/p/xoops/svn/12000
Author: alain91
Date: 2013-09-03 18:25:36 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
mark skipped au lieu de fail
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class/XoopsloadTest.php
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class/XoopsloadTest.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class/XoopsloadTest.php 2013-09-03 17:52:02 UTC (rev 11999)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/class/XoopsloadTest.php 2013-09-03 18:25:36 UTC (rev 12000)
@@ -29,7 +29,7 @@
if(file_exists($v)) {
$this->assertTrue(true);
} else {
- $this->assertSame(true,$k);
+ $this->markTestIncomplete($k);
}
}
}
|
|
From: <al...@us...> - 2013-09-03 17:52:04
|
Revision: 11999
http://sourceforge.net/p/xoops/svn/11999
Author: alain91
Date: 2013-09-03 17:52:02 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
simplification
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/init_mini.php
Modified: XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/init_mini.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/init_mini.php 2013-09-03 11:21:59 UTC (rev 11998)
+++ XoopsCore/branches/2.6.x/2.6.0_alain091/UnitTestXoops/init_mini.php 2013-09-03 17:52:02 UTC (rev 11999)
@@ -8,67 +8,8 @@
define('IS_PHPUNIT',true);
}
-if (!defined("XOOPS_MAINFILE_INCLUDED")) {
- define("XOOPS_MAINFILE_INCLUDED", 1);
+require_once '..' . DS . 'mainfile.php';
- // XOOPS Physical Paths
-
- // Physical path to the XOOPS documents (served) directory WITHOUT trailing slash
- define("XOOPS_ROOT_PATH", "D:\MesApp\EasyPHP-2.0b1\www\xoops\htdocs");
-
- // For forward compatibility
- // Physical path to the XOOPS library directory WITHOUT trailing slash
- define("XOOPS_PATH", "D:\MesApp\EasyPHP-2.0b1\www\xoops\htdocs\xoops_lib");
- // Physical path to the XOOPS datafiles (writable) directory WITHOUT trailing slash
- define("XOOPS_VAR_PATH", "D:\MesApp\EasyPHP-2.0b1\www\xoops\htdocs\xoops_data");
- // Alias of XOOPS_PATH, for compatibility, temporary solution
- define("XOOPS_TRUST_PATH", XOOPS_PATH);
-
- // URL Association for SSL and Protocol Compatibility
- $http = 'http://';
- if (!empty($_SERVER['HTTPS'])) {
- $http = ($_SERVER['HTTPS']=='on') ? 'https://' : 'http://';
- }
- define('XOOPS_PROT', $http);
-
- // XOOPS Virtual Path (URL)
- // Virtual path to your main XOOPS directory WITHOUT trailing slash
- // Example: define("XOOPS_URL", "http://url_to_xoops_directory");
- define("XOOPS_URL", "http://localhost/xoops/htdocs");
-
- // Shall be handled later, don't forget!
- define("XOOPS_CHECK_PATH", 0);
- // Protect against external scripts execution if safe mode is not enabled
- if (XOOPS_CHECK_PATH && !@ini_get("safe_mode")) {
- if (function_exists("debug_backtrace")) {
- $xoopsScriptPath = debug_backtrace();
- if (!count($xoopsScriptPath)) {
- die("XOOPS path check: this file cannot be requested directly");
- }
- $xoopsScriptPath = $xoopsScriptPath[0]["file"];
- } else {
- $xoopsScriptPath = isset($_SERVER["PATH_TRANSLATED"]) ? $_SERVER["PATH_TRANSLATED"] : $_SERVER["SCRIPT_FILENAME"];
- }
- if (DIRECTORY_SEPARATOR != "/") {
- // IIS6 may double the \ chars
- $xoopsScriptPath = str_replace(strpos($xoopsScriptPath, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, "/", $xoopsScriptPath);
- }
- if (strcasecmp(substr($xoopsScriptPath, 0, strlen(XOOPS_ROOT_PATH)), str_replace(DIRECTORY_SEPARATOR, "/", XOOPS_ROOT_PATH))) {
- exit("XOOPS path check: Script is not inside XOOPS_ROOT_PATH and cannot run.");
- }
- }
-
- // Secure file
- require XOOPS_VAR_PATH . '/data/secure.php';
-
- define("XOOPS_GROUP_ADMIN", "1");
- define("XOOPS_GROUP_USERS", "2");
- define("XOOPS_GROUP_ANONYMOUS", "3");
-
- // doesn't include include/common.php
-
-}
-
require_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'defines.php';
require_once XOOPS_ROOT_PATH . DS . 'include' . DS . 'version.php';
require_once XOOPS_ROOT_PATH . DS . 'class' . DS . 'xoopsload.php';
|
|
From: <be...@us...> - 2013-09-03 11:22:03
|
Revision: 11998
http://sourceforge.net/p/xoops/svn/11998
Author: beckmi
Date: 2013-09-03 11:21:59 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
fixed missing check on variable in userinfo.php
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/userinfo.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-03 10:25:43 UTC (rev 11997)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-03 11:21:59 UTC (rev 11998)
@@ -21,6 +21,7 @@
- added placeholder for a link to upload test data, if available after installation (mamba)
- assigning "static" to functions in XoopsUserUtility class (mamba)
- solved bug into PM module readpmsg.php (escrime-info/slider84)
+- fixed missing check on variable in userinfo.php (cesag/mamba)
Updated:
- jGrowl to 1.2.13 (mamba)
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/userinfo.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/userinfo.php 2013-09-03 10:25:43 UTC (rev 11997)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/userinfo.php 2013-09-03 11:21:59 UTC (rev 11998)
@@ -200,7 +200,7 @@
$results[$i]['link'] = XOOPS_URL . "/modules/" . $modules[$mid]->getVar('dirname', 'n') . "/" . $results[$i]['link'];
}
$results[$i]['title'] = $myts->htmlspecialchars($results[$i]['title']);
- $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : '';
+ $results[$i]['time'] = isset($results[$i]['time']) ? formatTimestamp($results[$i]['time']) : '';
}
if ($count == 5) {
$showall_link = '<a href="' . XOOPS_URL . '/search.php?action=showallbyuser&mid=' . $mid . '&uid=' . $thisUser->getVar('uid') . '">' . _US_SHOWALL . '</a>';
@@ -222,4 +222,4 @@
$GLOBALS['xoopsTpl']->assign('recent_activity', _PROFILE_MA_RECENTACTIVITY);
$xoBreadcrumbs[] = array('title' => _PROFILE_MA_USERINFO);
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'footer.php';
-?>
\ No newline at end of file
+?>
|
|
From: <be...@us...> - 2013-09-03 10:25:48
|
Revision: 11997
http://sourceforge.net/p/xoops/svn/11997
Author: beckmi
Date: 2013-09-03 10:25:43 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
Updating: jGrowl to 1.2.13, jQuery Form to 3.42.0, HTML Purifier to 4.5.0
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.form.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.jgrowl.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Background.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/FontFamily.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/CSS/Ident.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/Clone.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrDef/HTML/Color.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrTransform/Nofollow.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/AttrTransform/TargetBlank.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Bootstrap.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/CSSDefinition.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ChildDef/List.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Config.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ConfigSchema/schema.ser
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ElementDef.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Encoder.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Filter/ExtractStyleBlocks.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Bdo.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Iframe.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Name.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Nofollow.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/Scripting.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/TargetBlank.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModuleManager.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/RemoveEmpty.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/Strategy/FixNesting.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIDefinition.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIFilter/DisableResources.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIFilter/SafeIframe.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIScheme/data.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/URIScheme/file.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier.includes.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier.safe-includes.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/NEWS
Added Paths:
-----------
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ConfigSchema/schema/Core.DisableExcludes.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/ConfigSchema/schema/HTML.SafeScripting.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/modules/protector/library/HTMLPurifier/HTMLModule/SafeScripting.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-03 09:02:03 UTC (rev 11996)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-03 10:25:43 UTC (rev 11997)
@@ -22,6 +22,11 @@
- assigning "static" to functions in XoopsUserUtility class (mamba)
- solved bug into PM module readpmsg.php (escrime-info/slider84)
+Updated:
+ - jGrowl to 1.2.13 (mamba)
+ - jQuery Form to 3.42.0 (mamba)
+ - HTML Purifier to 4.5.0 (mamba)
+
===============================
2013/04/21: Version 2.5.6 Final
===============================
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.form.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.form.js 2013-09-03 09:02:03 UTC (rev 11996)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/xoops_lib/Frameworks/jquery/plugins/jquery.form.js 2013-09-03 10:25:43 UTC (rev 11997)
@@ -1,360 +1,779 @@
-/*
+/*!
* jQuery Form Plugin
- * version: 2.33 (22-SEP-2009)
- * @requires jQuery v1.2.6 or later
- *
+ * version: 3.42.0-2013.09.02
+ * Requires jQuery v1.5 or later
+ * Copyright (c) 2013 M. Alsup
* Examples and documentation at: http://malsup.com/jquery/form/
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
+ * Project repository: https://github.com/malsup/form
+ * Dual licensed under the MIT and GPL licenses.
+ * https://github.com/malsup/form#copyright-and-license
*/
+/*global ActiveXObject */
;(function($) {
+"use strict";
/*
- Usage Note:
- -----------
- Do not use both ajaxSubmit and ajaxForm on the same form. These
- functions are intended to be exclusive. Use ajaxSubmit if you want
- to bind your own submit handler to the form. For example,
+ Usage Note:
+ -----------
+ Do not use both ajaxSubmit and ajaxForm on the same form. These
+ functions are mutually exclusive. Use ajaxSubmit if you want
+ to bind your own submit handler to the form. For example,
- $(document).ready(function() {
- $('#myForm').bind('submit', function() {
- $(this).ajaxSubmit({
- target: '#output'
- });
- return false; // <-- important!
- });
- });
+ $(document).ready(function() {
+ $('#myForm').on('submit', function(e) {
+ e.preventDefault(); // <-- important
+ $(this).ajaxSubmit({
+ target: '#output'
+ });
+ });
+ });
- Use ajaxForm when you want the plugin to manage all the event binding
- for you. For example,
+ Use ajaxForm when you want the plugin to manage all the event binding
+ for you. For example,
- $(document).ready(function() {
- $('#myForm').ajaxForm({
- target: '#output'
- });
- });
+ $(document).ready(function() {
+ $('#myForm').ajaxForm({
+ target: '#output'
+ });
+ });
- When using ajaxForm, the ajaxSubmit function will be invoked for you
- at the appropriate time.
+ You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
+ form does not have to exist when you invoke ajaxForm:
+
+ $('#myForm').ajaxForm({
+ delegation: true,
+ target: '#output'
+ });
+
+ When using ajaxForm, the ajaxSubmit function will be invoked for you
+ at the appropriate time.
*/
/**
+ * Feature detection
+ */
+var feature = {};
+feature.fileapi = $("<input type='file'/>").get(0).files !== undefined;
+feature.formdata = window.FormData !== undefined;
+
+var hasProp = !!$.fn.prop;
+
+// attr2 uses prop when it can but checks the return type for
+// an expected string. this accounts for the case where a form
+// contains inputs with names like "action" or "method"; in those
+// cases "prop" returns the element
+$.fn.attr2 = function() {
+ if ( ! hasProp )
+ return this.attr.apply(this, arguments);
+ var val = this.prop.apply(this, arguments);
+ if ( ( val && val.jquery ) || typeof val === 'string' )
+ return val;
+ return this.attr.apply(this, arguments);
+};
+
+/**
* ajaxSubmit() provides a mechanism for immediately submitting
* an HTML form using AJAX.
*/
$.fn.ajaxSubmit = function(options) {
- // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
- if (!this.length) {
- log('ajaxSubmit: skipping submit process - no element selected');
- return this;
- }
+ /*jshint scripturl:true */
- if (typeof options == 'function')
- options = { success: options };
+ // fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
+ if (!this.length) {
+ log('ajaxSubmit: skipping submit process - no element selected');
+ return this;
+ }
- var url = $.trim(this.attr('action'));
- if (url) {
- // clean url (don't include hash vaue)
- url = (url.match(/^([^#]+)/)||[])[1];
- }
- url = url || window.location.href || '';
+ var method, action, url, $form = this;
- options = $.extend({
- url: url,
- type: this.attr('method') || 'GET'
- }, options || {});
+ if (typeof options == 'function') {
+ options = { success: options };
+ }
+ else if ( options === undefined ) {
+ options = {};
+ }
- // hook for manipulating the form data before it is extracted;
- // convenient for use with rich editors like tinyMCE or FCKEditor
- var veto = {};
- this.trigger('form-pre-serialize', [this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
- return this;
- }
+ method = options.type || this.attr2('method');
+ action = options.url || this.attr2('action');
- // provide opportunity to alter form data before it is serialized
- if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSerialize callback');
- return this;
- }
+ url = (typeof action === 'string') ? $.trim(action) : '';
+ url = url || window.location.href || '';
+ if (url) {
+ // clean url (don't include hash vaue)
+ url = (url.match(/^([^#]+)/)||[])[1];
+ }
- var a = this.formToArray(options.semantic);
- if (options.data) {
- options.extraData = options.data;
- for (var n in options.data) {
- if(options.data[n] instanceof Array) {
- for (var k in options.data[n])
- a.push( { name: n, value: options.data[n][k] } );
- }
- else
- a.push( { name: n, value: options.data[n] } );
- }
- }
+ options = $.extend(true, {
+ url: url,
+ success: $.ajaxSettings.success,
+ type: method || $.ajaxSettings.type,
+ iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank'
+ }, options);
- // give pre-submit callback an opportunity to abort the submit
- if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
- log('ajaxSubmit: submit aborted via beforeSubmit callback');
- return this;
- }
+ // hook for manipulating the form data before it is extracted;
+ // convenient for use with rich editors like tinyMCE or FCKEditor
+ var veto = {};
+ this.trigger('form-pre-serialize', [this, options, veto]);
+ if (veto.veto) {
+ log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
+ return this;
+ }
- // fire vetoable 'validate' event
- this.trigger('form-submit-validate', [a, this, options, veto]);
- if (veto.veto) {
- log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
- return this;
- }
+ // provide opportunity to alter form data before it is serialized
+ if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
+ log('ajaxSubmit: submit aborted via beforeSerialize callback');
+ return this;
+ }
- var q = $.param(a);
+ var traditional = options.traditional;
+ if ( traditional === undefined ) {
+ traditional = $.ajaxSettings.traditional;
+ }
- if (options.type.toUpperCase() == 'GET') {
- options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
- options.data = null; // data is null for 'get'
- }
- else
- options.data = q; // data is the query string for 'post'
+ var elements = [];
+ var qx, a = this.formToArray(options.semantic, elements);
+ if (options.data) {
+ options.extraData = options.data;
+ qx = $.param(options.data, traditional);
+ }
- var $form = this, callbacks = [];
- if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
- if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
+ // give pre-submit callback an opportunity to abort the submit
+ if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
+ log('ajaxSubmit: submit aborted via beforeSubmit callback');
+ return this;
+ }
- // perform a load on the target only if dataType is not provided
- if (!options.dataType && options.target) {
- var oldSuccess = options.success || function(){};
- callbacks.push(function(data) {
- $(options.target).html(data).each(oldSuccess, arguments);
- });
- }
- else if (options.success)
- callbacks.push(options.success);
+ // fire vetoable 'validate' event
+ this.trigger('form-submit-validate', [a, this, options, veto]);
+ if (veto.veto) {
+ log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
+ return this;
+ }
- options.success = function(data, status) {
- for (var i=0, max=callbacks.length; i < max; i++)
- callbacks[i].apply(options, [data, status, $form]);
- };
+ var q = $.param(a, traditional);
+ if (qx) {
+ q = ( q ? (q + '&' + qx) : qx );
+ }
+ if (options.type.toUpperCase() == 'GET') {
+ options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
+ options.data = null; // data is null for 'get'
+ }
+ else {
+ options.data = q; // data is the query string for 'post'
+ }
- // are there files to upload?
- var files = $('input:file', this).fieldValue();
- var found = false;
- for (var j=0; j < files.length; j++)
- if (files[j])
- found = true;
+ var callbacks = [];
+ if (options.resetForm) {
+ callbacks.push(function() { $form.resetForm(); });
+ }
+ if (options.clearForm) {
+ callbacks.push(function() { $form.clearForm(options.includeHidden); });
+ }
- var multipart = false;
-// var mp = 'multipart/form-data';
-// multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
+ // perform a load on the target only if dataType is not provided
+ if (!options.dataType && options.target) {
+ var oldSuccess = options.success || function(){};
+ callbacks.push(function(data) {
+ var fn = options.replaceTarget ? 'replaceWith' : 'html';
+ $(options.target)[fn](data).each(oldSuccess, arguments);
+ });
+ }
+ else if (options.success) {
+ callbacks.push(options.success);
+ }
- // options.iframe allows user to force iframe mode
- if (options.iframe || found || multipart) {
- // hack to fix Safari hang (thanks to Tim Molendijk for this)
- // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
- if (options.closeKeepAlive)
- $.get(options.closeKeepAlive, fileUpload);
- else
- fileUpload();
- }
- else
- $.ajax(options);
+ options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
+ var context = options.context || this ; // jQuery 1.4+ supports scope context
+ for (var i=0, max=callbacks.length; i < max; i++) {
+ callbacks[i].apply(context, [data, status, xhr || $form, $form]);
+ }
+ };
- // fire 'notify' event
- this.trigger('form-submit-notify', [this, options]);
- return this;
+ if (options.error) {
+ var oldError = options.error;
+ options.error = function(xhr, status, error) {
+ var context = options.context || this;
+ oldError.apply(context, [xhr, status, error, $form]);
+ };
+ }
+ if (options.complete) {
+ var oldComplete = options.complete;
+ options.complete = function(xhr, status) {
+ var context = options.context || this;
+ oldComplete.apply(context, [xhr, status, $form]);
+ };
+ }
- // private function for handling file uploads (hat tip to YAHOO!)
- function fileUpload() {
- var form = $form[0];
+ // are there files to upload?
- if ($(':input[name=submit]', form).length) {
- alert('Error: Form elements must not be named "submit".');
- return;
- }
+ // [value] (issue #113), also see comment:
+ // https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
+ var fileInputs = $('input[type=file]:enabled', this).filter(function() { return $(this).val() != ''; });
- var opts = $.extend({}, $.ajaxSettings, options);
- var s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);
+ var hasFileInputs = fileInputs.length > 0;
+ var mp = 'multipart/form-data';
+ var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
- var id = 'jqFormIO' + (new Date().getTime());
- var $io = $('<iframe id="' + id + '" name="' + id + '" src="about:blank" />');
- var io = $io[0];
+ var fileAPI = feature.fileapi && feature.formdata;
+ log("fileAPI :" + fileAPI);
+ var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
- $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+ var jqxhr;
- var xhr = { // mock object
- aborted: 0,
- responseText: null,
- responseXML: null,
- status: 0,
- statusText: 'n/a',
- getAllResponseHeaders: function() {},
- getResponseHeader: function() {},
- setRequestHeader: function() {},
- abort: function() {
- this.aborted = 1;
- $io.attr('src','about:blank'); // abort op in progress
- }
- };
+ // options.iframe allows user to force iframe mode
+ // 06-NOV-09: now defaulting to iframe mode if file input is detected
+ if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
+ // hack to fix Safari hang (thanks to Tim Molendijk for this)
+ // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
+ if (options.closeKeepAlive) {
+ $.get(options.closeKeepAlive, function() {
+ jqxhr = fileUploadIframe(a);
+ });
+ }
+ else {
+ jqxhr = fileUploadIframe(a);
+ }
+ }
+ else if ((hasFileInputs || multipart) && fileAPI) {
+ jqxhr = fileUploadXhr(a);
+ }
+ else {
+ jqxhr = $.ajax(options);
+ }
- var g = opts.global;
- // trigger ajax global events so that activity/block indicators work like normal
- if (g && ! $.active++) $.event.trigger("ajaxStart");
- if (g) $.event.trigger("ajaxSend", [xhr, opts]);
+ $form.removeData('jqxhr').data('jqxhr', jqxhr);
- if (s.beforeSend && s.beforeSend(xhr, s) === false) {
- s.global && $.active--;
- return;
- }
- if (xhr.aborted)
- return;
+ // clear element array
+ for (var k=0; k < elements.length; k++)
+ elements[k] = null;
- var cbInvoked = 0;
- var timedOut = 0;
+ // fire 'notify' event
+ this.trigger('form-submit-notify', [this, options]);
+ return this;
- // add submitting element to data if we know it
- var sub = form.clk;
- if (sub) {
- var n = sub.name;
- if (n && !sub.disabled) {
- options.extraData = options.extraData || {};
- options.extraData[n] = sub.value;
- if (sub.type == "image") {
- options.extraData[name+'.x'] = form.clk_x;
- options.extraData[name+'.y'] = form.clk_y;
- }
- }
- }
+ // utility fn for deep serialization
+ function deepSerialize(extraData){
+ var serialized = $.param(extraData, options.traditional).split('&');
+ var len = serialized.length;
+ var result = [];
+ var i, part;
+ for (i=0; i < len; i++) {
+ // #252; undo param space replacement
+ serialized[i] = serialized[i].replace(/\+/g,' ');
+ part = serialized[i].split('=');
+ // #278; use array instead of object storage, favoring array serializations
+ result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
+ }
+ return result;
+ }
- // take a breath so that pending repaints get some cpu time before the upload starts
- setTimeout(function() {
- // make sure form attrs are set
- var t = $form.attr('target'), a = $form.attr('action');
+ // XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
+ function fileUploadXhr(a) {
+ var formdata = new FormData();
- // update form attrs in IE friendly way
- form.setAttribute('target',id);
- if (form.getAttribute('method') != 'POST')
- form.setAttribute('method', 'POST');
- if (form.getAttribute('action') != opts.url)
- form.setAttribute('action', opts.url);
+ for (var i=0; i < a.length; i++) {
+ formdata.append(a[i].name, a[i].value);
+ }
- // ie borks in some cases when setting encoding
- if (! options.skipEncodingOverride) {
- $form.attr({
- encoding: 'multipart/form-data',
- enctype: 'multipart/form-data'
- });
- }
+ if (options.extraData) {
+ var serializedData = deepSerialize(options.extraData);
+ for (i=0; i < serializedData.length; i++)
+ if (serializedData[i])
+ formdata.append(serializedData[i][0], serializedData[i][1]);
+ }
- // support timout
- if (opts.timeout)
- setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
+ options.data = null;
- // add "extra" data to form if provided in options
- var extraInputs = [];
- try {
- if (options.extraData)
- for (var n in options.extraData)
- extraInputs.push(
- $('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
- .appendTo(form)[0]);
+ var s = $.extend(true, {}, $.ajaxSettings, options, {
+ contentType: false,
+ processData: false,
+ cache: false,
+ type: method || 'POST'
+ });
- // add iframe to doc and submit the form
- $io.appendTo('body');
- io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
- form.submit();
- }
- finally {
- // reset attrs and remove "extra" input elements
- form.setAttribute('action',a);
- t ? form.setAttribute('target', t) : $form.removeAttr('target');
- $(extraInputs).remove();
- }
- }, 10);
+ if (options.uploadProgress) {
+ // workaround because jqXHR does not expose upload property
+ s.xhr = function() {
+ var xhr = $.ajaxSettings.xhr();
+ if (xhr.upload) {
+ xhr.upload.addEventListener('progress', function(event) {
+ var percent = 0;
+ var position = event.loaded || event.position; /*event.position is deprecated*/
+ var total = event.total;
+ if (event.lengthComputable) {
+ percent = Math.ceil(position / total * 100);
+ }
+ options.uploadProgress(event, position, total, percent);
+ }, false);
+ }
+ return xhr;
+ };
+ }
- var domCheckCount = 50;
+ s.data = null;
+ var beforeSend = s.beforeSend;
+ s.beforeSend = function(xhr, o) {
+ o.data = formdata;
+ if(beforeSend)
+ beforeSend.call(this, xhr, o);
+ };
+ return $.ajax(s);
+ }
- function cb() {
- if (cbInvoked++) return;
+ // private function for handling file uploads (hat tip to YAHOO!)
+ function fileUploadIframe(a) {
+ var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
+ var deferred = $.Deferred();
- io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
+ // #341
+ deferred.abort = function(status) {
+ xhr.abort(status);
+ };
- var ok = true;
- try {
- if (timedOut) throw 'timeout';
- // extract the server response from the iframe
- var data, doc;
+ if (a) {
+ // ensure that every serialized input is still enabled
+ for (i=0; i < elements.length; i++) {
+ el = $(elements[i]);
+ if ( hasProp )
+ el.prop('disabled', false);
+ else
+ el.removeAttr('disabled');
+ }
+ }
- doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
-
- var isXml = opts.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
- log('isXml='+isXml);
- if (!isXml && (doc.body == null || doc.body.innerHTML == '')) {
- if (--domCheckCount) {
- // in some browsers (Opera) the iframe DOM is not always traversable when
- // the onload callback fires, so we loop a bit to accommodate
- cbInvoked = 0;
- setTimeout(cb, 100);
- return;
- }
- log('Could not access iframe DOM after 50 tries.');
- return;
- }
+ s = $.extend(true, {}, $.ajaxSettings, options);
+ s.context = s.context || s;
+ id = 'jqFormIO' + (new Date().getTime());
+ if (s.iframeTarget) {
+ $io = $(s.iframeTarget);
+ n = $io.attr2('name');
+ if (!n)
+ $io.attr2('name', id);
+ else
+ id = n;
+ }
+ else {
+ $io = $('<iframe name="' + id + '" src="'+ s.iframeSrc +'" />');
+ $io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
+ }
+ io = $io[0];
- xhr.responseText = doc.body ? doc.body.innerHTML : null;
- xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
- xhr.getResponseHeader = function(header){
- var headers = {'content-type': opts.dataType};
- return headers[header];
- };
- if (opts.dataType == 'json' || opts.dataType == 'script') {
- // see if user embedded response in textarea
- var ta = doc.getElementsByTagName('textarea')[0];
- if (ta)
- xhr.responseText = ta.value;
- else {
- // account for browsers injecting pre around json response
- var pre = doc.getElementsByTagName('pre')[0];
- if (pre)
- xhr.responseText = pre.innerHTML;
- }
- }
- else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
- xhr.responseXML = toXml(xhr.responseText);
- }
- data = $.httpData(xhr, opts.dataType);
- }
- catch(e){
- ok = false;
- $.handleError(opts, xhr, 'error', e);
- }
+ xhr = { // mock object
+ aborted: 0,
+ responseText: null,
+ responseXML: null,
+ status: 0,
+ statusText: 'n/a',
+ getAllResponseHeaders: function() {},
+ getResponseHeader: function() {},
+ setRequestHeader: function() {},
+ abort: function(status) {
+ var e = (status === 'timeout' ? 'timeout' : 'aborted');
+ log('aborting upload... ' + e);
+ this.aborted = 1;
- // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
- if (ok) {
- opts.success(data, 'success');
- if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
- }
- if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
- if (g && ! --$.active) $.event.trigger("ajaxStop");
- if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
+ try { // #214, #257
+ if (io.contentWindow.document.execCommand) {
+ io.contentWindow.document.execCommand('Stop');
+ }
+ }
+ catch(ignore) {}
- // clean up
- setTimeout(function() {
- $io.remove();
- xhr.responseXML = null;
- }, 100);
- };
+ $io.attr('src', s.iframeSrc); // abort op in progress
+ xhr.error = e;
+ if (s.error)
+ s.error.call(s.context, xhr, e, status);
+ if (g)
+ $.event.trigger("ajaxError", [xhr, s, e]);
+ if (s.complete)
+ s.complete.call(s.context, xhr, e);
+ }
+ };
- function toXml(s, doc) {
- if (window.ActiveXObject) {
- doc = new ActiveXObject('Microsoft.XMLDOM');
- doc.async = 'false';
- doc.loadXML(s);
- }
- else
- doc = (new DOMParser()).parseFromString(s, 'text/xml');
- return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
- };
- };
+ g = s.global;
+ // trigger ajax global events so that activity/block indicators work like normal
+ if (g && 0 === $.active++) {
+ $.event.trigger("ajaxStart");
+ }
+ if (g) {
+ $.event.trigger("ajaxSend", [xhr, s]);
+ }
+
+ if (s.beforeSend && s.beforeSend.call(s.context, xhr, s) === false) {
+ if (s.global) {
+ $.active--;
+ }
+ deferred.reject();
+ return deferred;
+ }
+ if (xhr.aborted) {
+ deferred.reject();
+ return deferred;
+ }
+
+ // add submitting element to data if we know it
+ sub = form.clk;
+ if (sub) {
+ n = sub.name;
+ if (n && !sub.disabled) {
+ s.extraData = s.extraData || {};
+ s.extraData[n] = sub.value;
+ if (sub.type == "image") {
+ s.extraData[n+'.x'] = form.clk_x;
+ s.extraData[n+'.y'] = form.clk_y;
+ }
+ }
+ }
+
+ var CLIENT_TIMEOUT_ABORT = 1;
+ var SERVER_ABORT = 2;
+
+ function getDoc(frame) {
+ /* it looks like contentWindow or contentDocument do not
+ * carry the protocol property in ie8, when running under ssl
+ * frame.document is the only valid response document, since
+ * the protocol is know but not on the other two objects. strange?
+ * "Same origin policy" http://en.wikipedia.org/wiki/Same_origin_policy
+ */
+
+ var doc = null;
+
+ // IE8 cascading access check
+ try {
+ if (frame.contentWindow) {
+ doc = frame.contentWindow.document;
+ }
+ } catch(err) {
+ // IE8 access denied under ssl & missing protocol
+ log('cannot get iframe.contentWindow document: ' + err);
+ }
+
+ if (doc) { // successful getting content
+ return doc;
+ }
+
+ try { // simply checking may throw in ie8 under ssl or mismatched protocol
+ doc = frame.contentDocument ? frame.contentDocument : frame.document;
+ } catch(err) {
+ // last attempt
+ log('cannot get iframe.contentDocument: ' + err);
+ doc = frame.document;
+ }
+ return doc;
+ }
+
+ // Rails CSRF hack (thanks to Yvan Barthelemy)
+ var csrf_token = $('meta[name=csrf-token]').attr('content');
+ var csrf_param = $('meta[name=csrf-param]').attr('content');
+ if (csrf_param && csrf_token) {
+ s.extraData = s.extraData || {};
+ s.extraData[csrf_param] = csrf_token;
+ }
+
+ // take a breath so that pending repaints get some cpu time before the upload starts
+ function doSubmit() {
+ // make sure form attrs are set
+ var t = $form.attr2('target'), a = $form.attr2('action');
+
+ // update form attrs in IE friendly way
+ form.setAttribute('target',id);
+ if (!method || /post/i.test(method) ) {
+ form.setAttribute('method', 'POST');
+ }
+ if (a != s.url) {
+ form.setAttribute('action', s.url);
+ }
+
+ // ie borks in some cases when setting encoding
+ if (! s.skipEncodingOverride && (!method || /post/i.test(method))) {
+ $form.attr({
+ encoding: 'multipart/form-data',
+ enctype: 'multipart/form-data'
+ });
+ }
+
+ // support timout
+ if (s.timeout) {
+ timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
+ }
+
+ // look for server aborts
+ function checkState() {
+ try {
+ var state = getDoc(io).readyState;
+ log('state = ' + state);
+ if (state && state.toLowerCase() == 'uninitialized')
+ setTimeout(checkState,50);
+ }
+ catch(e) {
+ log('Server abort: ' , e, ' (', e.name, ')');
+ cb(SERVER_ABORT);
+ if (timeoutHandle)
+ clearTimeout(timeoutHandle);
+ timeoutHandle = undefined;
+ }
+ }
+
+ // add "extra" data to form if provided in options
+ var extraInputs = [];
+ try {
+ if (s.extraData) {
+ for (var n in s.extraData) {
+ if (s.extraData.hasOwnProperty(n)) {
+ // if using the $.param format that allows for multiple values with the same name
+ if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
+ extraInputs.push(
+ $('<input type="hidden" name="'+s.extraData[n].name+'">').val(s.extraData[n].value)
+ .appendTo(form)[0]);
+ } else {
+ extraInputs.push(
+ $('<input type="hidden" name="'+n+'">').val(s.extraData[n])
+ .appendTo(form)[0]);
+ }
+ }
+ }
+ }
+
+ if (!s.iframeTarget) {
+ // add iframe to doc and submit the form
+ $io.appendTo('body');
+ if (io.attachEvent)
+ io.attachEvent('onload', cb);
+ else
+ io.addEventListener('load', cb, false);
+ }
+ setTimeout(checkState,15);
+
+ try {
+ form.submit();
+ } catch(err) {
+ // just in case form has element with name/id of 'submit'
+ var submitFn = document.createElement('form').submit;
+ submitFn.apply(form);
+ }
+ }
+ finally {
+ // reset attrs and remove "extra" input elements
+ form.setAttribute('action',a);
+ if(t) {
+ form.setAttribute('target', t);
+ } else {
+ $form.removeAttr('target');
+ }
+ $(extraInputs).remove();
+ }
+ }
+
+ if (s.forceSync) {
+ doSubmit();
+ }
+ else {
+ setTimeout(doSubmit, 10); // this lets dom updates render
+ }
+
+ var data, doc, domCheckCount = 50, callbackProcessed;
+
+ function cb(e) {
+ if (xhr.aborted || callbackProcessed) {
+ return;
+ }
+
+ doc = getDoc(io);
+ if(!doc) {
+ log('cannot access response document');
+ e = SERVER_ABORT;
+ }
+ if (e === CLIENT_TIMEOUT_ABORT && xhr) {
+ xhr.abort('timeout');
+ deferred.reject(xhr, 'timeout');
+ return;
+ }
+ else if (e == SERVER_ABORT && xhr) {
+ xhr.abort('server abort');
+ deferred.reject(xhr, 'error', 'server abort');
+ return;
+ }
+
+ if (!doc || doc.location.href == s.iframeSrc) {
+ // response not received yet
+ if (!timedOut)
+ return;
+ }
+ if (io.detachEvent)
+ io.detachEvent('onload', cb);
+ else
+ io.removeEventListener('load', cb, false);
+
+ var status = 'success', errMsg;
+ try {
+ if (timedOut) {
+ throw 'timeout';
+ }
+
+ var isXml = s.dataType == 'xml' || doc.XMLDocument || $.isXMLDoc(doc);
+ log('isXml='+isXml);
+ if (!isXml && window.opera && (doc.body === null || !doc.body.innerHTML)) {
+ if (--domCheckCount) {
+ // in some browsers (Opera) the iframe DOM is not always traversable when
+ // the onload callback fires, so we loop a bit to accommodate
+ log('requeing onLoad callback, DOM not available');
+ setTimeout(cb, 250);
+ return;
+ }
+ // let this fall through because server response could be an empty document
+ //log('Could not access iframe DOM after mutiple tries.');
+ //throw 'DOMException: not available';
+ }
+
+ //log('response detected');
+ var docRoot = doc.body ? doc.body : doc.documentElement;
+ xhr.responseText = docRoot ? docRoot.innerHTML : null;
+ xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
+ if (isXml)
+ s.dataType = 'xml';
+ xhr.getResponseHeader = function(header){
+ var headers = {'content-type': s.dataType};
+ return headers[header.toLowerCase()];
+ };
+ // support for XHR 'status' & 'statusText' emulation :
+ if (docRoot) {
+ xhr.status = Number( docRoot.getAttribute('status') ) || xhr.status;
+ xhr.statusText = docRoot.getAttribute('statusText') || xhr.statusText;
+ }
+
+ var dt = (s.dataType || '').toLowerCase();
+ var scr = /(json|script|text)/.test(dt);
+ if (scr || s.textarea) {
+ // see if user embedded response in textarea
+ var ta = doc.getElementsByTagName('textarea')[0];
+ if (ta) {
+ xhr.responseText = ta.value;
+ // support for XHR 'status' & 'statusText' emulation :
+ xhr.status = Number( ta.getAttribute('status') ) || xhr.status;
+ xhr.statusText = ta.getAttribute('statusText') || xhr.statusText;
+ }
+ else if (scr) {
+ // account for browsers injecting pre around json response
+ var pre = doc.getElementsByTagName('pre')[0];
+ var b = doc.getElementsByTagName('body')[0];
+ if (pre) {
+ xhr.responseText = pre.textContent ? pre.textContent : pre.innerText;
+ }
+ else if (b) {
+ xhr.responseText = b.textContent ? b.textContent : b.innerText;
+ }
+ }
+ }
+ else if (dt == 'xml' && !xhr.responseXML && xhr.responseText) {
+ xhr.responseXML = toXml(xhr.responseText);
+ }
+
+ try {
+ data = httpData(xhr, dt, s);
+ }
+ catch (err) {
+ status = 'parsererror';
+ xhr.error = errMsg = (err || status);
+ }
+ }
+ catch (err) {
+ log('error caught: ',err);
+ status = 'error';
+ xhr.error = errMsg = (err || status);
+ }
+
+ if (xhr.aborted) {
+ log('upload aborted');
+ status = null;
+ }
+
+ if (xhr.status) { // we've set xhr.status
+ status = (xhr.status >= 200 && xhr.status < 300 || xhr.status === 304) ? 'success' : 'error';
+ }
+
+ // ordering of these callbacks/triggers is odd, but that's how $.ajax does it
+ if (status === 'success') {
+ if (s.success)
+ s.success.call(s.context, data, 'success', xhr);
+ deferred.resolve(xhr.responseText, 'success', xhr);
+ if (g)
+ $.event.trigger("ajaxSuccess", [xhr, s]);
+ }
+ else if (status) {
+ if (errMsg === undefined)
+ errMsg = xhr.statusText;
+ if (s.error)
+ s.error.call(s.context, xhr, status, errMsg);
+ deferred.reject(xhr, 'error', errMsg);
+ if (g)
+ $.event.trigger("ajaxError", [xhr, s, errMsg]);
+ }
+
+ if (g)
+ $.event.trigger("ajaxComplete", [xhr, s]);
+
+ if (g && ! --$.active) {
+ $.event.trigger("ajaxStop");
+ }
+
+ if (s.complete)
+ s.complete.call(s.context, xhr, status);
+
+ callbackProcessed = true;
+ if (s.timeout)
+ clearTimeout(timeoutHandle);
+
+ // clean up
+ setTimeout(function() {
+ if (!s.iframeTarget)
+ $io.remove();
+ xhr.responseXML = null;
+ }, 100);
+ }
+
+ var toXml = $.parseXML || function(s, doc) { // use parseXML if available (jQuery 1.5+)
+ if (window.ActiveXObject) {
+ doc = new ActiveXObject('Microsoft.XMLDOM');
+ doc.async = 'false';
+ doc.loadXML(s);
+ }
+ else {
+ doc = (new DOMParser()).parseFromString(s, 'text/xml');
+ }
+ return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
+ };
+ var parseJSON = $.parseJSON || function(s) {
+ /*jslint evil:true */
+ return window['eval']('(' + s + ')');
+ };
+
+ var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
+
+ var ct = xhr.getResponseHeader('content-type') || '',
+ xml = type === 'xml' || !type && ct.indexOf('xml') >= 0,
+ data = xml ? xhr.responseXML : xhr.responseText;
+
+ if (xml && data.documentElement.nodeName === 'parsererror') {
+ if ($.error)
+ $.error('parsererror');
+ }
+ if (s && s.dataFilter) {
+ data = s.dataFilter(data, type);
+ }
+ if (typeof data === 'string') {
+ if (type === 'json' || !type && ct.indexOf('json') >= 0) {
+ data = parseJSON(data);
+ } else if (type === "script" || !type && ct.indexOf("javascript") >= 0) {
+ $.globalEval(data);
+ }
+ }
+ return data;
+ };
+
+ return deferred;
+ }
};
/**
@@ -363,9 +782,9 @@
* The advantages of using this method instead of ajaxSubmit() are:
*
* 1: This method will include coordinates for <input type="image" /> elements (if the element
- * is used to submit the form).
+ * is used to submit the form).
* 2. This method will include the submit element's name/value data (for the element that was
- * used to submit the form).
+ * used to submit the form).
* 3. This method binds the submit() method to the form for you.
*
* The options argument for ajaxForm works exactly as it does for ajaxSubmit. ajaxForm merely
@@ -373,37 +792,83 @@
* the form itself.
*/
$.fn.ajaxForm = function(options) {
- return this.ajaxFormUnbind().bind('submit.form-plugin', function() {
- $(this).ajaxSubmit(options);
- return false;
- }).bind('click.form-plugin', function(e) {
- var $el = $(e.target);
- if (!($el.is(":submit,input:image"))) {
- return;
- }
- var form = this;
- form.clk = e.target;
- if (e.target.type == 'image') {
- if (e.offsetX != undefined) {
- form.clk_x = e.offsetX;
- form.clk_y = e.offsetY;
- } else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
- var offset = $el.offset();
- form.clk_x = e.pageX - offset.left;
- form.clk_y = e.pageY - offset.top;
- } else {
- form.clk_x = e.pageX - e.target.offsetLeft;
- form.clk_y = e.pageY - e.target.offsetTop;
- }
- }
- // clear form vars
- setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10);
- });
+ options = options || {};
+ options.delegation = options.delegation && $.isFunction($.fn.on);
+
+ // in jQuery 1.3+ we can fix mistakes with the ready state
+ if (!options.delegation && this.length === 0) {
+ var o = { s: this.selector, c: this.context };
+ if (!$.isReady && o.s) {
+ log('DOM not ready, queuing ajaxForm');
+ $(function() {
+ $(o.s,o.c).ajaxForm(options);
+ });
+ return this;
+ }
+ // is your DOM ready? http://docs.jquery.com/Tutorials:Introducing_$(document).ready()
+ log('terminating; zero elements found by selector' + ($.isReady ? '' : ' (DOM not ready)'));
+ return this;
+ }
+
+ if ( options.delegation ) {
+ $(document)
+ .off('submit.form-plugin', this.selector, doAjaxSubmit)
+ .off('click.form-plugin', this.selector, captureSubmittingElement)
+ .on('submit.form-plugin', this.selector, options, doAjaxSubmit)
+ .on('click.form-plugin', this.selector, options, captureSubmittingElement);
+ return this;
+ }
+
+ return this.ajaxFormUnbind()
+ .bind('submit.form-plugin', options, doAjaxSubmit)
+ .bind('click.form-plugin', options, captureSubmittingElement);
};
+// private event handlers
+function doAjaxSubmit(e) {
+ /*jshint validthis:true */
+ var options = e.data;
+ if (!e.isDefaultPrevented()) { // if event has been canceled, don't proceed
+ e.preventDefault();
+ $(this).ajaxSubmit(options);
+ }
+}
+
+function captureSubmittingElement(e) {
+ /*jshint validthis:true */
+ var target = e.target;
+ var $el = $(target);
+ if (!($el.is("[type=submit],[type=image]"))) {
+ // is this a child element of the submit el? (ex: a span within a button)
+ var t = $el.closest('[type=submit]');
+ if (t.length === 0) {
+ return;
+ }
+ target = t[0];
+ }
+ var form = this;
+ form.clk = target;
+ if (target.type == 'image') {
+ if (e.offsetX !== undefined) {
+ form.clk_x = e.offsetX;
+ form.clk_y = e.offsetY;
+ } else if (typeof $.fn.offset == 'function') {
+ var offset = $el.offset();
+ form.clk_x = e.pageX - offset.left;
+ form.clk_y = e.pageY - offset.top;
+ } else {
+ form.clk_x = e.pageX - target.offsetLeft;
+ form.clk_y = e.pageY - target.offsetTop;
+ }
+ }
+ // clear form vars
+ setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 100);
+}
+
+
// ajaxFormUnbind unbinds the event handlers that were bound by ajaxForm
$.fn.ajaxFormUnbind = function() {
- return this.unbind('submit.form-plugin click.form-plugin');
+ return this.unbind('submit.form-plugin click.form-plugin');
};
/**
@@ -417,45 +882,74 @@
* It is this array that is passed to pre-submit callback functions provided to the
* ajaxSubmit() and ajaxForm() methods.
*/
-$.fn.formToArray = function(semantic) {
- var a = [];
- if (this.length == 0) return a;
+$.fn.formToArray = function(semantic, elements) {
+ var a = [];
+ if (this.length === 0) {
+ return a;
+ }
- var form = this[0];
- var els = semantic ? form.getElementsByTagName('*') : form.elements;
- if (!els) return a;
- for(var i=0, max=els.length; i < max; i++) {
- var el = els[i];
- var n = el.name;
- if (!n) continue;
+ var form = this[0];
+ var els = semantic ? form.getElementsByTagName('*') : form.elements;
+ if (!els) {
+ return a;
+ }
- if (semantic && form.clk && el.type == "image") {
- // handle image inputs on the fly when semantic == true
- if(!el.disabled && form.clk == el) {
- a.push({name: n, value: $(el).val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- continue;
- }
+ var i,j,n,v,el,max,jmax;
+ for(i=0, max=els.length; i < max; i++) {
+ el = els[i];
+ n = el.name;
+ if (!n || el.disabled) {
+ continue;
+ }
- var v = $.fieldValue(el, true);
- if (v && v.constructor == Array) {
- for(var j=0, jmax=v.length; j < jmax; j++)
- a.push({name: n, value: v[j]});
- }
- else if (v !== null && typeof v != 'undefined')
- a.push({name: n, value: v});
- }
+ if (semantic && form.clk && el.type == "image") {
+ // handle image inputs on the fly when semantic == true
+ if(form.clk == el) {
+ a.push({name: n, value: $(el).val(), type: el.type });
+ a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+ }
+ continue;
+ }
- if (!semantic && form.clk) {
- // input type=='image' are not found in elements array! handle it here
- var $input = $(form.clk), input = $input[0], n = input.name;
- if (n && !input.disabled && input.type == 'image') {
- a.push({name: n, value: $input.val()});
- a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
- }
- }
- return a;
+ v = $.fieldValue(el, true);
+ if (v && v.constructor == Array) {
+ if (elements)
+ elements.push(el);
+ for(j=0, jmax=v.length; j < jmax; j++) {
+ a.push({name: n, value: v[j]});
+ }
+ }
+ else if (feature.fileapi && el.type == 'file') {
+ if (elements)
+ elements.push(el);
+ var files = el.files;
+ if (files.length) {
+ for (j=0; j < files.length; j++) {
+ a.push({name: n, value: files[j], type: el.type});
+ }
+ }
+ else {
+ // #180
+ a.push({ name: n, value: '', type: el.type });
+ }
+ }
+ else if (v !== null && typeof v != 'undefined') {
+ if (elements)
+ elements.push(el);
+ a.push({name: n, value: v, type: el.type, required: el.required});
+ }
+ }
+
+ if (!semantic && form.clk) {
+ // input type=='image' are not found in elements array! handle it here
+ var $input = $(form.clk), input = $input[0];
+ n = input.name;
+ if (n && !input.disabled && input.type == 'image') {
+ a.push({name: n, value: $input.val()});
+ a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
+ }
+ }
+ return a;
};
/**
@@ -463,8 +957,8 @@
* in the format: name1=value1&name2=value2
*/
$.fn.formSerialize = function(semantic) {
- //hand off to jQuery.param for proper encoding
- return $.param(this.formToArray(semantic));
+ //hand off to jQuery.param for proper encoding
+ return $.param(this.formToArray(semantic));
};
/**
@@ -472,47 +966,51 @@
* This method will return a string in the format: name1=value1&name2=value2
*/
$.fn.fieldSerialize = function(successful) {
- var a = [];
- this.each(function() {
- var n = this.name;
- if (!n) return;
- var v = $.fieldValue(this, successful);
- if (v && v.constructor == Array) {
- for (var i=0,max=v.length; i < max; i++)
- a.push({name: n, value: v[i]});
- }
- else if (v !== null && typeof v != 'undefined')
- a.push({name: this.name, value: v});
- });
- //hand off to jQuery.param for proper encoding
- return $.param(a);
+ var a = [];
+ this.each(function() {
+ var n = this.name;
+ if (!n) {
+ return;
+ }
+ var v = $.fieldValue(this, successful);
+ if (v && v.constructor == Array) {
+ for (var i=0,max=v.length; i < max; i++) {
+ a.push({name: n, value: v[i]});
+ }
+ }
+ else if (v !== null && typeof v != 'undefined') {
+ a.push({name: this.name, value: v});
+ }
+ });
+ //hand off to jQuery.param for proper encoding
+ return $.param(a);
};
/**
* Returns the value(s) of the element in the matched set. For example, consider the following form:
*
* <form><fieldset>
- * <input name="A" type="text" />
- * <input name="A" type="text" />
- * <input name="B" type="checkbox" value="B1" />
- * <input name="B" type="checkbox" value="B2"/>
- * <input name="C" type="radio" value="C1" />
- * <input name="C" type="radio" value="C2" />
+ * <input name="A" type="text" />
+ * <input name="A" type="text" />
+ * <input name="B" type="checkbox" value="B1" />
+ * <input name="B" type="checkbox" value="B2"/>
+ * <input name="C" type="radio" value="C1" />
+ * <input name="C" type="radio" value="C2" />
* </fieldset></form>
*
- * var v = $(':text').fieldValue();
+ * var v = $('input[type=text]').fieldValue();
* // if no values are entered into the text inputs
* v == ['','']
* // if values entered into the text inputs are 'foo' and 'bar'
* v == ['foo','bar']
*
- * var v = $(':checkbox').fieldValue();
+ * var v = $('input[type=checkbox]').fieldValue();
* // if neither checkbox is checked
* v === undefined
* // if both checkboxes are checked
* v == ['B1', 'B2']
*
- * var v = $(':radio').fieldValue();
+ * var v = $('input[type=radio]').fieldValue();
* // if neither radio is checked
* v === undefined
* // if first radio is checked
@@ -524,51 +1022,63 @@
* for each element is returned.
*
* Note: This method *always* returns an array. If no valid value can be determined the
- * array will be empty, otherwise it will contain one or more values.
+ * array will be empty, otherwise it will contain one or more values.
*/
$.fn.fieldValue = function(successful) {
- for (var val=[], i=0, max=this.length; i < max; i++) {
- var el = this[i];
- var v = $.fieldValue(el, successful);
- if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
- continue;
- v.constructor == Array ? $.merge(val, v) : val.push(v);
- }
- return val;
+ for (var val=[], i=0, max=this.length; i < max; i++) {
+ var el = this[i];
+ var v = $.fieldValue(el, successful);
+ if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length)) {
+ continue;
+ }
+ if (v.constructor == Array)
+ $.merge(val, v);
+ else
+ val.push(v);
+ }
+ return val;
};
/**
* Returns the value of the field element.
*/
$.fieldValue = function(el, successful) {
- var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
- if (typeof successful == 'undefined') successful = true;
+ var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
+ if (successful === undefined) {
+ successful = true;
+ }
- if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
- (t == 'checkbox' || t == 'radio') && !el.checked ||
- (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
- tag == 'select' && el.selectedIndex == -1))
- return null;
+ if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
+ (t == 'checkbox' || t == 'radio') && !el.checked ||
+ (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
+ tag == 'select' && el.selectedIndex == -1)) {
+ return null;
+ }
- if (tag == 'select') {
- var index = el.selectedIndex;
- if (index < 0) return null;
- var a = [], ops = el.options;
- var one = (t == 'select-one');
- var max = (one ? index+1 : ops.length);
- for(var i=(one ? index : 0); i < max; i++) {
- var op = ops[i];
- if (op.selected) {
- var v = op.value;
- if (!v) // extra pain for IE...
- v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
- if (one) return v;
- a.push(v);
- }
- }
- return a;
- }
- return el.value;
+ if (tag == 'select') {
+ var index = el.selectedIndex;
+ if (index < 0) {
+ return null;
+ }
+ var a = [], ops = el.options;
+ var one = (t == 'select-one');
+ var max = (one ? index+1 : ops.length);
+ for(var i=(one ? index : 0); i < max; i++) {
+ var op = ops[i];
+ if (op.selected) {
+ var v = op.value;
+ if (!v) { // extra pain for IE...
+ v = (op.attributes && op.attributes['value'] && !(op.attributes['value'].specified)) ? op.text : op.value;
+ }
+ if (one) {
+ return v;
+ }
+ a.push(v);
+ }
+ }
+ return a;
+ }
+ return $(el).val();
};
/**
@@ -579,47 +1089,70 @@
* - inputs of type submit, button, reset, and hidden will *not* be effected
* - button elements will *not* be effected
*/
-$.fn.clearForm = function() {
- return this.each(function() {
- $('input,select,textarea', this).clearFields();
- });
+$.fn.clearForm = function(includeHidden) {
+ return this.each(function() {
+ $('input,select,textarea', this).clearFields(includeHidden);
+ });
};
/**
* Clears the selected form elements.
*/
-$.fn.clearFields = $.fn.clearInputs = function() {
- return this.each(function() {
- var t = this.type, tag = this.tagName.toLowerCase();
- if (t == 'text' || t == 'password' || tag == 'textarea')
- this.value = '';
- else if (t == 'checkbox' || t == 'radio')
- this.checked = false;
- else if (tag == 'select')
- this.selectedIndex = -1;
- });
+$.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
+ var re = /^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i; // 'hidden' is not in this list
+ return this.each(function() {
+ var t = this.type, tag = this.tagName.toLowerCase();
+ if (re.test(t) || tag == 'textarea') {
+ this.value = '';
+ }
+ else if (t == 'checkbox' || t == 'radio') {
+ this.checked = false;
+ }
+ else if (tag == 'select') {
+ this.selectedIndex = -1;
+ }
+ else if ...
[truncated message content] |
|
From: <be...@us...> - 2013-09-03 09:02:08
|
Revision: 11996
http://sourceforge.net/p/xoops/svn/11996
Author: beckmi
Date: 2013-09-03 09:02:03 +0000 (Tue, 03 Sep 2013)
Log Message:
-----------
Updating to version 4.05
Modified Paths:
--------------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/langs/readme.md
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/anchor/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autolink/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autosave/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/code/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/hr/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/media/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/paste/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/save/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/searchreplace/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/template/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/textcolor/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/visualblocks/css/visualblocks.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/visualblocks/plugin.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/skins/lightgray/skin.ie7.min.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/skins/lightgray/skin.min.css
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/themes/modern/theme.min.js
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/tinymce.min.js
Added Paths:
-----------
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/
ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/plugin.min.js
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/changelog.txt 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1,3 +1,37 @@
+Version 4.0.5 (2013-08-27)
+ Added visuals for UL, LI and BR to visualblocks plugin. Patch contributed by Dan Ransom.
+ Added new autosave_restore_when_empty option to autosave plugin. Enabled by default.
+ Fixed bug where an exception was thrown when inserting images if valid_elements didn't include an ID for the image.
+ Fixed bug where the advlist plugin wouldn't properly render the splitbutton controls.
+ Fixed bug where visual blocks menu item wouldn't be marked checked when using the visualblocks_default_state option.
+ Fixed bug where save button in save plugin wouldn't get properly enabled when contents was changed.
+ Fixed bug where it was possible to insert images without any value for it's source attribute.
+ Fixed bug where altering image attributes wouldn't add a new undo level.
+ Fixed bug where import rules in CSS files wouldn't be properly imported by the importcss plugin.
+ Fixed bug where selectors could be imported multiple times. Producing duplicate formats.
+ Fixed bug where IE would throw exception if selection was changed while the editor was hidden.
+ Fixed so complex rules like .class:before doesn't get imported by default in the importcss plugin.
+ Fixed so it's possible to remove images by setting the src attribute to a blank value.
+ Fixed so the save_enablewhendirty setting in the save plugin is enabled by default.
+ Fixed so block formats drop down for classic mode can be translated properly using language packs.
+ Fixed so hr menu item and toolbar button gets the same translation string.
+ Fixed so bullet list toolbar button gets the correct translation from language packs.
+ Fixed issue with Chrome logging CSS warning about border styling for combo boxes.
+ Fixed issue with Chrome logging warnings about deprecated keyLocation property.
+ Fixed issue where custom_elements would not remove the some of the default rules when cloning rules from div and span.
+Version 4.0.4 (2013-08-21)
+ Added new importcss plugin. Lets you auto import classes from CSS files similar to the 3.x behavior.
+ Fixed bug where resize handles would be positioned incorrectly when inline element parent was using position: relative.
+ Fixed bug where IE 8 would throw Unknown runtime error if the editor was placed within a P tag.
+ Fixed bug where removing empty lists wouldn't produce blocks or brs where the old list was in the DOM.
+ Fixed bug where IE 10 wouldn't properly initialize template dialog due to async loading issues.
+ Fixed bug where autosave wouldn't properly display the warning about content not being saved due to isDirty changes.
+ Fixed bug where it wouldn't be possible to type if a touchstart event was bound to the parent document.
+ Fixed bug where code dialog in code plugin wouldn't wouldn't add a proper undo level.
+ Fixed issue where resizing the editor in vertical mode would set the iframe width to a pixel value.
+ Fixed issue with naming of insertdatetime settings. All are now prefixed with the plugin name.
+ Fixed so an initial change event is fired when the user types the first character into the editor.
+ Fixed so swf gets mapped to object element in media plugin. Enables embedding of flash with alternative poster.
Version 4.0.3 (2013-08-08)
Added new code_dialog_width/code_dialog_height options to control code dialog size.
Added missing pastetext button that works the same way as the pastetext menu item.
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/langs/readme.md
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/langs/readme.md 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/langs/readme.md 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1,3 +1,3 @@
-This is where language files should be placed.
-
-Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
+This is where language files should be placed.
+
+Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/anchor/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/anchor/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/anchor/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("anchor",function(n){function e(){var e=n.selection.getNode();n.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.name||e.id},onsubmit:function(e){n.execCommand("mceInsertContent",!1,n.dom.createHTML("a",{id:e.data.name}))}})}n.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:e,stateSelector:"a:not([href])"}),n.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:e})});
\ No newline at end of file
+tinymce.PluginManager.add("anchor",function(e){function t(){var t=e.selection.getNode();e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:t.name||t.id},onsubmit:function(t){e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t.data.name}))}})}e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:t,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:t})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autolink/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autolink/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autolink/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("autolink",function(t){function e(t){r(t,-1,"(",!0)}function n(t){r(t,0,"",!0)}function i(t){r(t,-1,"",!1)}function r(t,e,n){var i,r,a,o,c,s,l,u,f;if(i=t.selection.getRng(!0).cloneRange(),i.startOffset<5){if(u=i.endContainer.previousSibling,!u){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;u=i.endContainer.firstChild.nextSibling}if(f=u.length,i.setStart(u,f),i.setEnd(u,f),i.endOffset<5)return;r=i.endOffset,o=u}else{if(o=i.endContainer,3!=o.nodeType&&o.firstChild){for(;3!=o.nodeType&&o.firstChild;)o=o.firstChild;3==o.nodeType&&(i.setStart(o,0),i.setEnd(o,o.nodeValue.length))}r=1==i.endOffset?2:i.endOffset-1-e}a=r;do i.setStart(o,r>=2?r-2:0),i.setEnd(o,r>=1?r-1:0),r-=1;while(" "!=i.toString()&&""!==i.toString()&&160!=i.toString().charCodeAt(0)&&r-2>=0&&i.toString()!=n);if(i.toString()==n||160==i.toString().charCodeAt(0)?(i.setStart(o,r),i.setEnd(o,a),r+=1):0===i.startOffset?(i.setStart(o,0),i.setEnd(o,a)):(i.setStart(o,r),i.setEnd(o,a)),s=i.toString(),"."==s.charAt(s.length-1)&&i.setEnd(o,a-1),s=i.toString(),l=s.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),l&&("www."==l[1]?l[1]="http://www.":/@$/.test(l[1])&&!/^mailto:/.test(l[1])&&(l[1]="mailto:"+l[1]),c=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,l[1]+l[2]),t.selection.moveToBookmark(c),t.nodeChanged(),tinymce.Env.webkit)){t.selection.collapse(!1);var d=Math.min(o.length,a+1);i.setStart(o,d),i.setEnd(o,d),t.selection.setRng(i)}}t.on("keydown",function(e){return 13==e.keyCode?i(t):void 0}),tinymce.Env.ie||(t.on("keypress",function(n){return 41==n.which?e(t):void 0}),t.on("keyup",function(e){return 32==e.keyCode?n(t):void 0}))});
\ No newline at end of file
+tinymce.PluginManager.add("autolink",function(t){function e(t){o(t,-1,"(",!0)}function n(t){o(t,0,"",!0)}function i(t){o(t,-1,"",!1)}function o(t,e,n){var i,o,r,a,s,l,c,u,d;if(i=t.selection.getRng(!0).cloneRange(),i.startOffset<5){if(u=i.endContainer.previousSibling,!u){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;u=i.endContainer.firstChild.nextSibling}if(d=u.length,i.setStart(u,d),i.setEnd(u,d),i.endOffset<5)return;o=i.endOffset,a=u}else{if(a=i.endContainer,3!=a.nodeType&&a.firstChild){for(;3!=a.nodeType&&a.firstChild;)a=a.firstChild;3==a.nodeType&&(i.setStart(a,0),i.setEnd(a,a.nodeValue.length))}o=1==i.endOffset?2:i.endOffset-1-e}r=o;do i.setStart(a,o>=2?o-2:0),i.setEnd(a,o>=1?o-1:0),o-=1;while(" "!=i.toString()&&""!==i.toString()&&160!=i.toString().charCodeAt(0)&&o-2>=0&&i.toString()!=n);if(i.toString()==n||160==i.toString().charCodeAt(0)?(i.setStart(a,o),i.setEnd(a,r),o+=1):0===i.startOffset?(i.setStart(a,0),i.setEnd(a,r)):(i.setStart(a,o),i.setEnd(a,r)),l=i.toString(),"."==l.charAt(l.length-1)&&i.setEnd(a,r-1),l=i.toString(),c=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),c&&("www."==c[1]?c[1]="http://www.":/@$/.test(c[1])&&!/^mailto:/.test(c[1])&&(c[1]="mailto:"+c[1]),s=t.selection.getBookmark(),t.selection.setRng(i),t.execCommand("createlink",!1,c[1]+c[2]),t.selection.moveToBookmark(s),t.nodeChanged(),tinymce.Env.webkit)){t.selection.collapse(!1);var m=Math.min(a.length,r+1);i.setStart(a,m),i.setEnd(a,m),t.selection.setRng(i)}}t.on("keydown",function(e){return 13==e.keyCode?i(t):void 0}),tinymce.Env.ie||(t.on("keypress",function(n){return 41==n.which?e(t):void 0}),t.on("keyup",function(e){return 32==e.keyCode?n(t):void 0}))});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autosave/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autosave/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/autosave/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("autosave",function(t){function e(t,e){var n={s:1e3,m:6e4};return t=/^(\d+)([ms]?)$/.exec(""+(t||e)),(t[2]?n[t[2]]:1)*parseInt(t,10)}function n(){var t=parseInt(m.getItem(f+"autosave.time"),10)||0;return(new Date).getTime()-t>d.autosave_retention?(i(),!1):!0}function i(){m.removeItem(f+"autosave.draft"),m.removeItem(f+"autosave.time")}function a(){c&&t.isDirty()&&(m.setItem(f+"autosave.draft",t.getContent({format:"raw",no_events:!0})),m.setItem(f+"autosave.time",(new Date).getTime()),t.fire("StoreDraft"))}function r(){n()&&(t.setContent(m.getItem(f+"autosave.draft"),{format:"raw"}),i(),t.fire("RestoreDraft"))}function o(){c||(setInterval(function(){t.removed||a()},d.autosave_interval),c=!0)}function s(){var e=this;e.disabled(!n()),t.on("StoreDraft RestoreDraft",function(){e.disabled(!n())}),o()}function l(){t.undoManager.beforeChange(),r(),t.undoManager.add()}function u(){var t;return tinymce.each(tinymce.editors,function(e){e.plugins.autosave&&e.plugins.autosave.storeDraft(),!t&&e.isDirty()&&e.getParam("autosave_ask_before_unload",!0)&&(t=e.translate("You have unsaved changes are you sure you want to navigate away?"))}),t}var c,d=t.settings,m=tinymce.util.LocalStorage,f=t.id;d.autosave_interval=e(d.autosave_interval,"30s"),d.autosave_retention=e(d.autosave_retention,"20m"),t.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),t.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),this.storeDraft=a,window.onbeforeunload=u});
\ No newline at end of file
+tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(f.getItem(h+"autosave.time"),10)||0;return(new Date).getTime()-e>d.autosave_retention?(i(!1),!1):!0}function i(t){f.removeItem(h+"autosave.draft"),f.removeItem(h+"autosave.time"),t!==!1&&e.fire("RemoveDraft")}function a(){c()||(f.setItem(h+"autosave.draft",e.getContent({format:"raw",no_events:!0})),f.setItem(h+"autosave.time",(new Date).getTime()),e.fire("StoreDraft"))}function r(){n()&&(e.setContent(f.getItem(h+"autosave.draft"),{format:"raw"}),e.fire("RestoreDraft"))}function o(){m||(setInterval(function(){e.removed||a()},d.autosave_interval),m=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft RemoveDraft",function(){t.disabled(!n())}),o()}function l(){e.undoManager.beforeChange(),r(),i(),e.undoManager.add()}function u(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}function c(t){var n=e.settings.forced_root_block;return t=tinymce.trim("undefined"==typeof t?e.getBody().innerHTML:t),""===t||new RegExp("^<"+n+">(( | |[ ]|<br[^>]*>)+?|)</"+n+">|<br>$","i").test(t)}var m,d=e.settings,f=tinymce.util.LocalStorage,h=e.id;d.autosave_interval=t(d.autosave_interval,"30s"),d.autosave_retention=t(d.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),e.settings.autosave_restore_when_empty!==!1&&(e.on("init",function(){n()&&c()&&r()}),e.on("saveContent",function(){i()})),window.onbeforeunload=u,this.hasDraft=n,this.storeDraft=a,this.restoreDraft=r,this.removeDraft=i,this.isEmpty=c});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/code/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/code/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/code/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("code",function(e){function t(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",500),value:e.getContent({source_view:!0}),spellcheck:!1},onSubmit:function(t){e.setContent(t.data.code),e.nodeChanged()}})}e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})});
\ No newline at end of file
+tinymce.PluginManager.add("code",function(e){function t(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:e.getParam("code_dialog_width",600),minHeight:e.getParam("code_dialog_height",500),value:e.getContent({source_view:!0}),spellcheck:!1},onSubmit:function(t){e.undoManager.transact(function(){e.setContent(t.data.code)}),e.nodeChanged()}})}e.addCommand("mceCodeEditor",t),e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/hr/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/hr/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/hr/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")}),e.addButton("hr",{icon:"hr",tooltip:"Insert horizontal ruler",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
\ No newline at end of file
+tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")}),e.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/image/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("image",function(e){function t(e,t){function n(e,n){i.parentNode.removeChild(i),t({width:e,height:n})}var i=document.createElement("img");i.onload=function(){n(i.clientWidth,i.clientHeight)},i.onerror=function(){n()},i.src=e;var o=i.style;o.visibility="hidden",o.position="fixed",o.bottom=o.left=0,o.width=o.height="auto",document.body.appendChild(i)}function n(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function i(n){function i(){var e=[{text:"None",value:""}];return tinymce.each(n,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function o(e){var t,n,i,o;t=c.find("#width")[0],n=c.find("#height")[0],i=t.value(),o=n.value(),c.find("#constrain")[0].checked()&&u&&m&&i&&o&&(e.control==t?(o=Math.round(i/u*o),n.value(o)):(i=Math.round(o/m*i),t.value(i))),u=i,m=o}function a(){function t(t){function i(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){n.width||n.height||g.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),i()},t.onerror=i}var n=c.toJSON();""===n.width&&(n.width=null),""===n.height&&(n.height=null),""===n.style&&(n.style=null),n={src:n.src,alt:n.alt,width:n.width,height:n.height,style:n.style},f?g.setAttribs(f,n):e.undoManager.transact(function(){n.id="__mcenew",e.insertContent(g.createHTML("img",n)),f=g.get("__mcenew"),g.setAttrib(f,"id",null)}),t(f)}function r(e){return e&&(e=e.replace(/px$/,"")),e}function l(){t(this.value(),function(e){e.width&&e.height&&(u=e.width,m=e.height,c.find("#width").value(u),c.find("#height").value(m))})}function s(){function e(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}var t=c.toJSON(),n=g.parseStyle(t.style);g.setAttrib(f,"style",""),delete n.margin,n["margin-top"]=n["margin-bottom"]=e(t.vspace),n["margin-left"]=n["margin-right"]=e(t.hspace),n["border-width"]=e(t.border),c.find("#style").value(g.serializeStyle(g.parseStyle(g.serializeStyle(n))))}var c,d,u,m,h,g=e.dom,f=e.selection.getNode();u=g.getAttrib(f,"width"),m=g.getAttrib(f,"height"),"IMG"!=f.nodeName||f.getAttribute("data-mce-object")?f=null:d={src:g.getAttrib(f,"src"),alt:g.getAttrib(f,"alt"),width:u,height:m},n&&(h={name:"target",type:"listbox",label:"Image list",values:i(),onselect:function(e){var t=c.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),c.find("#src").value(e.control.value())}});var p=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:l},h,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:o},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:o},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];e.settings.image_advtab?(f&&(d.hspace=r(f.style.marginLeft||f.style.marginRight),d.vspace=r(f.style.marginTop||f.style.marginBottom),d.border=r(f.style.borderWidth),d.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(f,"style")))),c=e.windowManager.open({title:"Insert/edit image",data:d,bodyType:"tabpanel",body:[{title:"General",type:"form",items:p},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:s},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:a})):c=e.windowManager.open({title:"Edit image",data:d,body:p,onSubmit:a})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(i),stateSelector:"img:not([data-mce-object])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(i),context:"insert",prependToContext:!0})});
\ No newline at end of file
+tinymce.PluginManager.add("image",function(e){function t(e,t){function n(e,n){i.parentNode.removeChild(i),t({width:e,height:n})}var i=document.createElement("img");i.onload=function(){n(i.clientWidth,i.clientHeight)},i.onerror=function(){n()},i.src=e;var a=i.style;a.visibility="hidden",a.position="fixed",a.bottom=a.left=0,a.width=a.height="auto",document.body.appendChild(i)}function n(t){return function(){var n=e.settings.image_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function i(n){function i(){var e=[{text:"None",value:""}];return tinymce.each(n,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function a(e){var t,n,i,a;t=c.find("#width")[0],n=c.find("#height")[0],i=t.value(),a=n.value(),c.find("#constrain")[0].checked()&&d&&m&&i&&a&&(e.control==t?(a=Math.round(i/d*a),n.value(a)):(i=Math.round(a/m*i),t.value(i))),d=i,m=a}function o(){function t(t){function i(){t.onload=t.onerror=null,e.selection.select(t),e.nodeChanged()}t.onload=function(){n.width||n.height||h.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),i()},t.onerror=i}var n=c.toJSON();""===n.width&&(n.width=null),""===n.height&&(n.height=null),""===n.style&&(n.style=null),n={src:n.src,alt:n.alt,width:n.width,height:n.height,style:n.style},e.undoManager.transact(function(){return n.src?(g?h.setAttribs(g,n):(n.id="__mcenew",e.selection.setContent(h.createHTML("img",n)),g=h.get("__mcenew"),h.setAttrib(g,"id",null)),t(g),void 0):(g&&(h.remove(g),e.nodeChanged()),void 0)})}function r(e){return e&&(e=e.replace(/px$/,"")),e}function s(){t(this.value(),function(e){e.width&&e.height&&(d=e.width,m=e.height,c.find("#width").value(d),c.find("#height").value(m))})}function l(){function e(e){return e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e}var t=c.toJSON(),n=h.parseStyle(t.style);h.setAttrib(g,"style",""),delete n.margin,n["margin-top"]=n["margin-bottom"]=e(t.vspace),n["margin-left"]=n["margin-right"]=e(t.hspace),n["border-width"]=e(t.border),c.find("#style").value(h.serializeStyle(h.parseStyle(h.serializeStyle(n))))}var c,u,d,m,f,h=e.dom,g=e.selection.getNode();d=h.getAttrib(g,"width"),m=h.getAttrib(g,"height"),"IMG"!=g.nodeName||g.getAttribute("data-mce-object")?g=null:u={src:h.getAttrib(g,"src"),alt:h.getAttrib(g,"alt"),width:d,height:m},n&&(f={name:"target",type:"listbox",label:"Image list",values:i(),onselect:function(e){var t=c.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),c.find("#src").value(e.control.value())}});var p=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:s},f,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:a},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:a},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];e.settings.image_advtab?(g&&(u.hspace=r(g.style.marginLeft||g.style.marginRight),u.vspace=r(g.style.marginTop||g.style.marginBottom),u.border=r(g.style.borderWidth),u.style=e.dom.serializeStyle(e.dom.parseStyle(e.dom.getAttrib(g,"style")))),c=e.windowManager.open({title:"Insert/edit image",data:u,bodyType:"tabpanel",body:[{title:"General",type:"form",items:p},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:l},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:o})):c=e.windowManager.open({title:"Edit image",data:u,body:p,onSubmit:o})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:n(i),stateSelector:"img:not([data-mce-object])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:n(i),context:"insert",prependToContext:!0})});
\ No newline at end of file
Added: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/plugin.min.js (rev 0)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -0,0 +1 @@
+tinymce.PluginManager.add("importcss",function(e){function t(t){function n(e,t){(t||o[e.href])&&(i(e.imports,function(e){n(e,!0)}),i(e.cssRules||e.rules,function(e){e.styleSheet?n(e.styleSheet,!0):e.selectorText&&i(e.selectorText.split(","),function(e){a.push(tinymce.trim(e))})}))}var a=[],o={};i(e.contentCSS,function(e){o[e]=!0});try{i(t.styleSheets,n)}catch(r){}return a}function n(t){var n,i=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(i){var a=i[1],o=i[2].substr(1).split(".").join(" ");return i[1]?(n={title:t},e.schema.getTextBlockElements()[a]?n.block=a:e.schema.getBlockElements()[a]?n.selector=a:n.inline=a):i[2]&&(n={inline:"span",title:t.substr(1),classes:o}),e.settings.importcss_merge_classes!==!1?n.classes=o:n.attributes={"class":o},n}}var i=tinymce.each;e.settings.style_formats||e.on("renderFormatsMenu",function(a){var o=e.settings.importcss_selector_converter||n,r={};e.settings.importcss_append||a.control.items().remove(),i(t(e.getDoc()),function(t){if(-1===t.indexOf(".mce-")&&!r[t]){var n=o(t);if(n){var i=n.name||tinymce.DOM.uniqueId();e.formatter.register(i,n),a.control.append(tinymce.extend({},a.control.settings.itemDefaults,{text:n.title,format:i}))}r[t]=!0}})})});
\ No newline at end of file
Property changes on: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/importcss/plugin.min.js
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function i(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",i(n.getMonth()+1,2)),t=t.replace("%d",i(n.getDate(),2)),t=t.replace("%H",""+i(n.getHours(),2)),t=t.replace("%M",""+i(n.getMinutes(),2)),t=t.replace("%S",""+i(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(l[n.getMonth()])),t=t.replace("%b",""+e.translate(o[n.getMonth()])),t=t.replace("%A",""+e.translate(r[n.getDay()])),t=t.replace("%a",""+e.translate(a[n.getDay()])),t=t.replace("%%","%")}function n(n){var i=t(n);if(e.settings.insertdatetime_element){var a;a=/%[HMSIp]/.test(n)?t("%Y-%m-%dT%H:%M"):t("%Y-%m-%d"),i='<time datetime="'+a+'">'+i+"</time>";var r=e.dom.getParent(e.selection.getStart(),"time");if(r)return e.dom.setOuterHTML(r,i),void 0}e.insertContent(i)}var i,a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),l="January February March April May June July August September October November December".split(" "),s=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdate_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdate_timeformat",e.translate("%H:%M:%S")))}),e.addButton("inserttime",{type:"splitbutton",title:"Insert time",onclick:function(){n(i||"%H:%M:%S")},menu:s}),tinymce.each(e.settings.insertdate_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){s.push({text:t(e),onclick:function(){i=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:s,context:"insert"})});
\ No newline at end of file
+tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function i(e,t){if(e=""+e,e.length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",i(n.getMonth()+1,2)),t=t.replace("%d",i(n.getDate(),2)),t=t.replace("%H",""+i(n.getHours(),2)),t=t.replace("%M",""+i(n.getMinutes(),2)),t=t.replace("%S",""+i(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(n.getHours()<12?"AM":"PM")),t=t.replace("%B",""+e.translate(s[n.getMonth()])),t=t.replace("%b",""+e.translate(o[n.getMonth()])),t=t.replace("%A",""+e.translate(r[n.getDay()])),t=t.replace("%a",""+e.translate(a[n.getDay()])),t=t.replace("%%","%")}function n(n){var i=t(n);if(e.settings.insertdatetime_element){var a;a=/%[HMSIp]/.test(n)?t("%Y-%m-%dT%H:%M"):t("%Y-%m-%d"),i='<time datetime="'+a+'">'+i+"</time>";var r=e.dom.getParent(e.selection.getStart(),"time");if(r)return e.dom.setOuterHTML(r,i),void 0}e.insertContent(i)}var i,a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),l=[];e.addCommand("mceInsertDate",function(){n(e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),e.addCommand("mceInsertTime",function(){n(e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S")))}),e.addButton("inserttime",{type:"splitbutton",title:"Insert time",onclick:function(){n(i||"%H:%M:%S")},menu:l}),tinymce.each(e.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(e){l.push({text:t(e),onclick:function(){i=e,n(e)}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:l,context:"insert"})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/link/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(e){var t=d.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find("#href").value(e.control.value())}function i(){var e=[{text:"None",value:""}];return tinymce.each(t,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function o(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function a(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function l(t){var i=[];return tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&i.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),i.length?(i.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:i,onselect:n}):void 0}function r(){u||0!==g.text.length||this.parent().parent().find("#text")[0].value(this.value())}var s,c,u,d,m,h,f,g={},p=e.selection,b=e.dom;s=p.getNode(),c=b.getParent(s,"a[href]"),g.text=u=c?c.innerText||c.textContent:p.getContent({format:"text"}),g.href=c?b.getAttrib(c,"href"):"",g.target=c?b.getAttrib(c,"target"):"",g.rel=c?b.getAttrib(c,"rel"):"","IMG"==s.nodeName&&(g.text=u=" "),t&&(m={type:"listbox",label:"Link list",values:i(),onselect:n}),e.settings.target_list!==!1&&(f={name:"target",type:"listbox",label:"Target",values:a(g.target)}),e.settings.rel_list&&(h={name:"rel",type:"listbox",label:"Rel",values:o(g.rel)}),d=e.windowManager.open({title:"Insert link",data:g,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:r,onkeyup:r},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){g.text=this.value()}},l(g.href),m,h,f],onSubmit:function(t){function n(t,n){window.setTimeout(function(){e.windowManager.confirm(t,n)},0)}function i(){o.text!=u?c?(e.focus(),c.innerHTML=o.text,b.setAttribs(c,{href:a,target:o.target?o.target:null,rel:o.rel?o.rel:null}),p.select(c)):e.insertContent(b.createHTML("a",{href:a,target:o.target?o.target:null,rel:o.rel?o.rel:null},o.text)):e.execCommand("mceInsertLink",!1,{href:a,target:o.target,rel:o.rel?o.rel:null})}var o=t.data,a=o.href;return a?a.indexOf("@")>0&&-1==a.indexOf("//")&&-1==a.indexOf("mailto:")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(a="mailto:"+a),i()}),void 0):/^\s*www\./i.test(a)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(a="http://"+a),i()}),void 0):(i(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t(n)),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
\ No newline at end of file
+tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(e){var t=d.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),d.find("#href").value(e.control.value())}function i(){var e=[{text:"None",value:""}];return tinymce.each(t,function(t){e.push({text:t.text||t.title,value:t.value||t.url,menu:t.menu})}),e}function a(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function o(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function r(t){var i=[];return tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&i.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),i.length?(i.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:i,onselect:n}):void 0}function s(){c||0!==g.text.length||this.parent().parent().find("#text")[0].value(this.value())}var l,u,c,d,m,f,h,g={},p=e.selection,v=e.dom;l=p.getNode(),u=v.getParent(l,"a[href]"),g.text=c=u?u.innerText||u.textContent:p.getContent({format:"text"}),g.href=u?v.getAttrib(u,"href"):"",g.target=u?v.getAttrib(u,"target"):"",g.rel=u?v.getAttrib(u,"rel"):"","IMG"==l.nodeName&&(g.text=c=" "),t&&(m={type:"listbox",label:"Link list",values:i(),onselect:n}),e.settings.target_list!==!1&&(h={name:"target",type:"listbox",label:"Target",values:o(g.target)}),e.settings.rel_list&&(f={name:"rel",type:"listbox",label:"Rel",values:a(g.rel)}),d=e.windowManager.open({title:"Insert link",data:g,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:s,onkeyup:s},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){g.text=this.value()}},r(g.href),m,f,h],onSubmit:function(t){function n(t,n){window.setTimeout(function(){e.windowManager.confirm(t,n)},0)}function i(){a.text!=c?u?(e.focus(),u.innerHTML=a.text,v.setAttribs(u,{href:o,target:a.target?a.target:null,rel:a.rel?a.rel:null}),p.select(u)):e.insertContent(v.createHTML("a",{href:o,target:a.target?a.target:null,rel:a.rel?a.rel:null},a.text)):e.execCommand("mceInsertLink",!1,{href:o,target:a.target,rel:a.rel?a.rel:null})}var a=t.data,o=a.href;return o?o.indexOf("@")>0&&-1==o.indexOf("//")&&-1==o.indexOf("mailto:")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(o="mailto:"+o),i()}),void 0):/^\s*www\./i.test(o)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(o="http://"+o),i()}),void 0):(i(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t(n)),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/lists/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("lists",function(e){var t=this;e.on("init",function(){function n(e){function t(t){var i,a,r;a=e[t?"startContainer":"endContainer"],r=e[t?"startOffset":"endOffset"],1==a.nodeType&&(i=b.create("span",{"data-mce-type":"bookmark"}),a.hasChildNodes()?(r=Math.min(r,a.childNodes.length-1),a.insertBefore(i,a.childNodes[r])):a.appendChild(i),a=i,r=0),n[t?"startContainer":"endContainer"]=a,n[t?"startOffset":"endOffset"]=r}var n={};return t(!0),t(),n}function i(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var i,a,r;i=r=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],1==i.nodeType&&(t?(a=n(i),i=i.parentNode):(a=n(i),i=i.parentNode),b.remove(r)),e[t?"startContainer":"endContainer"]=i,e[t?"startOffset":"endOffset"]=a}t(!0),t();var n=b.createRng();n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),x.setRng(n)}function a(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function r(e){return e.parentNode.firstChild==e}function o(e){return e.parentNode.lastChild==e}function l(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function s(t,n){var i,a;if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),a=n?b.create(n):b.createFragment(),t)for(;i=t.firstChild;)a.appendChild(i);return e.settings.forced_root_block||a.appendChild(b.create("br")),a.hasChildNodes()||tinymce.isIE||(a.innerHTML='<br data-mce-bogus="1">'),a}function c(){return tinymce.grep(x.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function d(){return tinymce.grep(x.getSelectedBlocks(),l)}function u(e,t,n){var i,a;n=n||s(t),i=b.createRng(),i.setStartAfter(t),i.setEndAfter(e),a=i.extractContents(),b.isEmpty(a)||b.insertAfter(a,e),b.isEmpty(n)||b.insertAfter(n,e),b.isEmpty(t.parentNode)&&b.remove(t.parentNode),b.remove(t)}function m(e){var t,n;if(t=e.nextSibling,t&&a(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.appendChild(n);b.remove(t)}if(t=e.previousSibling,t&&a(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.insertBefore(n,e.firstChild);b.remove(t)}}function f(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var t,n=e.parentNode;"LI"==n.nodeName&&n.firstChild==e&&(t=n.previousSibling,t&&"LI"==t.nodeName&&(t.appendChild(e),b.isEmpty(n)&&b.remove(n))),a(n)&&(t=n.previousSibling,t&&"LI"==t.nodeName&&t.appendChild(e))})}function g(){var e,t=n(x.getRng(!0));return tinymce.each(c(),function(t){var n,i;return n=t.previousSibling,n&&"UL"==n.nodeName?(n.appendChild(t),void 0):n&&"LI"==n.nodeName&&a(n.lastChild)?(n.lastChild.appendChild(t),void 0):(n=t.nextSibling,n&&"UL"==n.nodeName?(n.insertBefore(t,n.firstChild),void 0):(n&&"LI"==n.nodeName&&a(t.lastChild)||(n=t.previousSibling,n&&"LI"==n.nodeName&&(i=b.create(t.parentNode.nodeName),n.appendChild(i),i.appendChild(t)),e=!0),void 0))}),i(t),e}function p(){function e(e){b.isEmpty(e)&&b.remove(e)}var t,l=n(x.getRng(!0));return tinymce.each(c(),function(n){var i,l=n.parentNode,c=l.parentNode;if(r(n)&&o(n))if("LI"==c.nodeName)b.insertAfter(n,c),e(c);else{if(!a(c))return;b.remove(l,!0)}else if(r(n))if("LI"==c.nodeName)b.insertAfter(n,c),i=b.create("LI"),i.appendChild(l),b.insertAfter(i,n),e(c);else{if(!a(c))return;c.insertBefore(n,l)}else if(o(n))if("LI"==c.nodeName)b.insertAfter(n,c);else{if(!a(c))return;b.insertAfter(n,l)}else{if("LI"==c.nodeName)l=c,i=s(n,"LI");else{if(!a(c))return;i=s(n,"LI")}u(l,n,i),f(l.parentNode)}t=!0}),i(l),t}function h(t){function r(){function t(t){var n,i,a=e.getBody();for(n=o[t?"startContainer":"endContainer"],i=o[t?"startOffset":"endOffset"],1==n.nodeType&&(n=n.childNodes[Math.min(i,n.childNodes.length-1)]||n);n.parentNode!=a;){if(l(n))return n;if(/^(TD|TH)$/.test(n.parentNode.nodeName))return n;n=n.parentNode}return n}function n(e,t){var n,i=[];if(!l(e)){for(;e&&(n=e[t?"previousSibling":"nextSibling"],!b.isBlock(n)&&n);)e=n;for(;e;)i.push(e),e=e[t?"nextSibling":"previousSibling"]}return i}var i,a,r=t(!0),s=t();a=n(r,!0),r!=s&&(a=a.concat(n(s).reverse())),tinymce.each(a,function(e){if(!b.isBlock(e)||"BR"==e.nodeName){if(!i||"BR"==e.nodeName){if("BR"==e.nodeName&&(!e.nextSibling||b.isBlock(e.nextSibling)&&"BR"!=e.nextSibling.nodeName))return b.remove(e),!1;i=b.create("p"),c.push(i),e.parentNode.insertBefore(i,e)}return"BR"!=e.nodeName?i.appendChild(e):b.remove(e),e==s?!1:void 0}})}var o=x.getRng(!0),s=n(o),c=d();r(),tinymce.each(c,function(e){var n,i;i=e.previousSibling,i&&a(i)&&i.nodeName==t?(n=i,e=b.rename(e,"LI"),i.appendChild(e)):(n=b.create(t),e.parentNode.insertBefore(n,e),n.appendChild(e),e=b.rename(e,"LI")),m(n)}),i(s)}function y(){var e=n(x.getRng(!0));tinymce.each(c(),function(e){var t,n;for(t=e;t;t=t.parentNode)a(t)&&(n=t);u(n,e)}),i(e)}function v(e){var t=b.getParent(x.getStart(),"OL,UL");if(t)if(t.nodeName==e)y(e);else{var a=n(x.getRng(!0));m(b.rename(t,e)),i(a)}else h(e)}var b=e.dom,x=e.selection;t.backspaceDelete=function(e){function t(e,t){var n=e.startContainer,i=e.startOffset;if(3==n.nodeType&&(t?i<n.data.length:i>0))return n;for(var a=new tinymce.dom.TreeWalker(e.startContainer);n=a[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function r(e,t){var n,i,r=e.parentNode;for(a(t.lastChild)&&(i=t.lastChild),n=t.lastChild,n&&"BR"==n.nodeName&&e.hasChildNodes()&&b.remove(n);n=e.firstChild;)t.appendChild(n);i&&t.appendChild(i),b.remove(e),b.isEmpty(r)&&b.remove(r)}if(x.isCollapsed()){var o=b.getParent(x.getStart(),"LI");if(o){var l=x.getRng(!0),s=b.getParent(t(l,e),"LI");if(s&&s!=o){var c=n(l);return e?r(s,o):r(o,s),i(c),!0}if(!s&&!e&&y(o.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return g()?void 0:!0}),e.addCommand("Outdent",function(){return p()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){v("UL")}),e.addCommand("InsertOrderedList",function(){v("OL")})}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?t.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&t.backspaceDelete(!0)&&e.preventDefault()})});
\ No newline at end of file
+tinymce.PluginManager.add("lists",function(e){var t=this;e.on("init",function(){function n(e){function t(t){var i,r,a;r=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],1==r.nodeType&&(i=b.create("span",{"data-mce-type":"bookmark"}),r.hasChildNodes()?(a=Math.min(a,r.childNodes.length-1),r.insertBefore(i,r.childNodes[a])):r.appendChild(i),r=i,a=0),n[t?"startContainer":"endContainer"]=r,n[t?"startOffset":"endOffset"]=a}var n={};return t(!0),e.collapsed||t(),n}function i(t){function n(n){function i(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,a,o;if(r=o=t[n?"startContainer":"endContainer"],a=t[n?"startOffset":"endOffset"],r){if(1==r.nodeType){if(r.parentNode==e.getBody()){var s,l=e.settings.forced_root_block;l?(s=b.create(l),(!tinymce.Env.ie||tinymce.Env.ie>10)&&s.appendChild(b.create("br",{"data-mce-bogus":"true"})),r.parentNode.insertBefore(s,r),r=s,a=0):(s=b.create("br"),r.parentNode.insertBefore(s,r),r=r.parentNode,a=i(s))}else n?(a=i(r),r=r.parentNode):(a=i(r),r=r.parentNode);b.remove(o)}t[n?"startContainer":"endContainer"]=r,t[n?"startOffset":"endOffset"]=a}}n(!0),n();var i=b.createRng();i.setStart(t.startContainer,t.startOffset),t.endContainer&&i.setEnd(t.endContainer,t.endOffset),C.setRng(i)}function r(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function a(e){return e.parentNode.firstChild==e}function o(e){return e.parentNode.lastChild==e}function s(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function l(t,n){var i,r;if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),r=n?b.create(n):b.createFragment(),t)for(;i=t.firstChild;)r.appendChild(i);return e.settings.forced_root_block||r.appendChild(b.create("br")),r.hasChildNodes()||tinymce.Env.ie&&!(tinymce.Env.ie>10)||(r.innerHTML='<br data-mce-bogus="1">'),r}function c(){return tinymce.grep(C.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function d(){return tinymce.grep(C.getSelectedBlocks(),s)}function u(e,t,n){var i,r,a=b.select('span[data-mce-type="bookmark"]',e);n=n||l(t),i=b.createRng(),i.setStartAfter(t),i.setEndAfter(e),r=i.extractContents(),b.isEmpty(r)||b.insertAfter(r,e),b.isEmpty(n)||b.insertAfter(n,e),b.isEmpty(t.parentNode)&&(tinymce.each(a,function(e){t.parentNode.parentNode.insertBefore(e,t.parentNode)}),b.remove(t.parentNode)),b.remove(t)}function m(e){var t,n;if(t=e.nextSibling,t&&r(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.appendChild(n);b.remove(t)}if(t=e.previousSibling,t&&r(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.insertBefore(n,e.firstChild);b.remove(t)}}function f(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var t,n=e.parentNode;"LI"==n.nodeName&&n.firstChild==e&&(t=n.previousSibling,t&&"LI"==t.nodeName&&(t.appendChild(e),b.isEmpty(n)&&b.remove(n))),r(n)&&(t=n.previousSibling,t&&"LI"==t.nodeName&&t.appendChild(e))})}function p(){var e,t=n(C.getRng(!0));return tinymce.each(c(),function(t){var n,i;return n=t.previousSibling,n&&"UL"==n.nodeName?(n.appendChild(t),void 0):n&&"LI"==n.nodeName&&r(n.lastChild)?(n.lastChild.appendChild(t),void 0):(n=t.nextSibling,n&&"UL"==n.nodeName?(n.insertBefore(t,n.firstChild),void 0):(n&&"LI"==n.nodeName&&r(t.lastChild)||(n=t.previousSibling,n&&"LI"==n.nodeName&&(i=b.create(t.parentNode.nodeName),n.appendChild(i),i.appendChild(t)),e=!0),void 0))}),i(t),e}function h(){function e(e){b.isEmpty(e)&&b.remove(e)}var t,s=n(C.getRng(!0));return tinymce.each(c(),function(n){var i,s=n.parentNode,c=s.parentNode;if(a(n)&&o(n))if("LI"==c.nodeName)b.insertAfter(n,c),e(c);else{if(!r(c))return;b.remove(s,!0)}else if(a(n))if("LI"==c.nodeName)b.insertAfter(n,c),i=b.create("LI"),i.appendChild(s),b.insertAfter(i,n),e(c);else{if(!r(c))return;c.insertBefore(n,s)}else if(o(n))if("LI"==c.nodeName)b.insertAfter(n,c);else{if(!r(c))return;b.insertAfter(n,s)}else{if("LI"==c.nodeName)s=c,i=l(n,"LI");else{if(!r(c))return;i=l(n,"LI")}u(s,n,i),f(s.parentNode)}t=!0}),i(s),t}function g(t){function a(){function t(t){var n,i,r=e.getBody();for(n=o[t?"startContainer":"endContainer"],i=o[t?"startOffset":"endOffset"],1==n.nodeType&&(n=n.childNodes[Math.min(i,n.childNodes.length-1)]||n);n.parentNode!=r;){if(s(n))return n;if(/^(TD|TH)$/.test(n.parentNode.nodeName))return n;n=n.parentNode}return n}function n(e,t){var n,i=[];if(!s(e)){for(;e&&(n=e[t?"previousSibling":"nextSibling"],!b.isBlock(n)&&n);)e=n;for(;e;)i.push(e),e=e[t?"nextSibling":"previousSibling"]}return i}var i,r,a=t(!0),l=t();r=n(a,!0),a!=l&&(r=r.concat(n(l).reverse())),tinymce.each(r,function(e){if(!b.isBlock(e)||"BR"==e.nodeName){if(!i||"BR"==e.nodeName){if("BR"==e.nodeName&&(!e.nextSibling||b.isBlock(e.nextSibling)&&"BR"!=e.nextSibling.nodeName))return b.remove(e),!1;i=b.create("p"),c.push(i),e.parentNode.insertBefore(i,e)}return"BR"!=e.nodeName?i.appendChild(e):b.remove(e),e==l?!1:void 0}})}var o=C.getRng(!0),l=n(o),c=d();a(),tinymce.each(c,function(e){var n,i;i=e.previousSibling,i&&r(i)&&i.nodeName==t?(n=i,e=b.rename(e,"LI"),i.appendChild(e)):(n=b.create(t),e.parentNode.insertBefore(n,e),n.appendChild(e),e=b.rename(e,"LI")),m(n)}),i(l)}function v(){var e=n(C.getRng(!0));tinymce.each(c(),function(e){var t,n;for(t=e;t;t=t.parentNode)r(t)&&(n=t);u(n,e)}),i(e)}function y(e){var t=b.getParent(C.getStart(),"OL,UL");if(t)if(t.nodeName==e)v(e);else{var r=n(C.getRng(!0));m(b.rename(t,e)),i(r)}else g(e)}var b=e.dom,C=e.selection;t.backspaceDelete=function(e){function t(e,t){var n=e.startContainer,i=e.startOffset;if(3==n.nodeType&&(t?i<n.data.length:i>0))return n;for(var r=new tinymce.dom.TreeWalker(e.startContainer);n=r[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function a(e,t){var n,i,a=e.parentNode;for(r(t.lastChild)&&(i=t.lastChild),n=t.lastChild,n&&"BR"==n.nodeName&&e.hasChildNodes()&&b.remove(n);n=e.firstChild;)t.appendChild(n);i&&t.appendChild(i),b.remove(e),b.isEmpty(a)&&b.remove(a)}if(C.isCollapsed()){var o=b.getParent(C.getStart(),"LI");if(o){var s=C.getRng(!0),l=b.getParent(t(s,e),"LI");if(l&&l!=o){var c=n(s);return e?a(l,o):a(o,l),i(c),!0}if(!l&&!e&&v(o.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return p()?void 0:!0}),e.addCommand("Outdent",function(){return h()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){y("UL")}),e.addCommand("InsertOrderedList",function(){y("OL")})}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?t.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&t.backspaceDelete(!0)&&e.preventDefault()})});
\ No newline at end of file
Modified: ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/media/plugin.min.js
===================================================================
--- ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/media/plugin.min.js 2013-09-02 12:26:14 UTC (rev 11995)
+++ ThirdParty/xoopseditor/trunk/htdocs/class/xoopseditor/tinymce4/tinymce/js/tinymce/plugins/media/plugin.min.js 2013-09-03 09:02:03 UTC (rev 11996)
@@ -1 +1 @@
-tinymce.PluginManager.add("media",function(e,t){function n(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":""}function i(){function t(e){var t,a,r,o;t=n.find("#width")[0],a=n.find("#height")[0],r=t.value(),o=a.value(),n.find("#constrain")[0].checked()&&i&&s&&r&&o&&(e.control==t?(o=Math.round(r/i*o),a.value(o)):(r=Math.round(o/s*r),t.value(r))),i=r,s=o}var n,i,s,c;c=l(e.selection.getNode()),i=c.width,s=c.height,n=e.windowManager.open({title:"Insert/edit video",data:c,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){this.fromJSON(o(this.next().find("#embed").value()))},items:[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source"},{name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"},{name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:t},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:t},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}]},{title:"Embed",type:"panel",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(r(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:"},{type:"textbox",flex:1,name:"embed",value:a(),multiline:!0,label:"Source"}]}],onSubmit:function(){e.insertContent(r(this.toJSON()))}})}function a(){var t=e.selection.getNode();return t.getAttribute("data-mce-object")?e.selection.getContent():void 0}function r(i){var a="";return i.source1||(tinymce.extend(i,o(i.embed)),i.source1)?(i.source1=e.convertURL(i.source1,"source"),i.source2=e.convertURL(i.source2,"source"),i.source1mime=n(i.source1),i.source2mime=n(i.source2),i.poster=e.convertURL(i.poster,"poster"),i.flashPlayerUrl=e.convertURL(t+"/moxieplayer.swf","movie"),i.embed?a=s(i.embed,i,!0):(tinymce.each(c,function(e){var t,n,a;if(t=e.regex.exec(i.source1)){for(a=e.url,n=0;t[n];n++)a=a.replace("$"+n,function(){return t[n]});i.source1=a,i.type=e.type,i.width=e.w,i.height=e.h}}),i.width=i.width||300,i.height=i.height||150,tinymce.each(i,function(t,n){i[n]=e.dom.encode(t)}),"iframe"==i.type?a+='<iframe src="'+i.source1+'" width="'+i.width+'" height="'+i.height+'"></iframe>':-1!=i.source1mime.indexOf("audio")?e.settings.audio_template_callback?a=e.settings.audio_template_callback(i):a+='<audio controls="controls" src="'+i.source1+'">'+(i.source2?'\n<source src="'+i.source2+'"'+(i.source2mime?' type="'+i.source2mime+'"':"")+" />\n":"")+"</audio>":a=e.settings.video_template_callback?e.settings.video_template_callback(i):'<video width="'+i.width+'" height="'+i.height+'"'+(i.poster?' poster="'+i.poster+'"':"")+' controls="controls">\n'+'<source src="'+i.source1+'"'+(i.source1mime?' type="'+i.source1mime+'"':"")+" />\n"+(i.source2?'<source src="'+i.source2+'"'+(i.source2mime?' type="'+i.source2mime+'"':"")+" />\n":"")+"</video>"),a):""}function o(e){var t={};return new tinymce.html.SaxParser({validate:!1,special:"script,noscript",start:function(e,n){t.source1||"param"!=e||(t.source1=n.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t=tinymce.extend(n.map,t)),"source"==e&&(t.source1?t.source2||(t.source2=n.map.src):t.source1=n.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function l(t){return t.getAttribute("data-mce-object")?o(e.serializer.serialize(t,{selection:!0})):{}}function s(e,t,n){function i(e,t){var n,i,a,r;for(n in t)if(a=""+t[n],e.map[n])for(i=e.length;i--;)r=e[i],r.name==n&&(a?(e.map[n]=a,r.value=a):(delete e.map[n],e.splice(i,1)));else a&&(e.push({name:n,value:a}),e.map[n]=a)}var a=new tinymce.html.Writer,r=0;return new tinymce.html.SaxParser({validate:!1,special:"script,noscript",comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,o,l){switch(e){case"video":ca...
[truncated message content] |
|
From: <ce...@us...> - 2013-09-02 12:26:20
|
Revision: 11995
http://sourceforge.net/p/xoops/svn/11995
Author: cesag
Date: 2013-09-02 12:26:14 +0000 (Mon, 02 Sep 2013)
Log Message:
-----------
Solved bug into PM module readpmsg.php (escrime-info/slider84)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/docs/changelog.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/readpmsg.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-02 06:56:06 UTC (rev 11994)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-02 12:26:14 UTC (rev 11995)
@@ -20,6 +20,7 @@
- added link to Module's Admin after "Update" (currently only to XOOPS Modules section) (mamba)
- added placeholder for a link to upload test data, if available after installation (mamba)
- assigning "static" to functions in XoopsUserUtility class (mamba)
+- solved bug into PM module readpmsg.php (escrime-info/slider84)
===============================
2013/04/21: Version 2.5.6 Final
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/docs/changelog.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/docs/changelog.txt 2013-09-02 06:56:06 UTC (rev 11994)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/docs/changelog.txt 2013-09-02 12:26:14 UTC (rev 11995)
@@ -1,5 +1,6 @@
Version 1.09
-------------------
+- solved bug into readpmsg.php (escrime-info/slider84)
- updated code to make it consistent with other modules (mamba)
Version 1.08
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/readpmsg.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/readpmsg.php 2013-09-02 06:56:06 UTC (rev 11994)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/readpmsg.php 2013-09-02 12:26:14 UTC (rev 11995)
@@ -139,7 +139,7 @@
if (is_object($pm) && !empty($pm)) {
if ($pm->getVar('from_userid') != $GLOBALS['xoopsUser']->getVar('uid')) {
$reply_button = new XoopsFormButton('', 'send', _PM_REPLY);
- $reply_button->setExtra("onclick='javascript:openWithSelfMain(\"" . XOOPS_URL . "/modules/pm/pmlite.php?reply=1&msg_id={$msg_id}\", \"pmlite\", 565,500);'");
+ $reply_button->setExtra("onclick='javascript:openWithSelfMain(\"" . XOOPS_URL . "/modules/pm/pmlite.php?reply=1&msg_id=".$pm->getVar("msg_id")."\", \"pmlite\", 565,500);'");
$pmform->addElement($reply_button);
}
$pmform->addElement(new XoopsFormButton('', 'delete_message', _PM_DELETE, 'submit'));
|
|
From: <be...@us...> - 2013-09-02 06:56:09
|
Revision: 11994
http://sourceforge.net/p/xoops/svn/11994
Author: beckmi
Date: 2013-09-02 06:56:06 +0000 (Mon, 02 Sep 2013)
Log Message:
-----------
assigning "static" to functions in XoopsUserUtility class
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/userutility.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-08-31 22:17:30 UTC (rev 11993)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-09-02 06:56:06 UTC (rev 11994)
@@ -17,7 +17,9 @@
- added: check if 'date.timezone' is set in php.ini, if not, set it to UTC (cesag/mamba)
- assigned _SHORTDATESTRING to _CAL_FORMAT to have consistency in local languages (jcweb/guspel)
- fixed bug in calendar.js (mamba)
-- added link to Module's Admin after "Update" (currently only to XOOPS Modules section)
+- added link to Module's Admin after "Update" (currently only to XOOPS Modules section) (mamba)
+- added placeholder for a link to upload test data, if available after installation (mamba)
+- assigning "static" to functions in XoopsUserUtility class (mamba)
===============================
2013/04/21: Version 2.5.6 Final
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/userutility.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/userutility.php 2013-08-31 22:17:30 UTC (rev 11993)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/userutility.php 2013-09-02 06:56:06 UTC (rev 11994)
@@ -33,7 +33,7 @@
* @param mixed $user
* @return
*/
- function sendWelcome($user)
+ static function sendWelcome($user)
{
global $xoopsConfigUser, $xoopsConfig;
@@ -79,7 +79,7 @@
*
* @return
*/
- function validate()
+ static function validate()
{
global $xoopsUser;
@@ -214,7 +214,7 @@
* @param bool $asString requiring integer or dotted string
* @return mixed string or integer value for the IP
*/
- function getIP($asString = false)
+ static function getIP($asString = false)
{
// Gets the proxy ip sent by the user
$proxy_ip = '';
@@ -258,7 +258,7 @@
* @param mixed $linked
* @return
*/
- function getUnameFromIds($uid, $usereal = false, $linked = false)
+ static function getUnameFromIds($uid, $usereal = false, $linked = false)
{
if (!is_array($uid)) {
$uid = array($uid);
@@ -299,7 +299,7 @@
* @param mixed $linked
* @return
*/
- function getUnameFromId($userid, $usereal = false, $linked = false)
+ static function getUnameFromId($userid, $usereal = false, $linked = false)
{
$myts =& MyTextSanitizer::getInstance();
$userid = intval($userid);
|