From 95d86bb8a073c4d8b96d662743ab9aa437eee996 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 16 Apr 2013 14:57:15 +0000 Subject: [PATCH] private --> protected git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@8755 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/BlogArchives.php | 8 ++++---- lib/plugin/BlogJournal.php | 4 ++-- lib/plugin/WikiBlog.php | 20 ++++++++++---------- lib/plugin/WikiFormRich.php | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/plugin/BlogArchives.php b/lib/plugin/BlogArchives.php index 03c2bf270..5d91dd8d5 100644 --- a/lib/plugin/BlogArchives.php +++ b/lib/plugin/BlogArchives.php @@ -88,7 +88,7 @@ class WikiPlugin_BlogArchives // unset($pagelist->_columns['pagename']); if (!empty($args['month'])) { - $prefix = $parent . $this->_blogPrefix('wikiblog') . SUBPAGE_SEPARATOR . $args['month']; + $prefix = $parent . $this->blogPrefix('wikiblog') . SUBPAGE_SEPARATOR . $args['month']; $pages = $dbi->titleSearch(new TextSearchQuery("^" . $prefix, true, 'posix')); $html = HTML::ul(); while ($page = $pages->next()) { @@ -98,7 +98,7 @@ class WikiPlugin_BlogArchives $html->pushContent(HTML::li(WikiLink($page, 'known', $rev->get('summary')))); } if (!$args['noheader']) - return HTML(HTML::h3(sprintf(_("Blog Entries for %s:"), $this->_monthTitle($args['month']))), + return HTML(HTML::h3(sprintf(_("Blog Entries for %s:"), $this->monthTitle($args['month']))), $html); else return $html; @@ -118,11 +118,11 @@ class WikiPlugin_BlogArchives $mon = $blog['month']; if (empty($months[$mon])) $months[$mon] = - array('title' => $this->_monthTitle($mon), + array('title' => $this->monthTitle($mon), 'num' => 1, 'month' => $mon, 'link' => WikiURL($basepage, - $this->_nonDefaultArgs(array('month' => $mon)))); + $this->nonDefaultArgs(array('month' => $mon)))); else $months[$mon]['num']++; } diff --git a/lib/plugin/BlogJournal.php b/lib/plugin/BlogJournal.php index 6ef45dca5..86057ae70 100644 --- a/lib/plugin/BlogJournal.php +++ b/lib/plugin/BlogJournal.php @@ -79,7 +79,7 @@ class WikiPlugin_BlogJournal } $parent = (empty($args['user']) ? '' : $args['user'] . SUBPAGE_SEPARATOR); - $prefix = $base = $parent . $this->_blogPrefix('wikiblog'); + $prefix = $base = $parent . $this->blogPrefix('wikiblog'); if ($args['month']) $prefix .= (SUBPAGE_SEPARATOR . $args['month']); $pages = $dbi->titleSearch(new TextSearchQuery("^" . $prefix . SUBPAGE_SEPARATOR, true, 'posix')); @@ -100,7 +100,7 @@ class WikiPlugin_BlogJournal if (!$i) return HTML(HTML::h3(_("No Blog Entries")), $html); if (!$args['noheader']) - return HTML(HTML::h3(sprintf(_("Blog Entries for %s:"), $this->_monthTitle($args['month']))), + return HTML(HTML::h3(sprintf(_("Blog Entries for %s:"), $this->monthTitle($args['month']))), $html); else return $html; diff --git a/lib/plugin/WikiBlog.php b/lib/plugin/WikiBlog.php index 92b2a87ac..27af61335 100644 --- a/lib/plugin/WikiBlog.php +++ b/lib/plugin/WikiBlog.php @@ -196,7 +196,7 @@ class WikiPlugin_WikiBlog $saved = false; if ($type != 'wikiforum') - $pagename = $this->_blogPrefix($type); + $pagename = $this->blogPrefix($type); else { $pagename = substr($summary, 0, 12); if (empty($pagename)) { @@ -286,14 +286,14 @@ class WikiPlugin_WikiBlog if ($args['order'] == 'reverse') $blogs = array_reverse($blogs); - $name = $this->_blogPrefix($type); + $name = $this->blogPrefix($type); if (!$args['noheader']) $html->pushContent(HTML::h4(array('class' => "$type-heading"), fmt("%s on %s:", $name, WikiLink($basepage)))); foreach ($blogs as $rev) { if (!$rev->get($type)) { // Ack! this is an old-style blog with data ctime in page meta-data. - $content = $this->_transformOldFormatBlog($rev, $type); + $content = $this->transformOldFormatBlog($rev, $type); } else { $content = $rev->getTransformedContent($type); } @@ -306,7 +306,7 @@ class WikiPlugin_WikiBlog // Subpage for the basepage. All Blogs/Forum/Comment entries are // Subpages under this pagename, to find them faster. - private function _blogPrefix($type = 'wikiblog') + protected function blogPrefix($type = 'wikiblog') { if ($type == 'wikiblog') $basepage = "Blog"; @@ -317,7 +317,7 @@ class WikiPlugin_WikiBlog return $basepage; } - private function _transformOldFormatBlog($rev, $type = 'wikiblog') + private function transformOldFormatBlog($rev, $type = 'wikiblog') { $page = $rev->getPage(); $metadata = array(); @@ -334,7 +334,7 @@ class WikiPlugin_WikiBlog { $prefix = (empty($basepage) ? "" - : $basepage . SUBPAGE_SEPARATOR) . $this->_blogPrefix($type); + : $basepage . SUBPAGE_SEPARATOR) . $this->blogPrefix($type); $pages = $dbi->titleSearch(new TextSearchQuery('"' . $prefix . '"', true, 'none')); $blogs = array(); @@ -370,7 +370,7 @@ class WikiPlugin_WikiBlog } // "2004-12" => "December 2004" - private function _monthTitle($month) + protected function monthTitle($month) { if (!$month) $month = strftime("%Y-%m"); //list($year,$mon) = explode("-",$month); @@ -378,7 +378,7 @@ class WikiPlugin_WikiBlog } // "UserName/Blog/2004-12-13/12:28:50+01:00" => array('month' => "2004-12", ...) - private function _blog($rev_or_page) + protected function _blog($rev_or_page) { $pagename = $rev_or_page->getName(); if (preg_match("/^(.*Blog)\/(\d\d\d\d-\d\d)-(\d\d)\/(.*)/", $pagename, $m)) @@ -386,14 +386,14 @@ class WikiPlugin_WikiBlog return array('pagename' => $pagename, // page (list pages per month) or revision (list months)? //'title' => isa($rev_or_page,'WikiDB_PageRevision') ? $rev_or_page->get('summary') : '', - //'monthtitle' => $this->_monthTitle($month), + //'monthtitle' => $this->monthTitle($month), 'month' => $month, 'day' => $day, 'time' => $time, 'prefix' => $prefix); } - private function _nonDefaultArgs($args) + protected function nonDefaultArgs($args) { return array_diff_assoc($args, $this->getDefaultArguments()); } diff --git a/lib/plugin/WikiFormRich.php b/lib/plugin/WikiFormRich.php index 380193d24..0e59394a1 100644 --- a/lib/plugin/WikiFormRich.php +++ b/lib/plugin/WikiFormRich.php @@ -238,7 +238,7 @@ class WikiPlugin_WikiFormRich if (empty($input['value']) and ($s = $request->getArg($input['name']))) $input['value'] = $s; if (!empty($input['autocomplete'])) - $this->_doautocomplete($form, $inputtype, $input, $input['value']); + $this->do_autocomplete($form, $inputtype, $input, $input['value']); if ($nobr) $form->pushContent($text, $nbsp, HTML::input($input)); else @@ -252,7 +252,7 @@ class WikiPlugin_WikiFormRich unset($input['type']); if (is_string($values)) $values = explode(",", $values); if (!empty($input['autocomplete'])) - $this->_doautocomplete($form, $inputtype, $input, $values); + $this->do_autocomplete($form, $inputtype, $input, $values); $select = HTML::select($input); if (empty($values) and ($s = $request->getArg($input['name']))) { $select->pushContent(HTML::option(array('value' => $s), $s)); @@ -318,7 +318,7 @@ class WikiPlugin_WikiFormRich return $form; } - private function _doautocomplete(&$form, $inputtype, &$input, &$values) + private function do_autocomplete(&$form, $inputtype, &$input, &$values) { global $request; $input['class'] = "dropdown"; -- 2.42.0