|
[xoops-svn] SF.net SVN: xoops-svn:[10323]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <tr...@us...> - 2012-12-05 19:49:46
|
Revision: 10323
http://sourceforge.net/p/xoops/svn/10323
Author: trabis
Date: 2012-12-05 19:49:43 +0000 (Wed, 05 Dec 2012)
Log Message:
-----------
Fixing bug :: Cannot use a module in front page
Making File green (code inspection)
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-05 19:28:19 UTC (rev 10322)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-05 19:49:43 UTC (rev 10323)
@@ -251,7 +251,7 @@
* @param string $path
* @param string $error_type
*
- * @return string|false
+ * @return string|bool
*/
public function pathExists($path, $error_type)
{
@@ -410,7 +410,8 @@
// Temporary solution for start page redirection
if (defined("XOOPS_STARTPAGE_REDIRECTED")) {
- $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->getConfig('startpage') . "/' />", null, null);
+ $smarty = $repeat = null;
+ $this->theme->headContent(null, "<base href='" . XOOPS_URL . '/modules/' . $this->getConfig('startpage') . "/' />", $smarty, $repeat);
}
if (@is_object($this->theme->plugins['XoopsThemeBlocksPlugin'])) {
@@ -1764,9 +1765,10 @@
if ($count > 0) {
$xoopsTpl = new XoopsTpl();
$xoopsTpl->caching = 2;
- for ($i = 0; $i < $count; $i++) {
- if ($block_arr[$i]->getVar('template') != '') {
- $xoopsTpl->clear_cache(XOOPS_ROOT_PATH . "/modules/" . $block_arr[$i]->getVar('dirname') . "/templates/blocks/" . $block_arr[$i]->getVar('template'), 'blk_' . $block_arr[$i]->getVar('bid'));
+ /* @var XoopsBlock $block */
+ foreach($block_arr as $block) {
+ if ($block->getVar('template') != '') {
+ $xoopsTpl->clear_cache(XOOPS_ROOT_PATH . "/modules/" . $block->getVar('dirname') . "/templates/blocks/" . $block->getVar('template'), 'blk_' . $block->getVar('bid'));
}
}
}
|
|
[xoops-svn] SF.net SVN: xoops-svn:[10377]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <tr...@us...> - 2012-12-13 00:55:48
|
Revision: 10377
http://sourceforge.net/p/xoops/svn/10377
Author: trabis
Date: 2012-12-13 00:55:46 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Adding legacy support for XoopsOption template_main
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-13 00:35:57 UTC (rev 10376)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-13 00:55:46 UTC (rev 10377)
@@ -459,6 +459,12 @@
$included = true;
$this->preload()->triggerEvent('core.header.start');
+
+ //For legacy
+ if (!$tpl_name && isset($this->option['template_main'])) {
+ $tpl_name = $this->option['template_main'];
+ $this->deprecated('XoopsOption \'template_main\' is deprecated, please use $xoops->header(\'templatename.html\') instead');
+ }
$this->theme($tpl_name);
if ($this->isAdminSide) {
|
|
[xoops-svn] SF.net SVN: xoops-svn:[10398]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <tr...@us...> - 2012-12-16 00:31:57
|
Revision: 10398
http://sourceforge.net/p/xoops/svn/10398
Author: trabis
Date: 2012-12-16 00:31:55 +0000 (Sun, 16 Dec 2012)
Log Message:
-----------
Legacy XoopsModuleConfig was being overwritten
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-15 22:45:23 UTC (rev 10397)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2012-12-16 00:31:55 UTC (rev 10398)
@@ -1625,7 +1625,7 @@
$this->_moduleConfigs[$dirname] = $this->getHandlerConfig()->getConfigsByCat(0, $module->getVar('mid'));
}
if ($this->isModule()) {
- $this->moduleConfig =& $this->_moduleConfigs[$module->getVar('dirname')];
+ $this->moduleConfig =& $this->_moduleConfigs[$this->module->getVar('dirname')];
}
return $this->_moduleConfigs[$dirname];
}
|
|
[xoops-svn] SF.net SVN: xoops-svn:[10766]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <tr...@us...> - 2013-01-11 20:14:54
|
Revision: 10766
http://sourceforge.net/p/xoops/svn/10766
Author: trabis
Date: 2013-01-11 20:14:49 +0000 (Fri, 11 Jan 2013)
Log Message:
-----------
Allowing Xoops methods to be accessed in templates;
Example :
<{if $xoops->isUser()}><{$xoops->user->getVar('uname')}><{/if}>
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-01-11 19:52:44 UTC (rev 10765)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-01-11 20:14:49 UTC (rev 10766)
@@ -458,6 +458,7 @@
$this->deprecated('XoopsOption \'template_main\' is deprecated, please use $xoops->header(\'templatename.html\') instead');
}
$this->theme($tpl_name);
+ $this->tpl()->assign('xoops', $this);
if ($this->isAdminSide) {
$this->preload()->triggerEvent('system.class.gui.header');
@@ -680,7 +681,7 @@
* @return XoopsImageHandler
*/
public function getHandlerImage($optional = false)
- {
+ {
return Xoops_Module_Helper::getHelper('images')->getHandlerImages();
}
|
|
[xoops-svn] SF.net SVN: xoops-svn:[10811]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <ma...@us...> - 2013-01-15 18:22:57
|
Revision: 10811
http://sourceforge.net/p/xoops/svn/10811
Author: mageg
Date: 2013-01-15 18:22:54 +0000 (Tue, 15 Jan 2013)
Log Message:
-----------
Fix simpleHeader
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-01-15 18:22:07 UTC (rev 10810)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-01-15 18:22:54 UTC (rev 10811)
@@ -1065,17 +1065,15 @@
header("Pragma: no-cache");
}
- echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\n";
- echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . _LANGCODE . '" lang="' . _LANGCODE . '">
+ echo "<!DOCTYPE html>\n";
+ echo '<html lang="' . _LANGCODE . '">
<head>
<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />
- <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_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']) . '" />
<meta name="generator" content="XOOPS" />
<title>' . htmlspecialchars($this->getConfig('sitename')) . '</title>
<script type="text/javascript" src="' . XOOPS_URL . '/include/xoops.js"></script>';
|
|
[xoops-svn] SF.net SVN: xoops-svn:[11928]
XoopsCore/branches/2.6.x/2.6.0/htdocs/ xoops_lib/Xoops.php
From: <rgr...@us...> - 2013-08-16 03:02:10
|
Revision: 11928
http://sourceforge.net/p/xoops/svn/11928
Author: rgriffith
Date: 2013-08-16 03:02:06 +0000 (Fri, 16 Aug 2013)
Log Message:
-----------
Fix Strict error - Only variables should be passed by reference
Modified Paths:
--------------
XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php
===================================================================
--- XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-08-16 02:58:42 UTC (rev 11927)
+++ XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php 2013-08-16 03:02:06 UTC (rev 11928)
@@ -114,6 +114,11 @@
public $isAdminSide = false;
/**
+ * @var object
+ */
+ private $_db;
+
+ /**
* Actual Xoops OS
*/
private function __construct()
@@ -127,6 +132,8 @@
$this->paths['media'] = array(XOOPS_ROOT_PATH . '/media', XOOPS_URL . '/media');
$this->pathTranslation();
+
+ $this->_db = $this->db();
}
/**
@@ -776,7 +783,7 @@
if (!isset($this->_kernelHandlers[$name])) {
$class = 'Xoops' . ucfirst($name) . 'Handler';
if (class_exists($class)) {
- $this->_kernelHandlers[$name] = new $class($this->db());
+ $this->_kernelHandlers[$name] = new $class($this->_db);
}
}
if (!isset($this->_kernelHandlers[$name])) {
@@ -815,7 +822,7 @@
}
$class = ucfirst(strtolower($module_dir)) . ucfirst($name) . 'Handler';
if (class_exists($class)) {
- $this->_moduleHandlers[$module_dir][$name] = new $class($this->db());
+ $this->_moduleHandlers[$module_dir][$name] = new $class($this->_db);
}
}
if (!isset($this->_moduleHandlers[$module_dir][$name])) {
@@ -1818,4 +1825,4 @@
error_reporting(0);
$this->preload()->triggerEvent('core.disableerrorreporting');
}
-}
\ No newline at end of file
+}
|