From: <tr...@us...> - 2011-10-30 17:30:58
|
Revision: 7999 http://xoops.svn.sourceforge.net/xoops/?rev=7999&view=rev Author: trabis Date: 2011-10-30 17:30:51 +0000 (Sun, 30 Oct 2011) Log Message: ----------- Adding kernel classes to autoload to allow modules to extend them without using include Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/precheck.inc.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -451,9 +451,6 @@ $name = strtolower(trim($name)); $class = ''; if (!isset($this->_kernelHandlers[$name])) { - if (file_exists($hnd_file = XOOPS_ROOT_PATH . '/kernel/' . $name . '.php')) { - require_once $hnd_file; - } $class = 'Xoops' . ucfirst($name) . 'Handler'; if (class_exists($class)) { $this->_kernelHandlers[$name] = new $class($this->db); @@ -1475,7 +1472,7 @@ } /** - * function to update compiled template file in templates_c folder + * function to update compiled template file in cache folder * * @param string $tpl_id * @param boolean $clear_old @@ -1483,9 +1480,7 @@ */ public function templateTouch($tpl_id, $clear_old = true) { - $xoops = Xoops::getInstance(); - $tplfile_handler = $xoops->getTplfileHandler(); - $tplfile = $tplfile_handler->get($tpl_id); + $tplfile = $this->getTplfileHandler()->get($tpl_id); if (is_object($tplfile)) { $file = $tplfile->getVar('tpl_file', 'n'); @@ -1503,9 +1498,7 @@ */ public function templateClearModuleCache($mid) { - $xoops = Xoops::getInstance(); - $block_handler = $xoops->getBlockHandler(); - $block_arr = $block_handler->getByModule($mid); + $block_arr = $this->getBlockHandler()->getByModule($mid); $count = count($block_arr); if ($count > 0) { $xoopsTpl = new XoopsTpl(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -86,12 +86,14 @@ $configs = XoopsLoad::loadCoreConfig(); } if (isset($configs[$name])) { + //attemp loading from map require $configs[$name]; if (class_exists($name) && method_exists($name, '__autoload')) { call_user_func(array($name, '__autoload')); } return true; } elseif (file_exists($file = XOOPS_ROOT_PATH . '/class/' . $name . '.php')) { + //attempt loading from file include_once $file; $class = 'Xoops' . ucfirst($name); if (class_exists($class)) { @@ -202,14 +204,41 @@ 'xoopsauthfactory' => XOOPS_ROOT_PATH . '/class/auth/authfactory.php', 'xoopsauthldap' => XOOPS_ROOT_PATH . '/class/auth/auth_ldap.php', 'xoopsauthprovisionning' => XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php', + 'xoopsavatar' => XOOPS_ROOT_PATH . '/kernel/avatar.php', + 'xoopsavatarhandler' => XOOPS_ROOT_PATH . '/kernel/avatar.php', + 'xoopsblock' => XOOPS_ROOT_PATH . '/kernel/block.php', + 'xoopsblockhandler' => XOOPS_ROOT_PATH . '/kernel/block.php', 'xoopscache' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscacheengine' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', + 'xoopscachemodelobject' => XOOPS_ROOT_PATH . '/kernel/cache.php', + 'xoopscacheobjecthandler' => XOOPS_ROOT_PATH . '/kernel/cache.php', 'xoopscalendar' => XOOPS_ROOT_PATH . '/class/calendar/xoopscalendar.php', 'xoopscaptcha' => XOOPS_ROOT_PATH . '/class/captcha/xoopscaptcha.php', + 'xoopscomment' => XOOPS_ROOT_PATH . '/kernel/comment.php', + 'xoopscommenthandler' => XOOPS_ROOT_PATH . '/kernel/comment.php', 'xoopscommentrenderer' => XOOPS_ROOT_PATH . '/class/commentrenderer.php', + 'xoopsconfigcategory' => XOOPS_ROOT_PATH . '/kernel/configcategory.php', + 'xoopsconfigcategoryhandler' => XOOPS_ROOT_PATH . '/kernel/configcategory.php', + 'xoopsconfighandler' => XOOPS_ROOT_PATH . '/kernel/config.php', + 'xoopsconfigitem' => XOOPS_ROOT_PATH . '/kernel/configitem.php', + 'xoopsconfigitemhandler' => XOOPS_ROOT_PATH . '/kernel/configitem.php', + 'xoopsconfigoption' => XOOPS_ROOT_PATH . '/kernel/configoption.php', + 'xoopsconfigoptionhandler' => XOOPS_ROOT_PATH . '/kernel/configoption.php', 'xoopsdatabase' => XOOPS_ROOT_PATH . '/class/database/database.php', 'xoopsdatabasefactory' => XOOPS_ROOT_PATH . '/class/database/databasefactory.php', 'xoopsdownloader' => XOOPS_ROOT_PATH . '/class/downloader.php', + 'xoopsgroup' => XOOPS_ROOT_PATH . '/kernel/group.php', + 'xoopsgrouphandler' => XOOPS_ROOT_PATH . '/kernel/group.php', + 'xoopsgroupperm' => XOOPS_ROOT_PATH . '/kernel/groupperm.php', + 'xoopsgrouppermhandler' => XOOPS_ROOT_PATH . '/kernel/groupperm.php', + 'xoopsimage' => XOOPS_ROOT_PATH . '/kernel/image.php', + 'xoopsimagecategory' => XOOPS_ROOT_PATH . '/kernel/imagecategory.php', + 'xoopsimagecategroyhandler' => XOOPS_ROOT_PATH . '/kernel/imagecategory.php', + 'xoopsimagehandler' => XOOPS_ROOT_PATH . '/kernel/image.php', + 'xoopsimageset' => XOOPS_ROOT_PATH . '/kernel/imageset.php', + 'xoopsimagesethandler' => XOOPS_ROOT_PATH . '/kernel/imageset.php', + 'xoopsimagesetimg' => XOOPS_ROOT_PATH . '/kernel/imagesetimg.php', + 'xoopsimagesetimghandler' => XOOPS_ROOT_PATH . '/kernel/imagesetimg.php', 'xoopslists' => XOOPS_ROOT_PATH . '/class/xoopslists.php', 'xoopslocal' => XOOPS_ROOT_PATH . '/include/xoopslocal.php', 'xoopslocalabstract' => XOOPS_ROOT_PATH . '/class/xoopslocal.php', @@ -257,20 +286,42 @@ 'xoopsformtextdateselect' => XOOPS_ROOT_PATH . '/class/xoopsform/formtextdateselect.php', 'xoopsgroupformcheckbox' => XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php', 'xoopsgrouppermform' => XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php', + 'xoopsguestuser' => XOOPS_ROOT_PATH . '/kernel/user.php', 'xoopsmailer' => XOOPS_ROOT_PATH . '/class/xoopsmailer.php', 'xoopsmediauploader' => XOOPS_ROOT_PATH . '/class/uploader.php', + 'xoopsmemberhandler' => XOOPS_ROOT_PATH . '/kernel/member.php', + 'xoopsmembership' => XOOPS_ROOT_PATH . '/kernel/membership.php', + 'xoopsmembershiphandler' => XOOPS_ROOT_PATH . '/kernel/membership.php', 'xoopsmodelfactory' => XOOPS_ROOT_PATH . '/class/model/xoopsmodel.php', + 'xoopsmodules' => XOOPS_ROOT_PATH . '/kernel/module.php', + 'xoopsmodulehandler' => XOOPS_ROOT_PATH . '/kernel/module.php', 'xoopsmultimailer' => XOOPS_ROOT_PATH . '/class/mail/xoopsmultimailer.php', + 'xoopsnotification' => XOOPS_ROOT_PATH . '/kernel/notification.php', + 'xoopsnotificationhandler' => XOOPS_ROOT_PATH . '/kernel/notification.php', + 'xoopsobject' => XOOPS_ROOT_PATH . '/kernel/object.php', + 'xoopsobjecthandler' => XOOPS_ROOT_PATH . '/kernel/object.php', 'xoopsobjecttree' => XOOPS_ROOT_PATH . '/class/tree.php', + 'xoopsonline' => XOOPS_ROOT_PATH . '/kernel/online.php', + 'xoopsonlinehandler' => XOOPS_ROOT_PATH . '/kernel/online.php', + 'xoopspersistableobjecthandler' => XOOPS_ROOT_PATH . '/kernel/object.php', 'xoopspreload' => XOOPS_ROOT_PATH . '/class/preload.php', 'xoopspreloaditem' => XOOPS_ROOT_PATH . '/class/preload.php', + 'xoopsprivmessage' => XOOPS_ROOT_PATH . '/kernel/privmessage.php', + 'xoopsprivmessagehandler' => XOOPS_ROOT_PATH . '/kernel/privmessage.php', 'xoopssecurity' => XOOPS_ROOT_PATH . '/class/xoopssecurity.php', + 'xoopssessionhandler' => XOOPS_ROOT_PATH . '/kernel/session.php', 'xoopssimpleform' => XOOPS_ROOT_PATH . '/class/xoopsform/simpleform.php', 'xoopstableform' => XOOPS_ROOT_PATH . '/class/xoopsform/tableform.php', 'xoopstardownloader' => XOOPS_ROOT_PATH . '/class/tardownloader.php', + 'xoopsthemeform' => XOOPS_ROOT_PATH . '/class/xoopsform/themeform.php', 'xoopsthemesetparser' => XOOPS_ROOT_PATH . '/class/xml/themesetparser.php', 'xoopstpl' => XOOPS_ROOT_PATH . '/class/template.php', - 'xoopsthemeform' => XOOPS_ROOT_PATH . '/class/xoopsform/themeform.php', + 'xoopstplfile' => XOOPS_ROOT_PATH . '/kernel/tplfile.php', + 'xoopstplfilehandler' => XOOPS_ROOT_PATH . '/kernel/tplfile.php', + 'xoopstplset' => XOOPS_ROOT_PATH . '/kernel/tplset.php', + 'xoopstplsethandler' => XOOPS_ROOT_PATH . '/kernel/tplset.php', + 'xoopsuser' => XOOPS_ROOT_PATH . '/kernel/user.php', + 'xoopsuserhandler' => XOOPS_ROOT_PATH . '/kernel/user.php', 'xoopsuserutility' => XOOPS_ROOT_PATH . '/class/userutility.php', 'xoopsutility' => XOOPS_ROOT_PATH . '/class/utility/xoopsutility.php', 'xoopsxmlrpcapi' => XOOPS_ROOT_PATH . '/class/xml/rpc/xmlrpcapi.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -34,7 +34,6 @@ exit(); } -require_once XOOPS_ROOT_PATH . '/kernel/object.php'; include_once XOOPS_ROOT_PATH . '/class/xoopsload.php'; $xoops = Xoops::getInstance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -81,7 +81,6 @@ /** * Include Required Files not handled by autoload */ -include_once $xoops->path('kernel/object.php'); include_once $xoops->path('include/functions.php'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck.inc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck.inc.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/postcheck.inc.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -8,7 +8,7 @@ } define( 'PROTECTOR_POSTCHECK_INCLUDED' , 1 ) ; -if( ! class_exists( 'Database' ) ) return ; +if( ! class_exists( 'XoopsDatabase', false ) ) return ; protector_postcommon() ; ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/precheck.inc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/precheck.inc.php 2011-10-30 13:39:34 UTC (rev 7998) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/include/precheck.inc.php 2011-10-30 17:30:51 UTC (rev 7999) @@ -2,7 +2,7 @@ require_once dirname(__FILE__).'/precheck_functions.php' ; -if( class_exists( 'Database' ) ) { +if( class_exists( 'XoopsDatabase', false ) ) { require dirname(__FILE__).'/postcheck.inc.php' ; return ; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-10-30 17:48:43
|
Revision: 8000 http://xoops.svn.sourceforge.net/xoops/?rev=8000&view=rev Author: trabis Date: 2011-10-30 17:48:36 +0000 (Sun, 30 Oct 2011) Log Message: ----------- Updating tplfile methods Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/modulesadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/modulesadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/modulesadmin.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/modulesadmin.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -158,7 +158,7 @@ $tplfile->setVar('tpl_lastmodified', time()); $tplfile->setVar('tpl_lastimported', 0); $tplfile->setVar('tpl_type', 'module'); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">'.sprintf(_MD_AM_TEMPLATE_ADD_ERROR, "<strong>".$tpl['file']."</strong>")."</span>"; } else { $newtplid = $tplfile->getVar('tpl_id'); @@ -221,7 +221,7 @@ $tplfile->setVar('tpl_desc', $block['description'], true); $tplfile->setVar('tpl_lastimported', 0); $tplfile->setVar('tpl_lastmodified', time()); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">'.sprintf(_MD_AM_TEMPLATE_ADD_ERROR, "<strong>".$block['template']."</strong>")."</span>"; } else { $newtplid = $tplfile->getVar('tpl_id'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplfile.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplfile.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -197,7 +197,7 @@ * @param bool $getsource * @return XoopsTplfile|false */ - public function get($id, $getsource = false) + public function getById($id, $getsource = false) { $tplfile = false; $id = intval($id); @@ -242,7 +242,7 @@ * @param XoopsTplfile $tplfile * @return bool */ - public function insert(XoopsTplfile &$tplfile) + public function insertTpl(XoopsTplfile &$tplfile) { if (!$tplfile->isDirty()) { return true; @@ -323,7 +323,7 @@ * @param XoopsTplfile $tplfile * @return bool */ - public function delete(XoopsTplfile &$tplfile) + public function deleteTpl(XoopsTplfile &$tplfile) { $id = $tplfile->getVar('tpl_id'); $sql = sprintf("DELETE FROM %s WHERE tpl_id = %u", $this->db->prefix('tplfile'), $id); @@ -341,7 +341,7 @@ * @param bool $id_as_key * @return array */ - public function getObjects(CriteriaElement $criteria = null, $getsource = false, $id_as_key = false) + public function getTplObjects(CriteriaElement $criteria = null, $getsource = false, $id_as_key = false) { $ret = array(); $limit = $start = 0; @@ -431,7 +431,7 @@ $criteria->add(new Criteria('tpl_type', $type)); } } - return $this->getObjects($criteria, $getsource, false); + return $this->getTplObjects($criteria, $getsource, false); } /** @@ -450,5 +450,4 @@ } return false; } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -471,7 +471,7 @@ $tplfile_handler = $xoops->getTplfileHandler(); $btemplate = $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], 'block', $block_id); if (count($btemplate) > 0) { - $tplfile_handler->delete($btemplate[0]); + $tplfile_handler->deleteTpl($btemplate[0]); } } $xoops->redirect('admin.php?fct=blocksadmin', 1, _AM_SYSTEM_BLOCKS_DBUPDATED); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -523,7 +523,7 @@ // delete template file entry in db $dcount = count($deltpl); for ($i = 0; $i < $dcount; $i++) { - if (!$tplfile_handler->delete($deltpl[$i])) { + if (!$tplfile_handler->deleteTpl($deltpl[$i])) { $delng[] = $deltpl[$i]->getVar('tpl_file'); } } @@ -551,7 +551,7 @@ $tplfile->setVar('tpl_tplset', 'default'); $tplfile->setVar('tpl_file', $tpl['file'], true); $tplfile->setVar('tpl_desc', $tpl['description'], true); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR, "<strong>" . $tpl['file'] . "</strong>") . '</span>'; } else { $newid = $tplfile->getVar('tpl_id'); @@ -620,7 +620,7 @@ $tplfile_new->setVar('tpl_desc', $block['description'], true); $tplfile_new->setVar('tpl_lastmodified', time()); $tplfile_new->setVar('tpl_lastimported', 0); - if (!$tplfile_handler->insert($tplfile_new)) { + if (!$tplfile_handler->insertTpl($tplfile_new)) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_UPDATE_ERROR, "<strong>" . $block['template'] . "</strong>") . '</span>'; } else { $msgs[] = " " . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_UPDATE, "<strong>" . $block['template'] . "</strong>"); @@ -679,7 +679,7 @@ $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_lastmodified', time()); $tplfile->setVar('tpl_desc', $block['description'], true); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR, "<strong>" . $block['template'] . "</strong>") . '</span>'; } else { $newid = $tplfile->getVar('tpl_id'); @@ -713,7 +713,7 @@ if (is_array($tplfiles)) { $btcount = count($tplfiles); for ($k = 0; $k < $btcount; $k++) { - if (!$tplfile_handler->delete($tplfiles[$k])) { + if (!$tplfile_handler->deleteTpl($tplfiles[$k])) { $msgs[] = ' <span style="color:#ff0000;">' . _AM_SYSTEM_MODULES_BLOCK_DEPRECATED_ERROR . '(ID: <strong>' . $tplfiles[$k]->getVar('tpl_id') . '</strong>)</span>'; } else { $msgs[] = ' ' . sprintf(_AM_SYSTEM_MODULES_BLOCK_DEPRECATED, "<strong>" . $tplfiles[$k]->getVar('tpl_file') . "</strong>"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -177,7 +177,7 @@ $tplfile->setVar('tpl_lastmodified', time()); $tplfile->setVar('tpl_lastimported', time()); $tplfile->setVar('tpl_type', 'module'); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR, "<strong>" . $tpl['file'] . "</strong>") . "</span>"; } else { $newtplid = $tplfile->getVar('tpl_id'); @@ -238,7 +238,7 @@ $tplfile->setVar('tpl_desc', $block['description'], true); $tplfile->setVar('tpl_lastimported', 0); $tplfile->setVar('tpl_lastmodified', time()); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR, "<strong>" . $block['template'] . "</strong>") . "</span>"; } else { $newtplid = $tplfile->getVar('tpl_id'); @@ -525,7 +525,7 @@ if ($tcount > 0) { $msgs[] = _AM_SYSTEM_MODULES_TEMPLATES_DELETE; for ($i = 0; $i < $tcount; $i++) { - if (false === $tplfile_handler->delete($templates[$i])) { + if (false === $tplfile_handler->deleteTpl($templates[$i])) { $msgs[] = ' <span style="color:#ff0000;">' . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_DELETE_DATA_FAILD, $templates[$i]->getVar('tpl_file')) . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, "<strong>" . $templates[$i]->getVar('tpl_id') . "</strong>") . '</span>'; } else { $msgs[] = " " . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_DELETE_DATA, "<strong>" . $templates[$i]->getVar('tpl_file') . "</strong>") . sprintf(_AM_SYSTEM_MODULES_TEMPLATE_ID, "<strong>" . $templates[$i]->getVar('tpl_id') . "</strong>"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -40,11 +40,11 @@ } if (count($tplids) > 0) { $tplfile_handler = $xoops->getTplfileHandler(); - $duplicate_files = $tplfile_handler->getObjects(new Criteria('tpl_id', "(".implode(',', $tplids).")", "IN")); + $duplicate_files = $tplfile_handler->getTplObjects(new Criteria('tpl_id', "(".implode(',', $tplids).")", "IN")); if (count($duplicate_files) > 0) { foreach (array_keys($duplicate_files) as $i) { - $tplfile_handler->delete($duplicate_files[$i]); + $tplfile_handler->deleteTpl($duplicate_files[$i]); } } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -75,7 +75,7 @@ } // TEMPLATES - $tplfile_handler = xoops_gethandler('tplfile'); + $tplfile_handler = $xoops->getTplfileHandler(); $tpl_path = dirname(__FILE__) . '/templates'; if ($handler = @opendir($tpl_path . '/')) { while (($file = readdir($handler)) !== false) { @@ -95,7 +95,7 @@ $tplfile->setVar('tpl_lastmodified', $mtime); $tplfile->setVar('tpl_lastimported', 0); $tplfile->setVar('tpl_type', 'module'); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $ret[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b> to the database.</span><br />'; } else { $tplid = $tplfile->getVar('tpl_id'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onuninstall.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -1,84 +1,88 @@ <?php // start hack by Trabis -if (!class_exists('ProtectorRegistry')) exit('Registry not found'); +if (!class_exists('ProtectorRegistry')) { + exit('Registry not found'); +} -$registry = ProtectorRegistry::getInstance(); -$mydirname = $registry->getEntry('mydirname'); -$mydirpath = $registry->getEntry('mydirpath'); -$language = $registry->getEntry('language'); +$registry = ProtectorRegistry::getInstance(); +$mydirname = $registry->getEntry('mydirname'); +$mydirpath = $registry->getEntry('mydirpath'); +$language = $registry->getEntry('language'); // end hack by Trabis -eval( ' function xoops_module_uninstall_'.$mydirname.'( $module ) { return protector_onuninstall_base( $module , "'.$mydirname.'" ) ; } ' ) ; +eval(' function xoops_module_uninstall_' . $mydirname . '( $module ) { return protector_onuninstall_base( $module , "' . $mydirname . '" ) ; } '); -if( ! function_exists( 'protector_onuninstall_base' ) ) { +if (!function_exists('protector_onuninstall_base')) { -function protector_onuninstall_base( $module , $mydirname ) -{ - // transations on module uninstall + function protector_onuninstall_base($module, $mydirname) + { + // transations on module uninstall - global $ret ; // TODO :-D + global $ret; // TODO :-D - // for Cube 2.1 - if( defined( 'XOOPS_CUBE_LEGACY' ) ) { - $root = XCube_Root::getSingleton(); - $root->mDelegateManager->add( 'Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success' , 'protector_message_append_onuninstall' ) ; - $ret = array() ; - } else { - if( ! is_array( $ret ) ) $ret = array() ; - } + // for Cube 2.1 + if (defined('XOOPS_CUBE_LEGACY')) { + $root = XCube_Root::getSingleton(); + $root->mDelegateManager->add('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($mydirname) . '.Success', 'protector_message_append_onuninstall'); + $ret = array(); + } else { + if (!is_array($ret)) { + $ret = array(); + } + } - $db = XoopsDatabaseFactory::getDatabaseConnection(); - $mid = $module->getVar('mid') ; + $db = XoopsDatabaseFactory::getDatabaseConnection(); + $mid = $module->getVar('mid'); - // TABLES (loading mysql.sql) - $sql_file_path = dirname(__FILE__).'/sql/mysql.sql' ; - $prefix_mod = $db->prefix() . '_' . $mydirname ; - if( file_exists( $sql_file_path ) ) { - $ret[] = "SQL file found at <b>".htmlspecialchars($sql_file_path)."</b>.<br /> Deleting tables...<br />"; - $sql_lines = file( $sql_file_path ) ; - foreach( $sql_lines as $sql_line ) { - if( preg_match( '/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i' , $sql_line , $regs ) ) { - $sql = 'DROP TABLE '.addslashes($prefix_mod.'_'.$regs[1]); - if (!$db->query($sql)) { - $ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1]).'<b>.</span><br />'; - } else { - $ret[] = 'Table <b>'.htmlspecialchars($prefix_mod.'_'.$regs[1]).'</b> dropped.<br />'; - } - } - } - } + // TABLES (loading mysql.sql) + $sql_file_path = dirname(__FILE__) . '/sql/mysql.sql'; + $prefix_mod = $db->prefix() . '_' . $mydirname; + if (file_exists($sql_file_path)) { + $ret[] = "SQL file found at <b>" . htmlspecialchars($sql_file_path) . "</b>.<br /> Deleting tables...<br />"; + $sql_lines = file($sql_file_path); + foreach ($sql_lines as $sql_line) { + if (preg_match('/^CREATE TABLE \`?([a-zA-Z0-9_-]+)\`? /i', $sql_line, $regs)) { + $sql = 'DROP TABLE ' . addslashes($prefix_mod . '_' . $regs[1]); + if (!$db->query($sql)) { + $ret[] = '<span style="color:#ff0000;">ERROR: Could not drop table <b>' . htmlspecialchars($prefix_mod . '_' . $regs[1]) . '<b>.</span><br />'; + } else { + $ret[] = 'Table <b>' . htmlspecialchars($prefix_mod . '_' . $regs[1]) . '</b> dropped.<br />'; + } + } + } + } - // TEMPLATES (Not necessary because modulesadmin removes all templates) - /* $tplfile_handler = xoops_gethandler( 'tplfile' ) ; - $templates = $tplfile_handler->find( null , 'module' , $mid ) ; - $tcount = count( $templates ) ; - if( $tcount > 0 ) { - $ret[] = 'Deleting templates...' ; - for( $i = 0 ; $i < $tcount ; $i ++ ) { - if( ! $tplfile_handler->delete( $templates[$i] ) ) { - $ret[] = '<span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file','s').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b></span><br />'; - } else { - $ret[] = 'Template <b>'.$templates[$i]->getVar('tpl_file','s').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b><br />'; - } - } - } - unset($templates); */ + // TEMPLATES (Not necessary because modulesadmin removes all templates) + /* $tplfile_handler = xoops_gethandler( 'tplfile' ) ; + $templates = $tplfile_handler->find( null , 'module' , $mid ) ; + $tcount = count( $templates ) ; + if( $tcount > 0 ) { + $ret[] = 'Deleting templates...' ; + for( $i = 0 ; $i < $tcount ; $i ++ ) { + if( ! $tplfile_handler->deleteTpl( $templates[$i] ) ) { + $ret[] = '<span style="color:#ff0000;">ERROR: Could not delete template '.$templates[$i]->getVar('tpl_file','s').' from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b></span><br />'; + } else { + $ret[] = 'Template <b>'.$templates[$i]->getVar('tpl_file','s').'</b> deleted from the database. Template ID: <b>'.$templates[$i]->getVar('tpl_id','s').'</b><br />'; + } + } + } + unset($templates); */ - return true ; -} + return true; + } -function protector_message_append_onuninstall( &$module_obj , &$log ) -{ - if( is_array( @$GLOBALS['ret'] ) ) { - foreach( $GLOBALS['ret'] as $message ) { - $log->add( strip_tags( $message ) ) ; - } - } + function protector_message_append_onuninstall(&$module_obj, &$log) + { + if (is_array(@$GLOBALS['ret'])) { + foreach ($GLOBALS['ret'] as $message) { + $log->add(strip_tags($message)); + } + } - // use mLog->addWarning() or mLog->addError() if necessary -} + // use mLog->addWarning() or mLog->addError() if necessary + } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php 2011-10-30 17:30:51 UTC (rev 7999) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php 2011-10-30 17:48:36 UTC (rev 8000) @@ -59,7 +59,7 @@ // TEMPLATES (all templates have been already removed by modulesadmin) - $tplfile_handler = xoops_gethandler('tplfile'); + $tplfile_handler = $xoops->getTplfileHandler(); $tpl_path = dirname(__FILE__) . '/templates'; if ($handler = @opendir($tpl_path . '/')) { while (($file = readdir($handler)) !== false) { @@ -79,7 +79,7 @@ $tplfile->setVar('tpl_lastmodified', $mtime); $tplfile->setVar('tpl_lastimported', 0); $tplfile->setVar('tpl_type', 'module'); - if (!$tplfile_handler->insert($tplfile)) { + if (!$tplfile_handler->insertTpl($tplfile)) { $msgs[] = '<span style="color:#ff0000;">ERROR: Could not insert template <b>' . htmlspecialchars($mydirname . '_' . $file) . '</b> to the database.</span>'; } else { $tplid = $tplfile->getVar('tpl_id'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-10-30 18:56:43
|
Revision: 8003 http://xoops.svn.sourceforge.net/xoops/?rev=8003&view=rev Author: trabis Date: 2011-10-30 18:56:36 +0000 (Sun, 30 Oct 2011) Log Message: ----------- Updating image and avatar classes Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -819,7 +819,7 @@ <meta http-equiv="content-language" content="' . _LANGCODE . '" /> <meta name="robots" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_robots']) . '" /> <meta name="keywords" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_keywords']) . '" /> - <meta name="description" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_desc']) . '" /> + <meta name="description" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_description']) . '" /> <meta name="rating" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_rating']) . '" /> <meta name="author" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_author']) . '" /> <meta name="copyright" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_copyright']) . '" /> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -233,7 +233,7 @@ 'xoopsgrouppermhandler' => XOOPS_ROOT_PATH . '/kernel/groupperm.php', 'xoopsimage' => XOOPS_ROOT_PATH . '/kernel/image.php', 'xoopsimagecategory' => XOOPS_ROOT_PATH . '/kernel/imagecategory.php', - 'xoopsimagecategroyhandler' => XOOPS_ROOT_PATH . '/kernel/imagecategory.php', + 'xoopsimagecategoryhandler' => XOOPS_ROOT_PATH . '/kernel/imagecategory.php', 'xoopsimagehandler' => XOOPS_ROOT_PATH . '/kernel/image.php', 'xoopsimageset' => XOOPS_ROOT_PATH . '/kernel/imageset.php', 'xoopsimagesethandler' => XOOPS_ROOT_PATH . '/kernel/imageset.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -259,7 +259,7 @@ $avatar_handler = $xoops->getAvatarHandler(); $form2 = new XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); $avatar_select = new XoopsFormSelect('', 'user_avatar', $xoops->user->getVar('user_avatar')); - $avatar_list = $avatar_handler->getList('S', true); + $avatar_list = $avatar_handler->getListByType('S', true); $avatar_selected = $xoops->user->getVar("user_avatar", "E"); $avatar_selected = in_array($avatar_selected, array_keys($avatar_list)) ? $avatar_selected : "blank.gif"; $avatar_select->addOptionArray($avatar_list); @@ -303,21 +303,21 @@ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix('cavt'); if ($uploader->upload()) { - $avt_handler = $xoops->getAvatarHandler(); - $avatar = $avt_handler->create(); + $avatar_handler = $xoops->getAvatarHandler(); + $avatar = $avatar_handler->create(); $avatar->setVar('avatar_file', 'avatars/' . $uploader->getSavedFileName()); $avatar->setVar('avatar_name', $xoops->user->getVar('uname')); $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); $avatar->setVar('avatar_display', 1); $avatar->setVar('avatar_type', 'C'); - if (!$avt_handler->insert($avatar)) { + if (!$avatar_handler->insert($avatar)) { @unlink($uploader->getSavedDestination()); } else { $oldavatar = $xoops->user->getVar('user_avatar'); if (! empty($oldavatar) && false !== strpos(strtolower($oldavatar), "cavt")) { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $oldavatar)); if (! empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) { - $avt_handler->delete($avatars[0]); + $avatar_handler->delete($avatars[0]); $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar); if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { unlink($oldavatar_path); @@ -326,7 +326,7 @@ } $sql = sprintf("UPDATE %s SET user_avatar = %s WHERE uid = %u", $xoops->db->prefix('users'), $xoops->db->quoteString( 'avatars/' . $uploader->getSavedFileName()), $xoops->user->getVar('uid')); $xoops->db->query($sql); - $avt_handler->addUser($avatar->getVar('avatar_id'), $xoops->user->getVar('uid')); + $avatar_handler->addUser($avatar->getVar('avatar_id'), $xoops->user->getVar('uid')); $xoops->redirect('userinfo.php?t=' . time() . '&uid=' . $xoops->user->getVar('uid'), 3, _US_PROFUPDATED); } } @@ -349,12 +349,12 @@ exit(); } $user_avatar = ''; - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); if (!empty($_POST['user_avatar'])) { $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); $criteria_avatar = new CriteriaCompo(new Criteria('avatar_file', $user_avatar)); $criteria_avatar->add(new Criteria('avatar_type', "S")); - $avatars = $avt_handler->getObjects($criteria_avatar); + $avatars = $avatar_handler->getObjects($criteria_avatar); if (!is_array($avatars) || ! count($avatars)) { $user_avatar = 'avatars/blank.gif'; } @@ -371,9 +371,9 @@ $xoops->footer(); } if ($oldavatar && preg_match("/^cavt/", strtolower(substr($oldavatar,8)))) { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) { - $avt_handler->delete($avatars[0]); + $avatar_handler->delete($avatars[0]); $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar); if (0 === strpos($oldavatar_path, realpath(XOOPS_UPLOAD_PATH)) && is_file($oldavatar_path)) { unlink($oldavatar_path); @@ -381,9 +381,9 @@ } } if ($user_avatar != 'avatars/blank.gif') { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $user_avatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $user_avatar)); if (is_object($avatars[0])) { - $avt_handler->addUser($avatars[0]->getVar('avatar_id'), $xoops->user->getVar('uid')); + $avatar_handler->addUser($avatars[0]->getVar('avatar_id'), $xoops->user->getVar('uid')); } } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -44,10 +44,10 @@ $xoops->db = XoopsDatabaseFactory::getDatabaseConnection(); // ################# Include class manager file ############## -$imagehandler = $xoops->getImageHandler(); +$image_handler = $xoops->getImageHandler(); $criteria = new CriteriaCompo(new Criteria('i.image_display', 1)); $criteria->add(new Criteria('i.image_id', $image_id)); -$image = $imagehandler->getObjects($criteria, false, true); +$image = $image_handler->getObjects($criteria, false, true); if (count($image) > 0) { header('Content-type: ' . $image[0]->getVar('image_mimetype')); header('Cache-control: max-age=31536000'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -43,7 +43,7 @@ $target = htmlspecialchars($target, ENT_QUOTES); $xoopsTpl->assign('target', $target); $imgcat_handler = $xoops->getImagecategoryHandler(); - $catlist = $imgcat_handler->getList($group, 'imgcat_read', 1); + $catlist = $imgcat_handler->getListByPermission($group, 'imgcat_read', 1); $catcount = count($catlist); $xoopsTpl->assign('lang_align', _ALIGN); $xoopsTpl->assign('lang_add', _ADD); @@ -232,7 +232,7 @@ $image->setVar('image_body', $fbinary, true); @unlink($uploader->getSavedDestination()); } - if (!$image_handler->insert($image)) { + if (!$image_handler->insertImage($image)) { $err = sprintf(_FAILSAVEIMG, $image->getVar('image_nicename')); } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** @@ -179,7 +180,7 @@ * @param bool $id_as_key * @return array */ - public function getObjects(CriteriaElement $criteria = null, $id_as_key = false) + public function getObjectsWithCount(CriteriaElement $criteria = null, $id_as_key = false) { $ret = array(); $limit = $start = 0; @@ -257,7 +258,7 @@ * @param string $avatar_display * @return array */ - public function getList($avatar_type = null, $avatar_display = null) + public function getListByType($avatar_type = null, $avatar_display = null) { $criteria = new CriteriaCompo(); if (isset($avatar_type)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -164,9 +164,9 @@ * * @param int $id ID * @param boolean $getbinary - * @return object {@link XoopsImage}, FALSE on fail - **/ - public function get($id, $getbinary = true) + * @return XoopsImage {@link XoopsImage}, FALSE on fail + */ + public function getById($id, $getbinary = true) { $image = false; $id = intval($id); @@ -190,7 +190,7 @@ * @param XoopsImage &$image {@link XoopsImage} * @return bool **/ - public function insert(XoopsImage &$image) + public function insertImage(XoopsImage &$image) { /** * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 @@ -248,7 +248,7 @@ * @param XoopsImage &$image {@link XoopsImage} * @return bool **/ - public function delete(XoopsImage &$image) + public function deleteImage(XoopsImage &$image) { /** * @TODO: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5 @@ -315,7 +315,7 @@ * @param bool $image_display * @return array Array of {@link XoopsImage} objects **/ - public function getList($imgcat_id, $image_display = null) + public function getNameList($imgcat_id, $image_display = null) { $criteria = new CriteriaCompo(new Criteria('imgcat_id', intval($imgcat_id))); if (isset($image_display)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -187,7 +187,7 @@ * @param bool $id_as_key * @return array */ - public function getObjects($criteria = null, $id_as_key = false) + public function getPermittedObjects($criteria = null, $id_as_key = false) { $ret = array(); $limit = $start = 0; @@ -245,7 +245,7 @@ * @param null $storetype * @return array Array of {@link XoopsImage} objects */ - function getList($groups = array(), $perm = 'imgcat_read', $display = null, $storetype = null) + function getListByPermission($groups = array(), $perm = 'imgcat_read', $display = null, $storetype = null) { $criteria = new CriteriaCompo(); if (is_array($groups) && !empty($groups)) { @@ -265,13 +265,11 @@ if (isset($storetype)) { $criteria->add(new Criteria('imgcat_storetype', $storetype)); } - $categories = $this->getObjects($criteria, true); + $categories = $this->getPermittedObjects($criteria, true); $ret = array(); foreach (array_keys($categories) as $i) { $ret[$i] = $categories[$i]->getVar('imgcat_name'); } return $ret; } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -62,7 +62,7 @@ break; case "avatars": ?> - <script language='javascript'> + <script type='text/javascript' language='javascript'> <!--// function myimage_onclick(counter) { @@ -85,7 +85,7 @@ <tr> <?php $avatar_handler = $xoops->getAvatarHandler(); - $avatarslist = $avatar_handler->getList('S'); + $avatarslist = $avatar_handler->getListByType('S'); $cntavs = 0; $counter = isset($_GET['start']) ? intval($_GET['start']) : 0; foreach ($avatarslist as $file => $name) { @@ -112,7 +112,7 @@ $fname = ""; $fmail = ""; } - printCheckForm(); + xoops_printCheckForm(); echo '</head><body>'; echo "<div class='errorMsg'>" . implode('<br />', $xoops->security->getErrors()) . "</div>"; echo ' @@ -145,7 +145,6 @@ if (!$xoops->checkEmail($fmail) || !$xoops->checkEmail($ymail) || preg_match("/[\\0-\\31]/", $yname)) { $errormessage = _MSC_INVALIDEMAIL1 . "<br />" . _MSC_INVALIDEMAIL2 . ""; $xoops->redirect(XOOPS_URL . "/misc.php?action=showpopups&type=friend&op=sendform", 2, $errormessage); - exit(); } $xoopsMailer = $xoops->getMailer(); $xoopsMailer->setTemplate("tellfriend.tpl"); @@ -233,7 +232,7 @@ $xoops->simpleFooter(); } -function printCheckForm() +function xoops_printCheckForm() { ?> <script language='javascript' type="text/javascript"> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -120,7 +120,7 @@ $avatar_handler = $xoops->getAvatarHandler(); $form2 = new XoopsThemeForm(_US_CHOOSEAVT, 'chooseavatar', XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/edituser.php', 'post', true); $avatar_select = new XoopsFormSelect('', 'user_avatar', $xoops->user->getVar('user_avatar')); - $avatar_list = $avatar_handler->getList('S', true); + $avatar_list = $avatar_handler->getListByType('S', true); $avatar_selected = $xoops->user->getVar("user_avatar", "E"); $avatar_selected = in_array($avatar_selected, array_keys($avatar_list)) ? $avatar_selected : "blank.gif"; $avatar_select->addOptionArray($avatar_list); @@ -158,21 +158,21 @@ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix('cavt'); if ($uploader->upload()) { - $avt_handler = $xoops->getAvatarHandler(); - $avatar = $avt_handler->create(); + $avatar_handler = $xoops->getAvatarHandler(); + $avatar = $avatar_handler->create(); $avatar->setVar('avatar_file', 'avatars/' . $uploader->getSavedFileName()); $avatar->setVar('avatar_name', $GLOBALS['xoopsUser']->getVar('uname')); $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); $avatar->setVar('avatar_display', 1); $avatar->setVar('avatar_type', 'C'); - if (!$avt_handler->insert($avatar)) { + if (!$avatar_handler->insert($avatar)) { @unlink($uploader->getSavedDestination()); } else { $oldavatar = $xoops->user->getVar('user_avatar'); if (!empty($oldavatar) && false !== strpos(strtolower($oldavatar), "cavt")) { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) { - $avt_handler->delete($avatars[0]); + $avatar_handler->delete($avatars[0]); $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar); if (0 === strpos($oldavatar_path, XOOPS_UPLOAD_PATH) && is_file($oldavatar_path)) { unlink($oldavatar_path); @@ -181,7 +181,7 @@ } $sql = sprintf("UPDATE %s SET user_avatar = %s WHERE uid = %u", $xoops->db->prefix('users'), $xoops->db->quoteString('avatars/' . $uploader->getSavedFileName()), $xoops->user->getVar('uid')); $xoops->db->query($sql); - $avt_handler->addUser($avatar->getVar('avatar_id'), $xoops->user->getVar('uid')); + $avatar_handler->addUser($avatar->getVar('avatar_id'), $xoops->user->getVar('uid')); $xoops->redirect('userinfo.php?t=' . time() . '&uid=' . $xoops->user->getVar('uid'), 3, _US_PROFUPDATED); } } @@ -202,12 +202,12 @@ $xoops->redirect('index.php', 3, _US_NOEDITRIGHT); } $user_avatar = ''; - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); if (!empty($_POST['user_avatar'])) { $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); $criteria_avatar = new CriteriaCompo(new Criteria('avatar_file', $user_avatar)); $criteria_avatar->add(new Criteria('avatar_type', "S")); - $avatars = $avt_handler->getObjects($criteria_avatar); + $avatars = $avatar_handler->getObjects($criteria_avatar); if (!is_array($avatars) || !count($avatars)) { $user_avatar = 'avatars/blank.gif'; } @@ -224,9 +224,9 @@ $xoops->footer(); } if ($oldavatar && preg_match("/^cavt/", strtolower(substr($oldavatar, 8)))) { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $oldavatar)); if (!empty($avatars) && count($avatars) == 1 && is_object($avatars[0])) { - $avt_handler->delete($avatars[0]); + $avatar_handler->delete($avatars[0]); $oldavatar_path = realpath(XOOPS_UPLOAD_PATH . '/' . $oldavatar); if (0 === strpos($oldavatar_path, realpath(XOOPS_UPLOAD_PATH)) && is_file($oldavatar_path)) { unlink($oldavatar_path); @@ -234,9 +234,9 @@ } } if ($user_avatar != 'avatars/blank.gif') { - $avatars = $avt_handler->getObjects(new Criteria('avatar_file', $user_avatar)); + $avatars = $avatar_handler->getObjects(new Criteria('avatar_file', $user_avatar)); if (is_object($avatars[0])) { - $avt_handler->addUser($avatars[0]->getVar('avatar_id'), $xoops->user->getVar('uid')); + $avatar_handler->addUser($avatars[0]->getVar('avatar_id'), $xoops->user->getVar('uid')); } } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -59,21 +59,21 @@ $xoBreadCrumb->addTips(_AM_SYSTEM_AVATAR_TIPS); $xoBreadCrumb->render(); // Get avatar handler - $avt_handler = $xoops->getHandler('avatar'); + $avatar_handler = $xoops->getHandler('avatar'); // Get User Config $config_handler = $xoops->getConfigHandler(); $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); // User language $xoops->loadLanguage('user'); // Count avatars - $savatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'S')); - $cavatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'C')); + $savatar_count = $avatar_handler->getCount(new Criteria('avatar_type', 'S')); + $cavatar_count = $avatar_handler->getCount(new Criteria('avatar_type', 'C')); // Assign Template variables $xoopsTpl->assign('view_cat', true); $xoopsTpl->assign('count_system', $savatar_count); $xoopsTpl->assign('count_custom', $cavatar_count); // Create form - $avatar = $avt_handler->create(); + $avatar = $avatar_handler->create(); $form = $avatar->getForm(); // Assign form $xoopsTpl->assign('form', $form->render()); @@ -101,30 +101,30 @@ $xoBreadCrumb->addTips(_AM_SYSTEM_AVATAR_TIPS); $xoBreadCrumb->render(); // Get avatar handler - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); // Count avatars - $savatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'S')); - $cavatar_count = $avt_handler->getCount(new Criteria('avatar_type', 'C')); + $savatar_count = $avatar_handler->getCount(new Criteria('avatar_type', 'S')); + $cavatar_count = $avatar_handler->getCount(new Criteria('avatar_type', 'C')); // Assign Template variables $xoopsTpl->assign('type', $type); $xoopsTpl->assign('count_system', $savatar_count); $xoopsTpl->assign('count_custom', $cavatar_count); // Filter avatars $criteria = new Criteria('avatar_type', $type); - $avtcount = $avt_handler->getCount($criteria); + $avtcount = $avatar_handler->getCount($criteria); // Get avatar list $criteria->setStart($start); $criteria->setLimit($xoops->getModuleConfig('avatars_pager', 'system')); - $avatars = $avt_handler->getObjects($criteria, true); + $avatars = $avatar_handler->getObjects($criteria, true); // Construct avatars array $avatar_list = array(); $i = 0; foreach (array_keys($avatars) as $i) { $avatar_list[$i] = $avatars[$i]->getValues(); $avatar_list[$i]['type'] = $type; - $avatar_list[$i]['count'] = count($avt_handler->getUser($avatars[$i])); + $avatar_list[$i]['count'] = count($avatar_handler->getUser($avatars[$i])); if ($type == 'c') { - $user = $avt_handler->getUser($avatars[$i]); + $user = $avatar_handler->getUser($avatars[$i]); if (is_array($user) && isset($user[0])) { $avatar_list[$i]['user'] = $user[0]; } @@ -156,10 +156,10 @@ // User language $xoops->loadLanguage('user'); // Get avatar handler - $avt_handler = $xoops->getHandler('avatar'); + $avatar_handler = $xoops->getHandler('avatar'); $avatar_id = system_CleanVars($_REQUEST, 'avatar_id', 0, 'int'); if ($avatar_id > 0) { - $avatar = $avt_handler->get($avatar_id); + $avatar = $avatar_handler->get($avatar_id); // Create form $form = $avatar->getForm(); // Assign form @@ -183,13 +183,13 @@ 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png' ), $xoopsConfigUser['avatar_maxsize'], $xoopsConfigUser['avatar_width'], $xoopsConfigUser['avatar_height']); // Get avatar handler - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); // Get avatar id $avatar_id = system_CleanVars($_POST, 'avatar_id', 0, 'int'); if ($avatar_id > 0) { - $avatar = $avt_handler->get($avatar_id); + $avatar = $avatar_handler->get($avatar_id); } else { - $avatar = $avt_handler->create(); + $avatar = $avatar_handler->create(); } $err = array(); if ($uploader->fetchMedia('avatar_file')) { @@ -201,7 +201,7 @@ $avatar->setVar('avatar_file', 'avatars/' . $uploader->getSavedFileName()); $avatar->setVar('avatar_mimetype', $uploader->getMediaType()); $avatar->setVar('avatar_type', 's'); - if (!$avt_handler->insert($avatar)) { + if (!$avatar_handler->insert($avatar)) { $err[] = sprintf(_FAILSAVEIMG, $avatar->getVar('avatar_name')); } } @@ -209,7 +209,7 @@ $file = system_CleanVars($_REQUEST, 'avatar_file', 'blank.gif', 'string'); $avatar->setVars($_REQUEST); $avatar->setVar('avatar_file', 'avatars/' . $file); - if (!$avt_handler->insert($avatar)) { + if (!$avatar_handler->insert($avatar)) { $err[] = sprintf(_FAILSAVEIMG, $avatar->getVar('avatar_name')); } } @@ -235,16 +235,16 @@ case 'display': // Get avatar handler - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); // Get avatar id $avatar_id = system_CleanVars($_POST, 'avatar_id', 0, 'int'); if ($avatar_id > 0) { // Get avatar - $avatar = $avt_handler->get($avatar_id); + $avatar = $avatar_handler->get($avatar_id); $old = $avatar->getVar('avatar_display'); // Set value $avatar->setVar('avatar_display', !$old); - if (!$avt_handler->insert($avatar)) { + if (!$avatar_handler->insert($avatar)) { $error = true; } } @@ -266,9 +266,9 @@ $user_id = system_CleanVars($_REQUEST, 'user_id', 0, 'int'); $avatar_id = system_CleanVars($_REQUEST, 'avatar_id', 0, 'int'); // Get avatar handler - $avt_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getAvatarHandler(); if ($avatar_id > 0) { - $avatar = $avt_handler->get($avatar_id); + $avatar = $avatar_handler->get($avatar_id); $msg = '<div class="spacer"><img src="' . XOOPS_UPLOAD_URL . '/' . $avatar->getVar('avatar_file', 's') . '" alt="" /></div><div class="txtcenter bold">' . $avatar->getVar('avatar_name', 's') . '</div>' . _AM_SYSTEM_AVATAR_SUREDEL; // Display message $xoops->confirm(array( @@ -289,12 +289,12 @@ if ($avatar_id <= 0) { $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } - $avt_handler = $xoops->getAvatarHandler(); - $avatar = $avt_handler->get($avatar_id); + $avatar_handler = $xoops->getAvatarHandler(); + $avatar = $avatar_handler->get($avatar_id); if (!is_object($avatar)) { $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } - if (!$avt_handler->delete($avatar)) { + if (!$avatar_handler->delete($avatar)) { // Call Header xoops_cp_header(); // Display errors Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -103,7 +103,7 @@ $xoBreadCrumb->render(); $imgcat_handler = $xoops->getImagecategoryHandler(); - $imagecategorys = $imgcat_handler->getObjects(); + $imagecategorys = $imgcat_handler->getPermittedObjects(); $catcount = count($imagecategorys); $image_handler = $xoops->getImageHandler(); @@ -136,7 +136,7 @@ $form->setExtra('enctype="multipart/form-data"'); $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 50, 255), true); $select = new XoopsFormSelect(_IMAGECAT, 'imgcat_id'); - $select->addOptionArray($imgcat_handler->getList($groups, 'imgcat_write')); + $select->addOptionArray($imgcat_handler->getListByPermission($groups, 'imgcat_write')); $form->addElement($select, true); $form->addElement(new XoopsFormFile(_IMAGEFILE, 'image_file', 5000000)); $form->addElement(new XoopsFormText(_IMGWEIGHT, 'image_weight', 3, 4, 0)); @@ -240,7 +240,7 @@ } foreach (array_keys($images) as $i) { - $xoopsTpl->append_by_ref('images', $images[$i]->toArray()); + $xoopsTpl->append('images', $images[$i]->getValues()); } if ($imgcount > 0) { if ($imgcount > $xoops->getModuleConfig('images_pager', 'system')) { @@ -262,7 +262,7 @@ $form->setExtra('enctype="multipart/form-data"'); $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 50, 255), true); $select = new XoopsFormSelect(_IMAGECAT, 'imgcat_id', $imgcat_id); - $select->addOptionArray($imgcat_handler->getList($groups, 'imgcat_write')); + $select->addOptionArray($imgcat_handler->getListByPermission($groups, 'imgcat_write')); $form->addElement($select, true); $form->addElement(new XoopsFormFile(_IMAGEFILE, 'image_file', 5000000)); $form->addElement(new XoopsFormText(_IMGWEIGHT, 'image_weight', 3, 4, 0)); @@ -282,10 +282,10 @@ // Get image id $image_id = system_CleanVars($_POST, 'image_id', 0, 'int'); if ($image_id > 0) { - $img = $image_handler->get($image_id); + $img = $image_handler->getById($image_id); $old = $img->getVar('image_display'); $img->setVar('image_display', !$old); - if (!$image_handler->insert($img)) { + if (!$image_handler->insertImage($img)) { $error = true; } } @@ -306,7 +306,7 @@ // Get image id $image_id = system_CleanVars($_REQUEST, 'image_id', 0, 'int'); if ($image_id > 0) { - $image = $image_handler->get($image_id); + $image = $image_handler->getById($image_id); $image_cat = $imgcat_handler->get($image->getVar('imgcat_id')); // Define Breadcrumb and tips @@ -323,7 +323,7 @@ $form->setExtra('enctype="multipart/form-data"'); $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 50, 255, $image->getVar('image_nicename')), true); $select = new XoopsFormSelect(_IMAGECAT, 'imgcat_id', $image->getVar('imgcat_id')); - $select->addOptionArray($imgcat_handler->getList($groups, 'imgcat_write', $image->getVar('imgcat_write'))); + $select->addOptionArray($imgcat_handler->getListByPermission($groups, 'imgcat_write', $image->getVar('imgcat_write'))); $form->addElement($select, true); //$form->addElement(new XoopsFormFile( _IMAGEFILE, 'image_file', 5000000) ); $form->addElement(new XoopsFormText(_IMGWEIGHT, 'image_weight', 3, 4, $image->getVar('image_weight'))); @@ -355,7 +355,7 @@ // Get image id $image_id = system_CleanVars($_REQUEST, 'image_id', 0, 'int'); if ($image_id > 0) { - $image = $image_handler->get($image_id); + $image = $image_handler->getById($image_id); $msg = '<div style="width: 180px;margin:0 auto;"><img class="thumb" src="' . XOOPS_UPLOAD_URL . '/' . $image->getVar('image_name') . '" alt="" /></div>'; $msg .= '<div class="spacer">' . $image->getVar('image_nicename') . '</div>'; $msg .= '<div class="spacer">' . _AM_SYSTEM_IMAGES_RUDELIMG . '</div>'; @@ -378,11 +378,11 @@ $xoops->redirect('admin.php?fct=images', 1); } $image_handler = $xoops->getImageHandler(); - $image = $image_handler->get($image_id); + $image = $image_handler->getById($image_id); if (!is_object($image)) { $xoops->redirect('admin.php?fct=images', 1); } - if (!$image_handler->delete($image)) { + if (!$image_handler->deleteImage($image)) { xoops_cp_header(); $xoops->error(sprintf(_AM_SYSTEM_IMAGES_FAILDEL, $image->getVar('image_id'))); xoops_cp_footer(); @@ -406,9 +406,9 @@ // Get image id $image_id = system_CleanVars($_POST, 'image_id', 0, 'int'); if ($image_id > 0) { - $image = $image_handler->get($image_id); + $image = $image_handler->getById($image_id); $image->setVars($_POST); - if (!$image_handler->insert($image)) { + if (!$image_handler->insertImage($image)) { echo sprintf(_AM_SYSTEM_IMAGES_FAILSAVE, $avatar->getVar('avatar_name')); xoops_cp_footer(); exit; @@ -457,7 +457,7 @@ $image->setVar('image_body', $fbinary, true); @unlink($uploader->getSavedDestination()); } - if (!$image_handler->insert($image)) { + if (!$image_handler->insertImage($image)) { $err[] = sprintf(_FAILSAVEIMG, $image->getVar('image_nicename')); } } @@ -670,7 +670,7 @@ $images = $image_handler->getObjects(new Criteria('imgcat_id', $imgcat_id), true, false); $errors = array(); foreach (array_keys($images) as $i) { - if (!$image_handler->delete($images[$i])) { + if (!$image_handler->deleteImage($images[$i])) { $errors[] = sprintf(_AM_SYSTEM_IMAGES_FAILDEL, $i); } else { if (file_exists(XOOPS_UPLOAD_PATH . '/' . $images[$i]->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH . '/' . $images[$i]->getVar('image_name'))) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -17,8 +17,6 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -$xoops = Xoops::getInstance(); -$xoops->getAvatarHandler(); /** * System Avatar * @@ -103,46 +101,4 @@ parent::__construct($db); $this->className = 'SystemAvatar'; } - - /** - * Create new Object - * - * @param bool $isNew - * @return object - */ - function create($isNew = true) - { - $avatar = new SystemAvatar(); - if ($isNew) { - $avatar->setNew(); - } - return $avatar; - } - - /** - * Egt Object - * - * @param int $id - * @return object - */ - function get($id) - { - $avatar = false; - $id = intval($id); - if ($id > 0) { - $sql = 'SELECT * FROM ' . $this->db->prefix('avatar') . ' WHERE avatar_id=' . $id; - if (!$result = $this->db->query($sql)) { - return false; - } - $numrows = $this->db->getRowsNum($result); - if ($numrows == 1) { - $avatar = new SystemAvatar(); - $avatar->assignVars($this->db->fetchArray($result)); - return $avatar; - } - } - return $avatar; - } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-10-30 18:30:36 UTC (rev 8002) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php 2011-10-30 18:56:36 UTC (rev 8003) @@ -61,7 +61,7 @@ } unset($dirlist); } else { - $help = $module->toArray(); + $help = $module->getValues(); //$help['name'] = $module->getVar('dirname', 's'); $help['link'] = 'help.php?mid=' . $mid . '&' . $module->getInfo('help'); $xoopsTpl->append_by_ref('help', $help); @@ -107,7 +107,7 @@ $j = 0; foreach ($installed_mods as $module) { $list_help = array(); - $listed_mods[$i] = $module->toArray(); + $listed_mods[$i] = $module->getValues(); $listed_mods[$i]['image'] = $module->getInfo('image'); $listed_mods[$i]['adminindex'] = $module->getInfo('adminindex'); $listed_mods[$i]['version'] = round($module->getVar('version') / 100, 2); @@ -160,6 +160,4 @@ $xoopsTpl->assign('helpcontent', $helpcontent); } -xoops_cp_footer(); - -?> \ No newline at end of file +xoops_cp_footer(); \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-10-30 19:17:40
|
Revision: 8004 http://xoops.svn.sourceforge.net/xoops/?rev=8004&view=rev Author: trabis Date: 2011-10-30 19:17:33 +0000 (Sun, 30 Oct 2011) Log Message: ----------- Updating config and tplset class methods Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configcategory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplset.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -107,7 +107,7 @@ case 'tplset': $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); $tplset_handler =& xoops_gethandler('tplset'); - $tplsetlist =& $tplset_handler->getList(); + $tplsetlist = $tplset_handler->getNameList(); asort($tplsetlist); foreach ($tplsetlist as $key => $name) { $ele->addOption($key, $name); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/config.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -165,7 +165,18 @@ */ public function getConfigs(CriteriaElement $criteria = null, $id_as_key = false) { - return $this->_cHandler->getObjects($criteria, $id_as_key); + $criteria2 = new CriteriaCompo(); + if ($criteria) { + $criteria2->add($criteria); + if (!$criteria->getSort()) { + $criteria2->setSort('conf_order'); + $criteria2->setOrder('ASC'); + } + } else { + $criteria2->setSort('conf_order'); + $criteria2->setOrder('ASC'); + } + return $this->_cHandler->getObjects($criteria2, $id_as_key); } /** @@ -276,6 +287,8 @@ if (empty($conf_catid)) { $criteria->add(new Criteria('conf_catid', $conf_catid)); } + $criteria->setSort('conf_order'); + $criteria->setOrder('ASC'); $configs = $this->_cHandler->getObjects($criteria); $confcount = count($configs); $ret = array(); @@ -287,6 +300,4 @@ } } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configcategory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configcategory.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configcategory.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -109,7 +109,7 @@ * * @return array Array of {@link XoopsConfigCategory}s */ - public function getObjects(CriteriaElement $criteria = null, $id_as_key = false) + public function getCategoryObjects(CriteriaElement $criteria = null, $id_as_key = false) { $ret = array(); $limit = $start = 0; @@ -141,6 +141,4 @@ return $ret; } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -272,41 +272,4 @@ { parent::__construct($db, 'config', 'XoopsConfigItem', 'conf_id', 'conf_name'); } - - /** - * Get configs from the database - * - * @param CriteriaElement|null $criteria {@link CriteriaElement} - * @param bool $id_as_key return the config's id as key? - * @return array Array of {@link XoopsConfigItem} objects - */ - public function getObjects(CriteriaElement$criteria = null, $id_as_key = false) - { - $ret = array(); - $limit = $start = 0; - $sql = 'SELECT * FROM ' . $this->db->prefix('config'); - if (isset($criteria) && is_subclass_of($criteria, 'criteriaelement')) { - $sql .= ' ' . $criteria->renderWhere(); - $sql .= ' ORDER BY conf_order ASC'; - $limit = $criteria->getLimit(); - $start = $criteria->getStart(); - } - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return false; - } - while ($myrow = $this->db->fetchArray($result)) { - $config = new XoopsConfigItem(); - $config->assignVars($myrow); - if (!$id_as_key) { - $ret[] = $config; - } else { - $ret[$myrow['conf_id']] = $config; - } - unset($config); - } - return $ret; - } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -109,6 +109,4 @@ { parent::__construct($db, 'configoption', 'XoopsConfigOption', 'confop_id', 'confop_name'); } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplset.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplset.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/tplset.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -146,7 +146,7 @@ * @param CriteriaElement|null $criteria conditions to match * @return array array of tplsets matching the conditions **/ - public function getList(CriteriaElement$criteria = null) + public function getNameList(CriteriaElement $criteria = null) { $ret = array(); $tplsets = $this->getObjects($criteria, true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -145,7 +145,7 @@ case 'tplset': $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); $tplset_handler = $xoops->getTplsetHandler(); - $tplsetlist = $tplset_handler->getList(); + $tplsetlist = $tplset_handler->getNameList(); asort($tplsetlist); foreach ($tplsetlist as $key => $name) { $ele->addOption($key, $name); @@ -544,7 +544,7 @@ $xoBreadCrumb->render(); $confcat_handler = $xoops->getConfigcategoryHandler(); - $confcats = $confcat_handler->getObjects(); + $confcats = $confcat_handler->getCategoryObjects(); $image = system_adminVersion('preferences', 'configcat'); $count_prefs = 1; $nbcolonnes_pref = 5; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2011-10-30 18:56:36 UTC (rev 8003) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php 2011-10-30 19:17:33 UTC (rev 8004) @@ -71,7 +71,7 @@ $ele = new XoopsFormSelect(_AM_SYSTEM_TEMPLATES_SET, 'tplset', $GLOBALS['xoopsConfig']['tplset']); $tplset_handler = $xoops->getTplsetHandler(); - $tplsetlist = $tplset_handler->getList(); + $tplsetlist = $tplset_handler->getNameList(); asort($tplsetlist); foreach ($tplsetlist as $key => $name) { $ele->addOption($key, $name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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] |
From: <tr...@us...> - 2011-11-02 19:45:42
|
Revision: 8028 http://xoops.svn.sourceforge.net/xoops/?rev=8028&view=rev Author: trabis Date: 2011-11-02 19:45:32 +0000 (Wed, 02 Nov 2011) Log Message: ----------- Some refactoring on handlers, better to keep same name convention Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcapi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcheckgroup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectgroup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/grouppermform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_delete.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_post.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_select.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/searchform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/index.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/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/object.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/admin/prune.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/pmlite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/preloads/system.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/readpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/viewpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/activate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/category.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/deactivate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/permissions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/step.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/admin/visibility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changemail.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/changepass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/field.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/profile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/class/regstep.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/forms.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/lostpass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/admin_header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/comments/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groupperm.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/groups/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/images/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/mailusers/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/maintenance/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/smilies/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/userrank/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/jquery.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/users/users.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/blocks/system_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/group.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/maintenance.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/help.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/update.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/menu.php XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php XoopsCore/branches/2.6.x/2.6.0/htdocs/pmlite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/oninstall.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/modules/protector/onupdate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/private/smarty/xoops_plugins/function.block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/private/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/private/smarty/xoops_plugins/resource.db.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.config.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/art/functions.config.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -69,12 +69,12 @@ } $xoops = Xoops::getInstance(); - $module_handler = $xoops->getModuleHandler(); + $module_handler = $xoops->getHandlerModule(); if (!$module = $module_handler->getByDirname($dirname)) { trigger_error("Module '{$dirname}' does not exist", E_USER_WARNING); return null; } - $config_handler = $xoops->getConfigHandler(); + $config_handler = $xoops->getHandlerConfig(); $criteria = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid'))); $configs = $config_handler->getConfigs($criteria); $moduleConfig = array(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -101,7 +101,7 @@ public function getXoopsUser($uname) { $xoops = Xoops::getInstance(); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $criteria = new Criteria('uname', $uname); $getuser = $member_handler->getUsers($criteria); if (count($getuser) == 1) { @@ -151,7 +151,7 @@ { $xoops = Xoops::getInstance(); $ret = false; - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); // Create XOOPS Database User $newuser = $member_handler->createUser(); $newuser->setVar('uname', $uname); @@ -194,7 +194,7 @@ { $xoops = Xoops::getInstance(); $ret = false; - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $xoopsUser->setVar('pass', md5(stripslashes($pwd))); $tab_mapping = explode('|', $this->ldap_field_mapping); foreach ($tab_mapping as $mapping) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -51,7 +51,7 @@ public function authenticate($uname, $pwd = null) { $xoops = Xoops::getInstance(); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $user = $member_handler->loginUser($uname, $pwd); if ($user == false) { $this->setErrors(1, _US_INCORRECTLOGIN); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -89,7 +89,7 @@ $defaults = array('fields' => array('data', 'expires')); $this->settings = array_merge($defaults, $this->settings); $this->fields = $this->settings['fields']; - $this->model = Xoops::getInstance()->getCachemodelHandler(); + $this->model = Xoops::getInstance()->getHandlerCachemodel(); return true; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -366,7 +366,7 @@ { $poster['id'] = intval($poster_id); if ($poster['id'] > 0) { - $com_poster = Xoops::getInstance()->getMemberHandler()->getUser($poster['id']); + $com_poster = Xoops::getInstance()->getHandlerMember()->getUser($poster['id']); if (!is_object($com_poster)) { $poster['id'] = 0; } @@ -387,7 +387,7 @@ $poster['id'] = intval($poster_id); if ($poster['id'] > 0) { $xoops = Xoops::getInstance(); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $com_poster = $member_handler->getUser($poster['id']); if (is_object($com_poster)) { $poster['uname'] = XoopsUserUtility::getUnameFromId($poster['id'], false, true); 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-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -316,7 +316,7 @@ } // Meta tags - $config_handler = $xoops->getConfigHandler(); + $config_handler = $xoops->getHandlerConfig(); $criteria = new CriteriaCompo(new Criteria('conf_modid', 0)); $criteria->add(new Criteria('conf_catid', XOOPS_CONF_METAFOOTER)); $config = $config_handler->getConfigs($criteria, true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -111,7 +111,7 @@ $template = null; $template = new XoopsTpl(); } - $block_handler = $xoops->getBlockHandler(); + $block_handler = $xoops->getHandlerBlock(); $block_arr = $block_handler->getAllByGroupModule($groups, $mid, $isStart, XOOPS_BLOCK_VISIBLE); $xoops->preload->triggerEvent('core.class.theme_blocks.retrieveBlocks', array(&$this, &$template, &$block_arr)); foreach ($block_arr as $block) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -43,7 +43,7 @@ } if (!empty($user) && !is_object($user)) { - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $user = $member_handler->getUser($user); } if (!is_object($user)) { @@ -165,7 +165,7 @@ // Check if uname/email already exists if the user is a new one $uid = is_object($user) ? $user->getVar('uid') : 0; - $user_handler = $xoops->getUserHandler(); + $user_handler = $xoops->getHandlerUser(); $myts = MyTextSanitizer::getInstance(); $criteria = new CriteriaCompo(new Criteria('uname', $myts->addSlashes($uname))); @@ -277,7 +277,7 @@ $criteria = new CriteriaCompo(new Criteria('level', 0, '>')); $criteria->add(new Criteria('uid', "('" . implode(',', array_unique($userid)) . "')", 'IN')); - $user_handler = $xoops->getUserHandler(); + $user_handler = $xoops->getHandlerUser(); if (!$rows = $user_handler->getAll($criteria, array('uid', 'uname', 'name'), false, true)) { return $users; } @@ -313,7 +313,7 @@ $userid = intval($userid); $username = ''; if ($userid > 0) { - $member_handler = $xoops->getMemberhandler(); + $member_handler = $xoops->getHandlerMember(); $user = $member_handler->getUser($userid); if (is_object($user)) { if ($usereal && $user->getVar('name')) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcapi.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcapi.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcapi.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -78,13 +78,13 @@ if (isset($this->user)) { return true; } - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $this->user = $member_handler->loginUser(addslashes($username), addslashes($password)); if (!is_object($this->user)) { unset($this->user); return false; } - $moduleperm_handler = $xoops->getGrouppermHandler(); + $moduleperm_handler = $xoops->getHandlerGroupperm(); if (!$moduleperm_handler->checkRight('module_read', $this->module->getVar('mid'), $this->user->getGroups())) { unset($this->user); return false; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -442,247 +442,245 @@ } /** - * @param mixed $name * @param mixed $optional - * @return XoopsObjectHandler|XoopsPersistableObjectHandler|null - */ - public function getKernel($name, $optional = false) - { - $name = strtolower(trim($name)); - $class = ''; - if (!isset($this->_kernelHandlers[$name])) { - $class = 'Xoops' . ucfirst($name) . 'Handler'; - if (class_exists($class)) { - $this->_kernelHandlers[$name] = new $class($this->db); - } - } - if (!isset($this->_kernelHandlers[$name])) { - trigger_error('Class <strong>' . $class . '</strong> does not exist<br />Handler Name: ' . $name, $optional - ? E_USER_WARNING : E_USER_ERROR); - } - if (isset($this->_kernelHandlers[$name])) { - return $this->_kernelHandlers[$name]; - } - return false; - } - - /** - * @param mixed $optional * @return XoopsAvatarHandler */ - public function getAvatarHandler($optional = false) + public function getHandlerAvatar($optional = false) { - return $this->getKernel('avatar', $optional); + return $this->getHandler('avatar', $optional); } /** * @param mixed $optional * @return XoopsBlockHandler */ - public function getBlockHandler($optional = false) + public function getHandlerBlock($optional = false) { - return $this->getKernel('block', $optional); + return $this->getHandler('block', $optional); } /** * @param mixed $optional * @return XoopsCachemodelHandler */ - public function getCachemodelHandler($optional = false) + public function getHandlerCachemodel($optional = false) { - return $this->getKernel('cachemodel', $optional); + return $this->getHandler('cachemodel', $optional); } /** * @param mixed $optional * @return XoopsConfigHandler */ - public function getConfigHandler($optional = false) + public function getHandlerConfig($optional = false) { - return $this->getKernel('config', $optional); + return $this->getHandler('config', $optional); } /** * @param mixed $optional * @return XoopsCommentHandler */ - public function getCommentHandler($optional = false) + public function getHandlerComment($optional = false) { - return $this->getKernel('comment', $optional); + return $this->getHandler('comment', $optional); } /** * @param mixed $optional * @return XoopsConfigcategoryHandler */ - public function getConfigcategoryHandler($optional = false) + public function getHandlerConfigcategory($optional = false) { - return $this->getKernel('configcategory', $optional); + return $this->getHandler('configcategory', $optional); } /** * @param mixed $optional * @return XoopsConfigitemHandler */ - public function getConfigitemHandler($optional = false) + public function getHandlerConfigitem($optional = false) { - return $this->getKernel('configitem', $optional); + return $this->getHandler('configitem', $optional); } /** * @param mixed $optional * @return XoopsConfigoptionHandler */ - public function getConfigoptionHandler($optional = false) + public function getHandlerConfigoption($optional = false) { - return $this->getKernel('configoption', $optional); + return $this->getHandler('configoption', $optional); } /** * @param mixed $optional * @return XoopsGroupHandler */ - public function getGroupHandler($optional = false) + public function getHandlerGroup($optional = false) { - return $this->getKernel('group', $optional); + return $this->getHandler('group', $optional); } /** * @param mixed $optional * @return XoopsGrouppermHandler */ - public function getGrouppermHandler($optional = false) + public function getHandlerGroupperm($optional = false) { - return $this->getKernel('groupperm', $optional); + return $this->getHandler('groupperm', $optional); } /** * @param mixed $optional * @return XoopsImageHandler */ - public function getImageHandler($optional = false) + public function getHandlerImage($optional = false) { - return $this->getKernel('image', $optional); + return $this->getHandler('image', $optional); } /** * @param mixed $optional * @return XoopsImagecategoryHandler */ - public function getImagecategoryHandler($optional = false) + public function getHandlerImagecategory($optional = false) { - return $this->getKernel('imagecategory', $optional); + return $this->getHandler('imagecategory', $optional); } /** * @param mixed $optional * @return XoopsImagesetHandler */ - public function getImagesetHandler($optional = false) + public function getHandlerImageset($optional = false) { - return $this->getKernel('imageset', $optional); + return $this->getHandler('imageset', $optional); } /** * @param mixed $optional * @return XoopsImagesetimgHandler */ - public function getImagesetimgHandler($optional = false) + public function getHandlerImagesetimg($optional = false) { - return $this->getKernel('imagesetimg', $optional); + return $this->getHandler('imagesetimg', $optional); } /** * @param mixed $optional * @return XoopsMemberHandler */ - public function getMemberHandler($optional = false) + public function getHandlerMember($optional = false) { - return $this->getKernel('member', $optional); + return $this->getHandler('member', $optional); } /** * @param mixed $optional - * @return XoopsConfigoptionHandler + * @return XoopsMembershipHandler */ - public function getMembershipHandler($optional = false) + public function getHandlerMembership($optional = false) { - return $this->getKernel('membership', $optional); + return $this->getHandler('membership', $optional); } /** * @param mixed $optional * @return XoopsModuleHandler */ - public function getModuleHandler($optional = false) + public function getHandlerModule($optional = false) { - return $this->getKernel('module', $optional); + return $this->getHandler('module', $optional); } /** * @param mixed $optional * @return XoopsNotificationHandler */ - public function getNotificationHandler($optional = false) + public function getHandlerNotification($optional = false) { - return $this->getKernel('notification', $optional); + return $this->getHandler('notification', $optional); } /** * @param mixed $optional * @return XoopsOnlineHandler */ - public function getOnlineHandler($optional = false) + public function getHandlerOnline($optional = false) { - return $this->getKernel('online', $optional); + return $this->getHandler('online', $optional); } /** * @param mixed $optional * @return XoopsPrivmessageHandler */ - public function getPrivmessageHandler($optional = false) + public function getHandlerPrivmessage($optional = false) { - return $this->getKernel('privmessage', $optional); + return $this->getHandler('privmessage', $optional); } - /** * @param mixed $optional * @return XoopsSessionHandler */ - public function getSessionHandler($optional = false) + public function getHandlerSession($optional = false) { - return $this->getKernel('session', $optional); + return $this->getHandler('session', $optional); } /** * @param mixed $optional * @return XoopsTplfileHandler */ - public function getTplfileHandler($optional = false) + public function getHandlerTplfile($optional = false) { - return $this->getKernel('tplfile', $optional); + return $this->getHandler('tplfile', $optional); } /** * @param mixed $optional * @return XoopsTplsetHandler */ - public function getTplsetHandler($optional = false) + public function getHandlerTplset($optional = false) { - return $this->getKernel('tplset', $optional); + return $this->getHandler('tplset', $optional); } /** * @param mixed $optional * @return XoopsUserHandler */ - public function getUserHandler($optional = false) + public function getHandlerUser($optional = false) { - return $this->getKernel('user', $optional); + return $this->getHandler('user', $optional); } + /** + * @param mixed $name + * @param mixed $optional + * @return XoopsObjectHandler|XoopsPersistableObjectHandler|null + */ + public function getHandler($name, $optional = false) + { + $name = strtolower(trim($name)); + $class = ''; + if (!isset($this->_kernelHandlers[$name])) { + $class = 'Xoops' . ucfirst($name) . 'Handler'; + if (class_exists($class)) { + $this->_kernelHandlers[$name] = new $class($this->db); + } + } + if (!isset($this->_kernelHandlers[$name])) { + trigger_error('Class <strong>' . $class . '</strong> does not exist<br />Handler Name: ' . $name, $optional + ? E_USER_WARNING : E_USER_ERROR); + } + if (isset($this->_kernelHandlers[$name])) { + return $this->_kernelHandlers[$name]; + } + return false; + } /** * @param string|null $name @@ -690,7 +688,7 @@ * @param bool $optional * @return XoopsObjectHandler|XoopsPersistableObjectHandler|bool */ - public function getHandler($name = null, $module_dir = null, $optional = false) + public function getModuleHandler($name = null, $module_dir = null, $optional = false) { // if $module_dir is not specified if (!isset($module_dir)) { @@ -775,7 +773,7 @@ */ public function setActiveModules() { - $module_handler = Xoops::getInstance()->getModuleHandler(); + $module_handler = Xoops::getInstance()->getHandlerModule(); $modules_active = $module_handler->getAll(new Criteria('isactive', 1), array('dirname'), false, false); XoopsCache::write('system_modules_active', $modules_active); return $modules_active; @@ -1242,8 +1240,7 @@ if (is_object($mailer)) { return $mailer; } - - include_once XOOPS_ROOT_PATH . '/class/xoopsmailer.php'; + XoopsLoad::load('XoopsMailer'); $this->loadLanguage('xoopsmailerlocal'); if (class_exists('XoopsMailerLocal')) { $mailer = new XoopsMailerLocal(); @@ -1274,6 +1271,10 @@ return $rank; } + /** + * @param string $option + * @return string + */ public function getOption($option) { $ret = ''; @@ -1288,7 +1289,7 @@ * @param string $type * @return mixed */ - function getConfig($key, $type = 'XOOPS_CONF') + public function getConfig($key, $type = 'XOOPS_CONF') { if (isset($this->_systemConfigs[$key])) { return $this->_systemConfigs[$key]; @@ -1301,9 +1302,9 @@ return $this->_systemConfigs[$key]; } - function getConfigs($type = 'XOOPS_CONF') + public function getConfigs($type = 'XOOPS_CONF') { - $configs = $this->getConfigHandler()->getConfigsByCat((is_array($type)) ? $type : (!defined($type) ? $type + $configs = $this->getHandlerConfig()->getConfigsByCat((is_array($type)) ? $type : (!defined($type) ? $type : constant($type))); $this->_systemConfigs = array_merge($this->_systemConfigs, $configs); $this->config =& $this->_systemConfigs; //for compatibilty @@ -1314,7 +1315,7 @@ * @param $configs * @return void */ - function addConfigs($configs) + public function addConfigs($configs) { $this->_systemConfigs = array_merge($this->_systemConfigs, (array)$configs); } @@ -1366,9 +1367,9 @@ } $this->_moduleConfigs[$dirname] = array(); - $module = $this->getModuleHandler()->getByDirname($dirname); + $module = $this->getHandlerModule()->getByDirname($dirname); if (is_object($module)) { - $this->_moduleConfigs[$dirname] = $this->getConfigHandler()->getConfigsByCat(0, $module->getVar('mid')); + $this->_moduleConfigs[$dirname] = $this->getHandlerConfig()->getConfigsByCat(0, $module->getVar('mid')); } if ($this->isModule()) { $this->moduleConfig =& $this->_moduleConfigs[$module->getVar('dirname')]; @@ -1480,7 +1481,7 @@ */ public function templateTouch($tpl_id, $clear_old = true) { - $tplfile = $this->getTplfileHandler()->get($tpl_id); + $tplfile = $this->getHandlerTplfile()->get($tpl_id); if (is_object($tplfile)) { $file = $tplfile->getVar('tpl_file', 'n'); @@ -1498,7 +1499,7 @@ */ public function templateClearModuleCache($mid) { - $block_arr = $this->getBlockHandler()->getByModule($mid); + $block_arr = $this->getHandlerBlock()->getByModule($mid); $count = count($block_arr); if ($count > 0) { $xoopsTpl = new XoopsTpl(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcheckgroup.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcheckgroup.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcheckgroup.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -35,7 +35,7 @@ { parent::__construct($caption, $name, $value, '', true); $this->columns = 3; - $this->userGroups = Xoops::getInstance()->getMemberHandler()->getGroupList(); + $this->userGroups = Xoops::getInstance()->getHandlerMember()->getGroupList(); foreach ($this->userGroups as $group_id => $group_name) { $this->addOption($group_id, $group_name); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectgroup.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectgroup.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectgroup.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -38,7 +38,7 @@ public function __construct($caption, $name, $include_anon = false, $value = null, $size = 1, $multiple = false) { parent::__construct($caption, $name, $value, $size, $multiple); - $member_handler = Xoops::getInstance()->getMemberHandler(); + $member_handler = Xoops::getInstance()->getHandlerMember(); if (!$include_anon) { $this->addOptionArray($member_handler->getGroupList(new Criteria('groupid', XOOPS_GROUP_ANONYMOUS, '!='))); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -46,7 +46,7 @@ if ($include_anon) { $select_element->addOption(0, $xoops->config['anonymous']); } - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $user_count = $member_handler->getUserCount(); $value = is_array($value) ? $value : (empty($value) ? array() : array($value)); if ($user_count > $limit && count($value) > 0) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/grouppermform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/grouppermform.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/grouppermform.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -134,8 +134,8 @@ $this->_itemTree[$item_id]['allchild'] = array(); $this->_loadAllChildItemIds($item_id, $this->_itemTree[$item_id]['allchild']); } - $gperm_handler = $xoops->getGrouppermHandler(); - $member_handler = $xoops->getMemberHandler(); + $gperm_handler = $xoops->getHandlerGroupperm(); + $member_handler = $xoops->getHandlerMember(); $glist = $member_handler->getGroupList(); foreach (array_keys($glist) as $i) { if ($i == XOOPS_GROUP_ANONYMOUS && !$this->_showAnonymous) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -441,7 +441,7 @@ private function sendPM($uid, $subject, $body) { $xoops = Xoops::getInstance(); - $pm_handler = $xoops->getPrivmessageHandler(); + $pm_handler = $xoops->getHandlerPrivmessage(); $pm = $pm_handler->create(); $pm->setVar("subject", $subject); // RMV-NOTIFY @@ -603,7 +603,7 @@ public function setToGroups(XoopsGroup $group) { if (!is_array($group)) { - $this->setToUsers(Xoops::getInstance()->getMemberHandler() + $this->setToUsers(Xoops::getInstance()->getHandlerMember() ->getUsersByGroup($group->getVar('groupid'), true)); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -38,7 +38,7 @@ $op = $_GET['op']; } -$config_handler = $xoops->getConfigHandler(); +$config_handler = $xoops->getHandlerConfig(); $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); $myts = MyTextSanitizer::getInstance(); if ($op == 'saveuser') { @@ -89,7 +89,7 @@ echo '</div><br />'; $op = 'editprofile'; } else { - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $edituser = $member_handler->getUser($uid); $edituser->setVar('name', $_POST['name']); if ($xoopsConfigUser['allow_chgmail'] == 1) { @@ -256,7 +256,7 @@ $form->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit')); $form->display(); } - $avatar_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getHandlerAvatar(); $form2 = new XoopsThemeForm(_US_CHOOSEAVT, 'uploadavatar', 'edituser.php', 'post', true); $avatar_select = new XoopsFormSelect('', 'user_avatar', $xoops->user->getVar('user_avatar')); $avatar_list = $avatar_handler->getListByType('S', true); @@ -303,7 +303,7 @@ if ($uploader->fetchMedia($_POST['xoops_upload_file'][0])) { $uploader->setPrefix('cavt'); if ($uploader->upload()) { - $avatar_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getHandlerAvatar(); $avatar = $avatar_handler->create(); $avatar->setVar('avatar_file', 'avatars/' . $uploader->getSavedFileName()); $avatar->setVar('avatar_name', $xoops->user->getVar('uname')); @@ -349,7 +349,7 @@ exit(); } $user_avatar = ''; - $avatar_handler = $xoops->getAvatarHandler(); + $avatar_handler = $xoops->getHandlerAvatar(); if (!empty($_POST['user_avatar'])) { $user_avatar = $myts->addSlashes(trim($_POST['user_avatar'])); $criteria_avatar = new CriteriaCompo(new Criteria('avatar_file', $user_avatar)); @@ -364,7 +364,7 @@ if (0 === strpos($user_avatarpath, realpath(XOOPS_UPLOAD_PATH)) && is_file($user_avatarpath)) { $oldavatar = $xoops->user->getVar('user_avatar'); $xoops->user->setVar('user_avatar', $user_avatar); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); if (!$member_handler->insertUser($xoops->user)) { $xoops->header(); echo $xoops->user->getHtmlErrors(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -44,7 +44,7 @@ $xoops->db = XoopsDatabaseFactory::getDatabaseConnection(); // ################# Include class manager file ############## -$image_handler = $xoops->getImageHandler(); +$image_handler = $xoops->getHandlerImage(); $criteria = new CriteriaCompo(new Criteria('i.image_display', 1)); $criteria->add(new Criteria('i.image_id', $image_id)); $image = $image_handler->getObjects($criteria, false, true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -42,7 +42,7 @@ $xoopsTpl->assign('sitename', htmlspecialchars($xoops->config['sitename'], ENT_QUOTES)); $target = htmlspecialchars($target, ENT_QUOTES); $xoopsTpl->assign('target', $target); - $imgcat_handler = $xoops->getImagecategoryHandler(); + $imgcat_handler = $xoops->getHandlerImagecategory(); $catlist = $imgcat_handler->getListByPermission($group, 'imgcat_read', 1); $catcount = count($catlist); $xoopsTpl->assign('lang_align', _ALIGN); @@ -67,12 +67,12 @@ } $xoopsTpl->assign('cat_options', $cat_options); if ($catshow > 0) { - $image_handler = $xoops->getImageHandler(); + $image_handler = $xoops->getHandlerImage(); $criteria = new CriteriaCompo(new Criteria('imgcat_id', $catshow)); $criteria->add(new Criteria('image_display', 1)); $total = $image_handler->getCount($criteria); if ($total > 0) { - $imgcat_handler = $xoops->getImagecategoryHandler(); + $imgcat_handler = $xoops->getHandlerImagecategory(); $imgcat = $imgcat_handler->get($catshow); $xoopsTpl->assign('image_total', $total); $xoopsTpl->assign('lang_image', _IMAGE); @@ -132,14 +132,14 @@ } if ($op == 'upload') { - $imgcat_handler = $xoops->getImagecategoryHandler(); + $imgcat_handler = $xoops->getHandlerImagecategory(); $imgcat_id = intval($_GET['imgcat_id']); $imgcat = $imgcat_handler->get($imgcat_id); $error = false; if (!is_object($imgcat)) { $error = true; } else { - $imgcatperm_handler = $xoops->getGrouppermHandler(); + $imgcatperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->isUser()) { if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoops->user->getGroups())) { $error = true; @@ -183,13 +183,13 @@ $image_nicename = isset($_POST['image_nicename']) ? $_POST['image_nicename'] : ''; $xoops_upload_file = isset($_POST['xoops_upload_file']) ? $_POST['xoops_upload_file'] : array(); $imgcat_id = isset($_POST['imgcat_id']) ? intval($_POST['imgcat_id']) : 0; - $imgcat_handler = $xoops->getImagecategoryHandler(); + $imgcat_handler = $xoops->getHandlerImagecategory(); $imgcat = $imgcat_handler->get($imgcat_id); $error = false; if (!is_object($imgcat)) { $error = true; } else { - $imgcatperm_handler = $xoops->getGrouppermHandler(); + $imgcatperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->isUser()) { if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoops->user->getGroups())) { $error = true; @@ -216,7 +216,7 @@ if (!$uploader->upload()) { $err = $uploader->getErrors(); } else { - $image_handler = $xoops->getImageHandler();; + $image_handler = $xoops->getHandlerImage();; $image = $image_handler->create(); $image->setVar('image_name', $uploader->getSavedFileName()); $image->setVar('image_nicename', $image_nicename); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -29,7 +29,7 @@ exit(); } -$member_handler = $xoops->getMemberHandler(); +$member_handler = $xoops->getHandlerMember(); $myts = MyTextsanitizer::getInstance(); $xoops->loadLanguage('auth'); @@ -60,7 +60,7 @@ if (!$member_handler->insertUser($user)) { } // Regenerate a new session id and destroy old session - $xoops->getSessionHandler()->regenerate_id(true); + $xoops->getHandlerSession()->regenerate_id(true); $_SESSION = array(); $_SESSION['xoopsUserId'] = $user->getVar('uid'); $_SESSION['xoopsUserGroups'] = $user->getGroups(); @@ -102,7 +102,7 @@ // RMV-NOTIFY // Perform some maintenance of notification records - $notification_handler = $xoops->getNotificationHandler(); + $notification_handler = $xoops->getHandlerNotification(); $notification_handler->doLoginMaintenance($user->getVar('uid')); $xoops->redirect($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')), false); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_delete.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_delete.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_delete.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -38,8 +38,8 @@ } if ('system' == $xoops->module->getVar('dirname')) { - $comment = $xoops->getCommentHandler()->get($com_id); - $module = $xoops->getModuleHandler()->getById($comment->getVar('com_modid')); + $comment = $xoops->getHandlerComment()->get($com_id); + $module = $xoops->getHandlerModule()->getById($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); $com_modid = $module->getVar('mid'); $redirect_page = XOOPS_URL . '/modules/system/admin.php?fct=comments&com_modid=' . $com_modid . '&com_itemid'; @@ -79,7 +79,7 @@ /* @var $xoopsUser XoopsUser */ if (!$xoops->user->isAdmin($com_modid)) { include_once $xoops->path('modules/system/constants.php'); - $sysperm_handler = $xoops->getGrouppermHandler(); + $sysperm_handler = $xoops->getHandlerGroupperm(); if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoops->user->getGroups())) { $accesserror = true; } @@ -99,7 +99,7 @@ switch ($op) { case 'delete_one': /* @var $comment_handler XoopsCommentHandler */ - $comment_handler = $xoops->getCommentHandler(); + $comment_handler = $xoops->getHandlerComment(); /* @var $comment XoopsComment */ $comment = $comment_handler->get($com_id); if (!$comment_handler->delete($comment)) { @@ -136,7 +136,7 @@ // update user posts if its not an anonymous post if ($comment->getVar('com_uid') != 0) { - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $com_poster = $member_handler->getUser($comment->getVar('com_uid')); if (is_object($com_poster)) { $member_handler->updateUserByField($com_poster, 'posts', $com_poster->getVar('posts') - 1); @@ -186,7 +186,7 @@ break; case 'delete_all': - $comment_handler = $xoops->getCommentHandler(); + $comment_handler = $xoops->getHandlerComment(); $comment = $comment_handler->get($com_id); $com_rootid = $comment->getVar('com_rootid'); @@ -200,7 +200,7 @@ $child_comments[$com_id] = $comment; $msgs = array(); $deleted_num = array(); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); foreach (array_keys($child_comments) as $i) { if (!$comment_handler->delete($child_comments[$i])) { $msgs[] = _CM_COMDELETENG . ' (ID: ' . $child_comments[$i]->getVar('com_id') . ')'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -52,7 +52,7 @@ $com_order = intval($_GET['com_order']); } -$comment_handler = $xoops->getCommentHandler(); +$comment_handler = $xoops->getHandlerComment(); $comment = $comment_handler->get($com_id); $dohtml = $comment->getVar('dohtml'); $dosmiley = $comment->getVar('dosmiley'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_post.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_post.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_post.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -30,8 +30,8 @@ if (empty($com_id)) { exit(); } - $comment = $xoops->getCommentHandler()->get($com_id); - $module = $xoops->getModuleHandler()->getById($comment->getVar('com_modid')); + $comment = $xoops->getHandlerComment()->get($com_id); + $module = $xoops->getHandlerModule()->getById($comment->getVar('com_modid')); $comment_config = $module->getInfo('comments'); $com_modid = $module->getVar('mid'); $redirect_page = XOOPS_URL . '/modules/system/admin.php?fct=comments&com_modid=' . $com_modid . '&com_itemid'; @@ -112,7 +112,7 @@ if ($xoops->isUser()) { if (!$xoops->user->isAdmin($com_modid)) { include_once $xoops->path('modules/system/constants.php'); - $sysperm_handler = $xoops->getGrouppermHandler(); + $sysperm_handler = $xoops->getHandlerGroupperm(); if (!$sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoops->user->getGroups())) { $dohtml = 0; } @@ -148,7 +148,7 @@ case "post": $doimage = 1; - $comment_handler = $xoops->getCommentHandler(); + $comment_handler = $xoops->getHandlerComment(); $add_userpost = false; $call_approvefunc = false; $call_updatefunc = false; @@ -160,7 +160,7 @@ if ($xoops->isUser()) { include_once $xoops->path('modules/system/constants.php'); - $sysperm_handler = $xoops->getGrouppermHandler(); + $sysperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->user->isAdmin($com_modid) || $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoops->user->getGroups())) { if (!empty($com_status) && $com_status != XOOPS_COMMENT_PENDING) { $old_com_status = $comment->getVar('com_status'); @@ -209,7 +209,7 @@ $comment->setVar('com_ip', $xoops->getEnv('REMOTE_ADDR')); if ($xoops->isUser()) { include_once $xoops->path('modules/system/constants.php'); - $sysperm_handler = $xoops->getGrouppermHandler(); + $sysperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->user->isAdmin($com_modid) || $sysperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $xoops->user->getGroups())) { $comment->setVar('com_status', XOOPS_COMMENT_ACTIVE); $add_userpost = true; @@ -349,7 +349,7 @@ // increment user post if needed $uid = $comment->getVar('com_uid'); if ($uid > 0 && false != $add_userpost) { - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $poster = $member_handler->getUser($uid); if ($poster instanceof XoopsUser) { $member_handler->updateUserByField($poster, 'posts', $poster->getVar('posts') + 1); @@ -371,7 +371,7 @@ $comment_tags = array(); if ('system' == $xoops->module->getVar('dirname')) { /* @var $module_handler XoopsModuleHandler */ - $not_module = $xoops->getModuleHandler()->getById($not_modid); + $not_module = $xoops->getHandlerModule()->getById($not_modid); } else { $not_module = $xoops->module; } @@ -391,7 +391,7 @@ } $comment_tags['X_COMMENT_URL'] = XOOPS_URL . '/modules/' . $not_module->getVar('dirname') . '/' . $comment_url . '=' . $com_itemid . '&com_id=' . $newcid . '&com_rootid=' . $com_rootid . '&com_mode=' . $com_mode . '&com_order=' . $com_order . '#comment' . $newcid; - $notification_handler = $xoops->getNotificationHandler(); + $notification_handler = $xoops->getHandlerNotification(); $notification_handler->triggerEvent($not_category, $not_itemid, $not_event, $comment_tags, false, $not_modid); } if (!isset($comment_post_results)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -47,7 +47,7 @@ } else { $com_order = intval($_GET['com_order']); } -$comment_handler = $xoops->getCommentHandler(); +$comment_handler = $xoops->getHandlerComment(); $comment = $comment_handler->get($com_id); $r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid')); $r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong> ' . _CM_POSTED . ': <strong>' . XoopsLocal::formatTimestamp($comment->getVar('com_created')) . '</strong><br /><br />' . $comment->getVar('com_text'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -27,7 +27,7 @@ if (XOOPS_COMMENT_APPROVENONE != $xoops->moduleConfig['com_rule']) { include_once $xoops->path('modules/system/constants.php'); - $gperm_handler = $xoops->getGrouppermHandler(); + $gperm_handler = $xoops->getHandlerGroupperm(); $groups = $xoops->isUser() ? $xoops->user->getGroups() : XOOPS_GROUP_ANONYMOUS; $xoops->tpl->assign('xoops_iscommentadmin', $gperm_handler->checkRight('system_admin', XOOPS_SYSTEM_COMMENT, $groups)); @@ -74,7 +74,7 @@ $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0; $com_rootid = isset($_GET['com_rootid']) ? intval($_GET['com_rootid']) : 0; - $comment_handler = $xoops->getCommentHandler(); + $comment_handler = $xoops->getHandlerComment(); if ($com_mode == 'flat') { $comments = $comment_handler->getByItemId($xoops->module->getVar('mid'), $com_itemid, $com_dborder); $renderer = XoopsCommentRenderer::getInstance($xoops->tpl); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -156,8 +156,8 @@ /** * User Sessions */ -$member_handler = $xoops->getMemberHandler(); -$sess_handler = $xoops->getSessionHandler(); +$member_handler = $xoops->getHandlerMember(); +$sess_handler = $xoops->getHandlerSession(); if ($xoops->getConfig('use_ssl') && isset($_POST[$xoops->getConfig('sslpost_name')]) && $_POST[$xoops->getConfig('sslpost_name')] != '' ) { @@ -208,7 +208,7 @@ setcookie($xoops->getConfig('usercookie'), 0, -1, '/'); } else { if ((intval($xoops->user->getVar('last_login')) + 60 * 5) < time()) { - $user_handler = $xoops->getUserHandler(); + $user_handler = $xoops->getHandlerUser(); $criteria = new Criteria('uid', $_SESSION['xoopsUserId']); $user_handler->updateAll('last_login', time(), $criteria, true); unset($criteria); @@ -259,7 +259,7 @@ $xoops->moduleDirname = 'system'; if (file_exists('./xoops_version.php')) { $url_arr = explode('/', strstr($_SERVER['PHP_SELF'], '/modules/')); - $module_handler = $xoops->getModulehandler(); + $module_handler = $xoops->getHandlerModule(); $xoops->module = $module_handler->getByDirname($url_arr[2]); $xoops->moduleDirname = $url_arr[2]; unset($url_arr); @@ -269,7 +269,7 @@ echo '<h4>' . _MODULENOEXIST . '</h4>'; $xoops->footer(); } - $moduleperm_handler = $xoops->getGrouppermHandler(); + $moduleperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->isUser()) { if (!$moduleperm_handler->checkRight('module_read', $xoops->module->getVar('mid'), $xoops->user->getGroups())) { $xoops->redirect(XOOPS_URL, 1, _NOPERM, false); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -27,10 +27,10 @@ $xoops->loadLanguage('admin'); include_once $xoops->path('include/cp_functions.php'); -$moduleperm_handler = $xoops->getGrouppermHandler(); +$moduleperm_handler = $xoops->getHandlerGroupperm(); if ($xoops->isUser()) { $url_arr = explode('/', strstr($_SERVER['REQUEST_URI'], '/modules/')); - $xoops->module = $xoops->getModuleHandler()->getByDirname($url_arr[2]); + $xoops->module = $xoops->getHandlerModule()->getByDirname($url_arr[2]); unset($url_arr); if (!$moduleperm_handler->checkRight('module_admin', $xoops->module->getVar('mid'), $xoops->user->getGroups())) { $xoops->redirect(XOOPS_URL, 1, _NOPERM); 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-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/findusers.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -368,7 +368,7 @@ 3 => _MA_USER_LEVEL_DISABLED); $level_radio->addOptionArray($levels); - $member_handler = $xoops->getMemberHandler(); + $member_handler = $xoops->getHandlerMember(); $groups = $member_handler->getGroupList(); $groups[0] = _ALL; $group_select = new XoopsFormSelect(_MA_USER_GROUP, 'groups', @$_POST['groups'], 3, true); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-02 09:44:46 UTC (rev 8027) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-02 19:45:32 UTC (rev 8028) @@ -28,7 +28,7 @@ { $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated('xoops_getHandler(\'' . $name . '\') is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); - $method = 'get' . ucfirst(strtolower(trim($name))) . 'Handler'; + $method = 'getHandler' . ucfirst(strtolower(trim($name))); return $xoops->$method($optional); } @@ -43,7 +43,7 @@ { $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated(__FUNCTION__ . ' is deprecated. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); - return $xoops->getHandler($name, $module_dir, $optional); + return $xoops->getModuleHandler($name, $module_dir, $optional); } /** @@ -349,7 +349,7 @@ { $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated(__FUNCTION__ . ' is deprecated since XOOPS 2.6.0. See how to rep... [truncated message content] |
From: <tr...@us...> - 2011-11-03 00:07:50
|
Revision: 8032 http://xoops.svn.sourceforge.net/xoops/?rev=8032&view=rev Author: trabis Date: 2011-11-03 00:07:41 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Using $xoops->getConfig() instead of $xoops->config, adding $xoops->disableModuleCache() and $xoops->appendConfig() methods to deal with module_cache and other configs that are arrays and cannot rely on $xoops->setConfig() Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_new.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/viewpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/Frameworks/moduleclasses/moduleadmin/moduleadmin.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -93,7 +93,7 @@ function loadLanguage() { $xoops = Xoops::getInstance(); - $language = $xoops->config['language']; + $language = $xoops->getConfig('language'); if ( !file_exists($fileinc = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/moduleadmin/language/{$language}/main.php" )){ if ( !file_exists($fileinc = XOOPS_ROOT_PATH . "/Frameworks/moduleclasses/moduleadmin/language/english/main.php" )){ return false; @@ -345,6 +345,7 @@ function renderAbout($paypal = '', $logo_xoops = true) { + $xoops = Xoops::getInstance(); $path = XOOPS_URL . "/Frameworks/moduleclasses/icons/32/"; $ret = "<table>\n<tr>\n"; @@ -402,11 +403,11 @@ $ret .= _AM_MODULEADMIN_ABOUT_CHANGELOG; $ret .= "</legend><br/>\n"; $ret .= "<div class=\"txtchangelog\">\n"; - $language = $xoops->config['language']; + $language = $xoops->getConfig('language'); if ( !is_file( XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt" ) ){ $language = 'english'; } - $language = empty($language) ? $xoops->config['language'] : $language; + $language = empty($language) ? $xoops->getConfig('language') : $language; $file = XOOPS_ROOT_PATH. "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; if ( is_readable( $file ) ){ $ret .= utf8_encode(implode("<br />", file( $file ))) . "\n"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -38,7 +38,7 @@ /** * Error warning messages */ -if (!isset($xoops->config['admin_warnings_enable']) || $xoops->config['admin_warnings_enable']) { +if ($xoops->getConfig('admin_warnings_enable')) { if (is_dir(XOOPS_ROOT_PATH . '/install/')) { $xoops->error(sprintf(_AD_WARNINGINSTALL, XOOPS_ROOT_PATH . '/install/')); echo '<br />'; @@ -49,15 +49,15 @@ echo '<br />'; } // ###### Output warn messages for correct functionality ###### - if (! is_writable(XOOPS_CACHE_PATH)) { + if (!is_writable(XOOPS_CACHE_PATH)) { $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_CACHE_PATH)); echo '<br />'; } - if (! is_writable(XOOPS_UPLOAD_PATH)) { + if (!is_writable(XOOPS_UPLOAD_PATH)) { $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_UPLOAD_PATH)); echo '<br />'; } - if (! is_writable(XOOPS_COMPILE_PATH)) { + if (!is_writable(XOOPS_COMPILE_PATH)) { $xoops->error(sprintf(_AD_WARNINGNOTWRITEABLE, XOOPS_COMPILE_PATH)); echo '<br />'; } @@ -96,7 +96,7 @@ if (false != $rss2parser->parse()) { $_items = $rss2parser->getItems(); $count = count($_items); - for ($i = 0; $i < $count; $i ++) { + for ($i = 0; $i < $count; $i++) { $_items[$i]['title'] = XoopsLocal::convert_encoding($_items[$i]['title'], _CHARSET, 'UTF-8'); $_items[$i]['description'] = XoopsLocal::convert_encoding($_items[$i]['description'], _CHARSET, 'UTF-8'); $items[strval(strtotime($_items[$i]['pubdate'])) . "-" . strval(++$cnt)] = $_items[$i]; @@ -111,23 +111,23 @@ } if ($items != '') { $ret = '<table class="outer width100">'; - foreach(array_keys($items) as $i) { + foreach (array_keys($items) as $i) { $ret .= '<tr class="head"><td><a href="' . htmlspecialchars($items[$i]['link']) . '" rel="external">'; $ret .= htmlspecialchars($items[$i]['title']) . '</a> (' . htmlspecialchars($items[$i]['pubdate']) . ')</td></tr>'; if ($items[$i]['description'] != "") { $ret .= '<tr><td class="odd">' . $items[$i]['description']; - if (! empty($items[$i]['guid'])) { + if (!empty($items[$i]['guid'])) { $ret .= ' <a href="' . htmlspecialchars($items[$i]['guid']) . '" rel="external" title="">' . _MORE . '</a>'; } $ret .= '</td></tr>'; - } else if ($items[$i]['guid'] != "") { - $ret .= '<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="' . htmlspecialchars($items[$i]['guid']) . '" rel="external">' . _MORE . '</a></td></tr>'; + } else { + if ($items[$i]['guid'] != "") { + $ret .= '<tr><td class="even aligntop"></td><td colspan="2" class="odd"><a href="' . htmlspecialchars($items[$i]['guid']) . '" rel="external">' . _MORE . '</a></td></tr>'; + } } } $ret .= '</table>'; echo $ret; } } -xoops_cp_footer(); - -?> \ No newline at end of file +xoops_cp_footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -28,12 +28,12 @@ $tpl->caching = 2; $tpl->cache_lifetime = 3600; if (!$tpl->is_cached('db:system_rss.html')) { - $tpl->assign('channel_title', XoopsLocal::convert_encoding(htmlspecialchars($xoops->config['sitename'], ENT_QUOTES))); + $tpl->assign('channel_title', XoopsLocal::convert_encoding(htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES))); $tpl->assign('channel_link', XOOPS_URL . '/'); - $tpl->assign('channel_desc', XoopsLocal::convert_encoding(htmlspecialchars($xoops->config['slogan'], ENT_QUOTES))); + $tpl->assign('channel_desc', XoopsLocal::convert_encoding(htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES))); $tpl->assign('channel_lastbuild', XoopsLocal::formatTimestamp(time(), 'rss')); - $tpl->assign('channel_webmaster', $xoops->checkEmail($xoops->config['adminmail'], true)); - $tpl->assign('channel_editor', $xoops->checkEmail($xoops->config['adminmail'], true)); + $tpl->assign('channel_webmaster', $xoops->checkEmail($xoops->getConfig('adminmail'), true)); + $tpl->assign('channel_editor', $xoops->checkEmail($xoops->getConfig('adminmail'), true)); $tpl->assign('channel_category', 'News'); $tpl->assign('channel_generator', 'XOOPS'); $tpl->assign('channel_language', _LANGCODE); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -157,7 +157,7 @@ } echo "</table> <br /><br /> - <h4 class='content_title'>" . _BANNERS_FOW_IN . htmlspecialchars($xoops->config['sitename']) . "</h4><hr />"; + <h4 class='content_title'>" . _BANNERS_FOW_IN . htmlspecialchars($xoops->getConfig('sitename')) . "</h4><hr />"; $result = $xoops->db->query("SELECT bid, imageurl, clickurl, htmlbanner, htmlcode FROM " . $xoops->db->prefix("banner") . " WHERE cid={$cid}"); while (list ($bid, $imageurl, $clickurl, $htmlbanner, $htmlcode) = $xoops->db->fetchRow($result)) { @@ -263,13 +263,13 @@ $left = $imptotal - $impmade; } $fecha = date("F jS Y, h:iA."); - $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->config['sitename']); - $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->config['sitename'], $name, $bid, $imageurl, $clickurl, $imptotal, $impmade, $left, $clicks, $percent, $fecha); + $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->getConfig('sitename')); + $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->getConfig('sitename'), $name, $bid, $imageurl, $clickurl, $imptotal, $impmade, $left, $clicks, $percent, $fecha); $xoopsMailer = $xoops->getMailer(); $xoopsMailer->useMail(); $xoopsMailer->setToEmails($email); - $xoopsMailer->setFromEmail($xoops->config['adminmail']); - $xoopsMailer->setFromName($xoops->config['sitename']); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); $xoopsMailer->setSubject($subject); $xoopsMailer->setBody($message); $xoopsMailer->send(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -125,7 +125,7 @@ $xoopsMailerConfig = $xoops->getConfigs(XOOPS_CONF_MAILER); $this->From = $xoopsMailerConfig['from']; if ($this->From == '') { - $this->From = $xoops->config['adminmail']; + $this->From = $xoops->getConfig('adminmail'); } $this->Sender = $this->From; if ($xoopsMailerConfig['mailmethod'] == 'smtpauth') { @@ -142,7 +142,7 @@ $this->Host = implode(';', $xoopsMailerConfig['smtphost']); } $this->CharSet = strtolower(_CHARSET); - $xoopsLanguage = preg_replace('/[^a-zA-Z0-9_-]/', '', $xoops->config['language']); + $xoopsLanguage = preg_replace('/[^a-zA-Z0-9_-]/', '', $xoops->getConfig('language')); if (file_exists(XOOPS_ROOT_PATH . '/language/' . $xoopsLanguage . '/phpmailer.php')) { include XOOPS_ROOT_PATH . '/language/' . $xoopsLanguage . '/phpmailer.php'; $this->language = $PHPMAILER_LANG; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -293,7 +293,7 @@ } } if (in_array(0, $users, true)) { - $users[0] = $myts->htmlSpecialChars($xoops->config['anonymous']); + $users[0] = $myts->htmlSpecialChars($xoops->getConfig('anonymous')); } return $users; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -289,12 +289,12 @@ */ public function themeSelect() { - if (!empty($_POST['xoops_theme_select']) && in_array($_POST['xoops_theme_select'], $this->config['theme_set_allowed'])) { - $this->config['theme_set'] = $_POST['xoops_theme_select']; + if (!empty($_POST['xoops_theme_select']) && in_array($_POST['xoops_theme_select'], $this->getConfig('theme_set_allowed'))) { + $this->setConfig('theme_set',$_POST['xoops_theme_select']); $_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select']; } else { - if (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $this->config['theme_set_allowed'])) { - $this->config['theme_set'] = $_SESSION['xoopsUserTheme']; + if (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $this->getConfig('theme_set_allowed'))) { + $this->setConfig('theme_set', $_SESSION['xoopsUserTheme']); } } } @@ -328,8 +328,8 @@ $xoopsThemeFactory = null; $xoopsThemeFactory = new xos_opal_ThemeFactory(); - $xoopsThemeFactory->allowedThemes = $this->config['theme_set_allowed']; - $xoopsThemeFactory->defaultTheme = $this->config['theme_set']; + $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); + $xoopsThemeFactory->defaultTheme = $this->getConfig('theme_set'); $this->theme = $xoopsThemeFactory->createInstance(array('contentTemplate' => $this->tpl_file)); @@ -337,7 +337,7 @@ // Temporary solution for start page redirection if (defined("XOOPS_STARTPAGE_REDIRECTED")) { - $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->config['startpage'] . "/' />", null, null); + $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->getConfig('startpage') . "/' />", null, null); } if (@is_object($this->theme->plugins['xos_logos_PageBuilder'])) { @@ -355,7 +355,8 @@ // Sets cache time if ($this->isModule()) { - $this->theme->contentCacheLifetime = @$this->config['module_cache'][$this->module->getVar('mid', 'n')]; + $cache_times = $this->getConfig('module_cache'); + $this->theme->contentCacheLifetime = isset($cache_times[$this->module->getVar('mid')]) ? $cache_times[$this->module->getVar('mid')] : 0; // Tricky solution for setting cache time for homepage } else { if (!empty($this->tpl_file) && $this->tpl_file == 'db:system_homepage.html') { @@ -822,9 +823,9 @@ <meta name="author" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_author']) . '" /> <meta name="copyright" content="' . htmlspecialchars($xoopsConfigMetaFooter['meta_copyright']) . '" /> <meta name="generator" content="XOOPS" /> - <title>' . htmlspecialchars($this->config['sitename']) . '</title> + <title>' . htmlspecialchars($this->getConfig('sitename')) . '</title> <script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script>'; - $themecss = $this->getcss($this->config['theme_set']); + $themecss = $this->getcss($this->getConfig('theme_set')); echo '<link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" />'; $language = $this->getConfig('language'); if (file_exists($this->path('language/' . $language . '/style.css'))) { @@ -944,10 +945,10 @@ if ($this->isUser()) { $timeoffset = $this->user->getVar('timezone_offset'); } else { - $timeoffset = $this->config['default_TZ']; + $timeoffset = $this->getConfig('default_TZ'); } } - $usertimestamp = intval($time) + (floatval($timeoffset) - $this->config['server_TZ']) * 3600; + $usertimestamp = intval($time) + (floatval($timeoffset) - $this->getConfig('server_TZ')) * 3600; return $usertimestamp; } @@ -961,9 +962,9 @@ public function userTimeToServerTime($timestamp, $userTZ = null) { if (!isset($userTZ)) { - $userTZ = $this->config['default_TZ']; + $userTZ = $this->getConfig('default_TZ'); } - $timestamp = $timestamp - (($userTZ - $this->config['server_TZ']) * 3600); + $timestamp = $timestamp - (($userTZ - $this->getConfig('server_TZ')) * 3600); return $timestamp; } @@ -1063,7 +1064,7 @@ if ($numrows > 0) { $bresult = $this->db->query('SELECT * FROM ' . $this->db->prefix('banner'), 1, $bannum); list ($bid, $cid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date, $htmlbanner, $htmlcode) = $this->db->fetchRow($bresult); - if ($this->config['my_ip'] == $this->getEnv('REMOTE_ADDR')) { + if ($this->getConfig('my_ip') == $this->getEnv('REMOTE_ADDR')) { // EMPTY } else { $impmade = $impmade + 1; @@ -1128,12 +1129,12 @@ if (defined('XOOPS_CPFUNC_LOADED')) { $theme = 'default'; } else { - $theme = $this->config['theme_set']; + $theme = $this->getConfig('theme_set'); } $xoopsThemeFactory = null; $xoopsThemeFactory = new xos_opal_ThemeFactory(); - $xoopsThemeFactory->allowedThemes = $this->config['theme_set_allowed']; + $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); $xoopsThemeFactory->defaultTheme = $theme; $this->theme = $xoopsThemeFactory->createInstance(array("plugins" => array(), "renderBanner" => false)); $this->tpl = $this->theme->template; @@ -1141,13 +1142,13 @@ 'xoops_theme' => $theme, 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $theme . '/', 'xoops_themecss' => $this->getCss($theme), 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), - 'xoops_sitename' => htmlspecialchars($this->config['sitename'], ENT_QUOTES), - 'xoops_slogan' => htmlspecialchars($this->config['slogan'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($this->getConfig('sitename'), ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($this->getConfig('slogan'), ENT_QUOTES), 'xoops_dirname' => $this->isModule() ? $this->module->getVar('dirname') : 'system', 'xoops_pagetitle' => $this->isModule() ? $this->module->getVar('name') - : htmlspecialchars($this->config['slogan'], ENT_QUOTES) + : htmlspecialchars($this->getConfig('slogan'), ENT_QUOTES) )); - if ($this->config['debug_mode'] == 2 && $this->userIsAdmin) { + if ($this->getConfig('debug_mode') == 2 && $this->userIsAdmin) { $this->tpl->assign('time', 300); $this->tpl->assign('xoops_logdump', $this->logger->dump()); } else { @@ -1160,7 +1161,7 @@ $url .= '&xoops_redirect=' . urlencode($_SERVER['REQUEST_URI']); } } - if (defined('SID') && SID && (!isset($_COOKIE[session_name()]) || ($this->config['use_mysession'] && $this->config['session_name'] != '' && !isset($_COOKIE[$this->config['session_name']]))) + if (defined('SID') && SID && (!isset($_COOKIE[session_name()]) || ($this->getConfig('use_mysession') && $this->getConfig('session_name') != '' && !isset($_COOKIE[$this->getConfig('session_name')]))) ) { if (!strstr($url, '?')) { $url .= '?' . SID; @@ -1295,13 +1296,16 @@ return $this->_systemConfigs[$key]; } $this->getConfigs($type); - $this->_systemConfigs[$key] = array(); if (!isset($this->_systemConfigs[$key])) { $this->_systemConfigs[$key] = ''; } return $this->_systemConfigs[$key]; } + /** + * @param string $type + * @return array + */ public function getConfigs($type = 'XOOPS_CONF') { $configs = $this->getHandlerConfig()->getConfigsByCat((is_array($type)) ? $type : (!defined($type) ? $type @@ -1334,6 +1338,20 @@ /** * @param string $key + * @param array $values + * @return void + */ + public function appendConfig($key, array $values) + { + if (isset($this->_systemConfigs[$key]) && is_array($this->_systemConfigs[$key])) { + foreach ($values as $key2 => $value) { + $this->_systemConfigs[$key][$key2] = $value ; + } + } + } + + /** + * @param string $key * @param string $dirname * @return mixed */ @@ -1378,6 +1396,18 @@ } /** + * Disables page cache by overriding module cache settings + * + * @return void + */ + public function disableModuleCache() + { + if ($this->isModule()) { + $this->appendConfig('module_cache', array($this->module->getVar('mid') => 0)); + } + } + + /** * @param string $url * @param int $debug * @return string Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -246,7 +246,7 @@ return $editor; } $editor_path = $this->root_path . '/' . $name; - if (file_exists($file = $editor_path . '/language/' . $xoops->config['language'] . '.php')) { + if (file_exists($file = $editor_path . '/language/' . $xoops->getConfig('language') . '.php')) { include_once $file; } else { if (file_exists($file = $editor_path . '/language/english.php')) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -94,7 +94,8 @@ * @param string $hiddentext Identifier for hidden Text * @param array $options Extra options */ - public function __construct($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = array()) + public function __construct($caption, $name, $value = "", $rows = 5, $cols = 50, $hiddentext = "xoopsHiddenText", $options = + array()) { static $inLoop = 0; @@ -114,8 +115,8 @@ $xoops = Xoops::getInstance(); if (!isset($options['editor'])) { - if (isset($xoops->config['editor'])) { - $options['editor'] = $xoops->config['editor']; + if ($editor = $xoops->getConfig('editor')) { + $options['editor'] = $editor; } } @@ -178,8 +179,7 @@ if (empty($xoops->theme)) { $this->js .= implode("", file(XOOPS_ROOT_PATH . "/class/textsanitizer/image/image.js")); } else { - $xoops->theme->addScript('/class/textsanitizer/image/image.js', - array('type' => 'text/javascript')); + $xoops->theme->addScript('/class/textsanitizer/image/image.js', array('type' => 'text/javascript')); } $button = "<input id='" . $this->getName() . "_preview_button' " . "type='button' " . "value='" . _PREVIEW . "' " . "onclick=\"form_instantPreview('" . XOOPS_URL . "', '" . $this->getName() . "','" . XOOPS_URL . "/images', " . intval($this->doHtml) . ", '" . $xoops->security->createToken() . "')\"" . " />"; $ret .= "<br />" . "<div id='" . $this->getName() . "_hidden' style='display: block;'> " . "<fieldset>" . "<legend>" . $button . "</legend>" . "<div id='" . $this->getName() . "_hidden_data'>" . _XOOPS_FORM_PREVIEW_CONTENT . "</div>" . "</fieldset>" . "</div>"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -44,7 +44,7 @@ $limit = 200; $select_element = new XoopsFormSelect('', $name, $value, $size, $multiple); if ($include_anon) { - $select_element->addOption(0, $xoops->config['anonymous']); + $select_element->addOption(0, $xoops->getConfig('anonymous')); } $member_handler = $xoops->getHandlerMember(); $user_count = $member_handler->getUserCount(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -135,9 +135,9 @@ if ($format == 'rss' || $format == 'r') { $TIME_ZONE = ''; - if (isset($xoops->config['server_TZ'])) { - $server_TZ = abs(intval($xoops->config['server_TZ'] * 3600.0)); - $prefix = ($xoops->config['server_TZ'] < 0) ? ' -' : ' +'; + if ($xoops->getConfig('server_TZ')) { + $server_TZ = abs(intval($xoops->getConfig('server_TZ') * 3600.0)); + $prefix = ($xoops->getConfig('server_TZ') < 0) ? ' -' : ' +'; $TIME_ZONE = $prefix . date('Hi', $server_TZ); } $date = gmdate('D, d M Y H:i:s', intval($time)) . $TIME_ZONE; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -234,8 +234,8 @@ } elseif (substr($path, -1, 1) != "/") { $path .= "/"; } - if (file_exists($path . $xoops->config['language'] . "/mail_template/" . $this->template)) { - return $path . $xoops->config['language'] . "/mail_template/" . $this->template; + if (file_exists($path . $xoops->getConfig('language') . "/mail_template/" . $this->template)) { + return $path . $xoops->getConfig('language') . "/mail_template/" . $this->template; } elseif (file_exists($path . "english/mail_template/" . $this->template)) { return $path . "english/mail_template/" . $this->template; } elseif (file_exists($path . $this->template)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -119,9 +119,9 @@ $edituser->setVar('user_intrest', $_POST['user_intrest']); $edituser->setVar('user_mailok', $_POST['user_mailok']); if (!empty($_POST['usecookie'])) { - setcookie($xoops->config['usercookie'], $xoops->user->getVar('uname'), time() + 31536000, '/', XOOPS_COOKIE_DOMAIN); + setcookie($xoops->getConfig('usercookie'), $xoops->user->getVar('uname'), time() + 31536000, '/', XOOPS_COOKIE_DOMAIN); } else { - setcookie($xoops->config['usercookie']); + setcookie($xoops->getConfig('usercookie')); } if (! $member_handler->insertUser($edituser)) { $xoops->header(); @@ -197,7 +197,7 @@ XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE , XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN)); $bio_tarea = new XoopsFormTextArea(_US_EXTRAINFO, 'bio', $xoops->user->getVar('bio', 'E')); - $cookie_radio_value = empty($_COOKIE[$xoops->config['usercookie']]) ? 0 : 1; + $cookie_radio_value = empty($_COOKIE[$xoops->getConfig('usercookie')]) ? 0 : 1; $cookie_radio = new XoopsFormRadioYN(_US_USECOOKIE, 'usecookie', $cookie_radio_value, _YES, _NO); $pwd_text = new XoopsFormPassword('', 'password', 10, 32); $pwd_text2 = new XoopsFormPassword('', 'vpass', 10, 32); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -39,7 +39,7 @@ if ($op == 'list') { $xoopsTpl = new XoopsTpl(); $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER); - $xoopsTpl->assign('sitename', htmlspecialchars($xoops->config['sitename'], ENT_QUOTES)); + $xoopsTpl->assign('sitename', htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES)); $target = htmlspecialchars($target, ENT_QUOTES); $xoopsTpl->assign('target', $target); $imgcat_handler = $xoops->getHandlerImagecategory(); @@ -158,7 +158,7 @@ $xoopsTpl = new XoopsTpl(); $xoopsTpl->assign('show_cat', $imgcat_id); $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER); - $xoopsTpl->assign('sitename', htmlspecialchars($xoops->config['sitename'], ENT_QUOTES)); + $xoopsTpl->assign('sitename', htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES)); $xoopsTpl->assign('target', htmlspecialchars($_GET['target'], ENT_QUOTES)); $form = new XoopsThemeForm('', 'image_form', 'imagemanager.php', 'post', true); $form->setExtra('enctype="multipart/form-data"'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/checklogin.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -43,10 +43,10 @@ $xoops->redirect(XOOPS_URL . '/index.php', 5, _US_NOACTTPADM); exit(); } - if ($xoops->config['closesite'] == 1) { + if ($xoops->getConfig('closesite') == 1) { $allowed = false; foreach ($user->getGroups() as $group) { - if (in_array($group, $xoops->config['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { + if (in_array($group, $xoops->getConfig('closesite_okgrp')) || XOOPS_GROUP_ADMIN == $group) { $allowed = true; break; } @@ -65,16 +65,16 @@ $_SESSION['xoopsUserId'] = $user->getVar('uid'); $_SESSION['xoopsUserGroups'] = $user->getGroups(); $user_theme = $user->getVar('theme'); - if (in_array($user_theme, $xoops->config['theme_set_allowed'])) { + if (in_array($user_theme, $xoops->getConfig('theme_set_allowed'))) { $_SESSION['xoopsUserTheme'] = $user_theme; } // Set cookie for rememberme - if (!empty($xoops->config['usercookie'])) { + if ($xoops->getConfig('usercookie')) { if (!empty($_POST["rememberme"])) { - setcookie($xoops->config['usercookie'], $_SESSION['xoopsUserId'] . '-' . md5($user->getVar('pass') . XOOPS_DB_NAME . XOOPS_DB_PASS . XOOPS_DB_PREFIX), time() + 31536000, '/', XOOPS_COOKIE_DOMAIN, 0); + setcookie($xoops->getConfig('usercookie'), $_SESSION['xoopsUserId'] . '-' . md5($user->getVar('pass') . XOOPS_DB_NAME . XOOPS_DB_PASS . XOOPS_DB_PREFIX), time() + 31536000, '/', XOOPS_COOKIE_DOMAIN, 0); } else { - setcookie($xoops->config['usercookie'], 0, -1, '/', XOOPS_COOKIE_DOMAIN, 0); + setcookie($xoops->getConfig('usercookie'), 0, -1, '/', XOOPS_COOKIE_DOMAIN, 0); } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_edit.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -38,7 +38,7 @@ if ($xoops->isUser()) { $com_mode = $xoops->user->getVar('umode'); } else { - $com_mode = $xoops->config['com_mode']; + $com_mode = $xoops->getConfig('com_mode'); } } @@ -46,7 +46,7 @@ if ($xoops->isUser()) { $com_order = $xoops->user->getVar('uorder'); } else { - $com_order = $xoops->config['com_order']; + $com_order = $xoops->getConfig('com_order'); } } else { $com_order = intval($_GET['com_order']); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_new.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_new.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_new.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -51,14 +51,14 @@ if ($xoops->isUser()) { $com_mode = $xoops->user->getVar('umode'); } else { - $com_mode = $xoops->config['com_mode']; + $com_mode = $xoops->getConfig('com_mode'); } } if (!isset($_GET['com_order'])) { if ($xoops->isUser()) { $com_order = $xoops->user->getVar('uorder'); } else { - $com_order = $xoops->config['com_order']; + $com_order = $xoops->getConfig('com_order'); } } else { $com_order = intval($_GET['com_order']); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_reply.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -35,7 +35,7 @@ if ($xoops->isUser()) { $com_mode = $xoops->user->getVar('umode'); } else { - $com_mode = $xoops->config['com_mode']; + $com_mode = $xoops->getConfig('com_mode'); } } if (!isset($_GET['com_order'])) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/comment_view.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -41,14 +41,14 @@ if ($xoops->isUser()) { $com_mode = $xoops->user->getVar('umode'); } - $com_mode = empty($com_mode) ? $xoops->config['com_mode'] : $com_mode; + $com_mode = empty($com_mode) ? $xoops->getConfig('com_mode') : $com_mode; } $xoops->tpl->assign('comment_mode', $com_mode); if (!isset($_GET['com_order'])) { if ($xoops->isUser()) { $com_order = $xoops->user->getVar('uorder'); } else { - $com_order = $xoops->config['com_order']; + $com_order = $xoops->getConfig('com_order'); } } else { $com_order = intval($_GET['com_order']); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -282,14 +282,7 @@ } if ($xoops->module->getVar('dirname', 'n') != 'system') { - if (file_exists($file = $xoops->path('modules/' . $xoops->module->getVar('dirname', 'n') . '/language/' . $xoops->config['language'] . '/main.php'))) { - include_once $file; - } else { - if (file_exists($file = $xoops->path('modules/' . $xoops->module->getVar('dirname', 'n') . '/language/english/main.php'))) { - include_once $file; - } - } - unset($file); + $xoops->loadLanguage('main', $xoops->module->getVar('dirname', 'n')); } if ($xoops->module->getVar('hasconfig') == 1 || $xoops->module->getVar('hascomments') == 1 || $xoops->module->getVar('hasnotification') == 1) { 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-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/notification_functions.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -156,7 +156,7 @@ foreach ($not_config['event'] as $event) { if ($event['category'] == $category_name) { - if (!is_dir($dir = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/' . $xoops->config['language'] . '/mail_template/')) { + if (!is_dir($dir = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/' . $xoops->getConfig('language') . '/mail_template/')) { $dir = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/language/english/mail_template/'; } $event['mail_template_dir'] = $dir; @@ -181,7 +181,7 @@ if ($module->getVar('hascomments')) { $com_config = $module->getInfo('comments'); if (!empty($category['item_name']) && $category['item_name'] == $com_config['itemName']) { - if (!is_dir($dir = XOOPS_ROOT_PATH . '/language/' . $xoops->config['language'] . '/mail_template/')) { + if (!is_dir($dir = XOOPS_ROOT_PATH . '/language/' . $xoops->getConfig('language') . '/mail_template/')) { $dir = XOOPS_ROOT_PATH . '/language/english/mail_template/'; } $mail_template_dir = $dir; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -25,7 +25,7 @@ $allowed = false; if ($xoops->isUser()) { foreach ($xoops->user->getGroups() as $group) { - if (in_array($group, $xoops->config['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { + if (in_array($group, $xoops->getConfig('closesite_okgrp')) || XOOPS_GROUP_ADMIN == $group) { $allowed = true; break; } @@ -40,22 +40,22 @@ if (!$allowed) { $xoopsThemeFactory = null; $xoopsThemeFactory = new xos_opal_ThemeFactory(); - $xoopsThemeFactory->allowedThemes = $xoops->config['theme_set_allowed']; - $xoopsThemeFactory->defaultTheme = $xoops->config['theme_set']; + $xoopsThemeFactory->allowedThemes = $xoops->getConfig('theme_set_allowed'); + $xoopsThemeFactory->defaultTheme = $xoops->getConfig('theme_set'); $xoops->theme = $xoopsThemeFactory->createInstance(array('plugins' => array())); unset($xoopsThemeFactory); $xoops->theme->addScript('/include/xoops.js', array('type' => 'text/javascript')); $xoops->tpl = $xoops->theme->template; $xoops->tpl->assign(array( - 'xoops_theme' => $xoops->config['theme_set'], - 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->config['theme_set'] . '/', - 'xoops_themecss' => xoops_getcss($xoops->config['theme_set']), + 'xoops_theme' => $xoops->getConfig('theme_set'), + 'xoops_imageurl' => XOOPS_THEME_URL . '/' . $xoops->getConfig('theme_set') . '/', + 'xoops_themecss' => xoops_getcss($xoops->getConfig('theme_set')), 'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES), - 'xoops_sitename' => htmlspecialchars($xoops->config['sitename'], ENT_QUOTES), - 'xoops_slogan' => htmlspecialchars($xoops->config['slogan'], ENT_QUOTES), + 'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES), + 'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), 'xoops_dirname' => $xoops->isModule() ? $xoops->module->getVar('dirname') : 'system', 'xoops_banner' => $xoops->getConfig('banners') ? $xoops->getBanner() : ' ', - 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->config['slogan'], ENT_QUOTES), + 'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES), 'lang_login' => _LOGIN, 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $xoops->getConfig('closesite_text') )); 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-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -335,7 +335,7 @@ return false; } if (file_exists(XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'))) { - if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/language/' . $xoops->config['language'] . '/blocks.php')) { + if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/language/' . $xoops->getConfig('language') . '/blocks.php')) { include_once $file; } else { if (file_exists($file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/language/english/blocks.php')) { @@ -505,7 +505,7 @@ } else { if ($this->getVar('template') != '') { $tplfile_handler = $xoops->getHandlerTplfile(); - $btemplate = $tplfile_handler->find($xoops->config['template_set'], 'block', $this->getVar('bid')); + $btemplate = $tplfile_handler->find($xoops->getConfig('template_set'), 'block', $this->getVar('bid')); if (count($btemplate) > 0) { $form->addElement(new XoopsFormLabel(_AM_SYSTEM_BLOCKS_CONTENT, '<a href="' . XOOPS_URL . '/modules/system/admin.php?fct=tplsets&op=edittpl&id=' . $btemplate[0]->getVar('tpl_id') . '">' . _AM_SYSTEM_BLOCKS_EDITTPL . '</a>')); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -223,7 +223,7 @@ { $xoops = xoops::getInstance(); $dirname = basename($dirname); - if (file_exists($file = $xoops->path('modules/' . $dirname . '/language/' . $xoops->config['language'] . '/modinfo.php'))) { + if (file_exists($file = $xoops->path('modules/' . $dirname . '/language/' . $xoops->getConfig('language') . '/modinfo.php'))) { include_once $file; } else if (file_exists($file = $xoops->path('modules/' . $dirname . '/language/english/modinfo.php'))) { include_once $file; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -141,7 +141,7 @@ } } } - return $xoops->config['anonymous']; + return $xoops->getConfig('anonymous'); } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -46,14 +46,14 @@ $xoopsMailer = $xoops->getMailer(); $xoopsMailer->useMail(); $xoopsMailer->setTemplate("lostpass2.tpl"); - $xoopsMailer->assign("SITENAME", $xoops->config['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoops->config['adminmail']); + $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); + $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); $xoopsMailer->assign("SITEURL", XOOPS_URL . "/"); $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); $xoopsMailer->assign("NEWPWD", $newpass); $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoops->config['adminmail']); - $xoopsMailer->setFromName($xoops->config['sitename']); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ, XOOPS_URL)); if (!$xoopsMailer->send()) { echo $xoopsMailer->getErrors(); @@ -73,15 +73,15 @@ $xoopsMailer = $xoops->getMailer(); $xoopsMailer->useMail(); $xoopsMailer->setTemplate("lostpass1.tpl"); - $xoopsMailer->assign("SITENAME", $xoops->config['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoops->config['adminmail']); + $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); + $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); $xoopsMailer->assign("SITEURL", XOOPS_URL . "/"); $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL . "/lostpass.php?email=" . $email . "&code=" . $areyou); $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoops->config['adminmail']); - $xoopsMailer->setFromName($xoops->config['sitename']); - $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ, $xoops->config['sitename'])); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); + $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ, $xoops->getConfig('sitename'))); $xoops->header(); if (!$xoopsMailer->send()) { echo $xoopsMailer->getErrors(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -148,15 +148,15 @@ } $xoopsMailer = $xoops->getMailer(); $xoopsMailer->setTemplate("tellfriend.tpl"); - $xoopsMailer->assign("SITENAME", $xoops->config['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoops->config['adminmail']); + $xoopsMailer->assign("SITENAME", $xoops->getConfig('sitename')); + $xoopsMailer->assign("ADMINMAIL", $xoops->getConfig('adminmail')); $xoopsMailer->assign("SITEURL", XOOPS_URL . "/"); $xoopsMailer->assign("YOUR_NAME", $yname); $xoopsMailer->assign("FRIEND_NAME", $fname); $xoopsMailer->setToEmails($fmail); $xoopsMailer->setFromEmail($ymail); $xoopsMailer->setFromName($yname); - $xoopsMailer->setSubject(sprintf(_MSC_INTSITE, $xoops->config['sitename'])); + $xoopsMailer->setSubject(sprintf(_MSC_INTSITE, $xoops->getConfig('sitename'))); //OpenTable(); if (!$xoopsMailer->send()) { echo $xoopsMailer->getErrors(); @@ -202,7 +202,7 @@ : ' '; echo '<td>' . $avatar . "</td><td><a href=\"javascript:window.opener.location='" . XOOPS_URL . "/userinfo.php?uid=" . $onlineUsers[$i]['user']->getVar('uid') . "';window.close();\">" . $onlineUsers[$i]['user']->getVar('uname') . "</a>"; } else { - echo '<td> </td><td>' . $xoops->config['anonymous']; + echo '<td> </td><td>' . $xoops->getConfig('anonymous'); } if ($isadmin == 1) { echo '<br />(' . $onlineUsers[$i]['ip'] . ')'; @@ -216,8 +216,8 @@ } break; case 'ssllogin': - if ($xoops->config['use_ssl'] && isset($_POST[$xoops->config['sslpost_name']]) && $xoops->isUser()) { - include_once $xoops->path('language/' . $xoops->config['language'] . '/user.php'); + if ($xoops->getConfig('use_ssl') && isset($_POST[$xoops->getConfig('sslpost_name')]) && $xoops->isUser()) { + $xoops->loadLanguage('user'); echo sprintf(_US_LOGGINGU, $xoops->user->getVar('uname')); echo '<div style="text-align:center;"><input class="formButton" value="' . _CLOSE . '" type="button" onclick="window.opener.location.reload();window.close();" /></div>'; $closebutton = false; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/viewpmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/viewpmsg.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pm/viewpmsg.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -25,7 +25,7 @@ $xoops->redirect(XOOPS_URL, 3, _NOPERM); exit(); } -$xoopsConfig['module_cache'] = 0; //disable caching since the URL will be the same, but content different from one user to another +$xoops->disableModuleCache(); //disable caching since the URL will be the same, but content different from one user to another $xoops->header('pm_viewpmsg.html'); $valid_op_requests = array('out', 'save', 'in'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/header.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/header.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -27,5 +27,4 @@ $xoBreadcrumbs[] = array("title" => $GLOBALS['xoopsModule']->getVar('name'), "link" => XOOPS_URL . "/modules/" . $GLOBALS['xoopsModule']->getVar('dirname', 'n') . '/'); //disable cache -$GLOBALS['xoopsConfig']['module_cache'][$GLOBALS['xoopsModule']->getVar('mid')] = 0; -?> \ No newline at end of file +$xoops->disableModuleCache(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/user.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -80,8 +80,8 @@ $_SESSION = array(); // Regenerate a new session id and destroy old session session_regenerate_id(true); - setcookie($xoops->config['usercookie'], 0, -1, '/', XOOPS_COOKIE_DOMAIN, 0); - setcookie($xoops->config['usercookie'], 0, -1, '/'); + setcookie($xoops->getConfig('usercookie'), 0, -1, '/', XOOPS_COOKIE_DOMAIN, 0); + setcookie($xoops->getConfig('usercookie'), 0, -1, '/'); // clear entry from online users table if ($xoops->isUser()) { $xoops->getHandlerOnline()->destroy($xoops->user->getVar('uid')); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/profile/userinfo.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -37,7 +37,7 @@ if ($xoops->isUser() && $uid == $xoops->user->getVar('uid')) { //disable cache - $xoops->config['module_cache'][$xoops->module->getVar('mid')] = 0; + $xoops->disableModuleCache(); $xoops->header('profile_userinfo.html'); $xoops->getConfigs(XOOPS_CONF_USER); @@ -102,7 +102,7 @@ if ($xoops->isUser() && $xoops->user->isAdmin()) { //disable cache - $xoops->config['module_cache'][$xoops->module->getVar('mid')] = 0; + $xoops->disableModuleCache(); } $xoops->header('profile_userinfo.html'); $xoops->tpl->assign('user_ownpage', false); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -84,7 +84,7 @@ $tpl->assign('memory_limit', ini_get('memory_limit')); $tpl->assign('file_uploads', ini_get('file_uploads') ? 'On' : 'Off'); $tpl->assign('upload_max_filesize', ini_get('upload_max_filesize')); - $tpl->assign('xoops_sitename', $xoops->config['sitename']); + $tpl->assign('xoops_sitename', $xoops->getConfig('sitename')); // ADD MENU ***************************************** @@ -263,7 +263,7 @@ array('link' => XOOPS_URL . '/admin.php', 'text' => _OXYGEN_INTERESTSITES, 'menu' => $menu)); //add OPTIONS/links for local support - if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/default/language/' . $xoops->config['language'] . '/localsupport.php')) { + if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/default/language/' . $xoops->getConfig('language') . '/localsupport.php')) { $links = include $file; if (count($links) > 0) { $tpl->append('navitems', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -20,7 +20,7 @@ $xoops = Xoops::getInstance(); header("Content-Type: text/html"); -echo "<html><head><title>" . htmlspecialchars($xoops->config['sitename']) . "</title> +echo "<html><head><title>" . htmlspecialchars($xoops->getConfig('sitename')) . "</title> <meta name='HandheldFriendly' content='True' /> <meta name='PalmComputingPlatform' content='True' /> </head> @@ -32,8 +32,8 @@ if (!$result) { echo "An error occured"; } else { - echo "<img src='images/logo.gif' alt='" . htmlspecialchars($xoops->config['sitename'], ENT_QUOTES) . "' border='0' /><br />"; - echo "<h2>" . htmlspecialchars($xoops->config['slogan']) . "</h2>"; + echo "<img src='images/logo.gif' alt='" . htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES) . "' border='0' /><br />"; + echo "<h2>" . htmlspecialchars($xoops->getConfig('slogan')) . "</h2>"; echo "<div>"; while (list ($storyid, $title) = $xoops->db->fetchRow($result)) { echo "<a href='" . XOOPS_URL . "/modules/news/print.php?storyid={$storyid}'>" . htmlspecialchars($title) . "</a><br />"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -78,7 +78,7 @@ echo "<span class='red bold'>" . _PM_ONLINE . "</span><br /><br />\n"; } } else { - echo $xoops->config['anonymous']; // we need to do this for deleted users + echo $xoops->getConfig('anonymous'); // we need to do this for deleted users } //------------- mamba $iconName=$pm_arr[0]->getVar("msg_image", "E"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2011-11-02 21:40:59 UTC (rev 8031) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2011-11-03 00:07:41 UTC (rev 8032) @@ -42,7 +42,7 @@ $url = isset($_POST['url']) ? trim($myts->stripSlashesGPC($_POST['url'])) : ''; $pass = isset($_POST['pass']) ? $myts->stripSlashesGPC($_POST['pass']) : ''; $vpass = isset($_POST['vpass']) ? $myts->stripSlashesGPC($_POST['vpass']) : ''; -$timezone_offset = isset($_POST['timezone_offset']) ? (float)$_POST['timezone_offset'] : $xoops->config['default_TZ'];... [truncated message content] |
From: <tr...@us...> - 2011-11-03 00:35:38
|
Revision: 8033 http://xoops.svn.sourceforge.net/xoops/?rev=8033&view=rev Author: trabis Date: 2011-11-03 00:35:31 +0000 (Thu, 03 Nov 2011) Log Message: ----------- getter and setter methods for $xoops->option. Fixing notification handler for strict compliance Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php 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-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -455,16 +455,16 @@ foreach ($content['metas'] as $type => $value) { $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]); } - $xoops->option['xoops_pagetitle'] = $content['xoops_pagetitle']; - $xoops->option['xoops_module_header'] = $content['header']; + $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']); + $xoops->setOption('xoops_module_header', $content['header']); } - if (!empty($xoops->option['xoops_pagetitle'])) { - $this->template->assign('xoops_pagetitle', $xoops->option['xoops_pagetitle']); + if ($xoops->getOption('xoops_pagetitle')) { + $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle')); } - $header = empty($xoops->option['xoops_module_header']) + $header = !$xoops->getOption('xoops_module_header') ? $this->template->get_template_vars('xoops_module_header') - : $xoops->option['xoops_module_header']; + : $xoops->getOption('xoops_module_header'); //save meta information of cached pages if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -87,7 +87,7 @@ $isStart = (substr($_SERVER['PHP_SELF'], -9) == 'index.php' && $xoops->getConfig('startpage') == $xoops->module->getVar('dirname') && empty($_SERVER['QUERY_STRING'])); } else { $mid = 0; - $isStart = !empty($xoops->option['show_cblock']); + $isStart = $xoops->getOption('show_cblock'); } $groups = $xoops->isUser() ? $xoops->user->getGroups() : array(XOOPS_GROUP_ANONYMOUS); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -290,7 +290,7 @@ public function themeSelect() { if (!empty($_POST['xoops_theme_select']) && in_array($_POST['xoops_theme_select'], $this->getConfig('theme_set_allowed'))) { - $this->setConfig('theme_set',$_POST['xoops_theme_select']); + $this->setConfig('theme_set', $_POST['xoops_theme_select']); $_SESSION['xoopsUserTheme'] = $_POST['xoops_theme_select']; } else { if (!empty($_SESSION['xoopsUserTheme']) && in_array($_SESSION['xoopsUserTheme'], $this->getConfig('theme_set_allowed'))) { @@ -356,7 +356,8 @@ // Sets cache time if ($this->isModule()) { $cache_times = $this->getConfig('module_cache'); - $this->theme->contentCacheLifetime = isset($cache_times[$this->module->getVar('mid')]) ? $cache_times[$this->module->getVar('mid')] : 0; + $this->theme->contentCacheLifetime = isset($cache_times[$this->module->getVar('mid')]) + ? $cache_times[$this->module->getVar('mid')] : 0; // Tricky solution for setting cache time for homepage } else { if (!empty($this->tpl_file) && $this->tpl_file == 'db:system_homepage.html') { @@ -1273,20 +1274,32 @@ } /** - * @param string $option + * @param string $key * @return string */ - public function getOption($option) + public function getOption($key) { $ret = ''; - if (isset($this->option[$option])) { - $ret = $this->option[$option]; + if (isset($this->option[$key])) { + $ret = $this->option[$key]; } return $ret; } /** * @param string $key + * @param null $value + * @return void + */ + public function setOption($key, $value = null) + { + if (!is_null($value)) { + $this->option[$key] = $value; + } + } + + /** + * @param string $key * @param string $type * @return mixed */ @@ -1345,7 +1358,7 @@ { if (isset($this->_systemConfigs[$key]) && is_array($this->_systemConfigs[$key])) { foreach ($values as $key2 => $value) { - $this->_systemConfigs[$key][$key2] = $value ; + $this->_systemConfigs[$key][$key2] = $value; } } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -23,6 +23,4 @@ $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated("include 'header.php' is deprecated since 2.6.0, use Xoops::getInstance()->header(); instead"); -$xoops->header($xoops->option['template_main']); - -?> \ No newline at end of file +$xoops->header($xoops->getOption('template_main')); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -25,7 +25,7 @@ $xoops->preload->triggerEvent('core.index.start'); //check if start page is defined -if ($xoops->getConfig('startpage') != "" && $xoops->getConfig('startpage') != "--" && $xoops->isActiveModule($xoops->getConfig('startpage'))) { +if ($xoops->isActiveModule($xoops->getConfig('startpage'))) { // Temporary solution for start page redirection define("XOOPS_STARTPAGE_REDIRECTED", 1); $module_handler = $xoops->getHandlerModule(); @@ -67,7 +67,7 @@ include $xoops->path('modules/' . $xoops->getConfig('startpage') . '/index.php'); exit(); } else { - $xoops->option['show_cblock'] = 1; + $xoops->setOption('show_cblock', 1); $xoops->header("db:system_homepage.html"); $xoops->footer(); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -236,7 +236,7 @@ * @param bool $id_as_key Use IDs as keys into the array? * @return array Array of {@link XoopsNotification} objects */ - public function getObjects(CriteriaElement $criteria = null, $id_as_key = false) + public function getObjectsArray(CriteriaElement $criteria = null, $id_as_key = false) { $ret = array(); $limit = $start = 0; @@ -284,7 +284,7 @@ $criteria->add(new Criteria('not_itemid', intval($item_id))); $criteria->add(new Criteria('not_event', mysql_real_escape_string($event))); $criteria->add(new Criteria('not_uid', intval($user_id))); - $objects = $this->getObjects($criteria); + $objects = $this->getObjectsArray($criteria); if (count($objects) == 1) { return $objects[0]; } @@ -389,7 +389,7 @@ public function getByUser($user_id) { $criteria = new Criteria('not_uid', $user_id); - return $this->getObjects($criteria, true); + return $this->getObjectsArray($criteria, true); } /** @@ -412,7 +412,7 @@ $criteria->add(new Criteria('not_itemid', intval($item_id))); } $criteria->add(new Criteria('not_uid', intval($user_id))); - $results = $this->getObjects($criteria, true); + $results = $this->getObjectsArray($criteria, true); $ret = array(); foreach (array_keys($results) as $i) { $ret[] = $results[$i]->getVar('not_event'); @@ -441,7 +441,7 @@ if (isset($order)) { $criteria->setOrder($order); } - return $this->getObjects($criteria); + return $this->getObjectsArray($criteria); } /** @@ -532,7 +532,7 @@ } $criteria->add($user_criteria); } - $notifications = $this->getObjects($criteria); + $notifications = $this->getObjectsArray($criteria); if (empty($notifications)) { return false; } @@ -696,7 +696,7 @@ $criteria->add(new Criteria('not_uid', intval($user_id))); $criteria->add(new Criteria('not_mode', XOOPS_NOTIFICATION_MODE_WAITFORLOGIN)); - $notifications = $this->getObjects($criteria, true); + $notifications = $this->getObjectsArray($criteria, true); foreach ($notifications as $n) { /* @var $n XoopsNotification*/ $n->setVar('not_mode', XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -53,7 +53,7 @@ $xoops = Xoops::getInstance(); if (empty($tpl_file)) { - $tpl_file = $xoops->option['template_main']; + $tpl_file = $xoops->getOption('template_main'); } $xoops->tpl_file = $tpl_file; ob_start(); @@ -164,7 +164,7 @@ header('Pragma: no-cache'); } - if (isset($xoops->option['template_main']) && $xoops->option['template_main'] != $xoops->theme->contentTemplate) { + if ($xoops->getOption('template_main') && $xoops->getOption('template_main') != $xoops->theme->contentTemplate) { trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING); if (false === strpos($xoops->tpl_file, ':')) { $xoops->theme->contentTemplate = 'db:' . $xoops->tpl_file; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php 2011-11-03 00:07:41 UTC (rev 8032) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php 2011-11-03 00:35:31 UTC (rev 8033) @@ -65,7 +65,7 @@ $criteria = new Criteria('not_uid', $uid); $criteria->setSort('not_modid,not_category,not_itemid'); $notification_handler = $xoops->getHandlerNotification(); - $notifications = $notification_handler->getObjects($criteria); + $notifications = $notification_handler->getObjectsArray($criteria); // Generate the info for the template $module_handler = $xoops->getHandlerModule(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 00:39:50
|
Revision: 8034 http://xoops.svn.sourceforge.net/xoops/?rev=8034&view=rev Author: trabis Date: 2011-11-03 00:39:43 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Small refactoring... Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 00:35:31 UTC (rev 8033) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 00:39:43 UTC (rev 8034) @@ -726,7 +726,7 @@ /** * XOOPS language loader wrapper * - * Temporay solution, not encouraged to use + * Temporary solution, not encouraged to use * * @param string $name Name of language file to be loaded, without extension * @param string $domain Module dirname; global language file will be loaded if $domain is set to 'global' or not specified @@ -740,7 +740,7 @@ if (empty($name)) { return false; } - $language = empty($language) ? $this->config['language'] : $language; + $language = empty($language) ? $this->getConfig('language') : $language; $path = ((empty($domain) || 'global' == $domain) ? '' : "modules/{$domain}/") . 'language'; if (!file_exists($file = $this->path("{$path}/{$language}/{$name}.php"))) { if (!file_exists($file = $this->path("{$path}/english/{$name}.php"))) { @@ -1519,10 +1519,9 @@ * function to update compiled template file in cache folder * * @param string $tpl_id - * @param boolean $clear_old * @return boolean */ - public function templateTouch($tpl_id, $clear_old = true) + public function templateTouch($tpl_id) { $tplfile = $this->getHandlerTplfile()->get($tpl_id); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-03 00:35:31 UTC (rev 8033) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-03 00:39:43 UTC (rev 8034) @@ -541,7 +541,7 @@ { $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated(__FUNCTION__ . ' is deprecated since XOOPS 2.6.0. See how to replace it in file ' . __FILE__ . ' line ' . __LINE__); - return $xoops->templateTouch($tpl_id, $clear_old); + return $xoops->templateTouch($tpl_id); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 20:23:08
|
Revision: 8038 http://xoops.svn.sourceforge.net/xoops/?rev=8038&view=rev Author: trabis Date: 2011-11-03 20:23:01 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Adding some more handlers... Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avataruserlink.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/blocklinkmodule.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -454,6 +454,42 @@ /** * @param mixed $optional + * @return XoopsAvataruserlinkHandler + */ + public function getHandlerAvataruserlink($optional = false) + { + return $this->getHandler('avataruserlink', $optional); + } + + /** + * @param mixed $optional + * @return XoopsBannerHandler + */ + public function getHandlerBanner($optional = false) + { + return $this->getHandler('banner', $optional); + } + + /** + * @param mixed $optional + * @return XoopsBannerclientHandler + */ + public function getHandlerBannerclient($optional = false) + { + return $this->getHandler('bannerclient', $optional); + } + + /** + * @param mixed $optional + * @return XoopsBannerfinishHandler + */ + public function getHandlerBannerfinish($optional = false) + { + return $this->getHandler('bannerfinish', $optional); + } + + /** + * @param mixed $optional * @return XoopsBlockHandler */ public function getHandlerBlock($optional = false) @@ -463,6 +499,15 @@ /** * @param mixed $optional + * @return XoopsBlockmodulelinkHandler + */ + public function getHandlerBlockmodulelink($optional = false) + { + return $this->getHandler('blockmodulelink', $optional); + } + + /** + * @param mixed $optional * @return XoopsCachemodelHandler */ public function getHandlerCachemodel($optional = false) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -86,7 +86,7 @@ $configs = XoopsLoad::loadCoreConfig(); } if (isset($configs[$name])) { - //attemp loading from map + //attempt loading from map require $configs[$name]; if (class_exists($name) && method_exists($name, '__autoload')) { call_user_func(array($name, '__autoload')); @@ -206,8 +206,21 @@ 'xoopsauthprovisionning' => XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php', 'xoopsavatar' => XOOPS_ROOT_PATH . '/kernel/avatar.php', 'xoopsavatarhandler' => XOOPS_ROOT_PATH . '/kernel/avatar.php', + 'xoopsavataruserlink' => XOOPS_ROOT_PATH . '/kernel/avataruserlink.php', + 'xoopsavataruserlinkhandler' => XOOPS_ROOT_PATH . '/kernel/avataruserlink.php', + 'xoopsbanner' => XOOPS_ROOT_PATH . '/kernel/banner.php', + 'xoopsbannerhandler' => XOOPS_ROOT_PATH . '/kernel/banner.php', + 'xoopsbannerclient' => XOOPS_ROOT_PATH . '/kernel/bannerclient.php', + 'xoopsbannerclienthandler' => XOOPS_ROOT_PATH . '/kernel/bannerclient.php', + 'xoopsbannerfinish' => XOOPS_ROOT_PATH . '/kernel/bannerfinish.php', + 'xoopsbannerfinishhandler' => XOOPS_ROOT_PATH . '/kernel/bannerfinish.php', + 'xoopsblock' => XOOPS_ROOT_PATH . '/kernel/block.php', 'xoopsblockhandler' => XOOPS_ROOT_PATH . '/kernel/block.php', + 'xoopsblockmodulelink' => XOOPS_ROOT_PATH . '/kernel/blockmodulelink.php', + 'xoopsblockmodulelinkhandler' => XOOPS_ROOT_PATH . '/kernel/blockmodulelink.php', + + 'xoopscache' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscacheengine' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscachemodelobject' => XOOPS_ROOT_PATH . '/kernel/cache.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avatar.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** - * XOOPS Kernel Class + * Xoops Kernel class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package kernel @@ -37,7 +40,7 @@ /** * Constructor */ - function __construct() + public function __construct() { $this->initVar('avatar_id', XOBJ_DTYPE_INT, null, false); $this->initVar('avatar_file', XOBJ_DTYPE_OTHER, null, false, 30); @@ -152,10 +155,10 @@ } /** - * XOOPS avatar handler class. (Singelton) + * XOOPS avatar handler class. (Singleton) * * This class is responsible for providing data access mechanisms to the data source - * of XOOPS block class objects. + * of XOOPS avatar class objects. * * @author Kazumi Ono <on...@xo...> * @copyright copyright (c) 2000 XOOPS.org @@ -270,12 +273,11 @@ } $avatars = $this->getObjects($criteria, true); $ret = array( - 'blank.gif' => _NONE); + 'blank.gif' => _NONE + ); foreach (array_keys($avatars) as $i) { $ret[$avatars[$i]->getVar('avatar_file')] = $avatars[$i]->getVar('avatar_name'); } return $ret; } -} - -?> \ No newline at end of file +} \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avataruserlink.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avataruserlink.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/avataruserlink.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -0,0 +1,48 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XoopsAvataruserlink extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('avatar_id', XOBJ_DTYPE_INT, null, true); + $this->initVar('user_id', XOBJ_DTYPE_INT, null, true); + } +} + +class XoopsAvataruserlinkHandler extends XoopsPersistableObjectHandler +{ + /** + * Constructor + * + * @param XoopsDatabase|null $db {@link XoopsDatabase} + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'avatar_user_link', 'XoopsAvataruserlink', 'avatar_id', 'user_id'); + } +} \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/banner.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -0,0 +1,55 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class XoopsBanner extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('bid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 3); + $this->initVar('imptotal', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('impmade', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('clicks', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('imageurl', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('clickurl', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('date', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('htmlbanner', XOBJ_DTYPE_INT, null, false, 1); + $this->initVar('htmlcode', XOBJ_DTYPE_TXTBOX, null, false); + } +} + +class XoopsBannerHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'banner', 'XoopsBanner', 'bid', 'imageurl'); + } +} \ No newline at end of file Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php (from rev 8037, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/bannerclient.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -0,0 +1,52 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); + +class XoopsBannerclient extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('contact', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('email', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('login', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('passwd', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('extrainfo', XOBJ_DTYPE_TXTAREA, null, false); + } +} + +class XoopsBannerclientHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'bannerclient', 'XoopsBannerclient', 'cid', 'name'); + } +} \ No newline at end of file Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php (from rev 8037, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/bannerfinish.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerfinish.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -0,0 +1,59 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); + +/** + * System Banner Finish + * + * @copyright copyright (c) 2000 XOOPS.org + * @package system + */ +class XoopsBannerfinish extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('bid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('cid', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('impressions', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('clicks', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('datestart', XOBJ_DTYPE_INT, null, false, 10); + $this->initVar('dateend', XOBJ_DTYPE_INT, null, false, 10); + } + +} + +class XoopsBannerfinishHandler extends XoopsPersistableObjectHandler +{ + /** + * @param XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db) + { + parent::__construct($db, 'bannerfinish', 'XoopsBannerfinish', 'bid', 'cid'); + } + +} \ No newline at end of file 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-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -1,30 +1,29 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Kernel Class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package kernel * @since 2.0.0 * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); -/** - * A block - * - * @author Kazumi Ono <on...@xo...> - * - * @package kernel - */ class XoopsBlock extends XoopsObject { /** @@ -428,11 +427,11 @@ $title = ''; $modules = array(); // Search modules - /* @var $blocklinkmodule_handler SystemBlocklinkmoduleHandler */ - $blocklinkmodule_handler = $xoops->getModuleHandler('blocklinkmodule', 'system'); + $blockmodulelink_handler = $xoops->getHandlerBlockmodulelink(); $criteria = new CriteriaCompo(new Criteria('block_id', $this->getVar('bid'))); - $blocklinkmodule = $blocklinkmodule_handler->getObjects($criteria); - foreach ($blocklinkmodule as $link) { + $blockmodulelink = $blockmodulelink_handler->getObjects($criteria); + /* @var $link XoopsBlockmodulelink */ + foreach ($blockmodulelink as $link) { $modules[] = $link->getVar('module_id'); } // Search perms @@ -557,17 +556,6 @@ } } -/** - * XOOPS block handler class. (Singelton) - * - * This class is responsible for providing data access mechanisms to the data source - * of XOOPS block class objects. - * - * @author Kazumi Ono <on...@xo...> - * @copyright copyright (c) 2000 XOOPS.org - * @package kernel - * @subpackage block - */ class XoopsBlockHandler extends XoopsPersistableObjectHandler { /** @@ -985,7 +973,7 @@ * @param string $contentdb * @return string */ - function buildContent($position, $content = "", $contentdb = "") + public function buildContent($position, $content = "", $contentdb = "") { $ret = ''; if ($position == 0) { @@ -1005,7 +993,7 @@ * @param string $newtitle * @return string title */ - function buildTitle($originaltitle, $newtitle = '') + public function buildTitle($originaltitle, $newtitle = '') { if ($newtitle != '') { $ret = $newtitle; @@ -1021,7 +1009,7 @@ * @param int|array $groupid * @return array */ - function getBlockByPerm($groupid) + public function getBlockByPerm($groupid) { $ret = array(); if (isset($groupid)) { @@ -1045,8 +1033,4 @@ } return $ret; } - - -} - -?> \ No newline at end of file +} \ No newline at end of file Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php (from rev 8037, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/blocklinkmodule.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -0,0 +1,54 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * System Block + * + * @copyright copyright (c) 2000 XOOPS.org + * @package system + */ +class XoopsBlockmodulelink extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('block_id', XOBJ_DTYPE_INT); + $this->initVar('module_id', XOBJ_DTYPE_INT); + } +} + +class XoopsBlockmodulelinkHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'block_module_link', 'XoopsBlockmodulelink', 'block_id', 'module_id'); + } + +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -31,7 +31,7 @@ /** * Constructor */ - function __construct() + public function __construct() { $this->initVar('groupid', XOBJ_DTYPE_INT, null, false); $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 100); @@ -43,7 +43,7 @@ * @param string $format * @return mixed */ - function id($format = 'n') + public function id($format = 'n') { return $this->getVar('groupid', $format); } @@ -106,6 +106,4 @@ { parent::__construct($db, 'groups', 'XoopsGroup', 'groupid', 'name'); } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -58,6 +58,7 @@ * holds temporary user objects */ private $_members = array(); + /**#@-*/ /** @@ -427,8 +428,8 @@ $ret = array(); $select = $asobject ? "u.*" : "u.uid"; - $sql[] = " SELECT DISTINCT {$select} " . " FROM " . $this->_uHandler->db->prefix("users") . " AS u" . " LEFT JOIN " . $this->_mHandler->db->prefix("groups_users_link") . " AS m ON m.uid = u.uid" . " WHERE 1 = 1"; - if (! empty($groups)) { + $sql[] = "SELECT DISTINCT {$select} " . " FROM " . $this->_uHandler->db->prefix("users") . " AS u" . " LEFT JOIN " . $this->_mHandler->db->prefix("groups_users_link") . " AS m ON m.uid = u.uid" . " WHERE 1 = 1"; + if (!empty($groups)) { $sql[] = "m.groupid IN (" . implode(", ", $groups) . ")"; } $limit = $start = 0; @@ -491,5 +492,4 @@ return $ret; } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -104,6 +104,4 @@ } return $ret; } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -331,19 +331,19 @@ exit(); } if ($newid != 0) { - $blocklinkmodule_handler = $xoops->getModuleHandler('blocklinkmodule'); + $blockmodulelink_handler = $xoops->getHandlerBlockmodulelink(); // Delete old link $criteria = new CriteriaCompo(new Criteria('block_id', $newid)); - $blocklinkmodule_handler->deleteAll($criteria); + $blockmodulelink_handler->deleteAll($criteria); // Assign link $modules = $_POST['modules']; foreach ($modules as $mid) { - $blocklinkmodule = $blocklinkmodule_handler->create(); - $blocklinkmodule->setVar('block_id', $newid); - $blocklinkmodule->setVar('module_id', $mid); - if (!$blocklinkmodule_handler->insert($blocklinkmodule)) { + $blockmodulelink = $blockmodulelink_handler->create(); + $blockmodulelink->setVar('block_id', $newid); + $blockmodulelink->setVar('module_id', $mid); + if (!$blockmodulelink_handler->insert($blockmodulelink)) { xoops_cp_header(); - $xoops->error($blocklinkmodule->getHtmlErrors()); + $xoops->error($blockmodulelink->getHtmlErrors()); xoops_cp_footer(); exit(); } @@ -453,10 +453,10 @@ $block = $block_handler->get($block_id); if ($block_handler->deleteBlock($block)) { // Delete Group link - $blocklinkmodule_handler = $xoops->getModuleHandler('blocklinkmodule'); - $blocklinkmodule = $blocklinkmodule_handler->getObjects(new CriteriaCompo(new Criteria('block_id', $block_id))); - foreach ($blocklinkmodule as $link) { - $blocklinkmodule_handler->delete($link, true); + $blockmodulelink_handler = $xoops->getHandlerBlockmodulelink(); + $blockmodulelink = $blockmodulelink_handler->getObjects(new CriteriaCompo(new Criteria('block_id', $block_id))); + foreach ($blockmodulelink as $link) { + $blockmodulelink_handler->delete($link, true); } // Delete Group permission $groupperm_handler = $xoops->getHandlerGroupperm(); Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/blocklinkmodule.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/blocklinkmodule.php 2011-11-03 06:18:11 UTC (rev 8037) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/blocklinkmodule.php 2011-11-03 20:23:01 UTC (rev 8038) @@ -1,54 +0,0 @@ -<?php -/** - * Block Link Module Class Manager -* - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package system - * @version $Id:$ - */ -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -/** - * System Block - * - * @copyright copyright (c) 2000 XOOPS.org - * @package system - */ -class SystemBlockLinkModule extends XoopsObject -{ - function __construct() - { - $this->initVar('block_id', XOBJ_DTYPE_INT); - $this->initVar('module_id', XOBJ_DTYPE_INT); - } - -} - -/** - * System block handler class. (Singelton) - * - * This class is responsible for providing data access mechanisms to the data source - * of XOOPS block class objects. - * - * @copyright copyright (c) 2000 XOOPS.org - * @package system - * @subpackage avatar - */ -class SystemBlockLinkModuleHandler extends XoopsPersistableObjectHandler -{ - function __construct($db) - { - parent::__construct($db, 'block_module_link', 'SystemBlockLinkModule', 'block_id', 'module_id'); - } - -} - -?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 20:35:54
|
Revision: 8039 http://xoops.svn.sourceforge.net/xoops/?rev=8039&view=rev Author: trabis Date: 2011-11-03 20:35:48 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Adding Ranks Handler Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/userrank.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/ranks.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:23:01 UTC (rev 8038) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:35:48 UTC (rev 8039) @@ -670,6 +670,15 @@ /** * @param mixed $optional + * @return XoopsRanksHandler + */ + public function getHandlerRanks($optional = false) + { + return $this->getHandler('ranks', $optional); + } + + /** + * @param mixed $optional * @return XoopsSessionHandler */ public function getHandlerSession($optional = false) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 20:23:01 UTC (rev 8038) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 20:35:48 UTC (rev 8039) @@ -214,13 +214,10 @@ 'xoopsbannerclienthandler' => XOOPS_ROOT_PATH . '/kernel/bannerclient.php', 'xoopsbannerfinish' => XOOPS_ROOT_PATH . '/kernel/bannerfinish.php', 'xoopsbannerfinishhandler' => XOOPS_ROOT_PATH . '/kernel/bannerfinish.php', - 'xoopsblock' => XOOPS_ROOT_PATH . '/kernel/block.php', 'xoopsblockhandler' => XOOPS_ROOT_PATH . '/kernel/block.php', 'xoopsblockmodulelink' => XOOPS_ROOT_PATH . '/kernel/blockmodulelink.php', 'xoopsblockmodulelinkhandler' => XOOPS_ROOT_PATH . '/kernel/blockmodulelink.php', - - 'xoopscache' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscacheengine' => XOOPS_ROOT_PATH . '/class/cache/xoopscache.php', 'xoopscachemodelobject' => XOOPS_ROOT_PATH . '/kernel/cache.php', @@ -321,6 +318,8 @@ 'xoopspreloaditem' => XOOPS_ROOT_PATH . '/class/preload.php', 'xoopsprivmessage' => XOOPS_ROOT_PATH . '/kernel/privmessage.php', 'xoopsprivmessagehandler' => XOOPS_ROOT_PATH . '/kernel/privmessage.php', + 'xoopsranks' => XOOPS_ROOT_PATH . '/kernel/ranks.php', + 'xoopsrankshandler' => XOOPS_ROOT_PATH . '/kernel/ranks.php', 'xoopssecurity' => XOOPS_ROOT_PATH . '/class/xoopssecurity.php', 'xoopssessionhandler' => XOOPS_ROOT_PATH . '/kernel/session.php', 'xoopssimpleform' => XOOPS_ROOT_PATH . '/class/xoopsform/simpleform.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php 2011-11-03 20:23:01 UTC (rev 8038) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/blockmodulelink.php 2011-11-03 20:35:48 UTC (rev 8039) @@ -23,12 +23,6 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -/** - * System Block - * - * @copyright copyright (c) 2000 XOOPS.org - * @package system - */ class XoopsBlockmodulelink extends XoopsObject { /** Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/ranks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/ranks.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/ranks.php 2011-11-03 20:35:48 UTC (rev 8039) @@ -0,0 +1,53 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined"); + +class XoopsRanks extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('rank_id', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('rank_title', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('rank_min', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('rank_max', XOBJ_DTYPE_INT, null, false, 8); + $this->initVar('rank_special', XOBJ_DTYPE_INT, null, false, 1); + $this->initVar('rank_image', XOBJ_DTYPE_TXTBOX, null, false); + } +} + +class XoopsRanksHandler extends XoopsPersistableObjectHandler +{ + + /** + * @param XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db) + { + parent::__construct($db, 'ranks', 'XoopsRanks', 'rank_id', 'rank_title'); + } + +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/userrank.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/userrank.php 2011-11-03 20:23:01 UTC (rev 8038) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/userrank.php 2011-11-03 20:35:48 UTC (rev 8039) @@ -24,18 +24,8 @@ * @copyright copyright (c) 2000 XOOPS.org * @package system */ -class SystemUserrank extends XoopsObject +class SystemUserrank extends XoopsRanks { - function __construct() - { - $this->initVar( 'rank_id', XOBJ_DTYPE_INT, null, false, 5 ); - $this->initVar( 'rank_title', XOBJ_DTYPE_TXTBOX, null, false ); - $this->initVar( 'rank_min', XOBJ_DTYPE_INT, null, false, 8 ); - $this->initVar( 'rank_max', XOBJ_DTYPE_INT,null, false, 8 ); - $this->initVar( 'rank_special', XOBJ_DTYPE_INT, null, false,1 ); - $this->initVar( 'rank_image', XOBJ_DTYPE_TXTBOX, null, false ); - } - function getForm($action = false) { if ($this->isNew()) { @@ -103,13 +93,14 @@ * @package system * @subpackage avatar */ -class systemuserrankHandler extends XoopsPersistableObjectHandler +class systemuserrankHandler extends XoopsRanksHandler { - function __construct( $db ) + function __construct($db) { - parent::__construct( $db, 'ranks', 'SystemUserrank', 'rank_id', 'rank_title' ); - } + parent::__construct($db); + $this->className = 'SystemUserrank'; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 20:42:27
|
Revision: 8040 http://xoops.svn.sourceforge.net/xoops/?rev=8040&view=rev Author: trabis Date: 2011-11-03 20:42:20 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Adding smilies handler Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/smilies.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/smilies.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:35:48 UTC (rev 8039) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:42:20 UTC (rev 8040) @@ -688,6 +688,15 @@ /** * @param mixed $optional + * @return XoopsSmiliesHandler + */ + public function getHandlerSmilies($optional = false) + { + return $this->getHandler('smilies', $optional); + } + + /** + * @param mixed $optional * @return XoopsTplfileHandler */ public function getHandlerTplfile($optional = false) Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 20:35:48 UTC (rev 8039) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-03 20:42:20 UTC (rev 8040) @@ -323,6 +323,8 @@ 'xoopssecurity' => XOOPS_ROOT_PATH . '/class/xoopssecurity.php', 'xoopssessionhandler' => XOOPS_ROOT_PATH . '/kernel/session.php', 'xoopssimpleform' => XOOPS_ROOT_PATH . '/class/xoopsform/simpleform.php', + 'xoopssmilies' => XOOPS_ROOT_PATH . '/kernel/smilies.php', + 'xoopssmilieshandler' => XOOPS_ROOT_PATH . '/kernel/smilies.php', 'xoopstableform' => XOOPS_ROOT_PATH . '/class/xoopsform/tableform.php', 'xoopstardownloader' => XOOPS_ROOT_PATH . '/class/tardownloader.php', 'xoopsthemeform' => XOOPS_ROOT_PATH . '/class/xoopsform/themeform.php', Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/smilies.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/smilies.php 2011-11-03 20:42:20 UTC (rev 8040) @@ -0,0 +1,51 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS Kernel Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('XOOPS root path not defined'); + +class XoopsSmilies extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('id', XOBJ_DTYPE_INT, null, false, 5); + $this->initVar('code', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('smile_url', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('emotion', XOBJ_DTYPE_TXTBOX, null, false); + $this->initVar('display', XOBJ_DTYPE_INT, null, false, 1); + } +} + +class XoopsSmiliesHandler extends XoopsPersistableObjectHandler +{ + /** + * @param null|XoopsDatabase $db + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'smiles', 'XoopsSmilies', 'id', 'code'); + } + +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/smilies.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/smilies.php 2011-11-03 20:35:48 UTC (rev 8039) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/smilies.php 2011-11-03 20:42:20 UTC (rev 8040) @@ -25,18 +25,9 @@ * @copyright copyright (c) 2000 XOOPS.org * @package system */ -class SystemSmilies extends XoopsObject +class SystemSmilies extends XoopsSmilies { - function __construct() - { - $this->initVar('id',XOBJ_DTYPE_INT,null,false,5); - $this->initVar('code',XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar('smile_url',XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar('emotion',XOBJ_DTYPE_TXTBOX,null,false); - $this->initVar('display',XOBJ_DTYPE_INT,null,false,1); - } - function getForm($action = false) { if ($this->isNew()) { @@ -98,14 +89,13 @@ * @package system * @subpackage avatar */ -class systemsmiliesHandler extends XoopsPersistableObjectHandler +class systemsmiliesHandler extends XoopsSmiliesHandler { function __construct($db) { - parent::__construct($db, 'smiles', 'SystemSmilies', 'id', 'code'); + parent::__construct($db); + $this->className = 'SystemSmilies'; } -} - -?> \ No newline at end of file +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 23:34:52
|
Revision: 8042 http://xoops.svn.sourceforge.net/xoops/?rev=8042&view=rev Author: trabis Date: 2011-11-03 23:34:45 +0000 (Thu, 03 Nov 2011) Log Message: ----------- Adding $xoops->getModuleForm() to handle form classes. Refactoring avatar form. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/index.html Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 20:46:58 UTC (rev 8041) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 23:34:45 UTC (rev 8042) @@ -787,6 +787,30 @@ } /** + * @param string $name + * @param string $module_dir + * @param XoopsObject $obj + * @return XoopsForm|bool + */ + public function getModuleForm($name, $module_dir, XoopsObject $obj) + { + if (empty($name) || empty($module_dir)) { + return false; + } + if (file_exists($hnd_file = XOOPS_ROOT_PATH . "/modules/{$module_dir}/class/form/{$name}.php")) { + include_once $hnd_file; + $class = ucfirst(strtolower($module_dir)) . ucfirst($name) . 'Form'; + if (class_exists($class)) { + $instance = new $class($obj); + if ($instance instanceof XoopsForm) { + return $instance; + } + } + } + return false; + } + + /** * XOOPS language loader wrapper * * Temporary solution, not encouraged to use Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-03 20:46:58 UTC (rev 8041) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-03 23:34:45 UTC (rev 8042) @@ -59,7 +59,7 @@ $xoBreadCrumb->addTips(_AM_SYSTEM_AVATAR_TIPS); $xoBreadCrumb->render(); // Get avatar handler - $avatar_handler = $xoops->getModuleHandler('avatar'); + $avatar_handler = $xoops->getHandlerAvatar(); // Get User Config $config_handler = $xoops->getHandlerConfig(); $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); @@ -74,7 +74,7 @@ $xoopsTpl->assign('count_custom', $cavatar_count); // Create form $avatar = $avatar_handler->create(); - $form = $avatar->getForm(); + $form = $xoops->getModuleForm('avatar', 'system', $avatar); // Assign form $xoopsTpl->assign('form', $form->render()); // Call Footer @@ -156,12 +156,12 @@ // User language $xoops->loadLanguage('user'); // Get avatar handler - $avatar_handler = $xoops->getModuleHandler('avatar'); + $avatar_handler = $xoops->getHandlerAvatar(); $avatar_id = system_CleanVars($_REQUEST, 'avatar_id', 0, 'int'); if ($avatar_id > 0) { $avatar = $avatar_handler->get($avatar_id); // Create form - $form = $avatar->getForm(); + $form = $xoops->getModuleForm('avatar', 'system', $avatar); // Assign form $xoopsTpl->assign('form', $form->render()); } else { @@ -171,7 +171,7 @@ xoops_cp_footer(); break; - case 'save': + case'save': // Check security if (!$GLOBALS['xoopsSecurity']->check()) { $xoops->redirect('admin.php?fct=avatars', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); @@ -314,6 +314,4 @@ } $xoops->redirect('admin.php?fct=avatars', 2, _AM_SYSTEM_DBUPDATED); break; -} - -?> \ No newline at end of file +} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php 2011-11-03 20:46:58 UTC (rev 8041) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/avatar.php 2011-11-03 23:34:45 UTC (rev 8042) @@ -1,104 +0,0 @@ -<?php -/** - * Avatar Class Manager - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package system - * @version $Id:$ - */ - -defined('XOOPS_ROOT_PATH') or die('Restricted access'); - -/** - * System Avatar - * - * @copyright copyright (c) 2000 XOOPS.org - * @package system - */ -class SystemAvatar extends XoopsAvatar -{ - function __construct() - { - parent::__construct(); - } - - function getForm() - { - if ($this->isNew()) { - $blank_img = 'blank.gif'; - } else { - $blank_img = str_replace( 'avatars/', '', $this->getVar('avatar_file', 'e') ); - } - // Get User Config - $xoops = Xoops::getInstance(); - $config_handler = $xoops->getHandlerConfig(); - $xoopsConfigUser = $config_handler->getConfigsByCat( XOOPS_CONF_USER ); - // New and edit form - $form = new XoopsThemeForm( _AM_SYSTEM_AVATAR_ADD, 'avatar_form', 'admin.php', "post", true ); - $form->setExtra( 'enctype="multipart/form-data"' ); - // Name - $form->addElement( new XoopsFormText( _IMAGENAME, 'avatar_name', 50, 255, $this->getVar('avatar_name', 'e') ), true ); - // Name description - $maxpixel = '<div>' . _US_MAXPIXEL . ' : ' . $xoopsConfigUser['avatar_width'] . ' x ' . $xoopsConfigUser['avatar_height'] . '</div>'; - $maxsize = '<div>' . _US_MAXIMGSZ . ' : ' . $xoopsConfigUser['avatar_maxsize'] . '</div>'; - // Upload part - $imgtray_img = new XoopsFormElementTray( _IMAGEFILE, '<br />' ); - $imgtray_img->setDescription( $maxpixel . $maxsize ); - $imageselect_img = new XoopsFormSelect(sprintf( _AM_SYSTEM_AVATAR_USE_FILE, XOOPS_UPLOAD_PATH . '/avatars/'), 'avatar_file', $blank_img); - $image_array_img = XoopsLists::getImgListAsArray( XOOPS_UPLOAD_PATH . '/avatars' ); - $imageselect_img->addOption("$blank_img", $blank_img); - foreach ($image_array_img as $image_img) { - $imageselect_img->addOption("$image_img", $image_img); - } - $imageselect_img->setExtra( "onchange='showImgSelected(\"xo-avatar-img\", \"avatar_file\", \"avatars\", \"\", \"" . XOOPS_UPLOAD_URL . "\")'"); - $imgtray_img->addElement( $imageselect_img, false ); - $imgtray_img->addElement( new XoopsFormLabel( '', "<br /><img src='" . XOOPS_UPLOAD_URL . "/avatars/" . $blank_img . "' name='image_img' id='xo-avatar-img' alt='' />" ) ); - $fileseltray_img = new XoopsFormElementTray( '<br />','<br /><br />' ); - $fileseltray_img->addElement( new XoopsFormFile( _AM_SYSTEM_AVATAR_UPLOAD, 'avatar_file', 500000 ), false); - $imgtray_img->addElement($fileseltray_img); - $form->addElement($imgtray_img); - // Weight - $form->addElement( new XoopsFormText( _IMGWEIGHT, 'avatar_weight', 3, 4, $this->getVar('avatar_weight', 'e') ) ); - // Display - $form->addElement( new XoopsFormRadioYN( _IMGDISPLAY, 'avatar_display', $this->getVar('avatar_display', 'e'), _YES, _NO) ); - // Hidden - if ( $this->isNew() ) { - $form->addElement( new XoopsFormHidden( 'avatar_type', 's') ); - } - $form->addElement( new XoopsFormHidden( 'op', 'save') ); - $form->addElement( new XoopsFormHidden( 'fct', 'avatars') ); - $form->addElement( new XoopsFormHidden( 'avatar_id', $this->getVar('avatar_id', 'e') ) ); - // Button - $form->addElement( new XoopsFormButton( '', 'avt_button', _SUBMIT, 'submit') ); - - return $form; - } - -} - -/** - * System avatar handler class. (Singelton) - * - * This class is responsible for providing data access mechanisms to the data source - * of XOOPS block class objects. - * - * @copyright copyright (c) 2000 XOOPS.org - * @package system - * @subpackage avatar - */ -class SystemAvatarHandler extends XoopsAvatarHandler -{ - function __construct($db) - { - parent::__construct($db); - $this->className = 'SystemAvatar'; - } -} \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/avatar.php 2011-11-03 23:34:45 UTC (rev 8042) @@ -0,0 +1,82 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Avatar Form Class + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package system + * @since 2.6.0 + * @author Gregory Mage (AKA Mage) + * @author trabis <lus...@gm...> + * @version $Id:$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +class SystemAvatarForm extends XoopsThemeForm +{ + /** + * @param XoopsAvatar|XoopsObject $obj + */ + public function __construct(XoopsAvatar &$obj) + { + if ($obj->isNew()) { + $blank_img = 'blank.gif'; + } else { + $blank_img = str_replace('avatars/', '', $obj->getVar('avatar_file', 'e')); + } + // Get User Config + $xoops = Xoops::getInstance(); + $config_handler = $xoops->getHandlerConfig(); + $xoopsConfigUser = $config_handler->getConfigsByCat(XOOPS_CONF_USER); + + // New and edit form + parent::__construct(_AM_SYSTEM_AVATAR_ADD, 'avatar_form', 'admin.php', "post", true); + $this->setExtra('enctype="multipart/form-data"'); + // Name + $this->addElement(new XoopsFormText(_IMAGENAME, 'avatar_name', 50, 255, $obj->getVar('avatar_name', 'e')), true); + // Name description + $maxpixel = '<div>' . _US_MAXPIXEL . ' : ' . $xoopsConfigUser['avatar_width'] . ' x ' . $xoopsConfigUser['avatar_height'] . '</div>'; + $maxsize = '<div>' . _US_MAXIMGSZ . ' : ' . $xoopsConfigUser['avatar_maxsize'] . '</div>'; + // Upload part + $imgtray_img = new XoopsFormElementTray(_IMAGEFILE, '<br />'); + $imgtray_img->setDescription($maxpixel . $maxsize); + $imageselect_img = new XoopsFormSelect(sprintf(_AM_SYSTEM_AVATAR_USE_FILE, XOOPS_UPLOAD_PATH . '/avatars/'), 'avatar_file', $blank_img); + $image_array_img = XoopsLists::getImgListAsArray(XOOPS_UPLOAD_PATH . '/avatars'); + $imageselect_img->addOption("$blank_img", $blank_img); + foreach ($image_array_img as $image_img) { + $imageselect_img->addOption("$image_img", $image_img); + } + $imageselect_img->setExtra("onchange='showImgSelected(\"xo-avatar-img\", \"avatar_file\", \"avatars\", \"\", \"" . XOOPS_UPLOAD_URL . "\")'"); + $imgtray_img->addElement($imageselect_img, false); + $imgtray_img->addElement(new XoopsFormLabel('', "<br /><img src='" . XOOPS_UPLOAD_URL . "/avatars/" . $blank_img . "' name='image_img' id='xo-avatar-img' alt='' />")); + $fileseltray_img = new XoopsFormElementTray('<br />', '<br /><br />'); + $fileseltray_img->addElement(new XoopsFormFile(_AM_SYSTEM_AVATAR_UPLOAD, 'avatar_file', 500000), false); + $imgtray_img->addElement($fileseltray_img); + $this->addElement($imgtray_img); + // Weight + $this->addElement(new XoopsFormText(_IMGWEIGHT, 'avatar_weight', 3, 4, $obj->getVar('avatar_weight', 'e'))); + // Display + $this->addElement(new XoopsFormRadioYN(_IMGDISPLAY, 'avatar_display', $obj->getVar('avatar_display', 'e'), _YES, _NO)); + // Hidden + if ($obj->isNew()) { + $this->addElement(new XoopsFormHidden('avatar_type', 's')); + } + $this->addElement(new XoopsFormHidden('op', 'save')); + $this->addElement(new XoopsFormHidden('fct', 'avatars')); + $this->addElement(new XoopsFormHidden('avatar_id', $obj->getVar('avatar_id', 'e'))); + // Button + $this->addElement(new XoopsFormButton('', 'avt_button', _SUBMIT, 'submit')); + } + +} \ No newline at end of file Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/index.html (from rev 8037, XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/index.html) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/index.html 2011-11-03 23:34:45 UTC (rev 8042) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-03 23:59:53
|
Revision: 8043 http://xoops.svn.sourceforge.net/xoops/?rev=8043&view=rev Author: trabis Date: 2011-11-03 23:59:47 +0000 (Thu, 03 Nov 2011) Log Message: ----------- refactoring xoops->loadModuleForm() Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 23:34:45 UTC (rev 8042) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-03 23:59:47 UTC (rev 8043) @@ -787,16 +787,23 @@ } /** + * @param XoopsObject $obj * @param string $name * @param string $module_dir - * @param XoopsObject $obj * @return XoopsForm|bool */ - public function getModuleForm($name, $module_dir, XoopsObject $obj) + public function getModuleForm(XoopsObject $obj, $name, $module_dir = null) { - if (empty($name) || empty($module_dir)) { + if (empty($name)) { return false; } + if (empty($module_dir)) { + if ($this->isModule()) { + $module_dir = $this->module->getVar('dirname', 'n'); + } else { + return false; + } + } if (file_exists($hnd_file = XOOPS_ROOT_PATH . "/modules/{$module_dir}/class/form/{$name}.php")) { include_once $hnd_file; $class = ucfirst(strtolower($module_dir)) . ucfirst($name) . 'Form'; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-03 23:34:45 UTC (rev 8042) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-03 23:59:47 UTC (rev 8043) @@ -74,7 +74,7 @@ $xoopsTpl->assign('count_custom', $cavatar_count); // Create form $avatar = $avatar_handler->create(); - $form = $xoops->getModuleForm('avatar', 'system', $avatar); + $form = $xoops->getModuleForm($avatar, 'avatar'); // Assign form $xoopsTpl->assign('form', $form->render()); // Call Footer @@ -161,7 +161,7 @@ if ($avatar_id > 0) { $avatar = $avatar_handler->get($avatar_id); // Create form - $form = $xoops->getModuleForm('avatar', 'system', $avatar); + $form = $xoops->getModuleForm($avatar, 'avatar'); // Assign form $xoopsTpl->assign('form', $form->render()); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2011-11-05 10:48:59
|
Revision: 8049 http://xoops.svn.sourceforge.net/xoops/?rev=8049&view=rev Author: forxoops Date: 2011-11-05 10:48:50 +0000 (Sat, 05 Nov 2011) Log Message: ----------- Move smarty lib to xoops_lib directory Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Config_File.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Smarty.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Smarty_Compiler.class.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/configs/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/configs/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/configs/test.conf XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/debug.tpl XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.assemble_plugin_filepath.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.assign_smarty_interface.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.create_dir_structure.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.display_debug_console.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.get_include_path.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.get_microtime.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.get_php_resource.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.is_secure.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.is_trusted.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.load_plugins.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.load_resource_plugin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.process_cached_inserts.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.process_compiled_include.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.read_cache_file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.rm_auto.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.rmdir.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.run_insert_handler.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.smarty_include_php.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.write_cache_file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.write_compiled_include.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.write_compiled_resource.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/core.write_file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/internals/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/block.textformat.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/compiler.assign.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.assign_debug_info.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.config_load.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.counter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.cycle.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.debug.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.eval.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.fetch.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_checkboxes.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_options.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_radios.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_select_date.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_select_time.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.html_table.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.mailto.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.math.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.popup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/function.popup_init.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.capitalize.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.cat.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.count_characters.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.count_paragraphs.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.count_sentences.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.count_words.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.date_format.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.debug_print_var.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.default.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.escape.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.indent.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.lower.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.nl2br.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.regex_replace.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.replace.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.spacify.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.string_format.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.strip.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.strip_tags.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.truncate.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.upper.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/modifier.wordwrap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/outputfilter.trimwhitespace.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/shared.escape_special_chars.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/plugins/shared.make_timestamp.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.foreachq.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.includeq.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoAdminIcons.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoAdminNav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoAppUrl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoImgUrl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons16.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIcons32.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/compiler.xoModuleIconsBookmarks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.xoMemberInfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.xoPageNav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.xoops_link.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/modifier.debug_print_var.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.db.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/private/ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-11-05 08:44:03 UTC (rev 8048) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-11-05 10:48:50 UTC (rev 8049) @@ -20,7 +20,7 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); -define('SMARTY_DIR', XOOPS_PATH . '/private/smarty/'); +define('SMARTY_DIR', XOOPS_PATH . '/smarty/'); /** * Template engine Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-05 08:44:03 UTC (rev 8048) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-05 10:48:50 UTC (rev 8049) @@ -193,7 +193,7 @@ 'rsswebmasterhandler' => XOOPS_ROOT_PATH . '/class/xml/rss/xmlrss2parser.php', 'rsswidthhandler' => XOOPS_ROOT_PATH . '/class/xml/rss/xmlrss2parser.php', 'saxparser' => XOOPS_ROOT_PATH . '/class/xml/saxparser.php', - 'smarty' => XOOPS_PATH . '/private/smarty/Smarty.class.php', + 'smarty' => XOOPS_PATH . '/smarty/Smarty.class.php', 'snoopy' => XOOPS_ROOT_PATH . '/class/snoopy.php', 'sqlutility' => XOOPS_ROOT_PATH . '/class/database/sqlutility.php', 'tar' => XOOPS_ROOT_PATH . '/class/class.tar.php', Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Config_File.class.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Config_File.class.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Config_File.class.php 2011-11-05 10:48:50 UTC (rev 8049) @@ -0,0 +1,393 @@ +<?php + +/** + * Config_File class. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For questions, help, comments, discussion, etc., please join the + * Smarty mailing list. Send a blank e-mail to + * sma...@go... + * + * @link http://www.smarty.net/ + * @version 2.6.26 + * @copyright Copyright: 2001-2005 New Digital Group, Inc. + * @author Andrei Zmievski <an...@ph...> + * @access public + * @package Smarty + */ + +/* $Id: Config_File.class.php 7750 2011-10-01 18:58:41Z trabis $ */ + +/** + * Config file reading class + * @package Smarty + */ +class Config_File { + /**#@+ + * Options + * @var boolean + */ + /** + * Controls whether variables with the same name overwrite each other. + */ + var $overwrite = true; + + /** + * Controls whether config values of on/true/yes and off/false/no get + * converted to boolean values automatically. + */ + var $booleanize = true; + + /** + * Controls whether hidden config sections/vars are read from the file. + */ + var $read_hidden = true; + + /** + * Controls whether or not to fix mac or dos formatted newlines. + * If set to true, \r or \r\n will be changed to \n. + */ + var $fix_newlines = true; + /**#@-*/ + + /** @access private */ + var $_config_path = ""; + var $_config_data = array(); + /**#@-*/ + + /** + * Constructs a new config file class. + * + * @param string $config_path (optional) path to the config files + */ + function Config_File($config_path = NULL) + { + if (isset($config_path)) + $this->set_path($config_path); + } + + + /** + * Set the path where configuration files can be found. + * + * @param string $config_path path to the config files + */ + function set_path($config_path) + { + if (!empty($config_path)) { + if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) { + $this->_trigger_error_msg("Bad config file path '$config_path'"); + return; + } + if(substr($config_path, -1) != DIRECTORY_SEPARATOR) { + $config_path .= DIRECTORY_SEPARATOR; + } + + $this->_config_path = $config_path; + } + } + + + /** + * Retrieves config info based on the file, section, and variable name. + * + * @param string $file_name config file to get info for + * @param string $section_name (optional) section to get info for + * @param string $var_name (optional) variable to get info for + * @return string|array a value or array of values + */ + function get($file_name, $section_name = NULL, $var_name = NULL) + { + if (empty($file_name)) { + $this->_trigger_error_msg('Empty config file name'); + return; + } else { + $file_name = $this->_config_path . $file_name; + if (!isset($this->_config_data[$file_name])) + $this->load_file($file_name, false); + } + + if (!empty($var_name)) { + if (empty($section_name)) { + return $this->_config_data[$file_name]["vars"][$var_name]; + } else { + if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name])) + return $this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name]; + else + return array(); + } + } else { + if (empty($section_name)) { + return (array)$this->_config_data[$file_name]["vars"]; + } else { + if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"])) + return (array)$this->_config_data[$file_name]["sections"][$section_name]["vars"]; + else + return array(); + } + } + } + + + /** + * Retrieves config info based on the key. + * + * @param $file_name string config key (filename/section/var) + * @return string|array same as get() + * @uses get() retrieves information from config file and returns it + */ + function &get_key($config_key) + { + list($file_name, $section_name, $var_name) = explode('/', $config_key, 3); + $result = &$this->get($file_name, $section_name, $var_name); + return $result; + } + + /** + * Get all loaded config file names. + * + * @return array an array of loaded config file names + */ + function get_file_names() + { + return array_keys($this->_config_data); + } + + + /** + * Get all section names from a loaded file. + * + * @param string $file_name config file to get section names from + * @return array an array of section names from the specified file + */ + function get_section_names($file_name) + { + $file_name = $this->_config_path . $file_name; + if (!isset($this->_config_data[$file_name])) { + $this->_trigger_error_msg("Unknown config file '$file_name'"); + return; + } + + return array_keys($this->_config_data[$file_name]["sections"]); + } + + + /** + * Get all global or section variable names. + * + * @param string $file_name config file to get info for + * @param string $section_name (optional) section to get info for + * @return array an array of variables names from the specified file/section + */ + function get_var_names($file_name, $section = NULL) + { + if (empty($file_name)) { + $this->_trigger_error_msg('Empty config file name'); + return; + } else if (!isset($this->_config_data[$file_name])) { + $this->_trigger_error_msg("Unknown config file '$file_name'"); + return; + } + + if (empty($section)) + return array_keys($this->_config_data[$file_name]["vars"]); + else + return array_keys($this->_config_data[$file_name]["sections"][$section]["vars"]); + } + + + /** + * Clear loaded config data for a certain file or all files. + * + * @param string $file_name file to clear config data for + */ + function clear($file_name = NULL) + { + if ($file_name === NULL) + $this->_config_data = array(); + else if (isset($this->_config_data[$file_name])) + $this->_config_data[$file_name] = array(); + } + + + /** + * Load a configuration file manually. + * + * @param string $file_name file name to load + * @param boolean $prepend_path whether current config path should be + * prepended to the filename + */ + function load_file($file_name, $prepend_path = true) + { + if ($prepend_path && $this->_config_path != "") + $config_file = $this->_config_path . $file_name; + else + $config_file = $file_name; + + ini_set('track_errors', true); + $fp = @fopen($config_file, "r"); + if (!is_resource($fp)) { + $this->_trigger_error_msg("Could not open config file '$config_file'"); + return false; + } + + $contents = ($size = filesize($config_file)) ? fread($fp, $size) : ''; + fclose($fp); + + $this->_config_data[$config_file] = $this->parse_contents($contents); + return true; + } + + /** + * Store the contents of a file manually. + * + * @param string $config_file file name of the related contents + * @param string $contents the file-contents to parse + */ + function set_file_contents($config_file, $contents) + { + $this->_config_data[$config_file] = $this->parse_contents($contents); + return true; + } + + /** + * parse the source of a configuration file manually. + * + * @param string $contents the file-contents to parse + */ + function parse_contents($contents) + { + if($this->fix_newlines) { + // fix mac/dos formatted newlines + $contents = preg_replace('!\r\n?!', "\n", $contents); + } + + $config_data = array(); + $config_data['sections'] = array(); + $config_data['vars'] = array(); + + /* reference to fill with data */ + $vars =& $config_data['vars']; + + /* parse file line by line */ + preg_match_all('!^.*\r?\n?!m', $contents, $match); + $lines = $match[0]; + for ($i=0, $count=count($lines); $i<$count; $i++) { + $line = $lines[$i]; + if (empty($line)) continue; + + if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) { + /* section found */ + if (substr($match[1], 0, 1) == '.') { + /* hidden section */ + if ($this->read_hidden) { + $section_name = substr($match[1], 1); + } else { + /* break reference to $vars to ignore hidden section */ + unset($vars); + $vars = array(); + continue; + } + } else { + $section_name = $match[1]; + } + if (!isset($config_data['sections'][$section_name])) + $config_data['sections'][$section_name] = array('vars' => array()); + $vars =& $config_data['sections'][$section_name]['vars']; + continue; + } + + if (preg_match('/^\s*(\.?\w+)\s*=\s*(.*)/s', $line, $match)) { + /* variable found */ + $var_name = rtrim($match[1]); + if (strpos($match[2], '"""') === 0) { + /* handle multiline-value */ + $lines[$i] = substr($match[2], 3); + $var_value = ''; + while ($i<$count) { + if (($pos = strpos($lines[$i], '"""')) === false) { + $var_value .= $lines[$i++]; + } else { + /* end of multiline-value */ + $var_value .= substr($lines[$i], 0, $pos); + break; + } + } + $booleanize = false; + + } else { + /* handle simple value */ + $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', rtrim($match[2])); + $booleanize = $this->booleanize; + + } + $this->_set_config_var($vars, $var_name, $var_value, $booleanize); + } + /* else unparsable line / means it is a comment / means ignore it */ + } + return $config_data; + } + + /**#@+ @access private */ + /** + * @param array &$container + * @param string $var_name + * @param mixed $var_value + * @param boolean $booleanize determines whether $var_value is converted to + * to true/false + */ + function _set_config_var(&$container, $var_name, $var_value, $booleanize) + { + if (substr($var_name, 0, 1) == '.') { + if (!$this->read_hidden) + return; + else + $var_name = substr($var_name, 1); + } + + if (!preg_match("/^[a-zA-Z_]\w*$/", $var_name)) { + $this->_trigger_error_msg("Bad variable name '$var_name'"); + return; + } + + if ($booleanize) { + if (preg_match("/^(on|true|yes)$/i", $var_value)) + $var_value = true; + else if (preg_match("/^(off|false|no)$/i", $var_value)) + $var_value = false; + } + + if (!isset($container[$var_name]) || $this->overwrite) + $container[$var_name] = $var_value; + else { + settype($container[$var_name], 'array'); + $container[$var_name][] = $var_value; + } + } + + /** + * @uses trigger_error() creates a PHP warning/error + * @param string $error_msg + * @param integer $error_type one of + */ + function _trigger_error_msg($error_msg, $error_type = E_USER_WARNING) + { + trigger_error("Config_File error: $error_msg", $error_type); + } + /**#@-*/ +} + +?> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Smarty.class.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Smarty.class.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/Smarty.class.php 2011-11-05 10:48:50 UTC (rev 8049) @@ -0,0 +1,1961 @@ +<?php + +/** + * Project: Smarty: the PHP compiling template engine + * File: Smarty.class.php + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For questions, help, comments, discussion, etc., please join the + * Smarty mailing list. Send a blank e-mail to + * sma...@go... + * + * @link http://www.smarty.net/ + * @copyright 2001-2005 New Digital Group, Inc. + * @author Monte Ohrt <monte at ohrt dot com> + * @author Andrei Zmievski <an...@ph...> + * @package Smarty + * @version 2.6.26 + */ + +/* $Id: Smarty.class.php 7750 2011-10-01 18:58:41Z trabis $ */ + +/** + * DIR_SEP isn't used anymore, but third party apps might + */ +if(!defined('DIR_SEP')) { + define('DIR_SEP', DIRECTORY_SEPARATOR); +} + +/** + * set SMARTY_DIR to absolute path to Smarty library files. + * if not defined, include_path will be used. Sets SMARTY_DIR only if user + * application has not already defined it. + */ + +if (!defined('SMARTY_DIR')) { + define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR); +} + +if (!defined('SMARTY_CORE_DIR')) { + define('SMARTY_CORE_DIR', SMARTY_DIR . 'internals' . DIRECTORY_SEPARATOR); +} + +define('SMARTY_PHP_PASSTHRU', 0); +define('SMARTY_PHP_QUOTE', 1); +define('SMARTY_PHP_REMOVE', 2); +define('SMARTY_PHP_ALLOW', 3); + +/** + * @package Smarty + */ +class Smarty +{ + /**#@+ + * Smarty Configuration Section + */ + + /** + * The name of the directory where templates are located. + * + * @var string + */ + var $template_dir = 'templates'; + + /** + * The directory where compiled templates are located. + * + * @var string + */ + var $compile_dir = 'templates_c'; + + /** + * The directory where config files are located. + * + * @var string + */ + var $config_dir = 'configs'; + + /** + * An array of directories searched for plugins. + * + * @var array + */ + var $plugins_dir = array('plugins'); + + /** + * If debugging is enabled, a debug console window will display + * when the page loads (make sure your browser allows unrequested + * popup windows) + * + * @var boolean + */ + var $debugging = false; + + /** + * When set, smarty does uses this value as error_reporting-level. + * + * @var integer + */ + var $error_reporting = null; + + /** + * This is the path to the debug console template. If not set, + * the default one will be used. + * + * @var string + */ + var $debug_tpl = ''; + + /** + * This determines if debugging is enable-able from the browser. + * <ul> + * <li>NONE => no debugging control allowed</li> + * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li> + * </ul> + * @link http://www.foo.dom/index.php?SMARTY_DEBUG + * @var string + */ + var $debugging_ctrl = 'NONE'; + + /** + * This tells Smarty whether to check for recompiling or not. Recompiling + * does not need to happen unless a template or config file is changed. + * Typically you enable this during development, and disable for + * production. + * + * @var boolean + */ + var $compile_check = true; + + /** + * This forces templates to compile every time. Useful for development + * or debugging. + * + * @var boolean + */ + var $force_compile = false; + + /** + * This enables template caching. + * <ul> + * <li>0 = no caching</li> + * <li>1 = use class cache_lifetime value</li> + * <li>2 = use cache_lifetime in cache file</li> + * </ul> + * @var integer + */ + var $caching = 0; + + /** + * The name of the directory for cache files. + * + * @var string + */ + var $cache_dir = 'cache'; + + /** + * This is the number of seconds cached content will persist. + * <ul> + * <li>0 = always regenerate cache</li> + * <li>-1 = never expires</li> + * </ul> + * + * @var integer + */ + var $cache_lifetime = 3600; + + /** + * Only used when $caching is enabled. If true, then If-Modified-Since headers + * are respected with cached content, and appropriate HTTP headers are sent. + * This way repeated hits to a cached page do not send the entire page to the + * client every time. + * + * @var boolean + */ + var $cache_modified_check = false; + + /** + * This determines how Smarty handles "<?php ... ?>" tags in templates. + * possible values: + * <ul> + * <li>SMARTY_PHP_PASSTHRU -> print tags as plain text</li> + * <li>SMARTY_PHP_QUOTE -> escape tags as entities</li> + * <li>SMARTY_PHP_REMOVE -> remove php tags</li> + * <li>SMARTY_PHP_ALLOW -> execute php tags</li> + * </ul> + * + * @var integer + */ + var $php_handling = SMARTY_PHP_PASSTHRU; + + /** + * This enables template security. When enabled, many things are restricted + * in the templates that normally would go unchecked. This is useful when + * untrusted parties are editing templates and you want a reasonable level + * of security. (no direct execution of PHP in templates for example) + * + * @var boolean + */ + var $security = false; + + /** + * This is the list of template directories that are considered secure. This + * is used only if {@link $security} is enabled. One directory per array + * element. {@link $template_dir} is in this list implicitly. + * + * @var array + */ + var $secure_dir = array(); + + /** + * These are the security settings for Smarty. They are used only when + * {@link $security} is enabled. + * + * @var array + */ + var $security_settings = array( + 'PHP_HANDLING' => false, + 'IF_FUNCS' => array('array', 'list', + 'isset', 'empty', + 'count', 'sizeof', + 'in_array', 'is_array', + 'true', 'false', 'null'), + 'INCLUDE_ANY' => false, + 'PHP_TAGS' => false, + 'MODIFIER_FUNCS' => array('count'), + 'ALLOW_CONSTANTS' => false, + 'ALLOW_SUPER_GLOBALS' => true + ); + + /** + * This is an array of directories where trusted php scripts reside. + * {@link $security} is disabled during their inclusion/execution. + * + * @var array + */ + var $trusted_dir = array(); + + /** + * The left delimiter used for the template tags. + * + * @var string + */ + var $left_delimiter = '{'; + + /** + * The right delimiter used for the template tags. + * + * @var string + */ + var $right_delimiter = '}'; + + /** + * The order in which request variables are registered, similar to + * variables_order in php.ini E = Environment, G = GET, P = POST, + * C = Cookies, S = Server + * + * @var string + */ + var $request_vars_order = 'EGPCS'; + + /** + * Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false) + * are uses as request-vars or $_*[]-vars. note: if + * request_use_auto_globals is true, then $request_vars_order has + * no effect, but the php-ini-value "gpc_order" + * + * @var boolean + */ + var $request_use_auto_globals = true; + + /** + * Set this if you want different sets of compiled files for the same + * templates. This is useful for things like different languages. + * Instead of creating separate sets of templates per language, you + * set different compile_ids like 'en' and 'de'. + * + * @var string + */ + var $compile_id = null; + + /** + * This tells Smarty whether or not to use sub dirs in the cache/ and + * templates_c/ directories. sub directories better organized, but + * may not work well with PHP safe mode enabled. + * + * @var boolean + * + */ + var $use_sub_dirs = false; + + /** + * This is a list of the modifiers to apply to all template variables. + * Put each modifier in a separate array element in the order you want + * them applied. example: <code>array('escape:"htmlall"');</code> + * + * @var array + */ + var $default_modifiers = array(); + + /** + * This is the resource type to be used when not specified + * at the beginning of the resource path. examples: + * $smarty->display('file:index.tpl'); + * $smarty->display('db:index.tpl'); + * $smarty->display('index.tpl'); // will use default resource type + * {include file="file:index.tpl"} + * {include file="db:index.tpl"} + * {include file="index.tpl"} {* will use default resource type *} + * + * @var array + */ + var $default_resource_type = 'file'; + + /** + * The function used for cache file handling. If not set, built-in caching is used. + * + * @var null|string function name + */ + var $cache_handler_func = null; + + /** + * This indicates which filters are automatically loaded into Smarty. + * + * @var array array of filter names + */ + var $autoload_filters = array(); + + /**#@+ + * @var boolean + */ + /** + * This tells if config file vars of the same name overwrite each other or not. + * if disabled, same name variables are accumulated in an array. + */ + var $config_overwrite = true; + + /** + * This tells whether or not to automatically booleanize config file variables. + * If enabled, then the strings "on", "true", and "yes" are treated as boolean + * true, and "off", "false" and "no" are treated as boolean false. + */ + var $config_booleanize = true; + + /** + * This tells whether hidden sections [.foobar] are readable from the + * tempalates or not. Normally you would never allow this since that is + * the point behind hidden sections: the application can access them, but + * the templates cannot. + */ + var $config_read_hidden = false; + + /** + * This tells whether or not automatically fix newlines in config files. + * It basically converts \r (mac) or \r\n (dos) to \n + */ + var $config_fix_newlines = true; + /**#@-*/ + + /** + * If a template cannot be found, this PHP function will be executed. + * Useful for creating templates on-the-fly or other special action. + * + * @var string function name + */ + var $default_template_handler_func = ''; + + /** + * The file that contains the compiler class. This can a full + * pathname, or relative to the php_include path. + * + * @var string + */ + var $compiler_file = 'Smarty_Compiler.class.php'; + + /** + * The class used for compiling templates. + * + * @var string + */ + var $compiler_class = 'Smarty_Compiler'; + + /** + * The class used to load config vars. + * + * @var string + */ + var $config_class = 'Config_File'; + +/**#@+ + * END Smarty Configuration Section + * There should be no need to touch anything below this line. + * @access private + */ + /** + * where assigned template vars are kept + * + * @var array + */ + var $_tpl_vars = array(); + + /** + * stores run-time $smarty.* vars + * + * @var null|array + */ + var $_smarty_vars = null; + + /** + * keeps track of sections + * + * @var array + */ + var $_sections = array(); + + /** + * keeps track of foreach blocks + * + * @var array + */ + var $_foreach = array(); + + /** + * keeps track of tag hierarchy + * + * @var array + */ + var $_tag_stack = array(); + + /** + * configuration object + * + * @var Config_file + */ + var $_conf_obj = null; + + /** + * loaded configuration settings + * + * @var array + */ + var $_config = array(array('vars' => array(), 'files' => array())); + + /** + * md5 checksum of the string 'Smarty' + * + * @var string + */ + var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f'; + + /** + * Smarty version number + * + * @var string + */ + var $_version = '2.6.26'; + + /** + * current template inclusion depth + * + * @var integer + */ + var $_inclusion_depth = 0; + + /** + * for different compiled templates + * + * @var string + */ + var $_compile_id = null; + + /** + * text in URL to enable debug mode + * + * @var string + */ + var $_smarty_debug_id = 'SMARTY_DEBUG'; + + /** + * debugging information for debug console + * + * @var array + */ + var $_smarty_debug_info = array(); + + /** + * info that makes up a cache file + * + * @var array + */ + var $_cache_info = array(); + + /** + * default file permissions + * + * @var integer + */ + var $_file_perms = 0644; + + /** + * default dir permissions + * + * @var integer + */ + var $_dir_perms = 0771; + + /** + * registered objects + * + * @var array + */ + var $_reg_objects = array(); + + /** + * table keeping track of plugins + * + * @var array + */ + var $_plugins = array( + 'modifier' => array(), + 'function' => array(), + 'block' => array(), + 'compiler' => array(), + 'prefilter' => array(), + 'postfilter' => array(), + 'outputfilter' => array(), + 'resource' => array(), + 'insert' => array()); + + + /** + * cache serials + * + * @var array + */ + var $_cache_serials = array(); + + /** + * name of optional cache include file + * + * @var string + */ + var $_cache_include = null; + + /** + * indicate if the current code is used in a compiled + * include + * + * @var string + */ + var $_cache_including = false; + + /**#@-*/ + /** + * The class constructor. + */ + function Smarty() + { + $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] + : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']); + } + + /** + * assigns values to template variables + * + * @param array|string $tpl_var the template variable name(s) + * @param mixed $value the value to assign + */ + function assign($tpl_var, $value = null) + { + if (is_array($tpl_var)){ + foreach ($tpl_var as $key => $val) { + if ($key != '') { + $this->_tpl_vars[$key] = $val; + } + } + } else { + if ($tpl_var != '') + $this->_tpl_vars[$tpl_var] = $value; + } + } + + /** + * assigns values to template variables by reference + * + * @param string $tpl_var the template variable name + * @param mixed $value the referenced value to assign + */ + function assign_by_ref($tpl_var, &$value) + { + if ($tpl_var != '') + $this->_tpl_vars[$tpl_var] = &$value; + } + + /** + * appends values to template variables + * + * @param array|string $tpl_var the template variable name(s) + * @param mixed $value the value to append + */ + function append($tpl_var, $value=null, $merge=false) + { + if (is_array($tpl_var)) { + // $tpl_var is an array, ignore $value + foreach ($tpl_var as $_key => $_val) { + if ($_key != '') { + if(!@is_array($this->_tpl_vars[$_key])) { + settype($this->_tpl_vars[$_key],'array'); + } + if($merge && is_array($_val)) { + foreach($_val as $_mkey => $_mval) { + $this->_tpl_vars[$_key][$_mkey] = $_mval; + } + } else { + $this->_tpl_vars[$_key][] = $_val; + } + } + } + } else { + if ($tpl_var != '' && isset($value)) { + if(!@is_array($this->_tpl_vars[$tpl_var])) { + settype($this->_tpl_vars[$tpl_var],'array'); + } + if($merge && is_array($value)) { + foreach($value as $_mkey => $_mval) { + $this->_tpl_vars[$tpl_var][$_mkey] = $_mval; + } + } else { + $this->_tpl_vars[$tpl_var][] = $value; + } + } + } + } + + /** + * appends values to template variables by reference + * + * @param string $tpl_var the template variable name + * @param mixed $value the referenced value to append + */ + function append_by_ref($tpl_var, &$value, $merge=false) + { + if ($tpl_var != '' && isset($value)) { + if(!@is_array($this->_tpl_vars[$tpl_var])) { + settype($this->_tpl_vars[$tpl_var],'array'); + } + if ($merge && is_array($value)) { + foreach($value as $_key => $_val) { + $this->_tpl_vars[$tpl_var][$_key] = &$value[$_key]; + } + } else { + $this->_tpl_vars[$tpl_var][] = &$value; + } + } + } + + + /** + * clear the given assigned template variable. + * + * @param string $tpl_var the template variable to clear + */ + function clear_assign($tpl_var) + { + if (is_array($tpl_var)) + foreach ($tpl_var as $curr_var) + unset($this->_tpl_vars[$curr_var]); + else + unset($this->_tpl_vars[$tpl_var]); + } + + + /** + * Registers custom function to be used in templates + * + * @param string $function the name of the template function + * @param string $function_impl the name of the PHP function to register + */ + function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null) + { + $this->_plugins['function'][$function] = + array($function_impl, null, null, false, $cacheable, $cache_attrs); + + } + + /** + * Unregisters custom function + * + * @param string $function name of template function + */ + function unregister_function($function) + { + unset($this->_plugins['function'][$function]); + } + + /** + * Registers object to be used in templates + * + * @param string $object name of template object + * @param object &$object_impl the referenced PHP object to register + * @param null|array $allowed list of allowed methods (empty = all) + * @param boolean $smarty_args smarty argument format, else traditional + * @param null|array $block_functs list of methods that are block format + */ + function register_object($object, &$object_impl, $allowed = array(), $smarty_args = true, $block_methods = array()) + { + settype($allowed, 'array'); + settype($smarty_args, 'boolean'); + $this->_reg_objects[$object] = + array(&$object_impl, $allowed, $smarty_args, $block_methods); + } + + /** + * Unregisters object + * + * @param string $object name of template object + */ + function unregister_object($object) + { + unset($this->_reg_objects[$object]); + } + + + /** + * Registers block function to be used in templates + * + * @param string $block name of template block + * @param string $block_impl PHP function to register + */ + function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null) + { + $this->_plugins['block'][$block] = + array($block_impl, null, null, false, $cacheable, $cache_attrs); + } + + /** + * Unregisters block function + * + * @param string $block name of template function + */ + function unregister_block($block) + { + unset($this->_plugins['block'][$block]); + } + + /** + * Registers compiler function + * + * @param string $function name of template function + * @param string $function_impl name of PHP function to register + */ + function register_compiler_function($function, $function_impl, $cacheable=true) + { + $this->_plugins['compiler'][$function] = + array($function_impl, null, null, false, $cacheable); + } + + /** + * Unregisters compiler function + * + * @param string $function name of template function + */ + function unregister_compiler_function($function) + { + unset($this->_plugins['compiler'][$function]); + } + + /** + * Registers modifier to be used in templates + * + * @param string $modifier name of template modifier + * @param string $modifier_impl name of PHP function to register + */ + function register_modifier($modifier, $modifier_impl) + { + $this->_plugins['modifier'][$modifier] = + array($modifier_impl, null, null, false); + } + + /** + * Unregisters modifier + * + * @param string $modifier name of template modifier + */ + function unregister_modifier($modifier) + { + unset($this->_plugins['modifier'][$modifier]); + } + + /** + * Registers a resource to fetch a template + * + * @param string $type name of resource + * @param array $functions array of functions to handle resource + */ + function register_resource($type, $functions) + { + if (count($functions)==4) { + $this->_plugins['resource'][$type] = + array($functions, false); + + } elseif (count($functions)==5) { + $this->_plugins['resource'][$type] = + array(array(array(&$functions[0], $functions[1]) + ,array(&$functions[0], $functions[2]) + ,array(&$functions[0], $functions[3]) + ,array(&$functions[0], $functions[4])) + ,false); + + } else { + $this->trigger_error("malformed function-list for '$type' in register_resource"); + + } + } + + /** + * Unregisters a resource + * + * @param string $type name of resource + */ + function unregister_resource($type) + { + unset($this->_plugins['resource'][$type]); + } + + /** + * Registers a prefilter function to apply + * to a template before compiling + * + * @param callback $function + */ + function register_prefilter($function) + { + $this->_plugins['prefilter'][$this->_get_filter_name($function)] + = array($function, null, null, false); + } + + /** + * Unregisters a prefilter function + * + * @param callback $function + */ + function unregister_prefilter($function) + { + unset($this->_plugins['prefilter'][$this->_get_filter_name($function)]); + } + + /** + * Registers a postfilter function to apply + * to a compiled template after compilation + * + * @param callback $function + */ + function register_postfilter($function) + { + $this->_plugins['postfilter'][$this->_get_filter_name($function)] + = array($function, null, null, false); + } + + /** + * Unregisters a postfilter function + * + * @param callback $function + */ + function unregister_postfilter($function) + { + unset($this->_plugins['postfilter'][$this->_get_filter_name($function)]); + } + + /** + * Registers an output filter function to apply + * to a template output + * + * @param callback $function + */ + function register_outputfilter($function) + { + $this->_plugins['outputfilter'][$this->_get_filter_name($function)] + = array($function, null, null, false); + } + + /** + * Unregisters an outputfilter function + * + * @param callback $function + */ + function unregister_outputfilter($function) + { + unset($this->_plugins['outputfilter'][$this->_get_filter_name($function)]); + } + + /** + * load a filter of specified type and name + * + * @param string $type filter type + * @param string $name filter name + */ + function load_filter($type, $name) + { + switch ($type) { + case 'output': + $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false))); + require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); + smarty_core_load_plugins($_params, $this); + break; + + case 'pre': + case 'post': + if (!isset($this->_plugins[$type . 'filter'][$name])) + $this->_plugins[$type . 'filter'][$name] = false; + break; + } + } + + /** + * clear cached content for the given template and cache id + * + * @param string $tpl_file name of template file + * @param string $cache_id name of cache_id + * @param string $compile_id name of compile_id + * @param string $exp_time expiration time + * @return boolean + */ + function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null) + { + + if (!isset($compile_id)) + $compile_id = $this->compile_id; + + if (!isset($tpl_file)) + $compile_id = null; + + $_auto_id = $this->_get_auto_id($cache_id, $compile_id); + + if (!empty($this->cache_handler_func)) { + return call_user_func_array($this->cache_handler_func, + array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time)); + } else { + $_params = array('auto_base' => $this->cache_dir, + 'auto_source' => $tpl_file, + 'auto_id' => $_auto_id, + 'exp_time' => $exp_time); + require_once(SMARTY_CORE_DIR . 'core.rm_auto.php'); + return smarty_core_rm_auto($_params, $this); + } + + } + + + /** + * clear the entire contents of cache (all templates) + * + * @param string $exp_time expire time + * @return boolean results of {@link smarty_core_rm_auto()} + */ + function clear_all_cache($exp_time = null) + { + return $this->clear_cache(null, null, null, $exp_time); + } + + + /** + * test to see if valid cache exists for this template + * + * @param string $tpl_file name of template file + * @param string $cache_id + * @param string $compile_id + * @return string|false results of {@link _read_cache_file()} + */ + function is_cached($tpl_file, $cache_id = null, $compile_id = null) + { + if (!$this->caching) + return false; + + if (!isset($compile_id)) + $compile_id = $this->compile_id; + + $_params = array( + 'tpl_file' => $tpl_file, + 'cache_id' => $cache_id, + 'compile_id' => $compile_id + ); + require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php'); + return smarty_core_read_cache_file($_params, $this); + } + + + /** + * clear all the assigned template variables. + * + */ + function clear_all_assign() + { + $this->_tpl_vars = array(); + } + + /** + * clears compiled version of specified template resource, + * or all compiled template files if one is not specified. + * This function is for advanced use only, not normally needed. + * + * @param string $tpl_file + * @param string $compile_id + * @param string $exp_time + * @return boolean results of {@link smarty_core_rm_auto()} + */ + function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) + { + if (!isset($compile_id)) { + $compile_id = $this->compile_id; + } + $_params = array('auto_base' => $this->compile_dir, + 'auto_source' => $tpl_file, + 'auto_id' => $compile_id, + 'exp_time' => $exp_time, + 'extensions' => array('.inc', '.php')); + require_once(SMARTY_CORE_DIR . 'core.rm_auto.php'); + return smarty_core_rm_auto($_params, $this); + } + + /** + * Checks whether requested template exists. + * + * @param string $tpl_file + * @return boolean + */ + function template_exists($tpl_file) + { + $_params = array('resource_name' => $tpl_file, 'quiet'=>true, 'get_source'=>false); + return $this->_fetch_resource_info($_params); + } + + /** + * Returns an array containing template variables + * + * @param string $name + * @param string $type + * @return array + */ + function &get_template_vars($name=null) + { + if(!isset($name)) { + return $this->_tpl_vars; + } elseif(isset($this->_tpl_vars[$name])) { + return $this->_tpl_vars[$name]; + } else { + // var non-existant, return valid reference + $_tmp = null; + return $_tmp; + } + } + + /** + * Returns an array containing config variables + * + * @param string $name + * @param string $type + * @return array + */ + function &get_config_vars($name=null) + { + if(!isset($name) && is_array($this->_config[0])) { + return $this->_config[0]['vars']; + } else if(isset($this->_config[0]['vars'][$name])) { + return $this->_config[0]['vars'][$name]; + } else { + // var non-existant, return valid reference + $_tmp = null; + return $_tmp; + } + } + + /** + * trigger Smarty error + * + * @param string $error_msg + * @param integer $error_type + */ + function trigger_error($error_msg, $error_type = E_USER_WARNING) + { + trigger_error("Smarty error: $error_msg", $error_type); + } + + + /** + * executes & displays the template results + * + * @param string $resource_name + * @param string $cache_id + * @param string $compile_id + */ + function display($resource_name, $cache_id = null, $compile_id = null) + { + $this->fetch($resource_name, $cache_id, $compile_id, true); + } + + /** + * executes & returns or displays the template results + * + * @param string $resource_name + * @param string $cache_id + * @param string $compile_id + * @param boolean $display + */ + function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false) + { + static $_cache_info = array(); + + $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting) + ? $this->error_reporting : error_reporting() & ~E_NOTICE); + + if (!$this->debugging && $this->debugging_ctrl == 'URL') { + $_query_string = $this->request_use_auto_globals ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING']; + if (@strstr($_query_string, $this->_smarty_debug_id)) { + if (@strstr($_query_string, $this->_smarty_debug_id . '=on')) { + // enable debugging for this browser session + @setcookie('SMARTY_DEBUG', true); + $this->debugging = true; + } elseif (@strstr($_query_string, $this->_smarty_debug_id . '=off')) { + // disable debugging for this browser session + @setcookie('SMARTY_DEBUG', false); + $this->debugging = false; + } else { + // enable debugging for this page + $this->debugging = true; + } + } else { + $this->debugging = (bool)($this->request_use_auto_globals ? @$_COOKIE['SMARTY_DEBUG'] : @$GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG']); + } + } + + if ($this->debugging) { + // capture time for debugging info + $_params = array(); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); + $_debug_start_time = smarty_core_get_microtime($_params, $this); + $this->_smarty_debug_info[] = array('type' => 'template', + 'filename' => $resource_name, + 'depth' => 0); + $_included_tpls_idx = count($this->_smarty_debug_info) - 1; + } + + if (!isset($compile_id)) { + $compile_id = $this->compile_id; + } + + $this->_compile_id = $compile_id; + $this->_inclusion_depth = 0; + + if ($this->caching) { + // save old cache_info, initialize cache_info + array_push($_cache_info, $this->_cache_info); + $this->_cache_info = array(); + $_params = array( + 'tpl_file' => $resource_name, + 'cache_id' => $cache_id, + 'compile_id' => $compile_id, + 'results' => null + ); + require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php'); + if (smarty_core_read_cache_file($_params, $this)) { + $_smarty_results = $_params['results']; + if (!empty($this->_cache_info['insert_tags'])) { + $_params = array('plugins' => $this->_cache_info['insert_tags']); + require_once(SMARTY_CORE_DIR . 'core.load... [truncated message content] |
From: <for...@us...> - 2011-11-06 21:00:36
|
Revision: 8144 http://xoops.svn.sourceforge.net/xoops/?rev=8144&view=rev Author: forxoops Date: 2011-11-06 21:00:24 +0000 (Sun, 06 Nov 2011) Log Message: ----------- Move public lib in media directory (jquery) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/jquery.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.form.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.jgrowl.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.lightbox.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.tablesorter.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_flat_0_aaaaaa_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_flat_75_ffffff_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_glass_55_fbf9ee_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_glass_65_ffffff_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_glass_75_dadada_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_glass_75_e6e6e6_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_glass_95_fef1ec_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-icons_222222_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-icons_2e83ff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-icons_454545_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-icons_888888_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/images/ui-icons_cd0a0a_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/base/ui.theme.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_glass_50_3baae3_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-icons_2694e8_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-icons_2e83ff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-icons_3d80b3_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-icons_72a7cf_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/images/ui-icons_ffffff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.custom.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/cupertino/ui.theme.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/jquery.ui.js XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_flat_55_fbec88_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_glass_85_dfeffc_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_glass_95_fef1ec_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_217bc0_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_222222_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_228ef1_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_2e83ff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_454545_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_469bdd_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_6da8d5_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_888888_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_cd0a0a_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_d8e7f3_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_ef8c08_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_f9bd01_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_ffd27a_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/images/ui-icons_ffffff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.custom.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/redmond/ui.theme.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_glass_65_ffffff_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_glass_75_dadada_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-icons_222222_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-icons_2e83ff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-icons_454545_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-icons_888888_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/images/ui-icons_cd0a0a_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.custom.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/smoothness/ui.theme.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_glass_20_555555_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-icons_222222_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-icons_4b8e0b_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-icons_a83300_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-icons_cccccc_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/images/ui-icons_ffffff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.custom.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-darkness/ui.theme.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_flat_10_000000_40x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-icons_222222_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-icons_228ef1_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-icons_ef8c08_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-icons_ffd27a_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/images/ui-icons_ffffff_256x240.png XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/index.html XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.accordion.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.all.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.autocomplete.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.base.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.button.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.core.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.custom.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.datepicker.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.dialog.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.progressbar.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.resizable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.selectable.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.slider.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.tabs.css XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/ui/ui-lightness/ui.theme.css Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Frameworks/ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-06 20:58:16 UTC (rev 8143) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-06 21:00:24 UTC (rev 8144) @@ -314,19 +314,18 @@ return false; } $included = true; - $this->tpl_file = $tpl_file; + // Don't use db template + if (!$this->isModule()) { + /* @var $module_handler XoopsModuleHandler */ + $module_handler = $this->getHandler( 'module' ); + $this->module = $module_handler->getByDirname( 'system' ); + } + $this->tpl_file = XOOPS_ROOT_PATH . '/modules/' . $this->module->getVar('dirname', 'n') . '/templates/' . str_replace("db:", "", $tpl_file); $this->preload->triggerEvent('core.header.start'); $this->logger->stopTime('Module init'); $this->logger->startTime('XOOPS output init'); - // include Smarty template engine and initialize it - if ($this->tpl_file) { - if (false === strpos($this->tpl_file, ':')) { - $this->tpl_file = 'db:' . $this->tpl_file; - } - } - // for legacy support when template is sset after header. $this->option['template_main'] = $this->tpl_file; @@ -364,7 +363,7 @@ ? $cache_times[$this->module->getVar('mid')] : 0; // Tricky solution for setting cache time for homepage } else { - if (!empty($this->tpl_file) && $this->tpl_file == 'db:system_homepage.html') { + if (!empty($this->tpl_file) && $this->module->getVar('dirname', 'n') == 'system') { $this->theme->contentCacheLifetime = 604800; } } Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/index.html 2011-11-06 21:00:24 UTC (rev 8144) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery ___________________________________________________________________ Added: tsvn:autoprops + *.php = svn:executable=*;svn:keywords=Author Date Id Rev URL; Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/index.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/index.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/index.html 2011-11-06 21:00:24 UTC (rev 8144) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/jquery.js =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/jquery.js (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/jquery.js 2011-11-06 21:00:24 UTC (rev 8144) @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.related... [truncated message content] |
From: <tr...@us...> - 2011-11-07 19:35:04
|
Revision: 8223 http://xoops.svn.sourceforge.net/xoops/?rev=8223&view=rev Author: trabis Date: 2011-11-07 19:34:58 +0000 (Mon, 07 Nov 2011) Log Message: ----------- Refactoring root/banners.php with handlers usage Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/locale.php XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/xoopsmailerlocal.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -83,12 +83,12 @@ '); echo "<div id='login_window'> <h2 class='content_title'>" . _BANNERS_LOGIN_TITLE . "</h2> - <form method='post' action='banners . php' class='login_form'> + <form method='post' action='banners.php' class='login_form'> <div class='credentials'> - <label for='login_form - login'>" . _BANNERS_LOGIN_LOGIN . "</label> - <input type='text' name='login' id='login_form - login' value='' /><br /> - <label for='login_form - password'>" . _BANNERS_LOGIN_PASS . "</label> - <input type='password' name='pass' id='login_form - password' value='' /><br /> + <label for='login_form-login'>" . _BANNERS_LOGIN_LOGIN . "</label> + <input type='text' name='login' id='login_form-login' value='' /><br /> + <label for='login_form-password'>" . _BANNERS_LOGIN_PASS . "</label> + <input type='password' name='pass' id='login_form-password' value='' /><br /> </div> <div class='actions'><input type='hidden' name='op' value='Ok' /><button type='submit'>" . _BANNERS_LOGIN_OK . "</button></div> <div class='login_info'>" . _BANNERS_LOGIN_INFO . "</div>" . $xoops->security->getTokenHTML("BANNER_LOGIN") . " @@ -108,19 +108,18 @@ $xoops->redirect("banners.php", 2, _BANNERS_NO_LOGIN_DATA); exit(); } - $result = $xoops->db->query(sprintf("SELECT cid, name, passwd FROM %s WHERE login=%s", $xoops->db->prefix("bannerclient"), $xoops->db->quoteString($_SESSION['banner_login']))); - list ($cid, $name, $passwd) = $xoops->db->fetchRow($result); - if ($_SESSION['banner_pass'] == $passwd) { + $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); + if ($client) { $xoops->header(); - $xoops->theme->addStylesheet(null, null,' + $xoops->theme->addStylesheet(null, null, ' #bannerstats {} #bannerstats td {text-align: center;} '); echo "<div id='bannerstats'> - <h4 class='content_title'>" . sprintf(_BANNERS_TITLE, $name) . "</h4><hr /> + <h4 class='content_title'>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</h4><hr /> <table summary=''> - <caption>" . sprintf(_BANNERS_TITLE, $name) . "</caption> + <caption>" . sprintf(_BANNERS_TITLE, $client->getVar('name')) . "</caption> <thead><tr> <td>ID</td> <td>" . _BANNERS_IMP_MADE . "</td> @@ -131,71 +130,75 @@ <td>" . _BANNERS_FUNCTIONS . "</td></tr></thead> <tfoot><tr><td colspan='7'></td></tr></tfoot>"; - $result = $xoops->db->query("SELECT bid, imptotal, impmade, clicks, date FROM " . $xoops->db->prefix("banner") . " WHERE cid={$cid}"); + $criteria = new Criteria('cid', $client->getVar('cid')); + $banners = $xoops->getHandlerBanner()->getObjects($criteria); $i = 0; - while (list ($bid, $imptotal, $impmade, $clicks, $date) = $xoops->db->fetchRow($result)) { - if ($impmade == 0) { + /* @var $banner XoopsBanner */ + foreach ($banners as $banner) { + if ($banner->getvar('impmade') == 0) { $percent = 0; } else { - $percent = substr(100 * $clicks / $impmade, 0, 5); + $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impmade'), 0, 5); } - if ($imptotal == 0) { + if ($banner->getvar('imptotal') == 0) { $left = _BANNERS_UNLIMITED; } else { - $left = $imptotal - $impmade; + $left = $banner->getvar('imptotal') - $banner->getvar('impmade'); } $class = ($i % 2 == 0) ? 'even' : 'odd'; echo "<tbody><tr class='{$class}'> - <td>{$bid}</td> - <td>{$impmade}</td> - <td>{$imptotal}</td> + <td>" . $banner->getvar('bid') . "</td> + <td>" . $banner->getvar('impmade') . "</td> + <td>" . $banner->getvar('imptotal') . "</td> <td>{$left}</td> - <td>{$clicks}</td> + <td>" . $banner->getvar('clicks') . "</td> <td>{$percent}%</td> - <td><a href='banners . php ? op = EmailStats & amp;cid ={$cid}&bid ={$bid}' title='" . _BANNERS_STATS . "'>" . _BANNERS_STATS . "</a></td></tr></tbody>"; + <td><a href='banners.php?op=EmailStats&cid=" . $banner->getvar('cid') . "&bid=" . $banner->getvar('bid') . "' title='" . _BANNERS_STATS . "'>" . _BANNERS_STATS . "</a></td></tr></tbody>"; $i++; } echo "</table> <br /><br /> <h4 class='content_title'>" . _BANNERS_FOW_IN . htmlspecialchars($xoops->getConfig('sitename')) . "</h4><hr />"; - $result = $xoops->db->query("SELECT bid, imageurl, clickurl, htmlbanner, htmlcode FROM " . $xoops->db->prefix("banner") . " WHERE cid={$cid}"); - while (list ($bid, $imageurl, $clickurl, $htmlbanner, $htmlcode) = $xoops->db->fetchRow($result)) { - $numrows = $xoops->db->getRowsNum($result); + /* @var $banner XoopsBanner */ + $numrows = count($banners); + foreach ($banners as $banner) { if ($numrows > 1) { echo "<br />"; } - if (!empty($htmlbanner) && !empty($htmlcode)) { + if ($banner->getVar('htmlbanner') && $banner->getVar('htmlcode')) { $myts = MyTextSanitizer::getInstance(); - echo $myts->displayTarea($htmlcode); + echo $myts->displayTarea($banner->getVar('htmlcode')); } else { - if (strtolower(substr($imageurl, strrpos($imageurl, "."))) == ".swf") { - echo "<object type='application / x - shockwave - flash' width='468' height='60' data='{$imageurl}'>"; - echo "<param name='movie' value='{$imageurl}' />"; + if (strtolower(substr($banner->getVar('imageurl'), strrpos($banner->getVar('imageurl'), "."))) == ".swf") { + echo "<object type='application / x - shockwave - flash' width='468' height='60' data='" . $banner->getVar('imageurl') . "'>"; + echo "<param name='movie' value='" . $banner->getVar('imageurl') . "' />"; echo "<param name='quality' value='high' />"; echo "</object>"; } else { - echo "<img src='{$imageurl}' alt='' />"; + echo "<img src='" . $banner->getVar('imageurl') . "' alt='' />"; } } - echo "<br /><strong>" . _BANNERS_ID . $bid . "</strong><br />" . sprintf(_BANNERS_SEND_STATS, 'banners.php?op=EmailStats&cid = ' . $cid . '&bid=' . $bid) . "<br />"; - if (!$htmlbanner) { - $clickurl = htmlspecialchars($clickurl, ENT_QUOTES); - echo sprintf(_BANNERS_POINTS, $clickurl) . "<br /> - <form action='banners . php' method='post'>" . _BANNERS_URL . " - <input type='text' name='url' size='50' maxlength='200' value='{$clickurl}' /> - <input type='hidden' name='bid' value='{$bid}' /> - <input type='hidden' name='cid' value='{$cid}' /> + echo "<br /><strong>" . _BANNERS_ID . $banner->getVar('bid') . "</strong><br />" . sprintf(_BANNERS_SEND_STATS, 'banners.php?op=EmailStats&cid = ' . $banner->getVar('cid') . '&bid=' . $banner->getVar('bid')) . "<br />"; + if (!$banner->getVar('htmlbanner')) { + echo sprintf(_BANNERS_POINTS, $banner->getVar('clickurl', 'e')) . "<br /> + <form action='banners.php' method='post'>" . _BANNERS_URL . " + <input type='text' name='url' size='50' maxlength='200' value='" . $banner->getVar('clickurl', 'e') . "' /> + <input type='hidden' name='bid' value='" . $banner->getVar('bid') . "' /> + <input type='hidden' name='cid' value='" . $banner->getVar('cid') . "' /> <input type='submit' name='op' value='" . _BANNERS_CHANGE . "' />" . $xoops->security->getTokenHTML("BANNER_EDIT") . "</form>"; } } /* Finnished Banners */ echo "<br />"; - if ($result = $xoops->db->query("SELECT bid, impressions, clicks, datestart, dateend FROM " . $xoops->db->prefix("bannerfinish") . " WHERE cid={$cid}")) { - echo "<h4 class='content_title'>" . sprintf(_BANNERS_FINISHED, $name) . "</h4><hr /> + $criteria = new Criteria('cid', $client->getVar('cid')); + $banners = $xoops->getHandlerBannerfinish()->getObjects($criteria); + + if (count($banners) > 0) { + echo "<h4 class='content_title'>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</h4><hr /> <table summary=''> - <caption>" . sprintf(_BANNERS_FINISHED, $name) . "</caption> + <caption>" . sprintf(_BANNERS_FINISHED, $client->getvar('name')) . "</caption> <thead><tr> <td>ID</td> <td>" . _BANNERS_IMP_MADE . "</td> @@ -206,26 +209,27 @@ <tfoot><tr><td colspan='6'></td></tr></tfoot>"; $i = 0; - while (list ($bid, $impressions, $clicks, $datestart, $dateend) = $xoops->db->fetchRow($result)) { - if ($impressions == 0) { + /* @var $banner XoopsBanner */ + foreach ($banners as $banner) { + if ($banner->getvar('impressions') == 0) { $percent = 0; } else { - $percent = substr(100 * $clicks / $impressions, 0, 5); + $percent = substr(100 * $banner->getvar('clicks') / $banner->getvar('impressions'), 0, 5); } $class = ($i % 2 == 0) ? 'even' : 'odd'; echo "<tbody><tr class='{$class}'> - <td>{$bid}</td> - <td>{$impressions}</td> - <td>{$clicks}</td> + <td>" . $banner->getvar('bid') . "</td> + <td>" . $banner->getvar('impressions') . "</td> + <td>" . $banner->getvar('clicks') . "</td> <td>{$percent}%</td> - <td>" . XoopsLocal::formatTimestamp($datestart) . "</td> - <td>" . XoopsLocal::formatTimestamp($dateend) . "</td></tr></tbody>"; + <td>" . XoopsLocal::formatTimestamp($banner->getvar('datestart')) . "</td> + <td>" . XoopsLocal::formatTimestamp($banner->getvar('dateend')) . "</td></tr></tbody>"; } echo "</table></div>"; } $xoops->footer(); } else { - $xoops->redirect("banners.php", 2); + $xoops->redirect("banners.php", 2, _BANNERS_INVALID_LOGIN_DATA); } } @@ -239,49 +243,46 @@ function EmailStats($cid, $bid) { $xoops = Xoops::getInstance(); - if ($_SESSION['banner_login'] != "" && $_SESSION['banner_pass'] != "") { + $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); + if ($client) { $cid = intval($cid); $bid = intval($bid); - if ($result2 = $xoops->db->query(sprintf("SELECT name, email, passwd FROM %s WHERE cid=%u AND login=%s", $xoops->db->prefix("bannerclient"), $cid, $xoops->db->quoteString($_SESSION['banner_login'])))) { - list ($name, $email, $passwd) = $xoops->db->fetchRow($result2); - if ($_SESSION['banner_pass'] == $passwd) { - if ($email == "") { - $xoops->redirect("banners.php", 3, sprintf(_BANNERS_MAIL_ERROR, $name)); - exit(); + if ($client->getVar('email', 'n') == "") { + $xoops->redirect("banners.php", 3, sprintf(_BANNERS_MAIL_ERROR, $client->getVar('name'))); + } else { + $banner = $xoops->getHandlerBanner()->get($bid); + //make sure that the client is the banner owner + if ($banner && $banner->getVar('cid') == $cid) { + if ($banner->getVar('impmade') == 0) { + $percent = 0; } else { - if ($result = $xoops->db->query("SELECT bid, imptotal, impmade, clicks, imageurl, clickurl, date FROM " . $xoops->db->prefix("banner") . " WHERE bid={$bid} AND cid={$cid}")) { - list ($bid, $imptotal, $impmade, $clicks, $imageurl, $clickurl, $date) = $xoops->db->fetchRow($result); - if ($impmade == 0) { - $percent = 0; - } else { - $percent = substr(100 * $clicks / $impmade, 0, 5); - } - if ($imptotal == 0) { - $left = _BANNERS_UNLIMITED; - $imptotal = _BANNERS_UNLIMITED; - } else { - $left = $imptotal - $impmade; - } - $fecha = date("F jS Y, h:iA."); - $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->getConfig('sitename')); - $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->getConfig('sitename'), $name, $bid, $imageurl, $clickurl, $imptotal, $impmade, $left, $clicks, $percent, $fecha); - $xoopsMailer = $xoops->getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setToEmails($email); - $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); - $xoopsMailer->setFromName($xoops->getConfig('sitename')); - $xoopsMailer->setSubject($subject); - $xoopsMailer->setBody($message); - $xoopsMailer->send(); - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_MAIL_OK); - exit(); - } + $percent = substr(100 * $banner->getVar('clicks') / $banner->getVar('impmade'), 0, 5); } + if ($banner->getVar('imptotal') == 0) { + $left = _BANNERS_UNLIMITED; + $banner->setVar('imptotal', _BANNERS_UNLIMITED); + } else { + $left = $banner->getVar('imptotal') - $banner->getVar('impmade'); + } + $date = date("F jS Y, h:iA."); + $subject = sprintf(_BANNERS_MAIL_SUBJECT, $xoops->getConfig('sitename')); + $message = sprintf(_BANNERS_MAIL_MESSAGE, $xoops->getConfig('sitename'), $client->getVar('name'), $bid, $banner->getVar('imageurl'), $banner->getVar('clickurl'), $banner->getVar('imptotal'), $banner->getVar('impmade'), $left, $banner->getVar('clicks'), $percent, $date); + $xoopsMailer = $xoops->getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setToEmails($client->getVar('email', 'n')); + $xoopsMailer->setFromEmail($xoops->getConfig('adminmail')); + $xoopsMailer->setFromName($xoops->getConfig('sitename')); + $xoopsMailer->setSubject($subject); + $xoopsMailer->setBody($message); + + if (!$xoopsMailer->send()) { + $xoops->redirect("banners.php?op=Ok", 3, sprintf(_MAIL_SENDMAILNG, $client->getVar('email', 'n'))); + } + $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_MAIL_OK); } } } $xoops->redirect("banners.php", 2); - exit(); } /** @@ -295,23 +296,20 @@ function change_banner_url_by_client($cid, $bid, $url) { $xoops = Xoops::getInstance(); - if ($_SESSION['banner_login'] != "" && $_SESSION['banner_pass'] != "" && $url != "") { + $client = $xoops->getHandlerBannerclient()->getClient($_SESSION['banner_login'], $_SESSION['banner_pass']); + if ($client && $client->getVar('cid') == $cid && $url != "") { $cid = intval($cid); $bid = intval($bid); - $sql = sprintf("SELECT passwd FROM %s WHERE cid=%u AND login=%s", $xoops->db->prefix("bannerclient"), $cid, $xoops->db->quoteString($_SESSION['banner_login'])); - if ($result = $xoops->db->query($sql)) { - list ($passwd) = $xoops->db->fetchRow($result); - if ($_SESSION['banner_pass'] == $passwd) { - $sql = sprintf("UPDATE %s SET clickurl=%s WHERE bid=%u AND cid=%u", $xoops->db->prefix("banner"), $xoops->db->quoteString($url), $bid, $cid); - if ($xoops->db->query($sql)) { - $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_DBUPDATED); - exit(); - } + $banner = $xoops->getHandlerBanner()->get($bid); + //make sure that the client is the banner owner + if ($banner->getVar('cid') == $cid) { + $banner->setVar('clickurl', $url); + if ($xoops->getHandlerBanner()->insert($banner)) { + $xoops->redirect("banners.php?op=Ok", 3, _BANNERS_DBUPDATED); } } } $xoops->redirect("banners.php", 2); - exit(); } /** @@ -323,21 +321,20 @@ $xoops = Xoops::getInstance(); $bid = intval($bid); if ($bid > 0) { - $bresult = $xoops->db->query("SELECT clickurl FROM " . $xoops->db->prefix("banner") . " WHERE bid={$bid}"); - list ($clickurl) = $xoops->db->fetchRow($bresult); - if ($clickurl) { + $banner = $xoops->getHandlerBanner()->get($bid); + if ($banner) { if ($xoops->security->checkReferer()) { - $xoops->db->queryF("UPDATE " . $xoops->db->prefix("banner") . " SET clicks=clicks+1 WHERE bid=$bid"); - header('Location: ' . $clickurl); + $banner->setVar('clicks', $banner->getVar('clicks') + 1); + $xoops->getHandlerBanner()->insert($banner); + header('Location: ' . $banner->getVar('clickurl')); + exit(); } else { //No valid referer found so some javascript error or direct access found echo _BANNERS_NO_REFERER; } - exit(); } } $xoops->redirect(XOOPS_URL, 3, _BANNERS_NO_ID); - exit(); } $op = ''; @@ -372,7 +369,7 @@ break; case _BANNERS_CHANGE: if (!$xoops->security->check(true, false, "BANNER_EDIT")) { - $xoops->redirect("banners.php", 3, implode(' <br />', $xoops->security->getErrors())); + $xoops->redirect("banners.php", 3, implode('<br />', $xoops->security->getErrors())); exit(); } $bid = $cid = 0; @@ -401,6 +398,4 @@ default: clientlogin(); break; -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -63,9 +63,8 @@ * to something different than 'mail()' uses in {@link $Sendmail}) * * @var string - * @access private */ - private $Mailer = 'mail'; + public $Mailer = 'mail'; /** * set if $Mailer is 'sendmail' @@ -74,9 +73,8 @@ * Contains the full path to your sendmail program or replacement. * * @var string - * @access private */ - private $Sendmail = '/usr/sbin/sendmail'; + public $Sendmail = '/usr/sbin/sendmail'; /** * SMTP Host. @@ -84,17 +82,15 @@ * Only used if {@link $Mailer} is set to 'smtp' * * @var string - * @access private */ - private $Host = ''; + public $Host = ''; /** * Does your SMTP host require SMTPAuth authentication? * * @var boolean - * @access private */ - private $SMTPAuth = false; + public $SMTPAuth = false; /** * Username for authentication with your SMTP host. @@ -102,9 +98,8 @@ * Only used if {@link $Mailer} is 'smtp' and {@link $SMTPAuth} is TRUE * * @var string - * @access private */ - private $Username = ''; + public $Username = ''; /** * Password for SMTPAuth. @@ -112,9 +107,8 @@ * Only used if {@link $Mailer} is 'smtp' and {@link $SMTPAuth} is TRUE * * @var string - * @access private */ - private $Password = ''; + public $Password = ''; /** * Constuctor @@ -158,7 +152,7 @@ * @param $addr * @return string */ - private function AddrFormat($addr) + public function AddrFormat($addr) { if (empty($addr[1])) { $formatted = $addr[0]; @@ -179,7 +173,7 @@ * @param $body * @return bool */ - protected function SmtpSend($header, $body) + public function SmtpSend($header, $body) { if (!file_exists($file = $this->PluginDir . 'class.smtp.php')) { trigger_error('Required File ' . $file . ' was not found in file ' . __FILE__ . ' at line ' . __LINE__, E_USER_WARNING); @@ -249,6 +243,4 @@ } return true; } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -35,10 +35,10 @@ * reference to a {@link XoopsMultiMailer} * * @var XoopsMultiMailer - * @access private + * @access protected * @since 21.02.2003 14:14:13 */ - private $multimailer; + protected $multimailer; /** * sender email address Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/bannerclient.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -49,4 +49,20 @@ { parent::__construct($db, 'bannerclient', 'XoopsBannerclient', 'cid', 'name'); } + + /** + * @param string $login + * @param string $password + * @return bool|XoopsBannerclient + */ + public function getClient($login, $password) + { + $myts = MyTextSanitizer::getInstance(); + $criteria = new Criteria('login', $myts->addSlashes($login)); + $bannerclient = $this->getObjects($criteria); + if (count($bannerclient) == 1 && $bannerclient[0]->getVar('passwd', 'n') == $password) { + return $bannerclient[0]; + } + return false; + } } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/banners.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -54,4 +54,5 @@ define('_BANNERS_NO_LOGIN_DATA', 'No login data detected'); define('_BANNERS_NO_REFERER', 'No referer detected'); define('_BANNERS_NO_ID', 'No valid ID detected'); -?> \ No newline at end of file +//since 2.6.0 +define('_BANNERS_INVALID_LOGIN_DATA', 'Invalid login data!'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/locale.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/locale.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/locale.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -67,5 +67,4 @@ setlocale(LC_MONETARY, 'en_US'); return money_format($format, $number); } -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/xoopsmailerlocal.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/xoopsmailerlocal.php 2011-11-07 18:39:59 UTC (rev 8222) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/xoopsmailerlocal.php 2011-11-07 19:34:58 UTC (rev 8223) @@ -1,25 +1,26 @@ <?php /* You may not change or alter any portion of this comment or credits - of supporting developers from this source code or any supporting source code + of supporting developers from this source code or any supporting source code which is considered copyrighted (c) material of the original comment or credit authors. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** - * Xoops Language + * Xoops MailerLocal * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @subpackage Xoops Mailer Local Language * @since 2.3.0 * @author Taiwen Jiang <ph...@us...> * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** @@ -31,33 +32,42 @@ class XoopsMailerLocal extends XoopsMailer { /** - * Constructer + * Constructor * * @return XoopsMailerLocal */ - function XoopsMailerLocal() + public function __construct() { - $this->XoopsMailer(); + parent::__construct(); // It is supposed no need to change the charset $this->charSet = strtolower(_CHARSET); // You MUST specify the language code value so that the file exists: XOOPS_ROOT_PAT/class/mail/phpmailer/language/lang-["your-language-code"].php $this->multimailer->SetLanguage("en"); } - - // Multibyte languages are encouraged to make their proper method for encoding FromName - function encodeFromName($text) + + /** + * Multibyte languages are encouraged to make their proper method for encoding FromName + * + * @param string $text + * @return string + */ + public function encodeFromName($text) { // Activate the following line if needed // $text = "=?{$this->charSet}?B?".base64_encode($text)."?="; return $text; } - - // Multibyte languages are encouraged to make their proper method for encoding Subject - function encodeSubject($text) + + /** + * Multibyte languages are encouraged to make their proper method for encoding FromName + * + * @param string $text + * @return string + */ + public function encodeSubject($text) { // Activate the following line if needed // $text = "=?{$this->charSet}?B?".base64_encode($text)."?="; return $text; } -} -?> \ No newline at end of file +} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <for...@us...> - 2011-11-07 19:56:46
|
Revision: 8224 http://xoops.svn.sourceforge.net/xoops/?rev=8224&view=rev Author: forxoops Date: 2011-11-07 19:56:37 +0000 (Mon, 07 Nov 2011) Log Message: ----------- Refactore system module Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_banners.html Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.ui.js XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/bannerclient.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/banner.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/bannerclient.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/bannerfinish.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/breadcrumb.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.ui.js =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.ui.js (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/media/jquery/plugins/jquery.ui.js 2011-11-07 19:56:37 UTC (rev 8224) @@ -0,0 +1,791 @@ +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&& +c.ui.isOverAxis(b,e,i)}})}})(jQuery); +;/*! + * jQuery UI Widget 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]= +function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)): +d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options= +b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+ +"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled", +c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); +;/*! + * jQuery UI Mouse 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b){var d=false;b(document).mouseup(function(){d=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(c){return a._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(true===b.data(c.target,a.widgetName+".preventClickEvent")){b.removeData(c.target,a.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+ +this.widgetName)},_mouseDown:function(a){if(!d){this._mouseStarted&&this._mouseUp(a);this._mouseDownEvent=a;var c=this,f=a.which==1,g=typeof this.options.cancel=="string"&&a.target.nodeName?b(a.target).closest(this.options.cancel).length:false;if(!f||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted= +this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault();return true}}true===b.data(a.target,this.widgetName+".preventClickEvent")&&b.removeData(a.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(e){return c._mouseMove(e)};this._mouseUpDelegate=function(e){return c._mouseUp(e)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.preventDefault();return d=true}},_mouseMove:function(a){if(b.browser.msie&& +!(document.documentMode>=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.left<g[0])e=g[0]+this.offset.click.left; +if(a.pageY-this.offset.click.top<g[1])h=g[1]+this.offset.click.top;if(a.pageX-this.offset.click.left>g[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.top<g[1]||h-this.offset.click.top>g[3])?h:!(h-this.offset.click.top<g[1])?h-b.grid[1]:h+b.grid[1]:h;e=b.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/ +b.grid[0])*b.grid[0]:this.originalPageX;e=g?!(e-this.offset.click.left<g[0]||e-this.offset.click.left>g[2])?e:!(e-this.offset.click.left<g[0])?e-b.grid[0]:e+b.grid[0]:e}}return{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop()),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(d.browser.safari&&d.browser.version< +526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(a,b,c){c=c||this._uiHash();d.ui.plugin.call(this,a,[b,c]);if(a=="drag")this.positionAbs=this._convertPositionTo("absolute");return d.Widget.prototype._trigger.call(this,a,b, +c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});d.extend(d.ui.draggable,{version:"1.8.16"});d.ui.plugin.add("draggable","connectToSortable",{start:function(a,b){var c=d(this).data("draggable"),f=c.options,e=d.extend({},b,{item:c.element});c.sortables=[];d(f.connectToSortable).each(function(){var h=d.data(this,"sortable");if(h&&!h.options.disabled){c.sortables.push({instance:h,shouldRevert:h.options.revert}); +h.refreshPositions();h._trigger("activate",a,e)}})},stop:function(a,b){var c=d(this).data("draggable"),f=d.extend({},b,{item:c.element});d.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(a);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval= +false;this.instance._trigger("deactivate",a,f)}})},drag:function(a,b){var c=d(this).data("draggable"),f=this;d.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true); +this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return b.helper[0]};a.target=this.instance.currentItem[0];this.instance._mouseCapture(a,true);this.instance._mouseStart(a,true,true);this.instance.offset.click.top=c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top; +c._trigger("toSortable",a);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(a)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",a,this.instance._uiHash(this.instance));this.instance._mouseStop(a,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&& +this.instance.placeholder.remove();c._trigger("fromSortable",a);c.dropped=false}})}});d.ui.plugin.add("draggable","cursor",{start:function(){var a=d("body"),b=d(this).data("draggable").options;if(a.css("cursor"))b._cursor=a.css("cursor");a.css("cursor",b.cursor)},stop:function(){var a=d(this).data("draggable").options;a._cursor&&d("body").css("cursor",a._cursor)}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity= +a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!= +"x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop+c.scrollSpeed;else if(a.pageY-b.overflowOffset.top<c.scrollSensitivity)b.scrollParent[0].scrollTop=f=b.scrollParent[0].scrollTop-c.scrollSpeed;if(!c.axis||c.axis!="y")if(b.overflowOffset.left+b.scrollParent[0].offsetWidth-a.pageX<c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft+c.scrollSpeed;else if(a.pageX-b.overflowOffset.left< +c.scrollSensitivity)b.scrollParent[0].scrollLeft=f=b.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(a.pageY-d(document).scrollTop()<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()-c.scrollSpeed);else if(d(window).height()-(a.pageY-d(document).scrollTop())<c.scrollSensitivity)f=d(document).scrollTop(d(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(a.pageX-d(document).scrollLeft()<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()- +c.scrollSpeed);else if(d(window).width()-(a.pageX-d(document).scrollLeft())<c.scrollSensitivity)f=d(document).scrollLeft(d(document).scrollLeft()+c.scrollSpeed)}f!==false&&d.ui.ddmanager&&!c.dropBehaviour&&d.ui.ddmanager.prepareOffsets(b,a)}});d.ui.plugin.add("draggable","snap",{start:function(){var a=d(this).data("draggable"),b=a.options;a.snapElements=[];d(b.snap.constructor!=String?b.snap.items||":data(draggable)":b.snap).each(function(){var c=d(this),f=c.offset();this!=a.element[0]&&a.snapElements.push({item:this, +width:c.outerWidth(),height:c.outerHeight(),top:f.top,left:f.left})})},drag:function(a,b){for(var c=d(this).data("draggable"),f=c.options,e=f.snapTolerance,h=b.offset.left,g=h+c.helperProportions.width,n=b.offset.top,o=n+c.helperProportions.height,i=c.snapElements.length-1;i>=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e<h&&h<l+e&&k-e<n&&n<m+e||j-e<h&&h<l+e&&k-e<o&&o<m+e||j-e<g&&g<l+e&&k-e<n&&n<m+e||j-e<g&&g<l+e&&k-e<o&& +o<m+e){if(f.snapMode!="inner"){var p=Math.abs(k-o)<=e,q=Math.abs(m-n)<=e,r=Math.abs(j-g)<=e,s=Math.abs(l-h)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k-c.helperProportions.height,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j-c.helperProportions.width}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l}).left-c.margins.left}var t= +p||q||r||s;if(f.snapMode!="outer"){p=Math.abs(k-n)<=e;q=Math.abs(m-o)<=e;r=Math.abs(j-h)<=e;s=Math.abs(l-g)<=e;if(p)b.position.top=c._convertPositionTo("relative",{top:k,left:0}).top-c.margins.top;if(q)b.position.top=c._convertPositionTo("relative",{top:m-c.helperProportions.height,left:0}).top-c.margins.top;if(r)b.position.left=c._convertPositionTo("relative",{top:0,left:j}).left-c.margins.left;if(s)b.position.left=c._convertPositionTo("relative",{top:0,left:l-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[i].snapping&& +(p||q||r||s||t))c.options.snap.snap&&c.options.snap.snap.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=p||q||r||s||t}else{c.snapElements[i].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,a,d.extend(c._uiHash(),{snapItem:c.snapElements[i].item}));c.snapElements[i].snapping=false}}}});d.ui.plugin.add("draggable","stack",{start:function(){var a=d(this).data("draggable").options;a=d.makeArray(d(a.stack)).sort(function(c,f){return(parseInt(d(c).css("zIndex"), +10)||0)-(parseInt(d(f).css("zIndex"),10)||0)});if(a.length){var b=parseInt(a[0].style.zIndex)||0;d(a).each(function(c){this.style.zIndex=b+c});this[0].style.zIndex=b+a.length}}});d.ui.plugin.add("draggable","zIndex",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("zIndex"))b._zIndex=a.css("zIndex");a.css("zIndex",b.zIndex)},stop:function(a,b){a=d(this).data("draggable").options;a._zIndex&&d(b.helper).css("zIndex",a._zIndex)}})})(jQuery); +;/* + * jQuery UI Droppable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Droppables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.mouse.js + * jquery.ui.draggable.js + */ +(function(d){d.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var a=this.options,b=a.accept;this.isover=0;this.isout=1;this.accept=d.isFunction(b)?b:function(c){return c.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};d.ui.ddmanager.droppables[a.scope]=d.ui.ddmanager.droppables[a.scope]||[];d.ui.ddmanager.droppables[a.scope].push(this); +a.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var a=d.ui.ddmanager.droppables[this.options.scope],b=0;b<a.length;b++)a[b]==this&&a.splice(b,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(a,b){if(a=="accept")this.accept=d.isFunction(b)?b:function(c){return c.is(b)};d.Widget.prototype._setOption.apply(this,arguments)},_activate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&& +this.element.addClass(this.options.activeClass);b&&this._trigger("activate",a,this.ui(b))},_deactivate:function(a){var b=d.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);b&&this._trigger("deactivate",a,this.ui(b))},_over:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass); +this._trigger("over",a,this.ui(b))}},_out:function(a){var b=d.ui.ddmanager.current;if(!(!b||(b.currentItem||b.element)[0]==this.element[0]))if(this.accept.call(this.element[0],b.currentItem||b.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",a,this.ui(b))}},_drop:function(a,b){var c=b||d.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g= +d.data(this,"droppable");if(g.options.greedy&&!g.options.disabled&&g.options.scope==c.options.scope&&g.accept.call(g.element[0],c.currentItem||c.element)&&d.ui.intersect(c,d.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop", +a,this.ui(c));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});d.extend(d.ui.droppable,{version:"1.8.16"});d.ui.intersect=function(a,b,c){if(!b.offset)return false;var e=(a.positionAbs||a.position.absolute).left,g=e+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,h=f+a.helperProportions.height,i=b.offset.left,k=i+b.proportions.width,j=b.offset.top,l=j+b.proportions.height; +switch(c){case "fit":return i<=e&&g<=k&&j<=f&&h<=l;case "intersect":return i<e+a.helperProportions.width/2&&g-a.helperProportions.width/2<k&&j<f+a.helperProportions.height/2&&h-a.helperProportions.height/2<l;case "pointer":return d.ui.isOver((a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,j,i,b.proportions.height,b.proportions.width);case "touch":return(f>=j&&f<=l||h>=j&&h<=l||f<j&&h>l)&&(e>= +i&&e<=k||g>=i&&g<=k||e<i&&g>k);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f<c.length;f++)if(!(c[f].options.disabled||a&&!c[f].accept.call(c[f].element[0],a.currentItem||a.element))){for(var h=0;h<g.length;h++)if(g[h]==c[f].element[0]){c[f].proportions.height=0;continue a}c[f].visible=c[f].element.css("display")!= +"none";if(c[f].visible){e=="mousedown"&&c[f]._activate.call(c[f],b);c[f].offset=c[f].element.offset();c[f].proportions={width:c[f].element[0].offsetWidth,height:c[f].element[0].offsetHeight}}}},drop:function(a,b){var c=false;d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&d.ui.intersect(a,this,this.options.tolerance))c=c||this._drop.call(this,b);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],a.currentItem|| +a.element)){this.isout=1;this.isover=0;this._deactivate.call(this,b)}}});return c},dragStart:function(a,b){a.element.parents(":not(body,html)").bind("scroll.droppable",function(){a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)})},drag:function(a,b){a.options.refreshPositions&&d.ui.ddmanager.prepareOffsets(a,b);d.each(d.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=d.ui.intersect(a,this,this.options.tolerance); +if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){e=d.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,b)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,b);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,b)}}}})},dragStop:function(a,b){a.element.parents(":not(body,html)").unbind("scroll.droppable"); +a.options.refreshPositions||d.ui.ddmanager.prepareOffsets(a,b)}}})(jQuery); +;/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.resizable",e.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var b=this,a=this.options;this.element.addClass("ui-resizable");e.extend(this,{_aspectRatio:!!a.aspectRatio,aspectRatio:a.aspectRatio,originalElement:this.element, +_proportionallyResizeElements:[],_helper:a.helper||a.ghost||a.animate?a.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&e.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d<c.length;d++){var f=e.trim(c[d]),g=e('<div class="ui-resizable-handle '+("ui-resizable-"+f)+'"></div>');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); +var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= +false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); +this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= +{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; +if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, +_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, +{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: +Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(c<a.maxWidth)a.maxWidth=c;if(f<a.maxHeight)a.maxHeight=f}this._vBoundaries=a},_updateCache:function(b){this.offset=this.helper.offset();if(k(b.left))this.position.left=b.left;if(k(b.top))this.position.top=b.top;if(k(b.height))this.size.height=b.height;if(k(b.width))this.size.width= +b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(k(b.height))b.width=b.height*this.aspectRatio;else if(k(b.width))b.height=b.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top=null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this._vBoundaries,c=this.axis,d=k(b.width)&&a.maxWidth&&a.maxWidth<b.width,f=k(b.height)&&a.maxHeight&&a.maxHeight<b.height,g=k(b.width)&&a.minWidth&& +a.minWidth>b.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= +null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a<this._proportionallyResizeElements.length;a++){var c=this._proportionallyResizeElements[a];if(!this.borderDif){var d=[c.css("borderTopWidth"),c.css("borderRightWidth"),c.css("borderBottomWidth"),c.css("borderLeftWidth")],f=[c.css("paddingTop"),c.css("paddingRight"),c.css("paddingBottom"),c.css("paddingLeft")];this.borderDif=e.map(d,function(g,h){g=parseInt(g,10)|| +0;h=parseInt(f[h],10)||0;return g+h})}e.browser.msie&&(e(b).is(":hidden")||e(b).parents(":hidden").length)||c.css({height:b.height()-this.borderDif[0]-this.borderDif[2]||0,width:b.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();if(this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ +a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ +c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); +b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), +10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- +f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? +e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= +e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, +step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= +e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; +var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: +a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- +d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, +f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, +display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= +e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= +d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +;/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unse... [truncated message content] |
From: <tr...@us...> - 2011-11-07 20:49:48
|
Revision: 8228 http://xoops.svn.sourceforge.net/xoops/?rev=8228&view=rev Author: trabis Date: 2011-11-07 20:49:41 +0000 (Mon, 07 Nov 2011) Log Message: ----------- Updating file headers Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/footer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.dist.php XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php XoopsCore/branches/2.6.x/2.6.0/htdocs/pmlite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,16 +1,20 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS admin file * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package core * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,16 +1,20 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS feed creator * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package core * @since 2.0.0 * @version $Id$ */ @@ -67,5 +71,4 @@ } } } -$tpl->display('db:system_rss.html'); -?> \ No newline at end of file +$tpl->display('system_rss.html'); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/banners.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS banner management * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/browse.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS restricted file access * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -87,5 +90,4 @@ $buffer = fread($handle, 4096); echo $buffer; } -fclose($handle); -?> \ No newline at end of file +fclose($handle); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/edituser.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Xoops Edit User * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -388,5 +391,4 @@ } } $xoops->redirect('userinfo.php?uid=' . $uid, 0, _US_PROFUPDATED); -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/footer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/footer.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/footer.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** - * Xoops footer + * Xoops footer * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package kernel @@ -20,5 +23,4 @@ $xoops = Xoops::getInstance(); $xoops->logger->addDeprecated("include 'footer.php' is deprecated since 2.6.0, use Xoops::getInstance()->footer(); instead"); -$xoops->footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/header.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS global header file * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/image.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS image access * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -59,5 +62,4 @@ } else { header('Content-type: image/gif'); readfile(XOOPS_UPLOAD_PATH . '/blank.gif'); -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/imagemanager.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS image manager * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -247,6 +250,4 @@ $xoops->simpleFooter(); } header('location: imagemanager.php?cat_id=' . $imgcat_id . '&target=' . $target); -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS global entry * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/lostpass.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS password recovery * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -37,7 +40,6 @@ if (empty($getuser)) { $msg = _US_SORRYNOTFOUND; $xoops->redirect("user.php", 2, $msg); - exit(); } else { $code = isset($_GET['code']) ? trim($_GET['code']) : ''; $areyou = substr($getuser[0]->getVar("pass"), 0, 5); @@ -64,10 +66,8 @@ $xoops->header(); echo _US_MAILPWDNG; $xoops->footer(); - exit(); } $xoops->redirect("user.php", 3, sprintf(_US_PWDMAILED, $getuser[0]->getVar("uname")), false); - exit(); // If no Code, send it } else { $xoopsMailer = $xoops->getMailer(); @@ -91,6 +91,4 @@ echo "</h4>"; $xoops->footer(); } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.dist.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.dist.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/mainfile.dist.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS main configuration file * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @version $Id$ @@ -75,6 +78,4 @@ include XOOPS_ROOT_PATH."/include/common.php"; } -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/misc.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS misc utilities * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -259,6 +262,4 @@ </script> <?php -} - -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/notifications.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS notification * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -23,7 +26,6 @@ if (!$xoops->isUser()) { $xoops->redirect('index.php', 3, _NOT_NOACCESS); - exit(); } $uid = $xoops->user->getVar('uid'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/pda.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS PDA for news * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core @@ -40,6 +43,4 @@ } echo "</div>"; } -echo "</body></html>"; - -?> \ No newline at end of file +echo "</body></html>"; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/pmlite.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/pmlite.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/pmlite.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS message processing * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/readpmsg.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS message list * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/register.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,18 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Register * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * See the enclosed file license.txt for licensing information. - * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) * @package core @@ -28,12 +27,10 @@ $myts = MyTextSanitizer::getInstance(); - $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); if (empty($xoopsConfigUser['allow_register'])) { $xoops->redirect('index.php', 6, _US_NOREGISTER); - exit(); } $op = isset($_POST['op']) ? $_POST['op'] : (isset($_GET["op"]) ? $_GET["op"] : 'register'); @@ -127,18 +124,15 @@ if (!$member_handler->insertUser($newuser)) { echo _US_REGISTERNG; $xoops->footer(); - exit(); } $newid = $newuser->getVar('uid'); if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; $xoops->footer(); - exit(); } if ($xoopsConfigUser['activation_type'] == 1) { XoopsUserUtility::sendWelcome($newuser); $xoops->redirect('index.php', 4, _US_ACTLOGIN); - exit(); } // Sending notification email to user for self activation if ($xoopsConfigUser['activation_type'] == 0) { @@ -259,5 +253,4 @@ $reg_form->display(); $xoops->footer(); break; -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/search.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,17 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS global search * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * See the enclosed file license.txt for licensing information. - * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) * @package core @@ -90,13 +90,11 @@ if ($action == "showall") { if ($query == "" || empty($mid)) { $xoops->redirect("search.php", 1, _SR_PLZENTER); - exit(); } } else { if ($action == "showallbyuser") { if (empty($mid) || empty($uid)) { $xoops->redirect("search.php", 1, _SR_PLZENTER); - exit(); } } } @@ -110,7 +108,6 @@ include $xoops->path('include/searchform.php'); $search_form->display(); $xoops->footer(); - exit(); } if ($andor != "OR" && $andor != "exact" && $andor != "AND") { $andor = "AND"; @@ -291,5 +288,4 @@ $search_form->display(); break; } -$xoops->footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/user.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,17 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS User * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * See the enclosed file license.txt for licensing information. - * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) * @package core Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/userinfo.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,17 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS User * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * See the enclosed file license.txt for licensing information. - * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license http://www.fsf.org/copyleft/gpl.html GNU General Public License (GPL) * @package core @@ -67,7 +67,6 @@ $thisUser = $member_handler->getUser($uid); if (!is_object($thisUser) || !$thisUser->isActive()) { $xoops->redirect("index.php", 3, _US_SELECTNG); - exit(); } $xoops->header('system_userinfo.html'); $xoops->tpl->assign('user_ownpage', false); @@ -193,5 +192,4 @@ unset($module); } } -$xoops->footer(); -?> \ No newline at end of file +$xoops->footer(); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php 2011-11-07 20:18:56 UTC (rev 8227) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/viewpmsg.php 2011-11-07 20:49:41 UTC (rev 8228) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS message detail * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package core This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-07 23:54:18
|
Revision: 8234 http://xoops.svn.sourceforge.net/xoops/?rev=8234&view=rev Author: trabis Date: 2011-11-07 23:54:10 +0000 (Mon, 07 Nov 2011) Log Message: ----------- adding new resources to replace db:template.html. You can now use module:dirname|template.html You can now use block:dirname|template.html You can now use admin:dirname|template.html All resources look for override templates in theme dir You can use this new resources inside templates: <{includeq file="module:system|system_header.html"}> Or on any template object: if (!$tpl->is_cached('module:system|system_rss.html')) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.module.php 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-11-07 22:04:52 UTC (rev 8233) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -404,7 +404,7 @@ public function checkCache() { if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) { - $template = $this->contentTemplate ? $this->contentTemplate : 'db:system_dummy.html'; + $template = $this->contentTemplate ? $this->contentTemplate : 'module:system|system_dummy.html'; $this->template->caching = 2; $this->template->cache_lifetime = $this->contentCacheLifetime; $uri = str_replace(XOOPS_URL, '', $_SERVER['REQUEST_URI']); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-07 22:04:52 UTC (rev 8233) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -106,7 +106,7 @@ /** * @var string */ - public $tpl_file = ''; + public $tpl_name = ''; /** * @var array @@ -305,10 +305,46 @@ } /** - * @param string $tpl_file + * Gets module, type and file from a tpl name + * It also returns the correct tpl name in case it is not well formed + * + * @param string $tpl_name + * @return array; + */ + public function getTplInfo($tpl_name) + { + $ret = array(); + $ret['type'] = 'module'; + $info = explode(':', $tpl_name); + if (count($info) == 2) { + $ret['type'] = $info[0]; + $tpl_name = str_replace($ret['type'] . ':' , '', $tpl_name); + } + + if ($ret['type'] == 'db') { + //For legacy compatibility + $ret['type'] = 'module'; + } + + $info = explode('|', $tpl_name); + if (count($info) == 2) { + $ret['module'] = $info[0]; + $ret['file'] = $info[1]; + } else { + $ret['module'] = 'system'; + $ret['file'] = $tpl_name; + if ($this->isModule()) { + $ret['module'] = $this->module->getVar('dirname', 'n'); + } + } + $ret['tpl_name'] = $ret['type'] . ':' . $ret['module'] . '|' . $ret['file']; + return $ret; + } + /** + * @param string $tpl_name * @return bool */ - public function header($tpl_file = '') + public function header($tpl_name = '') { static $included = false; if ($included) { @@ -320,26 +356,20 @@ $this->logger->stopTime('Module init'); $this->logger->startTime('XOOPS output init'); - $dirname = 'system'; - if ($this->isModule()) { - $dirname = $this->module->getVar('dirname', 'n'); + if ($tpl_name) { + $tpl_info = $this->getTplInfo($tpl_name); + $this->tpl_name = $tpl_info['tpl_name']; } - if ($tpl_file) { - $tpl_file = str_replace('db:', '', $tpl_file); - $theme_set = $this->getConfig('theme_set') ? $this->getConfig('theme_set') : 'default'; - if (!file_exists($this->tpl_file = $this->path("themes/{$theme_set}/modules/{$dirname}/{$tpl_file}"))) { - $this->tpl_file = $this->path("modules/{$dirname}/templates/{$tpl_file}"); - } - } + // for legacy support when template is set after header. - $this->option['template_main'] = $this->tpl_file; + $this->option['template_main'] = $this->tpl_name; $xoopsThemeFactory = null; $xoopsThemeFactory = new xos_opal_ThemeFactory(); $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); $xoopsThemeFactory->defaultTheme = $this->getConfig('theme_set'); - $this->theme = $xoopsThemeFactory->createInstance(array('contentTemplate' => $this->tpl_file)); + $this->theme = $xoopsThemeFactory->createInstance(array('contentTemplate' => $this->tpl_name)); $this->preload->triggerEvent('core.header.addmeta'); @@ -368,7 +398,7 @@ ? $cache_times[$this->module->getVar('mid')] : 0; // Tricky solution for setting cache time for homepage } else { - if ($tpl_file == 'system_homepage.html') { + if ($this->tpl_name == 'module:system|system_homepage.html') { $this->theme->contentCacheLifetime = 604800; } } @@ -378,7 +408,7 @@ exit(); } - if (!isset($this->tpl_file) && $this->isModule()) { + if (!isset($this->tpl_name) && $this->isModule()) { ob_start(); } @@ -414,11 +444,7 @@ if (isset($this->option['template_main']) && $this->option['template_main'] != $this->theme->contentTemplate) { trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING); - if (false === strpos($this->tpl_file, ':')) { - $this->theme->contentTemplate = 'db:' . $this->tpl_file; - } else { - $this->theme->contentTemplate = $this->tpl_file; - } + $this->theme->contentTemplate = $this->tpl_name; } $xoops->theme->render(); $xoops->logger->stopTime(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-07 22:04:52 UTC (rev 8233) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/index.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -71,6 +71,6 @@ exit(); } else { $xoops->setOption('show_cblock', 1); - $xoops->header("db:system_homepage.html"); + $xoops->header("system_homepage.html"); $xoops->footer(); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-07 22:04:52 UTC (rev 8233) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -40,10 +40,10 @@ var $xoTheme; /** - * @param string $tpl_file + * @param string $tpl_name * @return bool */ - public function header($tpl_file = '') + public function header($tpl_name = '') { static $included = false; if ($included) { @@ -52,10 +52,10 @@ $included = true; $xoops = Xoops::getInstance(); - if (empty($tpl_file)) { - $tpl_file = $xoops->getOption('template_main'); + if (empty($tpl_name)) { + $tpl_name = $xoops->getOption('template_main'); } - $xoops->tpl_file = $tpl_file; + $xoops->tpl_name = $tpl_name; ob_start(); $xoops->loadLanguage('admin', 'system'); @@ -74,24 +74,24 @@ header("Pragma: no-cache"); } - if ($tpl_file != '') { + if ($tpl_name != '') { // Don't use db template if (!$xoops->isModule()) { /* @var $module_handler XoopsModuleHandler */ $module_handler = $xoops->getHandler('module'); $xoops->module = $module_handler->getByDirname('system'); } - $xoops->tpl_file = XOOPS_ROOT_PATH . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/templates/admin/' . str_replace("db:", "", $tpl_file); + $xoops->tpl_name = XOOPS_ROOT_PATH . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/templates/admin/' . str_replace("db:", "", $tpl_name); } // for legacy support when template is sset after header. - $xoops->option['template_main'] = $xoops->tpl_file; + $xoops->option['template_main'] = $xoops->tpl_name; $adminThemeFactory = new xos_opal_AdminThemeFactory(); $xoops->theme = $adminThemeFactory->createInstance(array( 'folderName' => $this->foldername, 'themesPath' => 'modules/system/themes', - 'contentTemplate' => $xoops->tpl_file)); + 'contentTemplate' => $xoops->tpl_name)); $xoops->theme->loadLocalization('admin'); $xoops->tpl = $xoops->theme->template; @@ -175,11 +175,7 @@ if ($xoops->getOption('template_main') && $xoops->getOption('template_main') != $xoops->theme->contentTemplate) { trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING); - if (false === strpos($xoops->tpl_file, ':')) { - $xoops->theme->contentTemplate = 'db:' . $xoops->tpl_file; - } else { - $xoops->theme->contentTemplate = $xoops->tpl_file; - } + $xoops->theme->contentTemplate = $xoops->tpl_name; } $xoops->theme->render(); Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.admin.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.admin.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -0,0 +1,73 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +/** + * @param $tpl_name + * @param $tpl_source + * @param $smarty + * @return bool + */ +function smarty_resource_admin_source($tpl_name, &$tpl_source, &$smarty) +{ + if (!$tpl = smarty_resource_admin_tplinfo($tpl_name)) { + return false; + } + + $fp = fopen($tpl, 'r'); + $filesize = filesize($tpl); + $tpl_source = ($filesize > 0) ? fread($fp, $filesize) : ''; + fclose($fp); + + return true; +} + +function smarty_resource_admin_timestamp($tpl_name, &$tpl_timestamp, &$smarty) +{ + if (!$tpl = smarty_resource_admin_tplinfo($tpl_name)) { + return false; + } + $tpl_timestamp = filemtime($tpl); + return true; +} + +function smarty_resource_admin_secure($tpl_name, &$smarty) +{ + // assume all templates are secure + return true; +} + +function smarty_resource_admin_trusted($tpl_name, &$smarty) +{ + // not used for templates +} + +function smarty_resource_admin_tplinfo($tpl_name) +{ + static $cache = array(); + $xoops = Xoops::getInstance(); + $tpl_info = $xoops->getTplInfo($tpl_name); + $tpl_name = $tpl_info['tpl_name']; + $dirname = $tpl_info['module']; + $file = $tpl_info['file']; + + $theme_set = $xoops->getConfig('theme_set') ? $xoops->getConfig('theme_set') : 'default'; + if (!file_exists($file_path = $xoops->path("themes/{$theme_set}/modules/{$dirname}/admin/{$file}"))) { + $file_path = $xoops->path("modules/{$dirname}/templates/admin/{$file}"); + } + return $cache[$tpl_name] = $file_path; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.admin.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.blocks.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.blocks.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -0,0 +1,73 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +/** + * @param $tpl_name + * @param $tpl_source + * @param $smarty + * @return bool + */ +function smarty_resource_blocks_source($tpl_name, &$tpl_source, &$smarty) +{ + if (!$tpl = smarty_resource_blocks_tplinfo($tpl_name)) { + return false; + } + + $fp = fopen($tpl, 'r'); + $filesize = filesize($tpl); + $tpl_source = ($filesize > 0) ? fread($fp, $filesize) : ''; + fclose($fp); + + return true; +} + +function smarty_resource_blocks_timestamp($tpl_name, &$tpl_timestamp, &$smarty) +{ + if (!$tpl = smarty_resource_blocks_tplinfo($tpl_name)) { + return false; + } + $tpl_timestamp = filemtime($tpl); + return true; +} + +function smarty_resource_blocks_secure($tpl_name, &$smarty) +{ + // assume all templates are secure + return true; +} + +function smarty_resource_blocks_trusted($tpl_name, &$smarty) +{ + // not used for templates +} + +function smarty_resource_blocks_tplinfo($tpl_name) +{ + static $cache = array(); + $xoops = Xoops::getInstance(); + $tpl_info = $xoops->getTplInfo($tpl_name); + $tpl_name = $tpl_info['tpl_name']; + $dirname = $tpl_info['module']; + $file = $tpl_info['file']; + + $theme_set = $xoops->getConfig('theme_set') ? $xoops->getConfig('theme_set') : 'default'; + if (!file_exists($file_path = $xoops->path("themes/{$theme_set}/modules/{$dirname}/blocks/{$file}"))) { + $file_path = $xoops->path("modules/{$dirname}/templates/blocks/{$file}"); + } + return $cache[$tpl_name] = $file_path; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.blocks.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.module.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.module.php 2011-11-07 23:54:10 UTC (rev 8234) @@ -0,0 +1,78 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + */ + +/** + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author trabis <lus...@gm...> + * @version $Id$ + */ + +/** + * @param $tpl_name + * @param $tpl_source + * @param $smarty + * @return bool + */ +function smarty_resource_module_source($tpl_name, &$tpl_source, &$smarty) +{ + if (!$tpl = smarty_resource_module_tplinfo($tpl_name)) { + return false; + } + + $fp = fopen($tpl, 'r'); + $filesize = filesize($tpl); + $tpl_source = ($filesize > 0) ? fread($fp, $filesize) : ''; + fclose($fp); + + return true; +} + +function smarty_resource_module_timestamp($tpl_name, &$tpl_timestamp, &$smarty) +{ + if (!$tpl = smarty_resource_module_tplinfo($tpl_name)) { + return false; + } + $tpl_timestamp = filemtime($tpl); + return true; +} + +function smarty_resource_module_secure($tpl_name, &$smarty) +{ + // assume all templates are secure + return true; +} + +function smarty_resource_module_trusted($tpl_name, &$smarty) +{ + // not used for templates +} + +function smarty_resource_module_tplinfo($tpl_name) +{ + static $cache = array(); + $xoops = Xoops::getInstance(); + $tpl_info = $xoops->getTplInfo($tpl_name); + $tpl_name = $tpl_info['tpl_name']; + $dirname = $tpl_info['module']; + $file = $tpl_info['file']; + + if (isset($cache[$tpl_name])) { + return $cache[$tpl_name]; + } + + + $theme_set = $xoops->getConfig('theme_set') ? $xoops->getConfig('theme_set') : 'default'; + if (!file_exists($file_path = $xoops->path("themes/{$theme_set}/modules/{$dirname}/{$file}"))) { + $file_path = $xoops->path("modules/{$dirname}/templates/{$file}"); + } + return $cache[$tpl_name] = $file_path; +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/resource.module.php ___________________________________________________________________ Added: svn:executable + * Added: svn:keywords + Author Date Id Rev URL Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-08 00:48:34
|
Revision: 8237 http://xoops.svn.sourceforge.net/xoops/?rev=8237&view=rev Author: trabis Date: 2011-11-08 00:48:27 +0000 (Tue, 08 Nov 2011) Log Message: ----------- Improving smarty block(everywhere) plugin (making use of core class instead of duplicating code) Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-08 00:31:09 UTC (rev 8236) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-08 00:48:27 UTC (rev 8237) @@ -165,15 +165,11 @@ $template->cache_lifetime = $bcachetime; } $template->setCompileId($dirname); - - $tplPath = XOOPS_ROOT_PATH . '/modules/system/template/blocks/system_block_dummy.html'; - $tplName = $xobject->getVar('template'); - if ($tplName) { - $tplPath = XOOPS_ROOT_PATH . "/modules/{$dirname}/templates/blocks/{$tplName}"; - } + $tplName = ($tplName = $xobject->getVar('template')) ? "block:{$dirname}|{$tplName}" + : "block:system|system_block_dummy.html"; $cacheid = $this->generateCacheId('blk_' . $xobject->getVar('bid')); - if (!$bcachetime || !$template->is_cached($tplPath, $cacheid)) { + if (!$bcachetime || !$template->is_cached($tplName, $cacheid)) { //Get theme metas $old = array(); @@ -187,7 +183,7 @@ XoopsLogger::getInstance()->addBlock($xobject->getVar('name')); if ($bresult = $xobject->buildBlock()) { $template->assign('block', $bresult); - $block['content'] = $template->fetch($tplPath, $cacheid); + $block['content'] = $template->fetch($tplName, $cacheid); } else { $block = false; } @@ -209,7 +205,7 @@ } } else { XoopsLogger::getInstance()->addBlock($xobject->getVar('name'), true, $bcachetime); - $block['content'] = $template->fetch($tplPath, $cacheid); + $block['content'] = $template->fetch($tplName, $cacheid); } //add block cached metas Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php 2011-11-08 00:31:09 UTC (rev 8236) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php 2011-11-08 00:48:27 UTC (rev 8237) @@ -39,21 +39,16 @@ $block_id = intval($params['id']); $block_handler = $xoops->getHandlerBlock(); - /* @var $blockObj XoopsBlock */ static $block_objs; if (!isset($block_objs[$block_id])) { $blockObj = $block_handler->get($block_id); - if (!is_object($blockObj)) { return false; } - $block_objs[$block_id] = $blockObj; - } else { $blockObj = $block_objs[$block_id]; } - $user_groups = $xoops->isUser() ? $xoops->user->getGroups() : array(XOOPS_GROUP_ANONYMOUS); static $allowed_blocks; @@ -83,35 +78,12 @@ return $blockObj->getVar('title'); } - $bcachetime = intval($blockObj->getVar('bcachetime')); - if (empty($bcachetime)) { - $xoops->tpl->caching = 0; - } else { - $xoops->tpl->caching = 2; - $xoops->tpl->cache_lifetime = $bcachetime; + $tpl = new XoopsTpl(); + $block_renderer = new xos_logos_PageBuilder(); + $block_renderer->theme = $xoops->theme; + $block = $block_renderer->buildBlock($blockObj, $tpl); + if (!$display_none) { + return $block['content']; } - - $dirname = $blockObj->getVar('dirname', 'n'); - $xoops->tpl->setCompileId($dirname); - $tplName = ($tplName = $blockObj->getVar('template')) ? "block:{$dirname}|{$tplName}" - : "block:system|system_block_dummy.html"; - $cacheid = 'blk_' . $block_id; - - if (!$bcachetime || !$xoops->tpl->is_cached($tplName, $cacheid)) { - $xoops->logger->addBlock($blockObj->getVar('name')); - if (!($bresult = $blockObj->buildBlock())) { - return false; - } - if (!$display_none) { - $xoops->tpl->assign('block', $bresult); - $xoops->tpl->display($tplName, $cacheid); - } - } else { - $xoops->logger->addBlock($blockObj->getVar('name'), true, $bcachetime); - if (!$display_none) { - $xoops->tpl->display($tplName, $cacheid); - } - } - $xoops->tpl->setCompileId($dirname); return ''; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-11 19:00:10
|
Revision: 8269 http://xoops.svn.sourceforge.net/xoops/?rev=8269&view=rev Author: trabis Date: 2011-11-11 19:00:04 +0000 (Fri, 11 Nov 2011) Log Message: ----------- Changing xos_ classes to use Xoops prefix Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -58,6 +58,17 @@ } $this->addExtra(_LOGGER_INCLUDED_FILES, sprintf(_LOGGER_FILES, count(get_included_files()))); +/* +$included_files = get_included_files(); +foreach ($included_files as $filename) { + $this->addExtra('files',$filename); +} + +if (function_exists('memory_get_peak_usage')) { + $this->addExtra('Peak memory',memory_get_peak_usage()); +} + +*/ $memory = 0; if (function_exists('memory_get_usage')) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -180,7 +180,7 @@ * Log extra information * * @param string $name name for the entry - * @param int $msg text message for the entry + * @param string $msg text message for the entry */ public function addExtra($name, $msg) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -33,7 +33,7 @@ class XoopsTpl extends Smarty { /** - * @var xos_opal_Theme + * @var XoopsTheme */ public $currentTheme = null; 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-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -1,6 +1,6 @@ <?php /** - * xos_opal_Theme component class file + * XoopsTheme component class file * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -21,19 +21,19 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** - * xos_opal_ThemeFactory + * XoopsThemeFactory * * @author Skalpa Keo * @package xos_opal - * @subpackage xos_opal_Theme + * @subpackage XoopsTheme * @since 2.3.0 */ -class xos_opal_ThemeFactory +class XoopsThemeFactory { /** * @var string */ - public $xoBundleIdentifier = 'xos_opal_ThemeFactory'; + public $xoBundleIdentifier = 'XoopsThemeFactory'; /** * Currently enabled themes (if empty, all the themes in themes/ are allowed) @@ -60,7 +60,7 @@ * Instantiate the specified theme * * @param array $options - * @return null|xos_opal_Theme + * @return null|XoopsTheme */ public function createInstance($options = array()) { @@ -85,7 +85,7 @@ } $options['path'] = XOOPS_THEME_PATH . '/' . $options['folderName']; $inst = null; - $inst = new xos_opal_Theme(); + $inst = new XoopsTheme(); foreach ($options as $k => $v) { $inst->$k = $v; } @@ -106,15 +106,15 @@ } /** - * xos_opal_AdminThemeFactory + * XoopsAdminThemeFactory * * @author Andricq Nicolas (AKA MusS) * @author trabis * @package xos_opal - * @subpackage xos_opal_Theme + * @subpackage XoopsTheme * @since 2.4.0 */ -class xos_opal_AdminThemeFactory extends xos_opal_ThemeFactory +class XoopsAdminThemeFactory extends XoopsThemeFactory { public function createInstance($options = array()) { @@ -134,7 +134,7 @@ } } -class xos_opal_Theme +class XoopsTheme { /** * Should we render banner? Not for redirect pages or admin side @@ -213,7 +213,7 @@ * @var array * @access public */ - public $plugins = array('xos_logos_PageBuilder'); + public $plugins = array('XoopsThemeBlocksPlugin'); /** * @var int @@ -345,7 +345,7 @@ // Instanciate and initialize all the theme plugins foreach ($this->plugins as $k => $bundleId) { if (!is_object($bundleId)) { - /* @var $plugin xos_Opal_Plugin */ + /* @var $plugin XoopsThemePlugin */ $plugin = new $bundleId(); $plugin->theme = $this; $plugin->xoInit(); @@ -397,7 +397,7 @@ } /** - * xos_opal_Theme::checkCache() + * XoopsTheme::checkCache() * * @return bool */ @@ -703,7 +703,7 @@ } /** - * xos_opal_Theme::headContent() + * XoopsTheme::headContent() * * @param $params * @param $content @@ -719,7 +719,7 @@ } /** - * xos_opal_Theme::renderMetas() + * XoopsTheme::renderMetas() * * @param null $type * @param bool|string $return @@ -834,10 +834,10 @@ } } -abstract class xos_opal_Plugin +abstract class XoopsThemePlugin { /** - * @var xos_opal_theme + * @var XoopsTheme */ public $theme = false; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -1,6 +1,6 @@ <?php /** - * xos_logos_PageBuilder component class file + * XoopsThemeBlocksPlugin component class file * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code @@ -20,17 +20,17 @@ defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** - * xos_logos_PageBuilder main class + * XoopsThemeBlocksPlugin main class * * @package xos_logos - * @subpackage xos_logos_PageBuilder + * @subpackage XoopsThemeBlocksPlugin * @author Skalpa Keo * @since 2.3.0 */ -class xos_logos_PageBuilder extends xos_opal_Plugin +class XoopsThemeBlocksPlugin extends XoopsThemePlugin { /** - * @var xos_opal_theme + * @var XoopsTheme */ public $theme = false; @@ -40,7 +40,7 @@ public $blocks = array(); /** - * xos_logos_PageBuilder::xoInit() + * XoopsThemeBlocksPlugin::xoInit() * * @return true */ @@ -74,7 +74,7 @@ } /** - * xos_logos_PageBuilder::retrieveBlocks() + * XoopsThemeBlocksPlugin::retrieveBlocks() * * @return void */ @@ -127,7 +127,7 @@ } /** - * xos_logos_PageBuilder::generateCacheId() + * XoopsThemeBlocksPlugin::generateCacheId() * * @param mixed $cache_id * @return string @@ -141,7 +141,7 @@ } /** - * xos_logos_PageBuilder::buildBlock() + * XoopsThemeBlocksPlugin::buildBlock() * * @param XoopsBlock $xobject * @param XoopsTpl $template Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -91,7 +91,7 @@ public $tpl = null; /** - * @var xos_opal_Theme|null + * @var XoopsTheme|null */ public $theme = null; @@ -365,7 +365,7 @@ $this->option['template_main'] = $this->tpl_name; $xoopsThemeFactory = null; - $xoopsThemeFactory = new xos_opal_ThemeFactory(); + $xoopsThemeFactory = new XoopsThemeFactory(); $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); $xoopsThemeFactory->defaultTheme = $this->getConfig('theme_set'); @@ -378,8 +378,8 @@ $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->getConfig('startpage') . "/' />", null, null); } - if (@is_object($this->theme->plugins['xos_logos_PageBuilder'])) { - $aggreg = $this->theme->plugins['xos_logos_PageBuilder']; + if (@is_object($this->theme->plugins['XoopsThemeBlocksPlugin'])) { + $aggreg = $this->theme->plugins['XoopsThemeBlocksPlugin']; // Backward compatibility code for pre 2.0.14 themes $this->tpl->assign_by_ref('xoops_lblocks', $aggreg->blocks['canvas_left']); $this->tpl->assign_by_ref('xoops_rblocks', $aggreg->blocks['canvas_right']); @@ -1264,7 +1264,7 @@ } $xoopsThemeFactory = null; - $xoopsThemeFactory = new xos_opal_ThemeFactory(); + $xoopsThemeFactory = new XoopsThemeFactory(); $xoopsThemeFactory->allowedThemes = $this->getConfig('theme_set_allowed'); $xoopsThemeFactory->defaultTheme = $theme; $this->theme = $xoopsThemeFactory->createInstance(array("plugins" => array(), "renderBanner" => false)); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -199,6 +199,7 @@ 'tar' => XOOPS_ROOT_PATH . '/class/class.tar.php', 'xmltaghandler' => XOOPS_ROOT_PATH . '/class/xml/xmltaghandler.php', 'xoops' => XOOPS_ROOT_PATH . '/class/xoops.php', + 'xoopsadminthemefactory' => XOOPS_ROOT_PATH . '/class/theme.php', 'xoopsapi' => XOOPS_ROOT_PATH . '/class/xml/rpc/xoopsapi.php', 'xoopsauth' => XOOPS_ROOT_PATH . '/class/auth/auth.php', 'xoopsauthfactory' => XOOPS_ROOT_PATH . '/class/auth/authfactory.php', @@ -327,7 +328,11 @@ 'xoopssmilieshandler' => XOOPS_ROOT_PATH . '/kernel/smilies.php', 'xoopstableform' => XOOPS_ROOT_PATH . '/class/xoopsform/tableform.php', 'xoopstardownloader' => XOOPS_ROOT_PATH . '/class/tardownloader.php', + 'xoopstheme' => XOOPS_ROOT_PATH . '/class/theme.php', + 'xoopsthemeblocksplugin' => XOOPS_ROOT_PATH . '/class/theme_blocks.php', + 'xoopsthemefactory' => XOOPS_ROOT_PATH . '/class/theme.php', 'xoopsthemeform' => XOOPS_ROOT_PATH . '/class/xoopsform/themeform.php', + 'xoopsthemeplugin' => XOOPS_ROOT_PATH . '/class/theme.php', 'xoopsthemesetparser' => XOOPS_ROOT_PATH . '/class/xml/themesetparser.php', 'xoopstpl' => XOOPS_ROOT_PATH . '/class/template.php', 'xoopstplfile' => XOOPS_ROOT_PATH . '/kernel/tplfile.php', @@ -355,11 +360,6 @@ 'xoopsxmlrpctag' => XOOPS_ROOT_PATH . '/class/xml/rpc/xmlrpctag.php', 'xoopsxmlrss2parser' => XOOPS_ROOT_PATH . '/class/xml/rss/xmlrss2parser.php', 'xoopszipdownloader' => XOOPS_ROOT_PATH . '/class/zipdownloader.php', - 'xos_opal_adminthemefactory' => XOOPS_ROOT_PATH . '/class/theme.php', - 'xos_logos_pagebuilder' => XOOPS_ROOT_PATH . '/class/theme_blocks.php', - 'xos_opal_plugin' => XOOPS_ROOT_PATH . '/class/theme.php', - 'xos_opal_theme' => XOOPS_ROOT_PATH . '/class/theme.php', - 'xos_opal_themefactory' => XOOPS_ROOT_PATH . '/class/theme.php', 'zipfile' => XOOPS_ROOT_PATH . '/class/class.zipfile.php', ); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/site-closed.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -39,7 +39,7 @@ if (!$allowed) { $xoopsThemeFactory = null; - $xoopsThemeFactory = new xos_opal_ThemeFactory(); + $xoopsThemeFactory = new XoopsThemeFactory(); $xoopsThemeFactory->allowedThemes = $xoops->getConfig('theme_set_allowed'); $xoopsThemeFactory->defaultTheme = $xoops->getConfig('theme_set'); $xoops->theme = $xoopsThemeFactory->createInstance(array('plugins' => array())); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -87,7 +87,7 @@ // for legacy support when template is sset after header. $xoops->option['template_main'] = $xoops->tpl_name; - $adminThemeFactory = new xos_opal_AdminThemeFactory(); + $adminThemeFactory = new XoopsAdminThemeFactory(); $xoops->theme = $adminThemeFactory->createInstance(array( 'folderName' => $this->foldername, 'themesPath' => 'modules/system/themes', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php 2011-11-11 17:02:16 UTC (rev 8268) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php 2011-11-11 19:00:04 UTC (rev 8269) @@ -79,7 +79,7 @@ } $tpl = new XoopsTpl(); - $block_renderer = new xos_logos_PageBuilder(); + $block_renderer = new XoopsThemeBlocksPlugin(); $block_renderer->theme = $xoops->theme; $block = $block_renderer->buildBlock($blockObj, $tpl); if (!$display_none) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-11 19:46:10
|
Revision: 8271 http://xoops.svn.sourceforge.net/xoops/?rev=8271&view=rev Author: trabis Date: 2011-11-11 19:46:00 +0000 (Fri, 11 Nov 2011) Log Message: ----------- U+dating class phpdoc header Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ads.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ldap.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/authfactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image/scripts/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/text.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/xoopscaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/file.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/xoopsfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/joint.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/read.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/stats.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/sync.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/write.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/model/xoopsmodel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/module.textsanitizer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/pagenav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tardownloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/censor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/censor/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/config.custom.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/flash/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/flash/flash.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/iframe/iframe.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/image/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/image/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/li/li.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/mp3/mp3.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/syntaxhighlight/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/syntaxhighlight/syntaxhighlight.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/textfilter/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/textfilter/textfilter.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/ul/ul.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wiki/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/textsanitizer/wiki/wiki.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/textsanitizer/youtube/youtube.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tree.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/uploader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/utility/xoopsutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/bloggerapi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/metaweblogapi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/movabletypeapi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xmlrpcapi.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/rpc/xmlrpctag.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rpc/xoopsapi.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/rss/xmlrss2parser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xml/themesetparser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/dhtmltextarea/dhtmltextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/dhtmltextarea/editor_registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/sampleform.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/textarea/editor_registry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/textarea/textarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.inc.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/form.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbutton.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formbuttontray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcheckbox.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcolorpicker.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formcontainer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdatetime.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formdhtmltextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formeditor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelement.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formelementtray.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhidden.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formhiddentoken.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formlabel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formpassword.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradio.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formradioyn.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formraw.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcheckgroup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectcountry.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselecteditor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectgroup.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlang.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectmatchoption.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselecttheme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselecttimezone.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectuser.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtext.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextarea.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/grouppermform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/simpleform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/tableform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsformloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopssecurity.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/zipdownloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/smarty/xoops_plugins/function.block.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Authentification base class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ads.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ads.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ads.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Authentification base class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ldap.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ldap.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_ldap.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Authentification base class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_provisionning.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Authentification provisionning class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/auth_xoops.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Authentification class for Native XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/authfactory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/authfactory.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/auth/authfactory.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Authentification class factory * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/apc.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/file.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/memcache.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/model.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xcache.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class 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-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/cache/xoopscache.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Cache engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.image.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.image.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,16 +1,19 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA configurations for Image mode * * Based on DuGris' SecurityImage * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA configurations for All modes * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA configurations for Recaptcha mode * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.text.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.text.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA configurations for Text mode * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class @@ -22,4 +25,4 @@ return $config = array( 'num_chars' => 6, // Maximum characters -); +); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image/scripts/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image/scripts/image.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image/scripts/image.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA class For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @since 2.3.0 Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/image.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,16 +1,19 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA for Image mode * * Based on DuGris' SecurityImage * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/recaptcha.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/recaptcha.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA for Recaptcha mode * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/text.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/text.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/text.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA for text mode * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/xoopscaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/xoopscaptcha.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/xoopscaptcha.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,16 +1,19 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * CAPTCHA configurations for Image mode * * Based on DuGris' SecurityImage * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS comment renderer * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS Criteria parser for database query * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/database.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Abstract base class for XOOPS Database access classes * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/databasefactory.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Factory Class for XOOPS Database * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/mysqldatabase.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * MySQL access * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class 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-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/database/sqlutility.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS MySQL utility * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * XOOPS downloader * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/file.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/file.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/file.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * File engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://www.xoops.org/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class 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-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/folder.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Folder engine For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://www.xoops.org/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/xoopsfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/xoopsfile.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/file/xoopsfile.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * File factory For XOOPS * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS project http://www.xoops.org/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/render.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Xoops Logger renderer * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/logger/xoopslogger.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Xoops Logger handlers - component main class file * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-11 19:15:56 UTC (rev 8270) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2011-11-11 19:46:00 UTC (rev 8271) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Xoops MultiMailer Base Class * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @package class Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mode... [truncated message content] |
From: <tr...@us...> - 2011-11-12 18:16:19
|
Revision: 8275 http://xoops.svn.sourceforge.net/xoops/?rev=8275&view=rev Author: trabis Date: 2011-11-12 18:16:12 +0000 (Sat, 12 Nov 2011) Log Message: ----------- Updating block manager Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/functions.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,6 +1,6 @@ <?php /** - * Xoops Functions + * Xoops Functions * * You may not change or alter any portion of this comment or credits * of supporting developers from this source code or any supporting source code Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/main.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Avatars Manager * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -16,13 +19,15 @@ * @version $Id$ */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + // Get main instance $xoops = Xoops::getInstance(); $system = System::getInstance(); $system_breadcrumb = SystemBreadcrumb::getInstance(); // Check users rights -if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin( $xoops->module->mid())) { - exit( _NOPERM ); +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { + exit(_NOPERM); } // Check is active if (!$xoops->getModuleConfig('active_avatars', 'system')) { @@ -95,7 +100,7 @@ $xoops->tpl->assign('type', $type); // Filter avatars $criteria = new Criteria('avatar_type', $type); - $avatar_count = $avatar_handler->getCount( $criteria ); + $avatar_count = $avatar_handler->getCount($criteria); $xoops->tpl->assign('avatar_count', $avatar_count); // Get avatar list $criteria->setStart($start); @@ -165,8 +170,9 @@ $xoopsConfigUser = $xoops->getConfigs(XOOPS_CONF_USER); $upload = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/avatars', array( - 'image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png' - ), $xoopsConfigUser['avatar_maxsize'], $xoopsConfigUser['avatar_width'], $xoopsConfigUser['avatar_height']); + 'image/gif', 'image/jpeg', 'image/pjpeg', + 'image/x-png', 'image/png' + ), $xoopsConfigUser['avatar_maxsize'], $xoopsConfigUser['avatar_width'], $xoopsConfigUser['avatar_height']); // Get avatar handler $avatar_handler = $xoops->getHandlerAvatar(); // Get avatar id @@ -257,8 +263,9 @@ $msg = '<div class="spacer"><img src="' . XOOPS_UPLOAD_URL . '/' . $avatar->getVar('avatar_file', 's') . '" alt="" /></div><div class="txtcenter bold">' . $avatar->getVar('avatar_name', 's') . '</div>' . _AM_SYSTEM_AVATAR_SUREDEL; // Display message $xoops->confirm(array( - 'op' => 'delete_ok', 'avatar_id' => $avatar_id, 'fct' => 'avatars', 'user_id' => $user_id - ), 'admin.php', $msg); + 'op' => 'delete_ok', 'avatar_id' => $avatar_id, 'fct' => 'avatars', + 'user_id' => $user_id + ), 'admin.php', $msg); } else { $xoops->redirect('admin.php?fct=avatars', 1, _AM_SYSTEM_DBERROR); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/xoops_version.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/avatars/xoops_version.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Avatars Manager * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -16,6 +19,8 @@ * @version $Id$ */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + $modversion['name'] = _AM_SYSTEM_AVATARS; $modversion['version'] = '1.0'; $modversion['description'] = _AM_SYSTEM_AVATARS_DESC; @@ -28,6 +33,4 @@ $modversion['hasAdmin'] = 1; $modversion['adminpath'] = 'admin.php?fct=avatars'; -$modversion['category'] = XOOPS_SYSTEM_AVATAR; - -?> \ No newline at end of file +$modversion['category'] = XOOPS_SYSTEM_AVATAR; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/main.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Banners Manager * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -16,6 +19,8 @@ * @version $Id$ */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + // Get main instance $xoops = Xoops::getInstance(); $system = System::getInstance(); @@ -50,7 +55,7 @@ // Define Breadcrumb and tips $system_breadcrumb->addLink(_AM_SYSTEM_BANNERS_NAV_MANAGER, system_adminVersion('banners', 'adminpath')); switch ($op) { - + case 'list': default: $system_breadcrumb->addHelp(system_adminVersion('banners', 'help')); @@ -161,7 +166,7 @@ } else { $percent = 0; } - + $banner_finish['bid'] = $bid; $banner_finish['impressions'] = $impressions; $banner_finish['clicks'] = $clicks; @@ -227,7 +232,7 @@ $form = $xoops->getModuleForm($obj, 'banner'); $xoops->tpl->assign('form', $form->render()); break; - + case 'banner_edit': // Edit banner $system_breadcrumb->addLink(_AM_SYSTEM_BANNERS_NAV_EDITBNR); $system_breadcrumb->addHelp(system_adminVersion('banners', 'help') . '#banner_edit'); @@ -237,13 +242,14 @@ $bid = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($bid > 0) { $obj = $banner_Handler->get($bid); - $form = $xoops->getModuleForm($obj, 'banner');$form = $xoops->getModuleForm($obj, 'banner'); + $form = $xoops->getModuleForm($obj, 'banner'); + $form = $xoops->getModuleForm($obj, 'banner'); $form->display(); } else { $xoops->redirect('admin.php?fct=banners', 1, _AM_SYSTEM_DBERROR); } break; - + // Banners case 'banner_save': // Save banner if (!$GLOBALS["xoopsSecurity"]->check()) { @@ -332,7 +338,7 @@ $form = $xoops->getModuleForm($obj, 'bannerclient'); $xoops->tpl->assign('form', $form->render()); break; - + case 'banner_client_save': // Save client if (!$GLOBALS["xoopsSecurity"]->check()) { $xoops->redirect("admin.php?fct=banners", 3, implode(",", $GLOBALS["xoopsSecurity"]->getErrors())); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/xoops_version.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/banners/xoops_version.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,14 +1,17 @@ <?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + /** * Banners Manager * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Kazumi Ono (AKA onokazu) @@ -16,18 +19,18 @@ * @version $Id$ */ +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + $modversion['name'] = _AM_SYSTEM_BANS; $modversion['version'] = '1.0'; $modversion['description'] = _AM_SYSTEM_BANS_DESC; $modversion['author'] = ''; $modversion['credits'] = 'The XOOPS Project; The MPN SE Project; Francisco Burzi <br>( http://phpnuke.org/ ); Kraven30 (Cointin Maxime); '; $modversion['help'] = 'page=banners'; -$modversion['license'] = "GPL see LICENSE"; +$modversion['license'] = "GPL see LICENSE"; $modversion['official'] = 1; $modversion['image'] = 'banners.png'; $modversion['hasAdmin'] = 1; $modversion['adminpath'] = 'admin.php?fct=banners'; -$modversion['category'] = XOOPS_SYSTEM_BANNER; - -?> \ No newline at end of file +$modversion['category'] = XOOPS_SYSTEM_BANNER; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/main.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,59 +1,56 @@ <?php -// $Id$ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: Kazumi Ono (AKA onokazu) // -// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // -// Project: The XOOPS Project // -// ------------------------------------------------------------------------- // +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. -// Check users rights + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Blocks admin Manager + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Kazumi Ono (AKA onokazu) + * @package system + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); +// Get main instance $xoops = Xoops::getInstance(); -if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { +$system = System::getInstance(); +$system_breadcrumb = SystemBreadcrumb::getInstance(); + +// Check users rights +if (!$xoops->isUser() || !$xoops->isModule() || !$xoops->user->isAdmin($xoops->module->mid())) { exit(_NOPERM); } + // Get Action type -$op = system_CleanVars($_REQUEST, 'op', 'list', 'string'); +$op = $system->cleanVars($_REQUEST, 'op', 'list', 'string'); -$filter = system_CleanVars($_GET, 'filter', 0, 'int'); +$filter = $system->cleanVars($_GET, 'filter', 0, 'int'); if ($filter) { $method = $_GET; } else { $method = $_REQUEST; } +$selmod = $selgen = $selgrp = $selvis = null; $sel = array( 'selmod' => -2, 'selgen' => -1, 'selgrp' => XOOPS_GROUP_USERS, 'selvis' => -1 ); foreach ($sel as $key => $value) { $_{$key} = isset($_COOKIE[$key]) ? intval($_COOKIE[$key]) : $value; - ${$key} = system_CleanVars($method, $key, $_{$key}, 'int'); + ${$key} = $system->cleanVars($method, $key, $_{$key}, 'int'); setcookie($key, ${$key}); } -$type = system_CleanVars($method, 'type', '', 'string'); +$type = $system->cleanVars($method, 'type', '', 'string'); if ($type == 'preview') { $op = 'preview'; } @@ -73,17 +70,17 @@ // Call Header xoops_cp_header(); // Define Stylesheet - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); // Define scripts - $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); - $xoTheme->addScript('browse.php?modules/system/js/admin.js'); - $xoTheme->addScript('browse.php?modules/system/js/blocks.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + $xoops->theme->addScript('browse.php?modules/system/js/admin.js'); + $xoops->theme->addScript('browse.php?modules/system/js/blocks.js'); // Define Breadcrumb and tips - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); - $xoBreadCrumb->addHelp(system_adminVersion('blocksadmin', 'help')); - $xoBreadCrumb->addTips(sprintf(_AM_SYSTEM_BLOCKS_TIPS, system_AdminIcons('block.png'), system_AdminIcons('success.png'), system_AdminIcons('cancel.png'))); - $xoBreadCrumb->render(); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); + $system_breadcrumb->addHelp(system_adminVersion('blocksadmin', 'help')); + $system_breadcrumb->addTips(sprintf(_AM_SYSTEM_BLOCKS_TIPS, system_AdminIcons('block.png'), system_AdminIcons('success.png'), system_AdminIcons('cancel.png'))); + $system_breadcrumb->render(); // Initialize module handler $module_handler = $xoops->getHandlerModule(); @@ -106,6 +103,7 @@ $sel_gen->setExtra("onchange='submit()'"); $sel_gen->addOption(-1, _AM_SYSTEM_BLOCKS_TYPES); $sel_gen->addOption(0, _AM_SYSTEM_BLOCKS_CUSTOM); + /* @var $list XoopsModule */ foreach ($modules as $list) { $sel_gen->addOption($list->getVar('mid'), $list->getVar('name')); } @@ -143,7 +141,7 @@ $filterform->addElement($sel_vis); - $filterform->assign($xoopsTpl); + $filterform->assign($xoops->tpl); /* Get blocks */ $selvis = ($selvis == -1) ? null : $selvis; @@ -168,11 +166,11 @@ $arr = array(); foreach (array_keys($blocks_arr) as $i) { $arr[$i] = $blocks_arr[$i]->getValues(); - $xoopsTpl->append_by_ref('blocks', $arr[$i]); + $xoops->tpl->append_by_ref('blocks', $arr[$i]); } $block = $block_handler->create(); $blockform = $block->getForm(); - $xoopsTpl->assign('blockform', $blockform->render()); + $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer xoops_cp_footer(); break; @@ -183,23 +181,23 @@ // Call Header xoops_cp_header(); // Define Stylesheet - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); // Define scripts - $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.form.js'); - $xoTheme->addScript('browse.php?modules/system/js/admin.js'); - $xoTheme->addScript('browse.php?modules/system/js/blocks.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/plugins/jquery.form.js'); + $xoops->theme->addScript('browse.php?modules/system/js/admin.js'); + $xoops->theme->addScript('browse.php?modules/system/js/blocks.js'); // Define Breadcrumb and tips - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADDBLOCK); - $xoBreadCrumb->render(); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_ADDBLOCK); + $system_breadcrumb->render(); // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); $block = $block_handler->create(); $blockform = $block->getForm(); - $xoopsTpl->assign('blockform', $blockform->render()); + $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer xoops_cp_footer(); break; @@ -208,8 +206,8 @@ // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get variable - $block_id = system_CleanVars($_POST, 'bid', 0, 'int'); - $visible = system_CleanVars($_POST, 'visible', 0, 'int'); + $block_id = $system->cleanVars($_POST, 'bid', 0, 'int'); + $visible = $system->cleanVars($_POST, 'visible', 0, 'int'); if ($block_id > 0) { $block = $block_handler->get($block_id); $block->setVar('visible', $visible); @@ -223,8 +221,8 @@ // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get variable - $block_id = system_CleanVars($_POST, 'bid', 0, 'int'); - $side = system_CleanVars($_POST, 'side', 0, 'int'); + $block_id = $system->cleanVars($_POST, 'bid', 0, 'int'); + $side = $system->cleanVars($_POST, 'side', 0, 'int'); if ($block_id > 0) { $block = $block_handler->get($block_id); $block->setVar('side', $side); @@ -266,20 +264,20 @@ break; case 'save': - if (!$GLOBALS['xoopsSecurity']->check()) { - $xoops->redirect('admin.php?fct=blocksadmin', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + if (!$xoops->security->check()) { + $xoops->redirect('admin.php?fct=blocksadmin', 3, implode('<br />', $xoops->security->getErrors())); exit(); } // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get avatar id - $block_id = system_CleanVars($_POST, 'bid', 0, 'int'); + $block_id = $system->cleanVars($_POST, 'bid', 0, 'int'); if ($block_id > 0) { $block = $block_handler->get($block_id); } else { $block = $block_handler->create(); } - $block_type = system_CleanVars($_POST, 'block_type', '', 'string'); + $block_type = $system->cleanVars($_POST, 'block_type', '', 'string'); $block->setVar('block_type', $block_type); if (!$block->isCustom()) { @@ -378,28 +376,28 @@ // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get avatar id - $block_id = system_CleanVars($_REQUEST, 'bid', 0, 'int'); + $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { // Define main template $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header xoops_cp_header(); // Define Stylesheet - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/ui/' . $xoops->getModuleConfig('jquery_theme', 'system') . '/ui.all.css'); // Define scripts - $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); - $xoTheme->addScript('browse.php?Frameworks/jquery/plugins/jquery.form.js'); - $xoTheme->addScript('browse.php?modules/system/js/admin.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/jquery.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js'); + $xoops->theme->addScript('browse.php?Frameworks/jquery/plugins/jquery.form.js'); + $xoops->theme->addScript('browse.php?modules/system/js/admin.js'); // Define Breadcrumb and tips - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_EDITBLOCK); - $xoBreadCrumb->render(); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_EDITBLOCK); + $system_breadcrumb->render(); $block = $block_handler->get($block_id); $blockform = $block->getForm(); - $xoopsTpl->assign('blockform', $blockform->render()); + $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer xoops_cp_footer(); } else { @@ -411,7 +409,7 @@ // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get avatar id - $block_id = system_CleanVars($_REQUEST, 'bid', 0, 'int'); + $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { $block = $block_handler->get($block_id); if ($block->getVar('block_type') == 'S') { @@ -433,22 +431,22 @@ xoops_cp_header(); // Display Question $xoops->confirm(array( - 'op' => 'delete_ok', 'fct' => 'blocksadmin', 'bid' => $block->getVar('bid') - ), 'admin.php', sprintf(_AM_SYSTEM_BLOCKS_RUSUREDEL, $block->getVar('title'))); + 'op' => 'delete_ok', 'fct' => 'blocksadmin', 'bid' => $block->getVar('bid') + ), 'admin.php', sprintf(_AM_SYSTEM_BLOCKS_RUSUREDEL, $block->getVar('title'))); // Call Footer xoops_cp_footer(); } break; case 'delete_ok': - if (!$GLOBALS['xoopsSecurity']->check()) { - $xoops->redirect('admin.php?fct=blocksadmin', 3, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors())); + if (!$xoops->security->check()) { + $xoops->redirect('admin.php?fct=blocksadmin', 3, implode('<br />', $xoops->security->getErrors())); exit(); } // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get avatar id - $block_id = system_CleanVars($_POST, 'bid', 0, 'int'); + $block_id = $system->cleanVars($_POST, 'bid', 0, 'int'); if ($block_id > 0) { $block = $block_handler->get($block_id); if ($block_handler->deleteBlock($block)) { @@ -485,22 +483,22 @@ // Initialize blocks handler $block_handler = $xoops->getHandlerBlock(); // Get avatar id - $block_id = system_CleanVars($_REQUEST, 'bid', 0, 'int'); + $block_id = $system->cleanVars($_REQUEST, 'bid', 0, 'int'); if ($block_id > 0) { // Define main template $xoopsOption['template_main'] = 'system_blocks.html'; // Call Header xoops_cp_header(); // Define Stylesheet - $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); + $xoops->theme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); // Define Breadcrumb and tips - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); - $xoBreadCrumb->addLink(_AM_SYSTEM_BLOCKS_CLONEBLOCK); - $xoBreadCrumb->render(); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_ADMIN, system_adminVersion('blocksadmin', 'adminpath')); + $system_breadcrumb->addLink(_AM_SYSTEM_BLOCKS_CLONEBLOCK); + $system_breadcrumb->render(); $block = $block_handler->get($block_id); $blockform = $block->getForm('clone'); - $xoopsTpl->assign('blockform', $blockform->render()); + $xoops->tpl->assign('blockform', $blockform->render()); // Call Footer xoops_cp_footer(); } else { @@ -508,5 +506,4 @@ } break; -} -?> \ No newline at end of file +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/xoops_version.php 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/blocksadmin/xoops_version.php 2011-11-12 18:16:12 UTC (rev 8275) @@ -1,46 +1,36 @@ <?php -// $Id$ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: Kazumi Ono (AKA onokazu) // -// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // -// Project: The XOOPS Project // -// ------------------------------------------------------------------------- // +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * Blocks admin Manager + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @author Kazumi Ono (AKA onokazu) + * @package system + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + $modversion['name'] = _AM_SYSTEM_BLOCKS; $modversion['version'] = '1.0'; $modversion['description'] = _AM_SYSTEM_BLOCKS_DESC; $modversion['author'] = ''; $modversion['credits'] = 'The XOOPS Project; The MPN SE Project; Andricq Nicolas (AKA MusS)'; $modversion['help'] = 'page=blocksadmin'; -$modversion['license'] = "GPL see LICENSE"; +$modversion['license'] = "GPL see LICENSE"; $modversion['official'] = 1; $modversion['image'] = 'blocks.png'; $modversion['hasAdmin'] = 1; $modversion['adminpath'] = 'admin.php?fct=blocksadmin'; -$modversion['category'] = XOOPS_SYSTEM_BLOCK; - -?> \ No newline at end of file +$modversion['category'] = XOOPS_SYSTEM_BLOCK; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html 2011-11-12 17:00:15 UTC (rev 8274) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/admin/system_blocks.html 2011-11-12 18:16:12 UTC (rev 8275) @@ -39,23 +39,23 @@ <tr> <td side="0" class="xo-blocksection" rowspan="3" id="xo-leftcolumn"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDELEFT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=0}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=0}> </td> <td side="3" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDETOPLEFT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=3}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=3}> </td> <td side="5" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDETOPCENTER}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=5}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=5}> </td> <td side="4" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDETOPRIGHT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=4}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=4}> </td> <td side="1" class="xo-blocksection" rowspan="3" id="xo-rightcolumn"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDERIGHT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=1}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=1}> </td> </tr> <tr style="height:30px;"> @@ -64,15 +64,15 @@ <tr> <td side="7" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDEBOTTOMLEFT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=7}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=7}> </td> <td side="9" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDEBOTTOMCENTER}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=9}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=9}> </td> <td side="8" class="xo-blocksection"> <div class="xo-title"><{$smarty.const._AM_SYSTEM_BLOCKS_SIDEBOTTOMRIGHT}></div> - <{includeq file="block:system|system_blocks_item.html" blocks=$blocks side=8}> + <{includeq file="admin:system|system_blocks_item.html" blocks=$blocks side=8}> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tr...@us...> - 2011-11-13 18:18:51
|
Revision: 8283 http://xoops.svn.sourceforge.net/xoops/?rev=8283&view=rev Author: trabis Date: 2011-11-13 18:18:44 +0000 (Sun, 13 Nov 2011) Log Message: ----------- Droping cpanel and gui class, using $xoops->header() on admin side now. Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/cpanel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -22,6 +22,7 @@ $xoops = Xoops::getInstance(); $xoops->loadLanguage('admin'); +$xoops->isAdminSide = true; include_once $xoops->path('include/cp_functions.php'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -169,7 +169,7 @@ } $template->setCompileId($dirname); $tplName = ($tplName = $xobject->getVar('template')) ? "block:{$dirname}|{$tplName}" - : "block:system|system_block_dummy.html"; + : "module:system|system_block_dummy.html"; $cacheid = $this->generateCacheId('blk_' . $xobject->getVar('bid')); if (!$bcachetime || !$template->is_cached($tplName, $cacheid)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -133,7 +133,9 @@ */ private $_moduleConfigs = array(); + public $isAdminSide = false; + /** * Actual Xoops OS */ @@ -314,7 +316,7 @@ public function getTplInfo($tpl_name) { $ret = array(); - $ret['type'] = 'module'; + $ret['type'] = $this->isAdminSide ? 'admin' : 'module'; $info = explode(':', $tpl_name); if (count($info) == 2) { $ret['type'] = $info[0]; @@ -346,6 +348,10 @@ */ public function header($tpl_name = '') { + if ($this->isAdminSide) { + return $this->_adminHeader($tpl_name); + } + static $included = false; if ($included) { return false; @@ -414,11 +420,53 @@ $this->logger->stopTime('XOOPS output init'); $this->logger->startTime('Module display'); - $this->preload->triggerEvent('core.header.end'); return true; } + private function _adminHeader($tpl_name = '') + { + static $included = false; + if ($included) { + return false; + } + $included = true; + + $this->preload->triggerEvent('admin.header.start'); + $this->logger->stopTime('Module init'); + $this->logger->startTime('XOOPS output init'); + + if ($tpl_name) { + $tpl_info = $this->getTplInfo($tpl_name); + $this->tpl_name = $tpl_info['tpl_name']; + } + + // for legacy support when template is set after header. + $this->option['template_main'] = $this->tpl_name; + + $adminThemeFactory = new XoopsAdminThemeFactory(); + $this->theme = $adminThemeFactory->createInstance(array( + 'folderName' => 'default', + 'themesPath' => 'modules/system/themes', + 'contentTemplate' => $this->tpl_name)); + + $this->theme->loadLocalization('admin'); + + $this->preload->triggerEvent('system.class.gui.header'); + include_once $this->path('modules/system/themes/default/default.php'); + $gui = new XoopsGuiDefault(); + $gui->header(); + + if (!isset($this->tpl_name) && $this->isModule()) { + ob_start(); + } + + $this->logger->stopTime('XOOPS output init'); + $this->logger->startTime('Module display'); + $this->preload->triggerEvent('admin.header.end'); + return true; + } + /** * @return bool */ @@ -428,8 +476,13 @@ if ($included) { return false; } - $this->preload->triggerEvent('core.footer.start'); + if ($this->isAdminSide) { + $this->preload->triggerEvent('admin.footer.start'); + } else { + $this->preload->triggerEvent('core.footer.start'); + } + $this->logger->stopTime('Module display'); // RMV-NOTIFY @@ -437,7 +490,6 @@ if (!headers_sent()) { header('Content-Type:text/html; charset=' . _CHARSET); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - //header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); header('Cache-Control: private, no-cache'); header('Pragma: no-cache'); } @@ -446,10 +498,14 @@ trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING); $this->theme->contentTemplate = $this->tpl_name; } - $xoops->theme->render(); - $xoops->logger->stopTime(); + $this->theme->render(); + $this->logger->stopTime(); - $xoops->preload->triggerEvent('core.footer.end'); + if ($this->isAdminSide) { + $this->preload->triggerEvent('admin.footer.end'); + } else { + $this->preload->triggerEvent('core.footer.end'); + } exit(); } @@ -931,8 +987,7 @@ */ public function simpleHeader($closehead = true) { - $xoops = Xoops::getInstance(); - $xoopsConfigMetaFooter = $xoops->getConfigs(XOOPS_CONF_METAFOOTER); + $xoopsConfigMetaFooter = $this->getConfigs(XOOPS_CONF_METAFOOTER); if (!headers_sent()) { header('Content-Type:text/html; charset=' . _CHARSET); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_functions.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -24,9 +24,8 @@ */ function xoops_cp_header() { - XoopsLoad::load('cpanel', 'system'); - $cpanel = XoopsSystemCpanel::getInstance(); - $cpanel->gui->header(); + $xoops = Xoops::getInstance(); + $xoops->header($xoops->getOption('template_main')); } /** @@ -35,7 +34,6 @@ */ function xoops_cp_footer() { - XoopsLoad::load('cpanel', 'system'); - $cpanel = XoopsSystemCpanel::getInstance(); - $cpanel->gui->footer(); + $xoops = Xoops::getInstance(); + $xoops->footer($xoops->getOption('template_main')); } \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/cp_header.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -45,4 +45,5 @@ } // include the default language file for the admin interface -$xoops->loadLanguage('admin', $xoops->module->getVar('dirname')); \ No newline at end of file +$xoops->loadLanguage('admin', $xoops->module->getVar('dirname')); +$xoops->isAdminSide = true; \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/modulesadmin/main.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -301,11 +301,6 @@ $write = true; } } - if ($write) { - // Flush cache files for cpanel GUIs - XoopsLoad::load('cpanel', 'system'); - XoopsSystemCpanel::flush(); - } //Set active modules in cache folder $xoops->setActiveModules(); @@ -358,9 +353,6 @@ case 'install_ok': $ret = array(); $ret[] = xoops_module_install($module); - // Flush cache files for cpanel GUIs - XoopsLoad::load('cpanel', 'system'); - XoopsSystemCpanel::flush(); //Set active modules in cache folder $xoops->setActiveModules(); // Define main template @@ -415,9 +407,6 @@ case 'uninstall_ok': $ret = array(); $ret[] = xoops_module_uninstall($module); - // Flush cache files for cpanel GUIs - XoopsLoad::load("cpanel", "system"); - XoopsSystemCpanel::flush(); //Set active modules in cache folder $xoops->setActiveModules(); // Define main template @@ -906,9 +895,6 @@ } // Call Footer xoops_cp_footer(); - // Flush cache files for cpanel GUIs - XoopsLoad::load("cpanel", "system"); - XoopsSystemCpanel::flush(); require_once $xoops->path('modules/system/class/maintenance.php'); $maintenance = new SystemMaintenance(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -154,10 +154,12 @@ break; case 'cpanel': + $ele = new XoopsFormHidden($config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); + /* $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); XoopsLoad::load("cpanel", "system"); $list = XoopsSystemCpanel::getGuis(); - $ele->addOptionArray($list); + $ele->addOptionArray($list); */ break; case 'timezone': @@ -523,12 +525,6 @@ //register_shutdown_function( array( &$xoopsTpl, 'clear_all_cache' ) ); register_shutdown_function(array(&$maintenance, 'CleanCache'), $options); - if ($lang_updated) { - // Flush cache files for cpanel GUIs - XoopsLoad::load("cpanel", "system"); - XoopsSystemCpanel::flush(); - } - if (isset($redirect) && $redirect != '') { $xoops->redirect($redirect, 2, _AM_SYSTEM_DBUPDATED); } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -154,7 +154,7 @@ $menu['infos'] = sprintf(_AM_SYSTEM_AVATAR_INFO, $avatar); break; case 'banners': - $banner_handler = $xoops->getModuleHandler('banner', 'system'); + $banner_handler = $xoops->getHandlerBanner(); $banner = $banner_handler->getCount(); $menu['infos'] = sprintf(_AM_SYSTEM_BANNER_INFO, $banner); break; Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/cpanel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/cpanel.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/cpanel.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -1,122 +0,0 @@ -<?php -/** - * Xoops Cpanel class - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package system - * @subpackage class - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - */ - -class XoopsSystemCpanel -{ - /** - * Reference to GUI object - * - * @var XoopsSystemGui - */ - var $gui; - - /** - * Constructer - * - */ - function __construct() - { - $xoops = Xoops::getInstance(); - $cpanel = $xoops->getConfig('cpanel'); - $this->loadGui($cpanel); - } - - /** - * Get an instance of the class - * - * @return XoopsSystemCpanel - */ - static function getInstance() - { - static $instance; - if (!isset($instance)) { - $class = __CLASS__; - $instance = new $class(); - } - return $instance; - } - - /** - * Load the Xoops Admin Gui by preference - * - * @param string $gui - */ - function loadGui($gui) - { - if (!empty($gui)) { - $class = 'XoopsGui' . ucfirst($gui); - if (!class_exists($class)) { - include_once XOOPS_ADMINTHEME_PATH . '/' . $gui . '/' . $gui . '.php'; - } - if (class_exists($class)) { - $guiClass = new $class(); - if (call_user_func(array($guiClass , 'validate'))) { - $this->gui = $guiClass; - $this->gui->foldername = $gui; - } - } - } - if (!isset($this->gui)) { - if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/default/default.php')) { - include_once $file; - $this->gui = new XoopsGuiDefault(); - $this->gui->foldername = 'default'; - } - } - } - - /** - * Get a list of Xoops Admin Gui - * - * @return unknown - */ - static function getGuis() - { - $guis = array(); - $lists = XoopsLists::getDirListAsArray(XOOPS_ADMINTHEME_PATH); - foreach (array_keys($lists) as $gui) { - if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/' . $gui . '/' . $gui . '.php')) { - include_once $file; - if (class_exists($class = 'XoopsGui' . ucfirst($gui))) { - if (call_user_func(array($class , 'validate'))) { - $guis[$gui] = $gui; - } - } - } - } - return $guis; - } - - /** - * Flush the Xoops Admin Gui - * - */ - static function flush() - { - $guis = XoopsSystemCpanel::getGuis(); - foreach ($guis as $gui) { - if ($file = XOOPS_ADMINTHEME_PATH . '/' . $gui . '/' . $gui . '.php') { - include_once $file; - if (class_exists($class = 'XoopsGui' . ucfirst($gui))) { - call_user_func(array($class , 'flush')); - } - } - } - } -} \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/gui.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -1,206 +0,0 @@ -<?php -/** - * Xoops Cpanel GUI abstract class - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package system - * @subpackage class - * @author Taiwen Jiang <ph...@us...> - * @version $Id$ - */ - -class XoopsSystemGui -{ - /** - * Reference to template object - */ - var $template; - - /** - * Holding navigation - */ - var $navigation; - - /** - * Holding gui folder name - */ - var $foldername; - - /** - * Reference for Theme - */ - var $xoTheme; - - /** - * @param string $tpl_name - * @return bool - */ - public function header($tpl_name = '') - { - static $included = false; - if ($included) { - return false; - } - $included = true; - - $xoops = Xoops::getInstance(); - if (empty($tpl_name)) { - $tpl_name = $xoops->getOption('template_main'); - } - $xoops->tpl_name = $tpl_name; - ob_start(); - - $xoops->loadLanguage('admin', 'system'); - $xoops->loadLanguage('cpanel', 'system'); - $xoops->loadLanguage('modinfo', 'system'); - - $xoops->logger->stopTime('Module init'); - $xoops->logger->startTime('XOOPS output init'); - - if (!headers_sent()) { - header('Content-Type:text/html; charset=' . _CHARSET); - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header('Cache-Control: no-store, no-cache, must-revalidate'); - header("Cache-Control: post-check=0, pre-check=0", false); - header("Pragma: no-cache"); - } - - if ($tpl_name != '') { - // Don't use db template - if (!$xoops->isModule()) { - /* @var $module_handler XoopsModuleHandler */ - $module_handler = $xoops->getHandler('module'); - $xoops->module = $module_handler->getByDirname('system'); - } - $xoops->tpl_name = XOOPS_ROOT_PATH . '/modules/' . $xoops->module->getVar('dirname', 'n') . '/templates/admin/' . str_replace("db:", "", $tpl_name); - } - - // for legacy support when template is sset after header. - $xoops->option['template_main'] = $xoops->tpl_name; - - $adminThemeFactory = new XoopsAdminThemeFactory(); - $xoops->theme = $adminThemeFactory->createInstance(array( - 'folderName' => $this->foldername, - 'themesPath' => 'modules/system/themes', - 'contentTemplate' => $xoops->tpl_name)); - - $xoops->theme->loadLocalization('admin'); - $xoops->tpl = $xoops->theme->template; - - //for legacy - $this->xoTheme = $xoops->theme; - $this->template = $xoops->tpl; - - - $xoops->logger->stopTime('XOOPS output init'); - $xoops->logger->startTime('Module display'); - - $xoops->preload->triggerEvent('system.class.gui.header'); - - // Add JQuery script with module config - if ($xoops->isModule() && $xoops->module->getInfo('jquery')) { - $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); - } - - if ($xoops->isModule() && $xoops->module->getVar('dirname') == 'system') { - $xoops->module->loadAdminMenu(); - - foreach (array_keys($xoops->module->adminmenu) as $item) { - $sys_menu[$item]['link'] = XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname') . '/' . $xoops->module->adminmenu[$item]['link']; - $xoops->tpl->append_by_ref('sys_menu', $sys_menu); - unset($sys_menu); - } - } - // Module adminmenu - if ($xoops->isModule() && $xoops->module->getVar('dirname') != 'system') { - - if ($xoops->module->getInfo('system_menu')) { - $xoops->theme->addStylesheet('modules/system/css/menu.css'); - - $xoops->module->loadAdminMenu(); - // Get menu tab handler - $menu_handler = $xoops->getModuleHandler('menu', 'system'); - // Define top navigation - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoops->module->getVar('mid', 'e'), _AM_SYSTEM_PREF); - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoops->module->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE); - $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=list&filter=1&selgen=" . $xoops->module->getVar('mid', 'e') . "&selmod=-2&selgrp=-1&selvis=-1", _AM_SYSTEM_BLOCKS); - $menu_handler->addMenuTop(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'e') . "/", _AM_SYSTEM_GOTOMODULE); - // Define main tab navigation - $i = 0; - $current = $i; - foreach ($xoops->module->adminmenu as $menu) { - if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) $current = $i; - $menu_handler->addMenuTabs($menu['link'], $menu['title']); - $i++; - } - if ($xoops->module->getInfo('help')) { - if (stripos($_SERVER['REQUEST_URI'], 'admin/' . $xoops->module->getInfo('help')) !== false) $current = $i; - $menu_handler->addMenuTabs('../system/help.php?mid=' . $xoops->module->getVar('mid', 's') . '&' . $xoops->module->getInfo('help'), _AM_SYSTEM_HELP); - } - - // Display navigation tabs - $xoops->tpl->assign('xo_system_menu', $menu_handler->render($current, false)); - } - } - return true; - } - - /** - * @return bool - */ - public function footer() - { - static $included = false; - if ($included) { - return false; - } - $xoops = Xoops::getInstance(); - $xoops->logger->stopTime('Module display'); - - if (!headers_sent()) { - header('Content-Type:text/html; charset=' . _CHARSET); - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header('Cache-Control: private, no-cache'); - header('Pragma: no-cache'); - } - - if ($xoops->getOption('template_main') && $xoops->getOption('template_main') != $xoops->theme->contentTemplate) { - trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING); - $xoops->theme->contentTemplate = $xoops->tpl_name; - } - - $xoops->theme->render(); - $xoops->logger->stopTime(); - ob_end_flush(); - return true; - } - - static function validate() - { - } - - static function flush() - { - } - - function getInstance() - { - static $instance; - if (!isset($instance)) { - $class = __CLASS__; - $instance = new $class(); - } - return $instance; - } -} - -?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2011-11-13 04:15:29 UTC (rev 8282) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/default.php 2011-11-13 18:18:44 UTC (rev 8283) @@ -27,29 +27,67 @@ * @version $Id$ */ -XoopsLoad::load('gui', 'system'); - -class XoopsGuiDefault extends XoopsSystemGui +class XoopsGuiDefault { - function __construct() + function header() { - } + $xoops = Xoops::getInstance(); + $xoops->loadLanguage('admin', 'system'); + $xoops->loadLanguage('cpanel', 'system'); + $xoops->loadLanguage('modinfo', 'system'); - static function validate() - { - return true; - } + // Add JQuery script with module config + if ($xoops->isModule() && $xoops->module->getInfo('jquery')) { + $xoops->theme->addScript($xoops->url('/media/jquery/jquery.js')); + } + if ($xoops->isModule() && $xoops->module->getVar('dirname') == 'system') { + $xoops->module->loadAdminMenu(); - function header($tpl_file = '') - { - parent::header($tpl_file); - $xoops = Xoops::getInstance(); - $tpl = $xoops->tpl; - $xoTheme = $xoops->theme; + foreach (array_keys($xoops->module->adminmenu) as $item) { + $sys_menu[$item]['link'] = XOOPS_URL . '/modules/' . $xoops->module->getVar('dirname') . '/' . $xoops->module->adminmenu[$item]['link']; + $xoops->tpl->append_by_ref('sys_menu', $sys_menu); + unset($sys_menu); + } + } + // Module adminmenu + if ($xoops->isModule() && $xoops->module->getVar('dirname') != 'system') { - $xoops->theme->addScript( '/media/jquery/jquery.js' ); + if ($xoops->module->getInfo('system_menu')) { + $xoops->theme->addStylesheet('modules/system/css/menu.css'); + + $xoops->module->loadAdminMenu(); + // Get menu tab handler + $menu_handler = $xoops->getModuleHandler('menu', 'system'); + // Define top navigation + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=preferences&op=showmod&mod=" . $xoops->module->getVar('mid', 'e'), _AM_SYSTEM_PREF); + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoops->module->getVar('dirname', 'e'), _AM_SYSTEM_UPDATE); + $menu_handler->addMenuTop(XOOPS_URL . "/modules/system/admin.php?fct=blocksadmin&op=list&filter=1&selgen=" . $xoops->module->getVar('mid', 'e') . "&selmod=-2&selgrp=-1&selvis=-1", _AM_SYSTEM_BLOCKS); + $menu_handler->addMenuTop(XOOPS_URL . "/modules/" . $xoops->module->getVar('dirname', 'e') . "/", _AM_SYSTEM_GOTOMODULE); + // Define main tab navigation + $i = 0; + $current = $i; + foreach ($xoops->module->adminmenu as $menu) { + if (stripos($_SERVER['REQUEST_URI'], $menu['link']) !== false) { + $current = $i; + } + $menu_handler->addMenuTabs($menu['link'], $menu['title']); + $i++; + } + if ($xoops->module->getInfo('help')) { + if (stripos($_SERVER['REQUEST_URI'], 'admin/' . $xoops->module->getInfo('help')) !== false) { + $current = $i; + } + $menu_handler->addMenuTabs('../system/help.php?mid=' . $xoops->module->getVar('mid', 's') . '&' . $xoops->module->getInfo('help'), _AM_SYSTEM_HELP); + } + + // Display navigation tabs + $xoops->tpl->assign('xo_system_menu', $menu_handler->render($current, false)); + } + } + + $xoops->theme->addScript('/media/jquery/jquery.js'); $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/styleswitch.js'); $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/formenu.js'); $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/menu.js'); @@ -57,34 +95,34 @@ $xoops->theme->addScript(XOOPS_ADMINTHEME_URL . '/default/js/tabs.jquery.tools.min.js'); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/dark.css', - array('title' => 'dark', 'media' => 'screen')); + array('title' => 'dark', 'media' => 'screen')); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/silver.css', - array('title' => 'silver', 'media' => 'screen')); + array('title' => 'silver', 'media' => 'screen')); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/orange.css', - array('title' => 'orange', 'media' => 'screen')); + array('title' => 'orange', 'media' => 'screen')); $xoops->theme->addStylesheet(XOOPS_ADMINTHEME_URL . '/default/css/style.css'); - $tpl->assign('lang_cp', _CPHOME); + $xoops->tpl->assign('lang_cp', _CPHOME); //start system overview - //$tpl->assign('lang_xoops_version', XOOPS_VERSION); - $tpl->assign('lang_php_vesion', PHP_VERSION); - $tpl->assign('lang_mysql_version', mysql_get_server_info()); - $tpl->assign('lang_server_api', PHP_SAPI); - $tpl->assign('lang_os_name', PHP_OS); - $tpl->assign('safe_mode', ini_get('safe_mode') ? 'On' : 'Off'); - $tpl->assign('register_globals', ini_get('register_globals') ? 'On' : 'Off'); - $tpl->assign('magic_quotes_gpc', ini_get('magic_quotes_gpc') ? 'On' : 'Off'); - $tpl->assign('allow_url_fopen', ini_get('allow_url_fopen') ? 'On' : 'Off'); - $tpl->assign('fsockopen', function_exists('fsockopen') ? 'On' : 'Off'); - $tpl->assign('allow_call_time_pass_reference', ini_get('allow_call_time_pass_reference') ? 'On' : 'Off'); - $tpl->assign('post_max_size', ini_get('post_max_size')); - $tpl->assign('max_input_time', ini_get('max_input_time')); - $tpl->assign('output_buffering', ini_get('output_buffering')); - $tpl->assign('max_execution_time', ini_get('max_execution_time')); - $tpl->assign('memory_limit', ini_get('memory_limit')); - $tpl->assign('file_uploads', ini_get('file_uploads') ? 'On' : 'Off'); - $tpl->assign('upload_max_filesize', ini_get('upload_max_filesize')); - $tpl->assign('xoops_sitename', $xoops->getConfig('sitename')); + //$xoops->tpl->assign('lang_xoops_version', XOOPS_VERSION); + $xoops->tpl->assign('lang_php_vesion', PHP_VERSION); + $xoops->tpl->assign('lang_mysql_version', mysql_get_server_info()); + $xoops->tpl->assign('lang_server_api', PHP_SAPI); + $xoops->tpl->assign('lang_os_name', PHP_OS); + $xoops->tpl->assign('safe_mode', ini_get('safe_mode') ? 'On' : 'Off'); + $xoops->tpl->assign('register_globals', ini_get('register_globals') ? 'On' : 'Off'); + $xoops->tpl->assign('magic_quotes_gpc', ini_get('magic_quotes_gpc') ? 'On' : 'Off'); + $xoops->tpl->assign('allow_url_fopen', ini_get('allow_url_fopen') ? 'On' : 'Off'); + $xoops->tpl->assign('fsockopen', function_exists('fsockopen') ? 'On' : 'Off'); + $xoops->tpl->assign('allow_call_time_pass_reference', ini_get('allow_call_time_pass_reference') ? 'On' : 'Off'); + $xoops->tpl->assign('post_max_size', ini_get('post_max_size')); + $xoops->tpl->assign('max_input_time', ini_get('max_input_time')); + $xoops->tpl->assign('output_buffering', ini_get('output_buffering')); + $xoops->tpl->assign('max_execution_time', ini_get('max_execution_time')); + $xoops->tpl->assign('memory_limit', ini_get('memory_limit')); + $xoops->tpl->assign('file_uploads', ini_get('file_uploads') ? 'On' : 'Off'); + $xoops->tpl->assign('upload_max_filesize', ini_get('upload_max_filesize')); + $xoops->tpl->assign('xoops_sitename', $xoops->getConfig('sitename')); // ADD MENU ***************************************** @@ -101,7 +139,7 @@ $menu[2]['title'] = _LOGOUT; $menu[2]['absolute'] = 1; $menu[2]['icon'] = XOOPS_ADMINTHEME_URL . '/default/images/logout.png'; - $tpl->append('navitems', array('link' => XOOPS_URL . '/admin.php', 'text' => _CPHOME, 'menu' => $menu)); + $xoops->tpl->append('navitems', array('link' => XOOPS_URL . '/admin.php', 'text' => _CPHOME, 'menu' => $menu)); //add SYSTEM Menu items include dirname(__FILE__) . '/menu.php'; @@ -114,10 +152,10 @@ $mod_options = $adminmenu; 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']; + ? XOOPS_URL . '/modules/' . $moddir . '/' . $mod_options[$item]['link'] + : $mod_options[$item]['link']; $mod_options[$item]['icon'] = empty($mod_options[$item]['icon']) ? '' - : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; + : XOOPS_ADMINTHEME_URL . '/default/' . $mod_options[$item]['icon']; unset($mod_options[$item]['icon_small']); } } else { @@ -129,17 +167,17 @@ $mod_options = $xoops->module->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']; + ? 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']; + : XOOPS_URL . "/modules/{$moddir}/" . $mod_options[$item]['icon']; } } - $tpl->assign('mod_options', $mod_options); - $tpl->assign('modpath', $modpath); - $tpl->assign('modname', $modname); - $tpl->assign('modid', $modid); - $tpl->assign('moddir', $moddir); + $xoops->tpl->assign('mod_options', $mod_options); + $xoops->tpl->assign('modpath', $modpath); + $xoops->tpl->assign('modname', $modname); + $xoops->tpl->assign('modid', $modid); + $xoops->tpl->assign('moddir', $moddir); // add MODULES Menu items $module_handler = $xoops->getHandlerModule(); @@ -176,10 +214,11 @@ } } - $tpl->append('navitems', array( - 'link' => XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin', 'text' => _AM_SYSTEM_MODULES, - 'dir' => $mod->getVar('dirname', 'n'), 'menu' => $menu - )); + $xoops->tpl->append('navitems', array( + 'link' => XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin', + 'text' => _AM_SYSTEM_MODULES, 'dir' => $mod->getVar('dirname', 'n'), + 'menu' => $menu + )); // add preferences menu $menu = array(); @@ -236,10 +275,11 @@ $menu[] = $rtn; } } - $tpl->append('navitems', array( - 'link' => XOOPS_URL . '/modules/system/admin.php?fct=preferences', 'text' => _OXYGEN_SITEPREF, - 'dir' => $mod->getVar('dirname', 'n'), 'menu' => $menu - )); + $xoops->tpl->append('navitems', array( + 'link' => XOOPS_URL . '/modules/system/admin.php?fct=preferences', + 'text' => _OXYGEN_SITEPREF, 'dir' => $mod->getVar('dirname', 'n'), + 'menu' => $menu + )); //add OPTIONS/Links Menu Items $menu = array(); @@ -259,15 +299,19 @@ 'icon' => XOOPS_ADMINTHEME_URL . '/default/images/tweb.png' ); - $tpl->append('navitems', - array('link' => XOOPS_URL . '/admin.php', 'text' => _OXYGEN_INTERESTSITES, 'menu' => $menu)); + $xoops->tpl->append('navitems', array( + 'link' => XOOPS_URL . '/admin.php', 'text' => _OXYGEN_INTERESTSITES, + 'menu' => $menu + )); //add OPTIONS/links for local support if (file_exists($file = XOOPS_ADMINTHEME_PATH . '/default/language/' . $xoops->getConfig('language') . '/localsupport.php')) { $links = include $file; if (count($links) > 0) { - $tpl->append('navitems', - array('link' => XOOPS_URL . '/admin.php', 'text' => _OXYGEN_LOCALSUPPORT, 'menu' => $links)); + $xoops->tpl->append('navitems', array( + 'link' => XOOPS_URL . '/admin.php', 'text' => _OXYGEN_LOCALSUPPORT, + 'menu' => $links + )); } } @@ -297,7 +341,7 @@ $rtn ['icon'] = XOOPS_URL . '/modules/' . $mod->getVar('dirname', 'n') . '/' . $info ['image']; } - $tpl->append('modules', $rtn); + $xoops->tpl->append('modules', $rtn); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |