|
From: <be...@us...> - 2013-08-06 11:46:40
|
Revision: 11881
http://sourceforge.net/p/xoops/svn/11881
Author: beckmi
Date: 2013-08-06 11:46:35 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
making function loadConfig in MyTextSanitizerExtension as static
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php 2013-08-05 21:28:45 UTC (rev 11880)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/module.textsanitizer.php 2013-08-06 11:46:35 UTC (rev 11881)
@@ -49,7 +49,7 @@
* @param string $path
* @return string
*/
- function loadConfig($path = null)
+ static function loadConfig($path = null)
{
$ts =& MyTextSanitizer::getInstance();
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
@@ -71,7 +71,7 @@
if (file_exists($path . '/config.custom.php')) {
$config_custom = include $path . '/config.custom.php';
}
- return $this->mergeConfig($config_default, $config_custom);
+ return self::mergeConfig($config_default, $config_custom);
}
/**
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php 2013-08-05 21:28:45 UTC (rev 11880)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/textsanitizer/flash/flash.php 2013-08-06 11:46:35 UTC (rev 11881)
@@ -51,7 +51,7 @@
}
static function myCallback($match) {
- return self::decode( $match[5], $match[3], $match[4] );
+ return self::decode( $match[5], $match[3], $match[4] );
}
function load(&$ts)
@@ -69,8 +69,8 @@
function decode($url, $width, $height)
{
-//TODO check on the loadConfig to enable it
-// $config = parent::loadConfig(dirname(__FILE__));
+ $config = parent::loadConfig(dirname(__FILE__));
+
if ((empty($width) || empty($height)) && !empty($config['detect_dimension'])) {
if (!$dimension = @getimagesize($url)) {
return "<a href='{$url}' rel='external' title=''>{$url}</a>";
|