From: <tr...@us...> - 2011-10-30 20:35:34
|
Revision: 8006 http://xoops.svn.sourceforge.net/xoops/?rev=8006&view=rev Author: trabis Date: 2011-10-30 20:35:25 +0000 (Sun, 30 Oct 2011) Log Message: ----------- Some more refactoring... Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/xoopsmodel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/mms/mms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/rtsp/rtsp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wmp/wmp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcparser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/saxparser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/xmltaghandler.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/comment.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/formdhtmltextarea.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -69,7 +69,7 @@ /** * Tries to find and include a file for a cache engine and returns object instance * - * @param $name Name of the engine + * @param string $name Name of the engine * @return XoopsCacheEngine|bool * @access private */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -44,7 +44,6 @@ { $sql = trim($sql); $sql_len = strlen($sql); - $char = ''; $string_start = ''; $in_string = false; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -590,7 +590,6 @@ { $path = $this->slashTerm($path); if (is_dir($path) === true) { - $files = glob($path . '*', GLOB_NOSORT); $normal_files = glob($path . '*'); $hidden_files = glob($path . '\.?*'); $files = array_merge($normal_files, $hidden_files); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/xoopsmodel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/xoopsmodel.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/xoopsmodel.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -68,7 +68,7 @@ $className = 'XoopsModel' . ucfirst($name); $handler = new $className(); } else { - if (Xoops::getInstance()->load('model', 'framework')) { + if (XoopsLoad::load('model', 'framework')) { $handler = XoopsModel::loadHandler($name); } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/mms/mms.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/mms/mms.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/mms/mms.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -28,7 +28,7 @@ */ public function encode($textarea_id) { - $code = "<img src='{$this->image_path}/mmssrc.gif' alt='" . _XOOPS_FORM_ALTMMS . "' onclick='xoopsCodeMms(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; + $code = "<img src='{$this->image_path}/mmssrc.gif' alt='" . _XOOPS_FORM_ALTMMS . "' onclick='xoopsCodeMms(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERMMSURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; $javascript = <<<EOH function xoopsCodeMms(id,enterMmsPhrase, enterMmsHeightPhrase, enterMmsWidthPhrase) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/rtsp/rtsp.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/rtsp/rtsp.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/rtsp/rtsp.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -28,7 +28,7 @@ */ public function encode($textarea_id) { - $code = "<img src='{$this->image_path}/rtspimg.gif' alt='" . _XOOPS_FORM_ALTRTSP . "' onclick='xoopsCodeRtsp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERRTSPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; + $code = "<img src='{$this->image_path}/rtspimg.gif' alt='" . _XOOPS_FORM_ALTRTSP . "' onclick='xoopsCodeRtsp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERRTSPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; $javascript = <<<EOH function xoopsCodeRtsp(id,enterRtspPhrase, enterRtspHeightPhrase, enterRtspWidthPhrase){ var selection = xoopsGetSelect(id); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wmp/wmp.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wmp/wmp.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wmp/wmp.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -28,7 +28,7 @@ */ public function encode($textarea_id) { - $code = "<img src='{$this->image_path}/wmp.gif' alt='" . _XOOPS_FORM_ALTWMP . "' onclick='xoopsCodeWmp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; + $code = "<img src='{$this->image_path}/wmp.gif' alt='" . _XOOPS_FORM_ALTWMP . "' onclick='xoopsCodeWmp(\"{$textarea_id}\",\"" . htmlspecialchars(_XOOPS_FORM_ENTERWMPURL, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERHEIGHT, ENT_QUOTES) . "\",\"" . htmlspecialchars(_XOOPS_FORM_ALT_ENTERWIDTH, ENT_QUOTES) . "\");' onmouseover='style.cursor=\"hand\"'/> "; $javascript = <<<EOH function xoopsCodeWmp(id, enterWmpPhrase, enterWmpHeightPhrase, enterWmpWidthPhrase) { var selection = xoopsGetSelect(id); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -622,8 +622,8 @@ /** * Add StyleSheet or CSS code to the document head * - * @param string $src path to .css file - * @param array $attributes name => value paired array of attributes such as title + * @param string|null $src path to .css file + * @param array|null $attributes name => value paired array of attributes such as title * @param string $content CSS code to output between the <style> tags (in case $src is empty) * @return void */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcparser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcparser.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcparser.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -28,122 +28,82 @@ // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // // Project: The XOOPS Project // // ------------------------------------------------------------------------- // -if (!defined('XOOPS_ROOT_PATH')) { - die("XOOPS root path not defined"); -} -require_once XOOPS_ROOT_PATH.'/class/xml/saxparser.php'; -require_once XOOPS_ROOT_PATH.'/class/xml/xmltaghandler.php'; -/** -* Class RSS Parser -* -* This class offers methods to parse RSS Files -* -* @link http://www.xoops.org/ Latest release of this class -* @package class -* @copyright Copyright (c) 2001 xoops.org. All rights reserved. -* @author Kazumi Ono <on...@xo...> -* @version $Id$ -* @access public -*/ +defined('XOOPS_ROOT_PATH') or die("XOOPS root path not defined"); +/** + * Class RSS Parser + * + * This class offers methods to parse RSS Files + * + * @link http://www.xoops.org/ Latest release of this class + * @package class + * @copyright Copyright (c) 2001 xoops.org. All rights reserved. + * @author Kazumi Ono <on...@xo...> + * @version $Id$ + * @access public + */ class XoopsXmlRpcParser extends SaxParser { /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_param; /** - * - * - * - * - * @access private - * @var string - */ + * @access private + * @var string + */ var $_methodName; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_tempName; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_tempValue; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_tempMember; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_tempStruct; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_tempArray; /** - * - * - * - * - * @access private - * @var array - */ + * @access private + * @var array + */ var $_workingLevel = array(); /** - * Constructor of the class - * - * - * - * - * @access - * @author - * @see - */ + * Constructor of the class + * + * @param $input + * @return void + */ function XoopsXmlRpcParser(&$input) { - $this->SaxParser($input); + parent::__construct($input); $this->addTagHandler(new RpcMethodNameHandler()); $this->addTagHandler(new RpcIntHandler()); $this->addTagHandler(new RpcDoubleHandler()); @@ -159,42 +119,26 @@ } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param string $name + * @return void + */ function setTempName($name) { $this->_tempName[$this->getWorkingLevel()] = $name; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getTempName() { return $this->_tempName[$this->getWorkingLevel()]; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param mixed $value + * @return void + */ function setTempValue($value) { if (is_array($value)) { @@ -216,126 +160,75 @@ } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return array + */ function getTempValue() { return $this->_tempValue; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function resetTempValue() { unset($this->_tempValue); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param string $name + * @param mixed $value + * @return void + */ function setTempMember($name, $value) { $this->_tempMember[$this->getWorkingLevel()][$name] = $value; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return mixed + */ function getTempMember() { return $this->_tempMember[$this->getWorkingLevel()]; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function resetTempMember() { $this->_tempMember[$this->getCurrentLevel()] = array(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function setWorkingLevel() { array_push($this->_workingLevel, $this->getCurrentLevel()); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return mixed + */ function getWorkingLevel() { return $this->_workingLevel[count($this->_workingLevel) - 1]; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function releaseWorkingLevel() { array_pop($this->_workingLevel); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param $member + * @return void + */ function setTempStruct($member) { $key = key($member); @@ -343,126 +236,75 @@ } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return + */ function getTempStruct() { return $this->_tempStruct[$this->getWorkingLevel()]; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function resetTempStruct() { $this->_tempStruct[$this->getCurrentLevel()] = array(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param $value + * @return void + */ function setTempArray($value) { $this->_tempArray[$this->getWorkingLevel()][] = $value; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return + */ function getTempArray() { return $this->_tempArray[$this->getWorkingLevel()]; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return void + */ function resetTempArray() { $this->_tempArray[$this->getCurrentLevel()] = array(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param $methodName + * @return void + */ function setMethodName($methodName) { $this->_methodName = $methodName; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getMethodName() { return $this->_methodName; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @param $value + * @return void + */ function setParam($value) { $this->_param[] = $value; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return array + */ function getParam() { return $this->_param; @@ -474,29 +316,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'methodName'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $parser->setMethodName($data); } @@ -506,13 +338,7 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see + * @return array */ function getName() { @@ -520,15 +346,11 @@ } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $parser->setTempValue(intval($data)); } @@ -538,29 +360,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'double'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $data = (float)$data; $parser->setTempValue($data); @@ -571,29 +383,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'boolean'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $data = (boolean)$data; $parser->setTempValue($data); @@ -604,29 +406,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'string'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $parser->setTempValue(strval($data)); } @@ -636,29 +428,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'dateTime.iso8601'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $matches = array(); if (!preg_match("/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})$/", $data, $matches)) { @@ -673,29 +455,19 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'base64'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { $parser->setTempValue(base64_decode($data)); } @@ -705,36 +477,26 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'name'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { switch ($parser->getParentTag()) { - case 'member': - $parser->setTempName($data); - break; - default: - break; + case 'member': + $parser->setTempName($data); + break; + default: + break; } } } @@ -744,79 +506,60 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'value'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleCharacterData(&$parser, &$data) + * @param XoopsXmlRpcParser $parser + * @param $data + * @return void + */ + function handleCharacterData(XoopsXmlRpcParser &$parser, &$data) { switch ($parser->getParentTag()) { - case 'member': - $parser->setTempValue($data); - break; - case 'data': - case 'array': - $parser->setTempValue($data); - break; - default: - break; + case 'member': + $parser->setTempValue($data); + break; + case 'data': + case 'array': + $parser->setTempValue($data); + break; + default: + break; } } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleBeginElement(&$parser, &$attributes) + * @param XoopsXmlRpcParser $parser + * @param $attributes + * @return void + */ + function handleBeginElement(XoopsXmlRpcParser &$parser, &$attributes) { //$parser->resetTempValue(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleEndElement(&$parser) + * @param XoopsXmlRpcParser $parser + * @return void + */ + function handleEndElement(XoopsXmlRpcParser &$parser) { switch ($parser->getCurrentTag()) { - case 'member': - $parser->setTempMember($parser->getTempName(), $parser->getTempValue()); - break; - case 'array': - case 'data': - $parser->setTempArray($parser->getTempValue()); - break; - default: - $parser->setParam($parser->getTempValue()); - break; + case 'member': + $parser->setTempMember($parser->getTempName(), $parser->getTempValue()); + break; + case 'array': + case 'data': + $parser->setTempArray($parser->getTempValue()); + break; + default: + $parser->setParam($parser->getTempValue()); + break; } $parser->resetTempValue(); } @@ -826,44 +569,29 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'member'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleBeginElement(&$parser, &$attributes) + * @param XoopsXmlRpcParser $parser + * @param $attributes + * @return void + */ + function handleBeginElement(XoopsXmlRpcParser &$parser, &$attributes) { $parser->setWorkingLevel(); $parser->resetTempMember(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleEndElement(&$parser) + * @param XoopsXmlRpcParser $parser + * @return void + */ + function handleEndElement(XoopsXmlRpcParser &$parser) { $member = $parser->getTempMember(); $parser->releaseWorkingLevel(); @@ -875,44 +603,29 @@ { /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'array'; } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see + * @param XoopsXmlRpcParser $parser + * @param $attributes + * @return void */ - function handleBeginElement(&$parser, &$attributes) + function handleBeginElement(XoopsXmlRpcParser &$parser, &$attributes) { $parser->setWorkingLevel(); $parser->resetTempArray(); } /** - * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File. - * - * @access - * @author - * @param - * @return - * @see - */ - function handleEndElement(&$parser) + * @param XoopsXmlRpcParser $parser + * @return void + */ + function handleEndElement(XoopsXmlRpcParser &$parser) { $parser->setTempValue($parser->getTempArray()); $parser->releaseWorkingLevel(); @@ -923,47 +636,31 @@ { /** - * - * - * @access - * @author - * @param - * @return - * @see - */ + * @return string + */ function getName() { return 'struct'; } /** - * - * - * @access - * @author - * @param - * @return - * @see - */ - function handleBeginElement(&$parser, &$attributes) + * @param XoopsXmlRpcParser $parser + * @param $attributes + * @return void + */ + function handleBeginElement(XoopsXmlRpcParser &$parser, &$attributes) { $parser->setWorkingLevel(); $parser->resetTempStruct(); } /** - * - * - * @access - * @author - * @param - * @return - * @see - */ - function handleEndElement(&$parser) + * @param XoopsXmlRpcParser $parser + * @return void + */ + function handleEndElement(XoopsXmlRpcParser &$parser) { $parser->setTempValue($parser->getTempStruct()); $parser->releaseWorkingLevel(); } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/saxparser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/saxparser.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/saxparser.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -1,17 +1,17 @@ <?php // $Id$ /******************************************************************************* - Location: <strong>xml/SaxParser.class</strong><br> - <br> - Provides basic functionality to read and parse XML documents. Subclasses - must implement all the their custom handlers by using add* function methods. - They may also use the handle*() methods to parse a specific XML begin and end - tags, but this is not recommended as it is more difficult.<br> - <br> - Copyright © 2001 eXtremePHP. All rights reserved.<br> - <br> - @author Ken Egervari<br> -*******************************************************************************/ +Location: <strong>xml/SaxParser.class</strong><br> +<br> +Provides basic functionality to read and parse XML documents. Subclasses +must implement all the their custom handlers by using add* function methods. +They may also use the handle*() methods to parse a specific XML begin and end +tags, but this is not recommended as it is more difficult.<br> +<br> +Copyright © 2001 eXtremePHP. All rights reserved.<br> +<br> +@author Ken Egervari<br> + *******************************************************************************/ class SaxParser { @@ -32,12 +32,14 @@ var $errors = array(); - /**************************************************************************** - Creates a SaxParser object using a FileInput to represent the stream - of XML data to parse. Use the static methods createFileInput or - createStringInput to construct xml input source objects to supply - to the constructor, or the implementor can construct them individually. - ****************************************************************************/ + /** + * Creates a SaxParser object using a FileInput to represent the stream + * of XML data to parse. Use the static methods createFileInput or + * createStringInput to construct xml input source objects to supply + * to the constructor, or the implementor can construct them individually. + * + * @param $input + */ function __construct(&$input) { $this->level = 0; @@ -46,7 +48,7 @@ $this->input = $input; $this->setCaseFolding(false); $this->useUtfEncoding(); - xml_set_element_handler($this->parser, 'handleBeginElement','handleEndElement'); + xml_set_element_handler($this->parser, 'handleBeginElement', 'handleEndElement'); xml_set_character_data_handler($this->parser, 'handleCharacterData'); xml_set_processing_instruction_handler($this->parser, 'handleProcessingInstruction'); xml_set_default_handler($this->parser, 'handleDefault'); @@ -65,9 +67,9 @@ } /**************************************************************************** - * @param $isCaseFolding - * @returns void - ****************************************************************************/ + * @param $isCaseFolding + * @returns void + ****************************************************************************/ function setCaseFolding($isCaseFolding) { assert(is_bool($isCaseFolding)); @@ -77,8 +79,8 @@ } /**************************************************************************** - * @returns void - ****************************************************************************/ + * @returns void + ****************************************************************************/ function useIsoEncoding() { $this->targetEncoding = 'ISO-8859-1'; @@ -86,8 +88,8 @@ } /**************************************************************************** - * @returns void - ****************************************************************************/ + * @returns void + ****************************************************************************/ function useAsciiEncoding() { $this->targetEncoding = 'US-ASCII'; @@ -95,8 +97,8 @@ } /**************************************************************************** - * @returns void - ****************************************************************************/ + * @returns void + ****************************************************************************/ function useUtfEncoding() { $this->targetEncoding = 'UTF-8'; @@ -104,9 +106,9 @@ } /**************************************************************************** - Returns the name of the xml tag being parsed - * @returns string - ****************************************************************************/ + Returns the name of the xml tag being parsed + * @returns string + ****************************************************************************/ function getCurrentTag() { return $this->tags[count($this->tags) - 1]; @@ -121,14 +123,13 @@ } - /*--------------------------------------------------------------------------- Parser methods ---------------------------------------------------------------------------*/ - /**************************************************************************** - * @returns void - ****************************************************************************/ + /** + * @return bool + */ function parse() { if (!is_resource($this->input)) { @@ -154,24 +155,23 @@ } /**************************************************************************** - * @returns void - ****************************************************************************/ + * @returns void + ****************************************************************************/ function free() { xml_parser_free($this->parser); if (!method_exists($this, '__destruct')) { unset($this); - } - else { + } else { $this->__destruct(); } } - /**************************************************************************** - * @private - * @returns string - ****************************************************************************/ + /** + * @private + * @return string + */ function getXmlError() { return sprintf("XmlParse error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser)); @@ -181,16 +181,12 @@ Custom Handler Methods ---------------------------------------------------------------------------*/ - /**************************************************************************** - Adds a callback function to be called when a tag is encountered.<br> - Functions that are added must be of the form:<br> - <strong>functionName( $attributes )</strong> - * @param $tagName string. The name of the tag currently being parsed. - * @param $functionName string. The name of the function in XmlDocument's - subclass. - * @returns void - ****************************************************************************/ - function addTagHandler(&$tagHandler) + /** + * Adds a callback function to be called when a tag is encountered.<br> + * @param XmlTagHandler $tagHandler + * @return void + */ + function addTagHandler(XmlTagHandler &$tagHandler) { $name = $tagHandler->getName(); if (is_array($name)) { @@ -208,15 +204,15 @@ ---------------------------------------------------------------------------*/ /**************************************************************************** - Callback function that executes whenever a the start of a tag - occurs when being parsed. - * @param $parser int. The handle to the parser. - * @param $tagName string. The name of the tag currently being parsed. - * @param $attributesArray attay. The list of attributes associated with - the tag. - * @private - * @returns void - ****************************************************************************/ + Callback function that executes whenever a the start of a tag + occurs when being parsed. + * @param $parser int. The handle to the parser. + * @param $tagName string. The name of the tag currently being parsed. + * @param $attributesArray attay. The list of attributes associated with + the tag. + * @private + * @returns void + ****************************************************************************/ function handleBeginElement($parser, $tagName, $attributesArray) { array_push($this->tags, $tagName); @@ -224,150 +220,173 @@ if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) { $this->tagHandlers[$tagName]->handleBeginElement($this, $attributesArray); } else { - $this->handleBeginElementDefault($parser, $tagName, $attributesArray); - } + $this->handleBeginElementDefault($parser, $tagName, $attributesArray); + } } /**************************************************************************** - Callback function that executes whenever the end of a tag - occurs when being parsed. - * @param $parser int. The handle to the parser. - * @param $tagName string. The name of the tag currently being parsed. - * @private - * @returns void - ****************************************************************************/ + Callback function that executes whenever the end of a tag + occurs when being parsed. + * @param $parser int. The handle to the parser. + * @param $tagName string. The name of the tag currently being parsed. + * @private + * @returns void + ****************************************************************************/ function handleEndElement($parser, $tagName) { array_pop($this->tags); if (isset($this->tagHandlers[$tagName]) && is_subclass_of($this->tagHandlers[$tagName], 'xmltaghandler')) { $this->tagHandlers[$tagName]->handleEndElement($this); } else { - $this->handleEndElementDefault($parser, $tagName); - } + $this->handleEndElementDefault($parser, $tagName); + } $this->level--; } /**************************************************************************** - Callback function that executes whenever character data is encountered - while being parsed. - * @param $parser int. The handle to the parser. - * @param $data string. Character data inside the tag - * @returns void - ****************************************************************************/ + Callback function that executes whenever character data is encountered + while being parsed. + * @param $parser int. The handle to the parser. + * @param $data string. Character data inside the tag + * @returns void + ****************************************************************************/ function handleCharacterData($parser, $data) { $tagHandler = $this->tagHandlers[$this->getCurrentTag()]; if (isset($tagHandler) && is_subclass_of($tagHandler, 'xmltaghandler')) { $tagHandler->handleCharacterData($this, $data); } else { - $this->handleCharacterDataDefault($parser, $data); - } + $this->handleCharacterDataDefault($parser, $data); + } } - /**************************************************************************** - * @param $parser int. The handle to the parser. - * @returns void - ****************************************************************************/ + /** + * @param $parser int. The handle to the parser. + * @param $target + * @param $data + * @return void + */ function handleProcessingInstruction($parser, &$target, &$data) { -// if($target == 'php') { -// eval($data); -// } + // if($target == 'php') { + // eval($data); + // } } - /**************************************************************************** - * @param $parser int. The handle to the parser. - * @returns void - ****************************************************************************/ + /** + * @param $parser + * @param $data + * @return void + */ function handleDefault($parser, $data) { } - /**************************************************************************** - * @param $parser int. The handle to the parser. - * @returns void - ****************************************************************************/ + /** + * @param $parser + * @param $entityName + * @param $base + * @param $systemId + * @param $publicId + * @param $notationName + * @return void + */ function handleUnparsedEntityDecl($parser, $entityName, $base, $systemId, $publicId, $notationName) { } - /**************************************************************************** - * @param $parser int. The handle to the parser. - * @returns void - ****************************************************************************/ + /** + * @param $parser + * @param $notationName + * @param $base + * @param $systemId + * @param $publicId + * @return void + */ function handleNotationDecl($parser, $notationName, $base, $systemId, $publicId) { } - /**************************************************************************** - * @param $parser int. The handle to the parser. - * @returns void - ****************************************************************************/ + /** + * @param $parser + * @param $openEntityNames + * @param $base + * @param $systemId + * @param $publicId + * @return void + */ function handleExternalEntityRef($parser, $openEntityNames, $base, $systemId, $publicId) { } - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleBeginElementDefault($parser, $tagName, $attributesArray) - { - } + /** + * The default tag handler method for a tag with no handler + * + * @param $parser + * @param $tagName + * @param $attributesArray + * @return void + */ + function handleBeginElementDefault($parser, $tagName, $attributesArray) + { + } - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleEndElementDefault($parser, $tagName) - { - } + /** + * The default tag handler method for a tag with no handler + * + * @param $parser + * @param $tagName + * @return void + */ + function handleEndElementDefault($parser, $tagName) + { + } - /** - * The default tag handler method for a tag with no handler - * - * @abstract - */ - function handleCharacterDataDefault($parser, $data) - { - } + /** + * The default tag handler method for a tag with no handler + * + * @abstract + * + * @param $parser + * @param $data + * @return void + */ + function handleCharacterDataDefault($parser, $data) + { + } - /** - * Sets error messages - * - * @param $error string an error message - */ + /** + * Sets error messages + * + * @param $error string an error message + */ function setErrors($error) { $this->errors[] = trim($error); } - /** - * Gets all the error messages - * - * @param $ashtml bool return as html? - * @return mixed - */ + /** + * Gets all the error messages + * + * @param $ashtml bool return as html? + * @return mixed + */ function getErrors($ashtml = true) { if (!$ashtml) { return $this->errors; } else { - $ret = ''; - if (count($this->errors) > 0) { - foreach ($this->errors as $error) { - $ret .= $error.'<br />'; - } - } - return $ret; + $ret = ''; + if (count($this->errors) > 0) { + foreach ($this->errors as $error) { + $ret .= $error . '<br />'; + } + } + return $ret; } } -} - -?> +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/xmltaghandler.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/xmltaghandler.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/xmltaghandler.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -14,7 +14,8 @@ { /** * @abstract - * @return void + * + * @return array|string */ function getName() {} Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -50,14 +50,6 @@ */ class XoopsRank extends XoopsObject { - /** - * Construct - * - */ - function __construct() - { - $this->XoopsRank(); - } /** * Xoops Rank @@ -66,7 +58,6 @@ */ function XoopsRank() { - $this->XoopsObject(); $this->initVar('rank_id', XOBJ_DTYPE_INT, null, false); $this->initVar('rank_title', XOBJ_DTYPE_TXTBOX, null, false); $this->initVar('rank_min', XOBJ_DTYPE_INT, 0); @@ -89,21 +80,10 @@ */ function __construct(&$db) { - $this->XoopsRankHandler($db); + parent::__construct($db); } /** - * Enter Xoops Ranks Handler - * - * @param object $db - * @return XoopsRankHandler - */ - function XoopsRankHandler(&$db) - { - $this->XoopsObjectHandler($db); - } - - /** * Create Object * * @param bool $isNew @@ -181,23 +161,15 @@ */ class XoUser extends XoopsUser { - /** - * Enter Constructor - * - */ - function __construct() - { - $this->XoUser(); - } /** * XoUser * * @return XoUser */ - function XoUser() + function __construct() { - $this->XoopsUser(); + parent::__construct(); $unsets = array( "actkey" , "pass" , @@ -224,21 +196,10 @@ */ function __construct(&$db) { - $this->XoUserHandler($db); + parent::__construct($db); } /** - * Enter description here... - * - * @param object $db - * @return XoUserHandler - */ - function XoUserHandler(&$db) - { - $this->XoopsObjectHandler($db); - } - - /** * Create * * @param bool $isNew @@ -256,11 +217,11 @@ /** * Get Count * - * @param array $criteria + * @param CriteriaElement|null $criteria * @param array $groups - * @return int + * @return */ - function getCount($criteria = null, $groups = array()) + function getCount(CriteriaElement $criteria = null, $groups = array()) { if (!is_array($groups)) { $groups = array( @@ -286,11 +247,11 @@ /** * GetAll * - * @param array $criteria + * @param CriteriaElement|null $criteria * @param array $groups - * @return object + * @return array */ - function getAll($criteria = null, $groups = array()) + function getAll(CriteriaElement $criteria = null, $groups = array()) { if (!is_array($groups)) { $groups = array( Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -375,8 +375,8 @@ * @param array $category Array of category info * @param array $event Array of event info * @param string $type The particular name to generate - * return string - **/ + * @return bool|string + */ function notificationGenerateConfig(&$category, &$event, $type) { switch ($type) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -15,6 +15,7 @@ * @since 2.0.0 * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); $xoops = Xoops::getInstance(); @@ -38,12 +39,13 @@ $criteria = new CriteriaCompo(); $criteria->add(new Criteria('hassearch', 1)); $criteria->add(new Criteria('isactive', 1)); - if (!empty($available_modules)) { + if (isset($available_modules) && !empty($available_modules)) { $criteria->add(new Criteria('mid', '(' . implode(',', $available_modules) . ')', 'IN')); } $module_handler = $xoops->getModuleHandler(); $mods_checkbox->addOptionArray($module_handler->getNameList($criteria)); } else { + /* @var $module XoopsModule */ foreach ($modules as $mid => $module) { $module_array[$mid] = $module->getVar('name'); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2011-10-30 19:23:16 UTC (rev 8005) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2011-10-30 20:35:25 UTC (rev 8006) @@ -376,7 +376,7 @@ $block = array(); if (!$this->isCustom()) { // get block display function - $show_func = (string) $this->getVar('show_func'); + $show_func = (string)$this->getVar('show_func'); if (!$show_func) { return false; } @@ -425,6 +425,8 @@ $this->setVar('visible', 1); $op = 'save'; } else { + $title = ''; + $modules = array(); // Search modules /* @var $blocklinkmodule_handler SystemBlocklinkmoduleHandler */ $blocklinkmodule_handler = $xoops->getHandler('blocklinkmodule', 'system'); @@ -459,11 +461,10 @@ // Side position $side_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'side', $this->getVar('side')); $side_select->addOptionArray(array( - 0 => _AM_SYSTEM_BLOCKS_SBLEFT, 1 => _AM_SYSTEM_BLOCKS_SBRIGHT, - 3 => _AM_SYSTEM_BLOCKS_CBLEFT, 4 => _AM_SYSTEM_BLOCKS_CBRIGHT, - 5 => _AM_SYSTEM_BLOCKS_CBCENTER, 7 => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT, - 8 => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT, 9 => _AM_SYSTEM_BLOCKS_CBBOTTOM - )); + 0 => _AM_SYSTEM_BLOCKS_SBLEFT, 1 => _AM_SYSTEM_BLOCKS_SBRIGHT, 3 => _AM_SYSTEM_BLOCKS_CBLEFT, + 4 => _AM_SYSTEM_BLOCKS_CBRIGHT, 5 => _AM_SYSTEM_BLOCKS_CBCENTER, 7 => _AM_SYSTEM_BLOCKS_CBBOTTOMLEFT, + 8 => _AM_SYSTEM_BLOCKS_CBBOTTOMRIGHT, 9 => _AM_SYSTEM_BLOCKS_CBBOTTOM + )); $form->addElement($side_select); // Order $form->addElement(new XoopsFormText(_AM_SYSTEM_BLOCKS_WEIGHT, 'weight', 2, 5, $this->getVar('weight'))); @@ -494,9 +495,9 @@ if (in_array($editor_configs["editor"], array('dhtmltextarea', 'textarea'))) { $ctype_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'c_type', $this->getVar('c_type')); $ctype_select->addOptionArray(array( - 'H' => _AM_SYSTEM_BLOCKS_HTML, 'P' => _AM_SYSTEM_BLOCKS_PHP, - 'S' => _AM_SYSTEM_BLOCKS_AFWSMILE, 'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE - )); + 'H' => _AM_SYSTEM_BLOCKS_HTML, 'P' => _AM_SYSTEM_BLOCKS_PHP, 'S' => _AM_SYSTEM_BLOCKS_AFWSMILE, + 'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE + )); $form->addElement($ctype_select); } else { $form->addElement(new XoopsFormHidden('c_type', 'H')); @@ -523,11 +524,10 @@ } $cache_select = new XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $this->getVar('bcachetime')); $cache_select->addOptionArray(array( - '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, - '300' => sprintf(_MINUTES, 5), '1800' => sprintf(_MINUTES, 30), - '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, - '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH - )); + '0' => _NOCACHE, '30' => sprintf(_SECONDS, 30), '60' => _MINUTE, '300' => sprintf(_MINUTES, 5), + '1800' => sprintf(_MINUTES, 30), '3600' => _HOUR, '18000' => sprintf(_HOURS, 5), '86400' => _DAY, + '259200' => sprintf(_DAYS, 3), '604800' => _WEEK, '2592000' => _MONTH + )); $form->addElement($cache_select); // Groups $form->addElement(new XoopsFormSelectGroup(_AM_SYSTEM_BLOCKS_GROUP, 'groups', true, $groups, 5, true)); @@ -591,7 +591,7 @@ return parent::insert($obj, $force); } - /** + /** * Delete a ID from the database * * @param XoopsBlock $obj @@ -797,7 +797,7 @@ $moduleid = intval($moduleid); $db = XoopsDatabaseFactory::getDatabaseConnection(); if ($asobject == true) { - $sql = $sql = "SELECT * FROM " . $db->prefix("newblocks") . " WHERE mid=" . $moduleid; + $sql = "SELECT * FROM " . $db->prefix("newblocks") . " WHERE mid=" . $moduleid; } else { $sql = "SELECT bid FROM " . $db->prefix("newblocks") . " WHERE mid=" . $moduleid; } @@ -829,6 +829,7 @@ $isactive = i... [truncated message content] |