|
From: <be...@us...> - 2015-06-20 20:30:32
|
Revision: 13092
http://sourceforge.net/p/xoops/svn/13092
Author: beckmi
Date: 2015-06-20 20:30:30 +0000 (Sat, 20 Jun 2015)
Log Message:
-----------
added possibility to include full icon URL in module's menu.php
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/default/default.php
XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/zetadigme/zetadigme.php
Modified: XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-06-16 21:08:34 UTC (rev 13091)
+++ XoopsCore/branches/2.5.x/2.5.8/docs/changelog.250.txt 2015-06-20 20:30:30 UTC (rev 13092)
@@ -19,6 +19,8 @@
- patch from Xoops 2.5.6 XoopsFormSelectUser is not compatible with some old modules like xNews (luciorota)
- fix "setExtra" in moduleadmin.php, Admin buttons can now use "onClick" assignments (mamba)
- updated XOOPS copyright to 2015, changed links to http://xoops.org (mamba)
+- replaced intval() with (int) (mamba)
+- added possibility to include full icon URL in module's menu.php (mamba)
Security fixes
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2015-06-16 21:08:34 UTC (rev 13091)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2015-06-20 20:30:30 UTC (rev 13092)
@@ -132,7 +132,10 @@
foreach (array_keys( $this->_obj->adminmenu) as $i) {
if ($this->_obj->adminmenu[$i]['link'] != 'admin/index.php') {
$ret .= "<a href=\"../" . $this->_obj->adminmenu[$i]['link'] . "\" title=\"" . (isset($this->_obj->adminmenu[$i]['desc']) ? $this->_obj->adminmenu[$i]['desc'] : '') . "\">";
- $ret .= "<img src=\"" . $path . $this->_obj->adminmenu[$i]['icon']. "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />";
+ //$ret .= "<img src=\"" . $path . $this->_obj->adminmenu[$i]['icon']. "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />";
+ //mb for direct URL access to icons in modules Admin
+ $ret .= "<img src=\"" . ((filter_var($this->_obj->adminmenu[$i]['icon'], FILTER_VALIDATE_URL)) ? $this->_obj->adminmenu[$i]['icon'] : $path . $this->_obj->adminmenu[$i]['icon']) . "\" alt=\"" . $this->_obj->adminmenu[$i]['title'] . "\" />";
+
$ret .= "<span>" . $this->_obj->adminmenu[$i]['title'] . "</span>";
$ret .= "</a>";
}
@@ -177,9 +180,12 @@
$ret = "<div class=\"aligncenter\">\n";
}
$ret .= "<div class=\"xo-buttons\">\n";
- foreach (array_keys( $this -> _itemButton) as $i) {
- $ret .= "<a class='ui-corner-all tooltip' href='" . $this -> _itemButton[$i]['link'] . "' title='" . $this -> _itemButton[$i]['title'] . "' " . $this -> _itemButton[$i]['extra']. ">";
- $ret .= "<img src='" . $path . $this -> _itemButton[$i]['icon'] . "' title='" . $this -> _itemButton[$i]['title'] . "' alt='" . $this -> _itemButton[$i]['title'] . "' />" . $this -> _itemButton[$i]['title'] ;
+ foreach (array_keys($this->_itemButton) as $i) {
+ $ret .= "<a class='ui-corner-all tooltip' href='" . $this->_itemButton[$i]['link'] . "' title='" . $this->_itemButton[$i]['title'] . "' " . $this->_itemButton[$i]['extra'] . ">";
+ $ret .= "<img src='"
+ //. $path . $this -> _itemButton[$i]['icon']
+ //mb for direct URL access to icons in modules Admin
+ . ((filter_var($this->_itemButton[$i]['icon'], FILTER_VALIDATE_URL)) ? $this->_itemButton[$i]['icon'] : $path . $this->_itemButton[$i]['icon']) . "' title='" . $this->_itemButton[$i]['title'] . "' alt='" . $this->_itemButton[$i]['title'] . "' />" . $this->_itemButton[$i]['title'];
$ret .= "</a>\n";
$ret .= $delimeter;
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/default/default.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/default/default.php 2015-06-16 21:08:34 UTC (rev 13091)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/default/default.php 2015-06-20 20:30:30 UTC (rev 13092)
@@ -135,7 +135,9 @@
$mod_options = $xoopsModule->getAdminMenu();
foreach (array_keys($mod_options) as $item) {
$mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link'];
- $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon'];
+// $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon'];
+ //mb for direct URL access to icons in modules Admin
+ $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : (filter_var($mod_options[$item]['icon'], FILTER_VALIDATE_URL) ? $mod_options[$item]['icon'] : (XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon']));
}
}
Modified: XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/zetadigme/zetadigme.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/zetadigme/zetadigme.php 2015-06-16 21:08:34 UTC (rev 13091)
+++ XoopsCore/branches/2.5.x/2.5.8/htdocs/modules/system/themes/zetadigme/zetadigme.php 2015-06-20 20:30:30 UTC (rev 13092)
@@ -174,7 +174,9 @@
$mod_options = $xoopsModule->getAdminMenu();
foreach (array_keys($mod_options) as $item) {
$mod_options[$item]['link'] = empty($mod_options[$item]['absolute']) ? XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['link'] : $mod_options[$item]['link'];
- $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon'];
+ //$mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon'];
+ //mb for direct URL access to icons in modules Admin
+ $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' : (filter_var($mod_options[$item]['icon'], FILTER_VALIDATE_URL) ? $mod_options[$item]['icon'] : (XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon']));
}
}
$tpl->assign('mod_options', $mod_options);
|