From 4073b421281e42be093ed0b95aa6f432b006db23 Mon Sep 17 00:00:00 2001 From: vargenau Date: Wed, 18 Feb 2015 15:34:57 +0000 Subject: [PATCH] Revert r9536 and r9540 git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9546 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/WikiTheme.php | 24 ++++++++++++------------ themes/Sidebar/themeinfo.php | 2 +- themes/blog/themeinfo.php | 3 +-- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/WikiTheme.php b/lib/WikiTheme.php index 8e7e2fdd0..cecb997a5 100644 --- a/lib/WikiTheme.php +++ b/lib/WikiTheme.php @@ -195,7 +195,7 @@ class WikiTheme * @param string $theme_name * @param bool $noinit */ - function __construct($theme_name = 'default', $noinit = false) + function WikiTheme($theme_name = 'default', $noinit = false) { /** * @var WikiRequest $request @@ -1783,7 +1783,7 @@ class Button extends HtmlElement * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. */ - function __construct($text, $url, $class = '', $options = array()) + function Button($text, $url, $class = '', $options = array()) { /** * @var WikiRequest $request @@ -1820,14 +1820,14 @@ class ImageButton extends Button * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function __construct($text, $url, $class, $img_url, $img_attr = array()) + function ImageButton($text, $url, $class, $img_url, $img_attr = array()) { /** * @var WikiRequest $request */ global $request; - parent::__construct('a', array('href' => $url)); + $this->__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this @@ -1856,9 +1856,9 @@ class SubmitButton extends HtmlElement * @param $class string The CSS class for the button. * @param $options array Additional attributes for the <input> tag. */ - function __construct($text, $name = '', $class = '', $options = array()) + function SubmitButton($text, $name = '', $class = '', $options = array()) { - parent::__construct('input', array('type' => 'submit', 'value' => $text)); + $this->__construct('input', array('type' => 'submit', 'value' => $text)); if ($name) $this->setAttr('name', $name); if ($class) @@ -1883,9 +1883,9 @@ class SubmitImageButton extends SubmitButton * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) + function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) { - parent::__construct('input', array('type' => 'image', + $this->__construct('input', array('type' => 'image', 'src' => $img_url, 'alt' => $text)); if ($name) @@ -1915,7 +1915,7 @@ class SubmitImageButton extends SubmitButton */ class SidebarBox { - function __construct($title, $body) + function SidebarBox($title, $body) { require_once 'lib/WikiPlugin.php'; $this->title = $title; @@ -1938,7 +1938,7 @@ class PluginSidebarBox extends SidebarBox public $_plugin, $_args = false, $_basepage = false; - function __construct($name, $args = false, $basepage = false) + function PluginSidebarBox($name, $args = false, $basepage = false) { require_once 'lib/WikiPlugin.php'; @@ -1969,7 +1969,7 @@ class PluginSidebarBox extends SidebarBox // Various boxes which are no plugins class RelatedLinksBox extends SidebarBox { - function __construct($title = false, $body = '', $limit = 20) + function RelatedLinksBox($title = false, $body = '', $limit = 20) { /** * @var WikiRequest $request @@ -1996,7 +1996,7 @@ class RelatedLinksBox extends SidebarBox class RelatedExternalLinksBox extends SidebarBox { - function __construct($title = false, $body = '', $limit = 20) + function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) { /** * @var WikiRequest $request diff --git a/themes/Sidebar/themeinfo.php b/themes/Sidebar/themeinfo.php index daca1694c..66581b41b 100644 --- a/themes/Sidebar/themeinfo.php +++ b/themes/Sidebar/themeinfo.php @@ -36,7 +36,7 @@ class WikiTheme_Sidebar extends WikiTheme_MonoBook function __construct($theme_name = 'Sidebar') { - parent::__construct($theme_name); + $this->WikiTheme($theme_name); } /* Display up/down button with persistent state */ diff --git a/themes/blog/themeinfo.php b/themes/blog/themeinfo.php index 63e1a8a0c..7e8fc2011 100644 --- a/themes/blog/themeinfo.php +++ b/themes/blog/themeinfo.php @@ -45,10 +45,9 @@ require_once 'lib/WikiTheme.php'; class WikiTheme_blog extends WikiTheme { - function __construct($theme_name = 'blog') { - parent::__construct($theme_name); + $this->WikiTheme($theme_name); $this->calendarInit(true); } -- 2.45.0