From: <var...@us...> - 2014-11-23 20:06:31
|
Revision: 9367 http://sourceforge.net/p/phpwiki/code/9367 Author: vargenau Date: 2014-11-23 20:06:27 +0000 (Sun, 23 Nov 2014) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-11-23 20:00:55 UTC (rev 9366) +++ trunk/lib/WikiTheme.php 2014-11-23 20:06:27 UTC (rev 9367) @@ -188,6 +188,8 @@ /** * noinit: Do not initialize unnecessary items in default_theme fallback twice. + * @param string $theme_name + * @param bool $noinit */ function WikiTheme($theme_name = 'default', $noinit = false) { @@ -210,7 +212,11 @@ } } } - if ($noinit) return; + + if ($noinit) { + return; + } + $this->_css = array(); // on derived classes do not add headers twice @@ -329,9 +335,9 @@ /** * Set format string used for dates. * - * @param $fs string Format string for dates. + * @param string $fs Format string for dates. * - * @param $show_mod_time bool If true (default) then times + * @param bool $show_mod_time If true (default) then times * are included in the messages generated by getLastModifiedMessage(), * otherwise, only the date of last modification will be shown. */ @@ -344,7 +350,7 @@ /** * Set format string used for times. * - * @param $fs string Format string for times. + * @param string $fs Format string for times. */ function setTimeFormat($fs) { @@ -357,7 +363,7 @@ * Any time zone offset specified in the users preferences is * taken into account by this method. * - * @param $time_t integer Unix-style time. + * @param int $time_t Unix-style time. * * @return string The date. */ @@ -378,7 +384,7 @@ * Any time zone offset specified in the users preferences is * taken into account by this method. * - * @param $time_t integer Unix-style time. + * @param int $time_t Unix-style time. * * @return string The time. */ @@ -397,7 +403,7 @@ * Any time zone offset specified in the users preferences is * taken into account by this method. * - * @param $time_t integer Unix-style time. + * @param int $time_t Unix-style time. * * @return string The date and time. */ @@ -420,7 +426,7 @@ * Any time zone offset specified in the users preferences is * taken into account by this method. * - * @param $time_t integer Unix-style time. + * @param int $time_t Unix-style time. * * @return string The day. */ @@ -513,6 +519,9 @@ /** * Format the "Author" and "Owner" messages for a page revision. + * + * @param WikiDB_Page $page + * @return string */ function getOwnerMessage($page) { @@ -539,11 +548,14 @@ Prefer author (name) over internal author_id (IP) */ function getAuthorMessage($revision) { - if (!$revision) return ''; + if (!$revision) + return ''; $dbi =& $GLOBALS['request']->_dbi; $author = $revision->get('author'); - if (!$author) $author = $revision->get('author_id'); - if (!$author) return ''; + if (!$author) + $author = $revision->get('author_id'); + if (!$author) + return ''; if ($dbi->isWikiPage($author)) { return fmt("by %s", WikiLink($author)); } else { @@ -707,7 +719,7 @@ //////////////////////////////////////////////////////////////// public $_imageAliases = array(); - /** + /* * * (To disable an image, alias the image to <code>false</code>. */ @@ -986,8 +998,9 @@ return $tooltipAccessKeyPrefix; } - /** Define the accesskey in the title only, with ending [p] or [alt-p]. - * This fixes the prefix in the title and sets the accesskey. + /* + * Define the access key in the title only, with ending [p] or [alt-p]. + * This fixes the prefix in the title and sets the access key. */ function fixAccesskey($attrs) { @@ -1244,7 +1257,7 @@ } public $_headers_printed; - /** + /* * Add a random header element to head * TODO: first css, then js. Maybe separate it into addJSHeaders/addCSSHeaders * or use an optional type argument, and separate it within _MoreHeaders[] @@ -1260,7 +1273,7 @@ } } - /** + /* * Singleton. Only called once, by the head template. See the warning above. */ function getMoreHeaders() @@ -1329,11 +1342,11 @@ return $out; } - /** + /* * Common Initialisations */ - /** + /* * The ->load() method replaces the formerly global code in themeinfo.php. * This is run only once for the selected theme, and not for the parent themes. * Without this you would not be able to derive from other themes. @@ -1359,14 +1372,14 @@ $this->addAlternateCSS(_("Top & bottom toolbars"), 'phpwiki-topbottombars.css'); $this->addAlternateCSS(_("Modern"), 'phpwiki-modern.css'); - /** + /* * The logo image appears on every page and links to the HomePage. */ $this->addImageAlias('logo', WIKI_NAME . 'Logo.png'); $this->addImageAlias('search', 'search.png'); - /** + /* * The Signature image is shown after saving an edited page. If this * is set to false then the "Thank you for editing..." screen will * be omitted. @@ -1389,13 +1402,13 @@ $this->setButtonSeparator("\n | "); - /** + /* * WikiWords can automatically be split by inserting spaces between * the words. The default is to leave WordsSmashedTogetherLikeSo. */ $this->setAutosplitWikiWords(false); - /** + /* * Layout improvement with dangling links for mostly closed wiki's: * If false, only users with edit permissions will be presented the * special wikiunknown class with "?" and Tooltip. @@ -1428,7 +1441,7 @@ */ //$this->setDateFormat("%B %d, %Y", false); - /** + /* * Custom UserPreferences: * A list of name => _UserPreference class pairs. * Rationale: Certain themes should be able to extend the predefined list @@ -1438,7 +1451,7 @@ */ //$this->customUserPreference(); - /** + /* * Register custom PageList type and define custom PageList classes. * Rationale: Certain themes should be able to extend the predefined list * of pagelist types. E.g. certain plugins, like MostPopular might use @@ -1450,7 +1463,7 @@ } // end of load - /** + /* * Custom UserPreferences: * A list of name => _UserPreference class pairs. * Rationale: Certain themes should be able to extend the predefined list @@ -1468,7 +1481,8 @@ } } - /** addPageListColumn(array('rating' => new _PageList_Column_rating('rating', _("Rate")))) + /* + * addPageListColumn(array('rating' => new _PageList_Column_rating('rating', _("Rate")))) * Register custom PageList types for special themes, like * 'rating' for wikilens */ @@ -1638,7 +1652,8 @@ // //////////////////////////////////////////////////////////////// - /** CbUserLogin (&$request, $userid) + /* + * CbUserLogin (&$request, $userid) * Callback when a user logs in */ function CbUserLogin(&$request, $userid) @@ -1646,7 +1661,8 @@ ; // do nothing } - /** CbNewUserEdit (&$request, $userid) + /* + * CbNewUserEdit (&$request, $userid) * Callback when a new user creates or edits a page */ function CbNewUserEdit(&$request, $userid) @@ -1654,7 +1670,8 @@ ; // i.e. create homepage with Template/UserPage } - /** CbNewUserLogin (&$request, $userid) + /* + * CbNewUserLogin (&$request, $userid) * Callback when a "new user" logs in. * What is new? We only record changes, not logins. * Should we track user actions? @@ -1665,7 +1682,8 @@ ; // do nothing } - /** CbUserLogout (&$request, $userid) + /* + * CbUserLogout (&$request, $userid) * Callback when a user logs out */ function CbUserLogout(&$request, $userid) @@ -1675,16 +1693,15 @@ } -/** +/* * A class representing a clickable "button". * - * In it's simplest (default) form, a "button" is just a link associated + * In its simplest (default) form, a "button" is just a link associated * with some sort of wiki-action. */ class Button extends HtmlElement { - /** Constructor - * + /** * @param string $text The text for the button. * @param string $url The url (href) for the button. * @param string $class The CSS class for the button. @@ -1710,12 +1727,12 @@ } -/** +/* * A clickable image button. */ class ImageButton extends Button { - /** Constructor + /** * * @param $text string The text for the button. * @param $url string The url (href) for the button. @@ -1743,13 +1760,12 @@ } } -/** +/* * A class representing a form <samp>submit</samp> button. */ class SubmitButton extends HtmlElement { - /** Constructor - * + /** * @param $text string The text for the button. * @param $name string The name of the form field. * @param $class string The CSS class for the button. @@ -1770,13 +1786,12 @@ } -/** +/* * A class representing an image form <samp>submit</samp> button. */ class SubmitImageButton extends SubmitButton { - /** Constructor - * + /** * @param $text string The text for the button. * @param $name string The name of the form field. * @param $class string The CSS class for the button. @@ -1800,7 +1815,7 @@ } -/** +/* * A sidebar box with title and body, narrow fixed-width. * To represent abbrevated content of plugins, links or forms, * like "Getting Started", "Search", "Sarch Pagename", @@ -1815,7 +1830,6 @@ */ class SidebarBox { - function SidebarBox($title, $body) { require_once 'lib/WikiPlugin.php'; @@ -1829,7 +1843,7 @@ } } -/** +/* * A sidebar box for plugins. * Any plugin may provide a box($args=false, $request=false, $basepage=false) * method, with the help of WikiPlugin::makeBox() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |