From: <var...@us...> - 2015-02-12 13:55:03
|
Revision: 9536 http://sourceforge.net/p/phpwiki/code/9536 Author: vargenau Date: 2015-02-12 13:55:00 +0000 (Thu, 12 Feb 2015) Log Message: ----------- wiki: use __construct Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/themes/Sidebar/themeinfo.php trunk/themes/blog/themeinfo.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2015-02-12 12:10:32 UTC (rev 9535) +++ trunk/lib/WikiTheme.php 2015-02-12 13:55:00 UTC (rev 9536) @@ -195,7 +195,7 @@ * @param string $theme_name * @param bool $noinit */ - function WikiTheme($theme_name = 'default', $noinit = false) + function __construct($theme_name = 'default', $noinit = false) { /** * @var WikiRequest $request @@ -1783,7 +1783,7 @@ * @param string $class The CSS class for the button. * @param array $options Additional attributes for the <input> tag. */ - function Button($text, $url, $class = '', $options = array()) + function __construct($text, $url, $class = '', $options = array()) { /** * @var WikiRequest $request @@ -1820,14 +1820,14 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function ImageButton($text, $url, $class, $img_url, $img_attr = array()) + function __construct($text, $url, $class, $img_url, $img_attr = array()) { /** * @var WikiRequest $request */ global $request; - $this->__construct('a', array('href' => $url)); + parent::__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); // Google honors this @@ -1856,7 +1856,7 @@ * @param $class string The CSS class for the button. * @param $options array Additional attributes for the <input> tag. */ - function SubmitButton($text, $name = '', $class = '', $options = array()) + function __construct($text, $name = '', $class = '', $options = array()) { $this->__construct('input', array('type' => 'submit', 'value' => $text)); if ($name) @@ -1883,9 +1883,9 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) + function __construct($text, $name = '', $class = '', $img_url, $img_attr = array()) { - $this->__construct('input', array('type' => 'image', + parent::__construct('input', array('type' => 'image', 'src' => $img_url, 'alt' => $text)); if ($name) @@ -1915,7 +1915,7 @@ */ class SidebarBox { - function SidebarBox($title, $body) + function __construct($title, $body) { require_once 'lib/WikiPlugin.php'; $this->title = $title; @@ -1938,7 +1938,7 @@ public $_plugin, $_args = false, $_basepage = false; - function PluginSidebarBox($name, $args = false, $basepage = false) + function __construct($name, $args = false, $basepage = false) { require_once 'lib/WikiPlugin.php'; @@ -1969,7 +1969,7 @@ // Various boxes which are no plugins class RelatedLinksBox extends SidebarBox { - function RelatedLinksBox($title = false, $body = '', $limit = 20) + function __construct($title = false, $body = '', $limit = 20) { /** * @var WikiRequest $request @@ -1984,11 +1984,11 @@ $counter = 0; foreach ($page_content->getWikiPageLinks() as $link) { $linkto = $link['linkto']; - if (!$request->_dbi->isWikiPage($linkto)) + if (!$request->_dbi->isWikiPage($linkto)) continue; $this->body->pushContent(HTML::li(WikiLink($linkto))); $counter++; - if ($limit and $counter > $limit) + if ($limit and $counter > $limit) continue; } } @@ -1996,7 +1996,7 @@ class RelatedExternalLinksBox extends SidebarBox { - function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) + function __construct($title = false, $body = '', $limit = 20) { /** * @var WikiRequest $request Modified: trunk/themes/Sidebar/themeinfo.php =================================================================== --- trunk/themes/Sidebar/themeinfo.php 2015-02-12 12:10:32 UTC (rev 9535) +++ trunk/themes/Sidebar/themeinfo.php 2015-02-12 13:55:00 UTC (rev 9536) @@ -36,8 +36,7 @@ function __construct($theme_name = 'Sidebar') { - $this->WikiTheme($theme_name); - //$this->calendarInit(true); + parent::__construct($theme_name); } /* Display up/down button with persistent state */ Modified: trunk/themes/blog/themeinfo.php =================================================================== --- trunk/themes/blog/themeinfo.php 2015-02-12 12:10:32 UTC (rev 9535) +++ trunk/themes/blog/themeinfo.php 2015-02-12 13:55:00 UTC (rev 9536) @@ -48,7 +48,7 @@ function __construct($theme_name = 'blog') { - $this->WikiTheme($theme_name); + parent::__construct($theme_name); $this->calendarInit(true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |