|
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();
}
|