From 7de86af9758e71d251fad91063035a459d83d2eb Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 30 Jun 2015 23:07:10 +0200 Subject: phpdocs, reformatting --- inc/changelog.php | 13 +++++++++---- inc/pageutils.php | 26 +++++++++++++++----------- inc/parserutils.php | 19 +++++++++++++------ 3 files changed, 37 insertions(+), 21 deletions(-) (limited to 'inc') diff --git a/inc/changelog.php b/inc/changelog.php index d1ef7973e..f4731021c 100644 --- a/inc/changelog.php +++ b/inc/changelog.php @@ -849,18 +849,17 @@ abstract class ChangeLog { public function isCurrentRevision($rev) { return $rev == @filemtime($this->getFilename()); } - + /** - * Return an existing revision for a specific date which is + * Return an existing revision for a specific date which is * the current one or younger or equal then the date * - * @param string $id * @param number $date_at timestamp * @return string revision ('' for current) */ function getLastRevisionAt($date_at){ //requested date_at(timestamp) younger or equal then modified_time($this->id) => load current - if($date_at >= @filemtime($this->getFilename())) { + if($date_at >= @filemtime($this->getFilename())) { return ''; } else if ($rev = $this->getRelativeRevision($date_at+1, -1)) { //+1 to get also the requested date revision return $rev; @@ -1049,6 +1048,12 @@ class MediaChangelog extends ChangeLog { * * @author Ben Coburn * @author Kate Arzamastseva + * + * @param string $id + * @param int $rev + * @param int $chunk_size + * @param bool $media + * @return array|bool */ function getRevisionInfo($id, $rev, $chunk_size = 8192, $media = false) { dbg_deprecated('class PageChangeLog or class MediaChangelog'); diff --git a/inc/pageutils.php b/inc/pageutils.php index 375712661..a5bf039d5 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -243,7 +243,6 @@ function sectionID($title,&$check) { return $title; } - /** * Wiki page existence check * @@ -251,9 +250,10 @@ function sectionID($title,&$check) { * * @author Chris Smith * - * @param string $id page id - * @param string|int $rev empty or revision timestamp - * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well) + * @param string $id page id + * @param string|int $rev empty or revision timestamp + * @param bool $clean flag indicating that $id should be cleaned (see wikiFN as well) + * @param bool $date_at * @return bool exists? */ function page_exists($id,$rev='',$clean=true, $date_at=false) { @@ -489,9 +489,11 @@ function resolve_id($ns,$id,$clean=true){ * * @author Andreas Gohr * - * @param string $ns namespace which is context of id - * @param string &$page (reference) relative media id, updated to resolved id - * @param bool &$exists (reference) updated with existance of media + * @param string $ns namespace which is context of id + * @param string &$page (reference) relative media id, updated to resolved id + * @param bool &$exists (reference) updated with existance of media + * @param int|string $rev + * @param bool $date_at */ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ $page = resolve_id($ns,$page); @@ -502,7 +504,7 @@ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ $rev = $medialog_rev; } } - + $file = mediaFN($page,$rev); $exists = file_exists($file); } @@ -512,9 +514,11 @@ function resolve_mediaid($ns,&$page,&$exists,$rev='',$date_at=false){ * * @author Andreas Gohr * - * @param string $ns namespace which is context of id - * @param string &$page (reference) relative page id, updated to resolved id - * @param bool &$exists (reference) updated with existance of media + * @param string $ns namespace which is context of id + * @param string &$page (reference) relative page id, updated to resolved id + * @param bool &$exists (reference) updated with existance of media + * @param string $rev + * @param bool $date_at */ function resolve_pageid($ns,&$page,&$exists,$rev='',$date_at=false ){ global $conf; diff --git a/inc/parserutils.php b/inc/parserutils.php index 8650f974f..5b96d39fe 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -121,15 +121,21 @@ function p_cached_output($file, $format='xhtml', $id='') { $cache = new cache_renderer($id, $file, $format); if ($cache->useCache()) { $parsed = $cache->retrieveCache(false); - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n\n"; + } } else { $parsed = p_render($format, p_cached_instructions($file,false,$id), $info); if ($info['cache'] && $cache->storeCache($parsed)) { // storeCache() attempts to save cachefile - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n\n"; + } }else{ $cache->removeCache(); //try to delete cachefile - if($conf['allowdebug'] && $format=='xhtml') $parsed .= "\n\n"; + if($conf['allowdebug'] && $format=='xhtml') { + $parsed .= "\n\n"; + } } } @@ -616,8 +622,9 @@ function p_sort_modes($a, $b){ * @author Andreas Gohr * * @param string $mode - * @param array|null|false $instructions - * @param array $info returns render info like enabled toc and cache + * @param array|null|false $instructions + * @param array $info returns render info like enabled toc and cache + * @param string $date_at * @return null|string rendered output */ function p_render($mode,$instructions,&$info,$date_at=''){ @@ -632,7 +639,7 @@ function p_render($mode,$instructions,&$info,$date_at=''){ if($date_at) { $Renderer->date_at = $date_at; } - + $Renderer->smileys = getSmileys(); $Renderer->entities = getEntities(); $Renderer->acronyms = getAcronyms(); -- cgit v1.2.3