From: <var...@us...> - 2014-06-10 16:38:19
|
Revision: 8882 http://sourceforge.net/p/phpwiki/code/8882 Author: vargenau Date: 2014-06-10 16:38:14 +0000 (Tue, 10 Jun 2014) Log Message: ----------- Update PHP Doc Modified Paths: -------------- trunk/lib/AccessLog.php trunk/lib/DbSession.php trunk/lib/ErrorManager.php trunk/lib/ExternalReferrer.php trunk/lib/FileFinder.php trunk/lib/Google.php trunk/lib/HtmlElement.php trunk/lib/PageType.php trunk/lib/RSSWriter091.php trunk/lib/Request.php trunk/lib/SemanticWeb.php trunk/lib/WikiDB.php trunk/lib/WikiGroup.php trunk/lib/WikiPluginCached.php trunk/lib/WikiTheme.php trunk/lib/WikiUser.php trunk/lib/loadsave.php trunk/lib/prepend.php trunk/lib/stdlib.php trunk/lib/upgrade.php Modified: trunk/lib/AccessLog.php =================================================================== --- trunk/lib/AccessLog.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/AccessLog.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -35,7 +35,8 @@ class Request_AccessLog { /** - * @param $logfile string Log file name. + * @param string $logfile Log file name. + * @param bool $do_sql */ function Request_AccessLog($logfile, $do_sql = false) { @@ -297,7 +298,7 @@ * * This is a static member function. * - * @param $time integer Unix timestamp (defaults to current time). + * @param int|bool $time Unix timestamp (defaults to current time). * @return string Zone offset, e.g. "-0800" for PST. */ function _zone_offset($time = false) @@ -320,7 +321,7 @@ * * This is a static member function. * - * @param $time integer Unix timestamp (defaults to current time). + * @param int|bool $time Unix timestamp (defaults to current time). * @return string Formatted date & time. */ function _ncsa_time($time = false) Modified: trunk/lib/DbSession.php =================================================================== --- trunk/lib/DbSession.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/DbSession.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -22,6 +22,7 @@ * be extracted. * * @param string $table + * @return bool|DbSession * Name of SQL table containing session data. */ function DbSession(&$dbh, $table = 'session') Modified: trunk/lib/ErrorManager.php =================================================================== --- trunk/lib/ErrorManager.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/ErrorManager.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -431,10 +431,10 @@ /** * Construct a new PhpError. - * @param $errno int - * @param $errstr string - * @param $errfile string - * @param $errline int + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline */ function PhpError($errno, $errstr, $errfile, $errline) { @@ -587,8 +587,10 @@ { /** * Construct a new PhpError. - * @param $errno int - * @param $errstr string + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline */ function PhpWikiError($errno, $errstr, $errfile, $errline) { Modified: trunk/lib/ExternalReferrer.php =================================================================== --- trunk/lib/ExternalReferrer.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/ExternalReferrer.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -74,6 +74,7 @@ * the method determines the name of the search engine, it's URL, and the search keywords * used in the search. This information is returned in an associative array with the following * keys: + * @param string $url * @returns array engine, engine_url, query * @public */ Modified: trunk/lib/FileFinder.php =================================================================== --- trunk/lib/FileFinder.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/FileFinder.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -20,7 +20,7 @@ * * @param $path array A list of directories in which to search for files. */ - function FileFinder($path = false) + function FileFinder($path = array()) { $this->_pathsep = $this->_get_syspath_separator(); if (!isset($this->_path) and $path === false) @@ -32,6 +32,7 @@ * Find file. * * @param $file string File to search for. + * @param bool $missing_okay * @return string The filename (including path), if found, otherwise false. */ function findFile($file, $missing_okay = false) @@ -139,6 +140,7 @@ * So if there's any '\' in the path, either fix them to '/' (not in Win95 or FAT?) * or use '\' for ours. * + * @param string $path * @access private * @return string path_separator. */ Modified: trunk/lib/Google.php =================================================================== --- trunk/lib/Google.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/Google.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -254,7 +254,7 @@ * * The return type for cached pages is base64 encoded text. * - * @params string url - full URL to the page to retrieve + * @param string $url - full URL to the page to retrieve * @return string full text of the cached page */ function doGetCachedPage($url) Modified: trunk/lib/HtmlElement.php =================================================================== --- trunk/lib/HtmlElement.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/HtmlElement.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -68,9 +68,10 @@ /** Add a "tooltip" to an element. * - * @param $tooltip_text string The tooltip text. + * @param string $tooltip_text The tooltip text. + * @param string $accesskey. */ - function addTooltip($tooltip_text, $accesskey = null) + function addTooltip($tooltip_text, $accesskey = '') { $this->setAttr('title', $tooltip_text); if ($accesskey) $this->setAccesskey($accesskey); @@ -580,7 +581,7 @@ /** * Generate hidden form input fields. * - * @param $query_args hash A hash mapping names to values for the hidden inputs. + * @param array $query_args A hash mapping names to values for the hidden inputs. * Values in the hash can themselves be hashes. The will result in hidden inputs * which will reconstruct the nested structure in the resulting query args as * processed by PHP. @@ -597,6 +598,8 @@ * <input type="hidden" name="y[a]" value = "aval" /> * <input type="hidden" name="y[b]" value = "bval" /> * + * @param bool $pfx + * @param array $exclude * @return object An XmlContent object containing the inputs. */ function HiddenInputs($query_args, $pfx = false, $exclude = array()) @@ -619,11 +622,11 @@ /** Generate a <script> tag containing javascript. * * @param string $js The javascript. - * @param string $script_args (optional) hash of script tags options + * @param array $script_args (optional) hash of script tags options * e.g. to provide another version or the defer attr * @return HtmlElement A <script> element. */ -function JavaScript($js, $script_args = false) +function JavaScript($js, $script_args = array()) { $default_script_args = array( //'version' => 'JavaScript', // not xhtml conformant 'type' => 'text/javascript'); Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/PageType.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -30,11 +30,11 @@ * * @param WikiDB_Page $page * @param string $text The packed page revision content. - * @param hash $meta The version meta-data. + * @param array $meta The version meta-data. * @param string $type_override For markup of page using a different * pagetype than that specified in its version meta-data. */ - function TransformedText($page, $text, $meta, $type_override = false) + function TransformedText($page, $text, $meta, $type_override = '') { $pagetype = false; if ($type_override) @@ -74,10 +74,10 @@ * * This is a static member function. * - * @param string $pagetype Name of the page type. + * @param string $name Name of the page type. * @return PageType An object which is a subclass of PageType. */ - function GetPageType($name = false) + function GetPageType($name = '') { if (!$name) $name = 'wikitext'; @@ -106,7 +106,7 @@ * * @param WikiDB_Page $page * @param string $text - * @param hash $meta Version meta-data + * @param array $meta Version meta-data * @return XmlContent The transformed page text. */ function transform(&$page, &$text, $meta) Modified: trunk/lib/RSSWriter091.php =================================================================== --- trunk/lib/RSSWriter091.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/RSSWriter091.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -104,7 +104,7 @@ { global $request; - $rc_url = WikiURL($request->getArg('pagename'), false, 'absurl'); + $rc_url = WikiURL($request->getArg('pagename'), array(), 'absurl'); return array('title' => WIKI_NAME, 'description' => _("RecentChanges"), Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/Request.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -22,7 +22,7 @@ class Request { - public $args = array(); + public $args = array(); function Request() { @@ -866,6 +866,7 @@ { /** * @param $logfile string Log file name. + * @param bool $do_sql */ function Request_AccessLog($logfile, $do_sql = false) { @@ -1123,10 +1124,10 @@ * * This is a static member function. * - * @param $time integer Unix timestamp (defaults to current time). + * @param int $time Unix timestamp (defaults to current time). * @return string Zone offset, e.g. "-0800" for PST. */ - function _zone_offset($time = false) + function _zone_offset($time = 0) { if (!$time) $time = time(); @@ -1146,10 +1147,10 @@ * * This is a static member function. * - * @param $time integer Unix timestamp (defaults to current time). + * @param int $time Unix timestamp (defaults to current time). * @return string Formatted date & time. */ - function _ncsa_time($time = false) + function _ncsa_time($time = 0) { if (!$time) $time = time(); Modified: trunk/lib/SemanticWeb.php =================================================================== --- trunk/lib/SemanticWeb.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/SemanticWeb.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -132,7 +132,7 @@ $this->_uris_seen = array(); $this->_items = array(); - $this->wiki_xmlns_xml = WikiURL(_("UriResolver") . "?", false, true); + $this->wiki_xmlns_xml = WikiURL(_("UriResolver") . "?", array(), true); $this->wiki_xmlns_url = PHPWIKI_BASE_URL; $this->pre_ns_buffer = Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/WikiDB.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -217,6 +217,7 @@ * @access public * @param string $pagename Name of page to delete. * @see purgePage + * @return mixed */ function deletePage($pagename) { @@ -410,7 +411,7 @@ * * @access public * - * @param hash $params This hash is used to specify various optional + * @param array $params This hash is used to specify various optional * parameters: * <dl> * <dt> limit @@ -432,7 +433,7 @@ * @return WikiDB_PageRevisionIterator A WikiDB_PageRevisionIterator * containing the matching revisions. */ - function mostRecent($params = false) + function mostRecent($params = array()) { $result = $this->_backend->most_recent($params); return new WikiDB_PageRevisionIterator($this, $result); @@ -441,6 +442,8 @@ /** * @access public * + * @param string $exclude_from + * @param string $exclude * @param string $sortby Optional. "+-column,+-column2". * If false the result is faster in natural order. * @param string $limit Optional. Encoded as "$offset,$count". @@ -451,7 +454,6 @@ function wantedPages($exclude_from = '', $exclude = '', $sortby = '', $limit = '') { return $this->_backend->wanted_pages($exclude_from, $exclude, $sortby, $limit); - //return new WikiDB_PageIterator($this, $result); } /** @@ -460,8 +462,8 @@ * * @access public * - * @param $pages object A TextSearchQuery object. - * @param $search object A TextSearchQuery object. + * @param object $pages A TextSearchQuery object. + * @param object $search A TextSearchQuery object. * @param string $linktype One of "linkto", "linkfrom", "relation", "attribute". * linktype parameter: * <dl> @@ -474,7 +476,7 @@ * <dt> "attribute" * <dd> the first part in a <>:=<> link * </dl> - * @param $relation object An optional TextSearchQuery to match the + * @param mixed $relation An optional TextSearchQuery to match the * relation name. Ignored on simple in-out links. * * @return Iterator A generic iterator containing links to pages or values. @@ -490,7 +492,9 @@ * for the SemanticSearch autocompletion. * * @access public - * + * @param bool $also_attributes + * @param bool $only_attributes + * @param bool $sorted * @return array of strings */ function listRelations($also_attributes = false, $only_attributes = false, $sorted = true) @@ -1027,7 +1031,11 @@ * (You can defeat this check by setting $version to * {@link WIKIDB_FORCE_CREATE} --- not usually recommended.) * - * @param hash $meta Meta-data for new revision. + * @param array $meta Meta-data for new revision. + * + * @param mixed $formatted + * + * @return mixed */ function save($wikitext, $version, $meta, $formatted = null) { @@ -1100,7 +1108,7 @@ * Get the most recent revision of a page. * * @access public - * + * @param bool $need_content * @return WikiDB_PageRevision The current WikiDB_PageRevision object. */ function getCurrentRevision($need_content = true) @@ -1129,8 +1137,8 @@ * * @access public * - * @param integer $version Which revision to get. - * + * @param int $version Which revision to get. + * @param bool $need_content * @return WikiDB_PageRevision The requested WikiDB_PageRevision object, or * false if the requested revision does not exist in the {@link WikiDB}. * Note that version zero of any page always exists. @@ -1161,9 +1169,11 @@ * * @access public * - * @param integer $version Find most recent revision before this version. + * @param bool|int $version Find most recent revision before this version. * You can also use a WikiDB_PageRevision object to specify the $version. * + * @param bool $need_content + * * @return WikiDB_PageRevision The requested WikiDB_PageRevision object, or false if the * requested revision does not exist in the {@link WikiDB}. Note that * unless $version is greater than zero, a revision (perhaps version zero, @@ -1213,8 +1223,13 @@ * * @access public * - * @param boolean $reversed Which links to find: true for backlinks (default). - * + * @param bool $reversed Which links to find: true for backlinks (default). + * @param bool $include_empty + * @param string $sortby + * @param string $limit + * @param string $sortby + * @param string $exclude + * @param bool $want_relations * @return WikiDB_PageIterator A WikiDB_PageIterator containing * all matching pages. */ @@ -1656,8 +1671,7 @@ /** * Get the transformed content of a page. * - * @param string $pagetype Override the page-type of the revision. - * + * @param bool $pagetype_override * @return object An XmlContent-like object containing the page transformed * contents. */ Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/WikiGroup.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -72,7 +72,7 @@ /** * Initializes a WikiGroup object which should never happen. Use: * $group = &WikiGroup::getGroup(); - * @param object $request The global WikiRequest object -- ignored. + * @param bool $not_current */ function WikiGroup($not_current = false) { @@ -103,7 +103,7 @@ /** * Static method to return the WikiGroup subclass used in this wiki. Controlled * by the constant GROUP_METHOD. - * @param object $request The global WikiRequest object. + * @param bool $not_current The global WikiRequest object. * @return object Subclass of WikiGroup selected via GROUP_METHOD. */ function getGroup($not_current = false) @@ -387,7 +387,7 @@ * @param string $user Username to add to the group (default = current user). * @return bool On true user was added, false if not. */ - function setMemberOf($group, $user = false) + function setMemberOf($group, $user = '') { trigger_error(__sprintf("Method “%s” not implemented in this GROUP_METHOD %s", 'setMemberOf', GROUP_METHOD), @@ -404,7 +404,7 @@ * @param string $user Username to remove from the group (default = current user). * @return bool On true user was removed, false if not. */ - function removeMemberOf($group, $user = false) + function removeMemberOf($group, $user = '') { trigger_error(__sprintf("Method “%s” not implemented in this GROUP_METHOD %s", 'removeMemberOf', GROUP_METHOD), @@ -425,13 +425,9 @@ /** * Constructor - * - * Ignores the parameter provided. - * @param object $request The global WikiRequest object - ignored. */ function GroupNone() { - //$this->request = &$GLOBALS['request']; return; } @@ -455,7 +451,6 @@ * Determines all of the groups of which the current user is a member. * * The group is ignored and an empty array (a member of no groups) is returned. - * @param string $group Name of the group to check for membership (ignored). * @return array Array of groups to which the user belongs (always empty). */ function getAllGroupsIn() @@ -492,7 +487,6 @@ * Constructor * * Initializes the three superclass instance variables - * @param object $request The global WikiRequest object. */ function GroupWikiPage() { @@ -535,6 +529,7 @@ * Private method to take a WikiDB_Page and parse to determine if the * current_user is a member of the group. * @param object $group_page WikiDB_Page object for the group's page + * @param bool $strict * @return boolean True if user is a member, else false. * @access private */ @@ -562,7 +557,6 @@ * * Checks the root Group page ('CategoryGroup') for the list of all groups, * then checks each group to see if the current user is a member. - * @param string $group Name of the group to check for membership. * @return array Array of groups to which the user belongs. */ function getAllGroupsIn() @@ -633,8 +627,6 @@ /** * Constructor - * - * @param object $request The global WikiRequest object. ignored */ function GroupDb() { @@ -711,7 +703,6 @@ * Determines all of the groups of which the current user is a member. * * then checks each group to see if the current user is a member. - * @param string $group Name of the group to check for membership. * @return array Array of groups to which the user belongs. */ function getAllGroupsIn() @@ -804,7 +795,6 @@ * Determines all of the groups of which the current user is a member. * then checks each group to see if the current user is a member. * - * @param string $group Name of the group to check for membership. * @return array Array of groups to which the user belongs. */ function getAllGroupsIn() @@ -868,8 +858,6 @@ /** * Constructor - * - * @param object $request The global WikiRequest object. */ function GroupFile() { @@ -929,7 +917,6 @@ * Determines all of the groups of which the current user is a member. * * then checks each group to see if the current user is a member. - * @param string $group Name of the group to check for membership. * @return array Array of groups to which the user belongs. */ function getAllGroupsIn() @@ -987,8 +974,6 @@ /** * Constructor - * - * @param object $request The global WikiRequest object. */ function GroupLdap() { @@ -999,7 +984,7 @@ if (!defined("LDAP_AUTH_HOST")) { trigger_error(sprintf(_("%s not defined"), "LDAP_AUTH_HOST"), E_USER_WARNING); - return false; + return; } // We should ignore multithreaded environments, not generally windows. // CGI does work. @@ -1008,7 +993,7 @@ dl("ldap" . defined('PHP_SHLIB_SUFFIX') ? PHP_SHLIB_SUFFIX : DLL_EXT); if (!function_exists('ldap_connect')) { trigger_error(_("No LDAP in this PHP version"), E_USER_WARNING); - return false; + return; } } if (!defined("LDAP_BASE_DN")) @@ -1051,13 +1036,10 @@ /** * Determines all of the groups of which the current user is a member. * - * @param string $group Name of the group to check for membership. * @return array Array of groups to which the user belongs. */ function getAllGroupsIn() { - //$request = &$this->request; - //$username = $this->_getUserName(); $membership = array(); $specialgroups = $this->specialGroups(); Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/WikiPluginCached.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -65,8 +65,8 @@ * will allow to find a cached image or to reconstruct the complete * plugin call to recreate the image. * - * @param cache object the cache object used to store the images - * @param argarray array all parameters (including those set to + * @param object $cache the cache object used to store the images + * @param array $argarray all parameters (including those set to * default values) of the plugin call to be * prepared * @access private @@ -285,12 +285,12 @@ * PLUGIN_CACHED_IMG_INLINE or PLUGIN_CACHED_IMG_ONDEMAND. * * @access protected pure virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments to produce + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? - * @return imagehandle image handle if successful + * @param Request $request + * @return mixed imagehandle image handle if successful * false if an error occured */ function getImage($dbi, $argarray, $request) @@ -309,11 +309,11 @@ * is determined by the last "touch" of the entry. * * @access protected virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments. It is + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments. It is * not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param Request $request * @return string format: '+seconds' * '0' never expires */ @@ -327,11 +327,11 @@ * Always used unless plugin type is PLUGIN_CACHED_HTML. * * @access protected virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments. It is + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments. It is * not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param Request $request * @return string 'png', 'jpeg' or 'gif' */ function getImageType(&$dbi, $argarray, &$request) @@ -347,11 +347,11 @@ * <code> <img src=... alt="getAlt(...)"> </code> * * @access protected virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments. It is + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments. It is * not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param Request $request * @return string "alt" description of the image */ function getAlt($dbi, $argarray, $request) @@ -365,11 +365,11 @@ * PLUGIN_CACHED_HTML. * * @access protected pure virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments to produce + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param Request $request * @param string $basepage Pagename to use to interpret links [/relative] page names. * @return string html to be printed in place of the plugin command * false if an error occured @@ -386,11 +386,11 @@ * PLUGIN_CACHED_HTML. * * @access protected pure virtual - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments to produce + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param Request $request * @return array(html,handle) html for the map interior (to be specific, * only <area;> tags defining hot spots) * handle is an imagehandle to the corresponding @@ -410,15 +410,15 @@ * by url and containing the hotspots given by map. * * @access private - * @param id string unique id for the plugin call - * @param url string url pointing to the image part of the map - * @param map string <area> tags defining active + * @param $id string unique id for the plugin call + * @param $url string url pointing to the image part of the map + * @param $map string <area> tags defining active * regions in the map - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments to produce + * @param $dbi WikiDB database abstraction class + * @param $argarray array complete (!) arguments to produce * image. It is not necessary to call * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param $request Request * @return string html output */ function embedMap($id, $url, $map, &$dbi, $argarray, &$request) @@ -439,14 +439,12 @@ * browsers. * * @access private - * @param url string url pointing to the image part of the map - * @param map string <area> tags defining active - * regions in the map - * @param dbi WikiDB database abstraction class - * @param argarray array complete (!) arguments to produce - * image. It is not necessary to call - * WikiPlugin->getArgs anymore. - * @param request Request ??? + * @param string $url url pointing to the image part of the map + * @param WikiDB $dbi database abstraction class + * @param array $argarray complete (!) arguments to produce + * image. It is not necessary to call + * WikiPlugin->getArgs anymore. + * @param Request $request * @return string html output */ function embedImg($url, $dbi, $argarray, $request) @@ -527,8 +525,8 @@ * Determines whether a needed image type may is available * from the GD library and gives an alternative otherwise. * - * @access public static - * @param wish string one of 'png', 'gif', 'jpeg', 'jpg' + * @access public static + * @param string $wish one of 'png', 'gif', 'jpeg', 'jpg' * @return string the image type to be used ('png', 'gif', 'jpeg') * 'html' in case of an error */ @@ -578,13 +576,13 @@ * be written. * * @access public static - * @param imgtype string 'png', 'gif' or 'jpeg' - * @param imghandle string image handle containing the image - * @param imgfile string file name of the image to be produced + * @param string $imgtype 'png', 'gif' or 'jpeg' + * @param string $imghandle image handle containing the image + * @param string $imgfile file name of the image to be produced * @return void * @see decideImageType */ - function writeImage($imgtype, $imghandle, $imgfile = false) + function writeImage($imgtype, $imghandle, $imgfile = '') { if ($imgtype != 'html') { $func = "Image" . strtoupper($imgtype); @@ -601,7 +599,7 @@ * There is no parameter check. * * @access public static - * @param doctype string 'gif', 'png', 'jpeg', 'html' + * @param string $doctype 'gif', 'png', 'jpeg', 'html' * @return void */ function writeHeader($doctype) @@ -626,7 +624,7 @@ * the quoting of arguments is not safe, yet. * * @access public static - * @param argarray array contains all arguments to be converted + * @param array $argarray contains all arguments to be converted * @return string concated arguments */ function glueArgs($argarray) @@ -650,15 +648,15 @@ * parameters if available. * * @access private static - * @param id string return value. Image is stored under this id. - * @param plugincall string return value. Only returned if present in url. + * @param string $id return value. Image is stored under this id. + * @param string $plugincall return value. Only returned if present in url. * Contains all parameters to reconstruct * plugin call. - * @param cache Cache PEAR Cache object - * @param request Request ??? - * @param errorformat string format which should be used to + * @param Cache $cache PEAR Cache object + * @param Request $request + * @param string $errorformat format which should be used to * output errors ('html', 'png', 'gif', 'jpeg') - * @return boolean false if an error occurs, true otherwise. + * @return bool false if an error occurs, true otherwise. * Param id and param plugincall are * also return values. */ @@ -685,10 +683,10 @@ * call needed to produce the requested image. * * @access static private - * @param plugincall string reference to serialized array containing both + * @param $plugincall string reference to serialized array containing both * name and parameters of the plugin call - * @param request Request ??? - * @return boolean false if an error occurs, true otherwise. + * @param $request Request ??? + * @return bool false if an error occurs, true otherwise. * */ function checkCall2(&$plugincall, $request) @@ -713,14 +711,14 @@ /** * Creates an image or image map depending on the plugin type. * @access static private - * @param content array reference to created array which overwrite the keys + * @param $content array reference to created array which overwrite the keys * 'image', 'imagetype' and possibly 'html' - * @param plugin WikiPluginCached plugin which is called to create image or map - * @param dbi WikiDB handle to database - * @param argarray array Contains all arguments needed by plugin - * @param request Request ???? - * @param errorformat string outputs errors in 'png', 'gif', 'jpg' or 'html' - * @return boolean error status; true=ok; false=error + * @param $plugin WikiPluginCached plugin which is called to create image or map + * @param $dbi WikiDB handle to database + * @param $argarray array Contains all arguments needed by plugin + * @param $request Request ???? + * @param $errorformat string outputs errors in 'png', 'gif', 'jpg' or 'html' + * @return bool error status; true=ok; false=error */ function produceImage(&$content, $plugin, $dbi, $argarray, $request, $errorformat) { @@ -824,9 +822,10 @@ * from parameters sent by url or session vars. * * @access static public - * @param dbi WikiDB handle to database - * @param request Request ??? - * @param errorformat string outputs errors in 'png', 'gif', 'jpeg' or 'html' + * @param WikiDB $dbi handle to database + * @param Request $request ??? + * @param string $errorformat outputs errors in 'png', 'gif', 'jpeg' or 'html' + * @return bool */ function fetchImageFromCache($dbi, $request, $errorformat = 'png') { @@ -922,8 +921,8 @@ * that occur during data (html,image,map) creation. * * @access protected - * @param addtext string errormessage to be printed (separate - * multiple lines with '\n') + * @param string $addtext errormessage to be printed (separate + * multiple lines with '\n') * @return void */ function complain($addtext) @@ -936,8 +935,8 @@ * if wished or html header has already been sent. * * @access static protected - * @param imgtype string 'png', 'gif', 'jpeg' or 'html' - * @param errortext string guess what? + * @param string $imgtype 'png', 'gif', 'jpeg' or 'html' + * @param string $errortext guess what? * @return void */ function printError($imgtype, $errortext) @@ -973,11 +972,11 @@ * is further restriction to 600 pixel in width and 350 in height. * * @access static public - * @param txt string multi line text to be converted - * @param fontnr integer number (1-5) telling gd which internal font to use; + * @param $txt string multi line text to be converted + * @param $fontnr integer number (1-5) telling gd which internal font to use; * I recommend font 2 for errors and 4 for help texts. - * @param textcol array text color as a list of the rgb components; array(red,green,blue) - * @param bgcol array background color; array(red,green,blue) + * @param $textcol array text color as a list of the rgb components; array(red,green,blue) + * @param $bgcol array background color; array(red,green,blue) * @return string image handle for gd routines */ function text2img($txt, $fontnr, $textcol, $bgcol) @@ -1106,11 +1105,11 @@ /** * Execute system command and wait until the outfile $until exists. * - * @param cmd string command to be invoked - * @param until string expected output filename - * @return boolean error status; true=ok; false=error + * @param string $cmd command to be invoked + * @param string $until expected output filename + * @return bool error status; true=ok; false=error */ - function execute($cmd, $until = false) + function execute($cmd, $until = '') { // cmd must redirect stderr to stdout though! $errstr = exec($cmd); //, $outarr, $returnval); // normally 127 Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/WikiTheme.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -143,7 +143,7 @@ * * This is a convenience function. * - * @param $action string + * @param string $action * One of <dl> * <dt>[action]</dt><dd>Perform action (e.g. 'edit') on the selected page.</dd> * <dt>[ActionPage]</dt><dd>Run the actionpage (e.g. 'BackLinks') on the selected page.</dd> @@ -154,11 +154,11 @@ * </pre></dd> * </dl> * - * @param $label string + * @param string $label * A label for the button. If ommited, a suitable default (based on the valued of $action) * will be picked. * - * @param $page_or_rev mixed + * @param mixed $page_or_rev * Which page (& version) to perform the action on. * Can be one of:<dl> * <dt>A string</dt><dd>The pagename.</dd> @@ -166,8 +166,12 @@ * <dt>A WikiDB_PageRevision object</dt><dd>A specific version of the page.</dd> * </dl> * ($Page_or_rev is ignored for submit buttons.) + * + * @param array $options + * + * @return object */ -function Button($action, $label = false, $page_or_rev = false, $options = false) +function Button($action, $label = '', $page_or_rev = false, $options = array()) { global $WikiTheme; @@ -432,9 +436,9 @@ /** * Format the "last modified" message for a page revision. * - * @param $revision object A WikiDB_PageRevision object. + * @param object $revision A WikiDB_PageRevision object. * - * @param $show_version bool Should the page version number + * @param string $show_version Should the page version number * be included in the message. (If this argument is omitted, * then the version number will be shown only iff the revision * is not the current one. @@ -934,10 +938,12 @@ * designated page, otherwise the button links to the most recent * version of the page. * + * @param array $options + * * @return object A Button object. */ - function makeActionButton($action, $label = false, - $page_or_rev = false, $options = false) + function makeActionButton($action, $label = '', + $page_or_rev = false, $options = array()) { extract($this->_get_name_and_rev($page_or_rev)); @@ -1002,16 +1008,20 @@ * * Use linkExistingWikiWord, or LinkWikiWord for normal links. * - * @param $page_or_rev mixed The page to link to. This can be + * @param mixed $page_or_rev The page to link to. This can be * given as a string (the page name), a WikiDB_Page object, or as * WikiDB_PageRevision object. If given as a WikiDB_PageRevision * object, the button will link to a specific version of the * designated page, otherwise the button links to the most recent * version of the page. * + * @param string $label + * + * @param string $action + * * @return object A Button object. */ - function makeLinkButton($page_or_rev, $label = false, $action = false) + function makeLinkButton($page_or_rev, $label = '', $action = '') { extract($this->_get_name_and_rev($page_or_rev)); @@ -1516,7 +1526,7 @@ $this->addMoreAttr('body', 'LiveSearch', HTML::Raw(" onload=\"liveSearchInit()")); $this->addMoreHeaders(JavaScript('var liveSearchURI="' - . WikiURL(_("TitleSearch"), false, true) . '";')); + . WikiURL(_("TitleSearch"), array(), true) . '";')); $this->addMoreHeaders(JavaScript('', array ('src' => $this->_findData('livesearch.js')))); $already = 1; @@ -1678,12 +1688,12 @@ { /** Constructor * - * @param $text string The text for the button. - * @param $url string The url (href) for the button. - * @param $class string The CSS class for the button. - * @param $options array Additional attributes for the <input> tag. + * @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. + * @param array $options Additional attributes for the <input> tag. */ - function Button($text, $url, $class = false, $options = false) + function Button($text, $url, $class = '', $options = array()) { global $request; $this->_init('a', array('href' => $url)); @@ -1718,7 +1728,7 @@ * @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 = false) + function ImageButton($text, $url, $class, $img_url, $img_attr = array()) { $this->__construct('a', array('href' => $url)); if ($class) @@ -1750,7 +1760,7 @@ * @param $class string The CSS class for the button. * @param $options array Additional attributes for the <input> tag. */ - function SubmitButton($text, $name = false, $class = false, $options = false) + function SubmitButton($text, $name = '', $class = '', $options = array()) { $this->__construct('input', array('type' => 'submit', 'value' => $text)); @@ -1779,7 +1789,7 @@ * @param $img_url string URL for button's image. * @param $img_attr array Additional attributes for the <img> tag. */ - function SubmitImageButton($text, $name = false, $class = false, $img_url, $img_attr = false) + function SubmitImageButton($text, $name = '', $class = '', $img_url, $img_attr = array()) { $this->__construct('input', array('type' => 'image', 'src' => $img_url, Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/WikiUser.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -76,8 +76,9 @@ * * Populates the instance variables and calls $this->_ok() * to ensure that the parameters are valid. + * @param Request $request * @param mixed $userid String of username or WikiUser object. - * @param integer $authlevel Authorization level. + * @param int|bool $authlevel Authorization level. */ function WikiUser(&$request, $userid = false, $authlevel = false) { Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/loadsave.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -217,10 +217,11 @@ * dirs are allowed for zipdump and htmldump, not for dumpserial * * - * @param $pagename string Pagename. + * @param string $pagename Pagename. + * @param string $action. * @return string Filename for page. */ -function FilenameForPage($pagename, $action = false) +function FilenameForPage($pagename, $action = '') { $enc = rawurlencode($pagename); if (!$action) { Modified: trunk/lib/prepend.php =================================================================== --- trunk/lib/prepend.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/prepend.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -87,6 +87,7 @@ /** * @param string $which One of 'real', 'utime', 'stime', 'cutime', 'sutime' + * @param bool $now * @return float Seconds. */ function getTime($which = 'real', $now = false) Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/stdlib.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -163,10 +163,10 @@ * If a WikiDB_Page object function will extract the name to link to. * If a WikiDB_PageRevision object function will extract the name to link to. * @param array $args - * @param boolean $get_abs_url Default value is false. + * @param bool $get_abs_url Default value is false. * @return string The absolute URL to the page passed as $pagename. */ -function WikiURL($pagename, $args = '', $get_abs_url = false) +function WikiURL($pagename, $args = array(), $get_abs_url = false) { global $request, $WikiTheme; $anchor = false; @@ -308,7 +308,7 @@ * - 'front' display at left * - 'after' display at right * - * @param string $protocol_or_url Protocol or URL. Used to determine the + * @param string $proto_or_url Protocol or URL. Used to determine the * proper icon. * @param string $text The text. * @return XmlContent. @@ -819,10 +819,10 @@ * This can be a relative subpage name (like '/SubPage'), * or can be the empty string to refer to the $basename. * - * @param string $anchor For links to anchors in page. - * * @param mixed $basename Page name from which to interpret * relative or other non-fully-specified page names. + * + * @param mixed $anchor For links to anchors in page. */ function WikiPageName($name, $basename = false, $anchor = false) { @@ -1091,13 +1091,13 @@ /** * Get time offset for local time zone. * - * @param $time time_t Get offset for this time. Default: now. - * @param $no_colon boolean Don't put colon between hours and minutes. + * @param int $time Get offset for this time. Default: now. + * @param bool $no_colon Don't put colon between hours and minutes. * @return string Offset as a string in the format +HH:MM. */ -function TimezoneOffset($time = false, $no_colon = false) +function TimezoneOffset($time = 0, $no_colon = false) { - if ($time === false) + if ($time == 0) $time = time(); $secs = date('Z', $time); @@ -1116,12 +1116,12 @@ /** * Format time in ISO-8601 format. * - * @param $time time_t Time. Default: now. + * @param int $time Time. Default: now. * @return string Date and time in ISO-8601 format. */ -function Iso8601DateTime($time = false) +function Iso8601DateTime($time = 0) { - if ($time === false) + if ($time == 0) $time = time(); $tzoff = TimezoneOffset($time); $date = date('Y-m-d', $time); @@ -1132,12 +1132,12 @@ /** * Format time in RFC-2822 format. * - * @param $time time_t Time. Default: now. + * @param int $time Time. Default: now. * @return string Date and time in RFC-2822 format. */ -function Rfc2822DateTime($time = false) +function Rfc2822DateTime($time = 0) { - if ($time === false) + if ($time == 0) $time = time(); return date('D, j M Y H:i:s ', $time) . TimezoneOffset($time, 'no colon'); } @@ -1145,12 +1145,12 @@ /** * Format time in RFC-1123 format. * - * @param $time time_t Time. Default: now. + * @param int $time Time. Default: now. * @return string Date and time in RFC-1123 format. */ -function Rfc1123DateTime($time = false) +function Rfc1123DateTime($time = 0) { - if ($time === false) + if ($time == 0) $time = time(); return gmdate('D, d M Y H:i:s \G\M\T', $time); } @@ -1200,12 +1200,12 @@ /** * Format time to standard 'ctime' format. * - * @param $time time_t Time. Default: now. + * @param int $time Time. Default: now. * @return string Date and time. */ -function CTime($time = false) +function CTime($time = 0) { - if ($time === false) + if ($time == 0) $time = time(); return date("D M j H:i:s Y", $time); } @@ -1217,7 +1217,7 @@ * * @param $bytes int. Default: 0. * @param $longformat bool. Default: false. - * @return class FormattedText (XmlElement.php). + * @return FormattedText (XmlElement.php). */ function ByteFormatter($bytes = 0, $longformat = false) { @@ -1726,17 +1726,13 @@ { /** Constructor * - * @param object $request * @param mixed $head Header ("title") for alert box. * @param mixed $body The text in the alert box. - * @param hash $buttons An array mapping button labels to URLs. + * @param array $buttons An array mapping button labels to URLs. * The default is a single "Okay" button pointing to $request->getURLtoSelf(). */ - function Alert($head, $body, $buttons = false) + function Alert($head, $body, $buttons = array()) { - if ($buttons === false) - $buttons = array(); - if (is_array($body)) { $html = HTML::ol(); foreach ($body as $li) { Modified: trunk/lib/upgrade.php =================================================================== --- trunk/lib/upgrade.php 2014-06-06 16:02:08 UTC (rev 8881) +++ trunk/lib/upgrade.php 2014-06-10 16:38:14 UTC (rev 8882) @@ -1052,14 +1052,8 @@ /** * Add an upgrade item to be checked. * - * @param $parent object The parent Upgrade class to inherit the version properties - * @param $key string A short unique key to store success in the WikiDB - * @param $fixed_with double @see phpwiki_version() number - * @param $header string Optional header to be printed always even if not applicable - * @param $applicable WikiCallback Optional callback boolean applicable() - * @param $notice string Description of the check - * @param $method WikiCallback Optional callback array method(array) - * //param All other args are passed to $method + * @param object $parent The parent Upgrade class to inherit the version properties + * @param array $params */ function UpgradeEntry(&$parent, $params) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |