PPP
authorJan Schneider <jan@horde.org>
Mon, 18 Oct 2010 12:08:14 +0000 (14:08 +0200)
committerJan Schneider <jan@horde.org>
Mon, 18 Oct 2010 12:08:14 +0000 (14:08 +0200)
37 files changed:
wicked/lib/Driver.php
wicked/lib/Driver/Sql.php
wicked/lib/Page.php
wicked/lib/Page/AddPage.php
wicked/lib/Page/AllPages.php
wicked/lib/Page/AttachedFiles.php
wicked/lib/Page/BackLinks.php
wicked/lib/Page/DeletePage.php
wicked/lib/Page/EditPage.php
wicked/lib/Page/LeastPopular.php
wicked/lib/Page/LikePages.php
wicked/lib/Page/MergeOrRename.php
wicked/lib/Page/MostPopular.php
wicked/lib/Page/NewPage.php
wicked/lib/Page/RecentChanges.php
wicked/lib/Page/RevertPage.php
wicked/lib/Page/Search.php
wicked/lib/Page/StandardHistoryPage.php
wicked/lib/Page/StandardPage.php
wicked/lib/Page/SyncDiff.php
wicked/lib/Page/SyncPages.php
wicked/lib/Sync.php
wicked/lib/Sync/Wicked.php
wicked/lib/Text_Wiki/Parse/Default/Attribute.php
wicked/lib/Text_Wiki/Parse/Default/Code2.php
wicked/lib/Text_Wiki/Parse/Default/Registrylink.php
wicked/lib/Text_Wiki/Parse/Default/Wickedblock.php
wicked/lib/Text_Wiki/Render/Xhtml/Attribute.php
wicked/lib/Text_Wiki/Render/Xhtml/Code2.php
wicked/lib/Text_Wiki/Render/Xhtml/Image2.php
wicked/lib/Text_Wiki/Render/Xhtml/Interwiki.php
wicked/lib/Text_Wiki/Render/Xhtml/Registrylink.php
wicked/lib/Text_Wiki/Render/Xhtml/Toc.php
wicked/lib/Text_Wiki/Render/Xhtml/Url.php
wicked/lib/Text_Wiki/Render/Xhtml/Wickedblock.php
wicked/lib/Text_Wiki/Render/Xhtml/Wikilink2.php
wicked/lib/tests/Driver.php

index fad267d..74c5c7b 100644 (file)
@@ -22,21 +22,21 @@ abstract class Wicked_Driver {
      *
      * @var array
      */
-    var $_params = array();
+    protected $_params = array();
 
     /**
      * VFS object for storing attachments.
      *
      * @var VFS
      */
-    var $_vfs;
+    protected $_vfs;
 
     /**
      * Constructs a new Wicked driver object.
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function __construct($params = array())
+    public function __construct($params = array())
     {
         $this->_params = $params;
     }
@@ -46,7 +46,7 @@ abstract class Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function getVFS()
+    public function getVFS()
     {
         if (!$this->_vfs) {
             try {
@@ -98,24 +98,24 @@ abstract class Wicked_Driver {
 
     abstract function renamePage($pagename, $newname);
 
-    function getPageId($pagename)
+    public function getPageId($pagename)
     {
         $pages = $this->getPages();
         $ids = array_flip($pages);
         return isset($ids[$pagename]) ? $ids[$pagename] : false;
     }
 
-    function getPage($pagename)
+    public function getPage($pagename)
     {
         return array();
     }
 
-    function getPageById($id)
+    public function getPageById($id)
     {
         return array();
     }
 
-    function getSpecialPages()
+    public function getSpecialPages()
     {
         static $pages;
         if (isset($pages)) {
@@ -138,12 +138,12 @@ abstract class Wicked_Driver {
         return $pages;
     }
 
-    function getPages($special = true)
+    public function getPages($special = true)
     {
         return array();
     }
 
-    function pageExists($pagename)
+    public function pageExists($pagename)
     {
         return in_array($pagename, $this->getPages());
     }
@@ -231,7 +231,7 @@ abstract class Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function attachFile($file, $data)
+    public function attachFile($file, $data)
     {
         $vfs = $this->getVFS();
         if (!isset($file['change_author'])) {
@@ -260,7 +260,7 @@ abstract class Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function removeAttachment($pageId, $attachment, $version = null)
+    public function removeAttachment($pageId, $attachment, $version = null)
     {
         $vfs = $this->getVFS();
         $path = WICKED_VFS_ATTACH_PATH . '/' . $pageId;
@@ -291,7 +291,7 @@ abstract class Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function removeAllAttachments($pageId)
+    public function removeAllAttachments($pageId)
     {
         $vfs = $this->getVFS();
         if (!$vfs->isFolder(WICKED_VFS_ATTACH_PATH, $pageId)) {
@@ -320,7 +320,7 @@ abstract class Wicked_Driver {
      * @return boolean  The new version of the file attached
      * @throws Wicked_Exception
      */
-    abstract function _attachFile($file);
+    abstract protected function _attachFile($file);
 
     /**
      * Retrieves the contents of an attachment.
@@ -333,7 +333,7 @@ abstract class Wicked_Driver {
      * @return string  The file's contents.
      * @throws Wicked_Exception
      */
-    function getAttachmentContents($pageId, $filename, $version)
+    public function getAttachmentContents($pageId, $filename, $version)
     {
         $vfs = $this->getVFS();
         $path = WICKED_VFS_ATTACH_PATH . '/' . $pageId;
@@ -347,7 +347,7 @@ abstract class Wicked_Driver {
 
     abstract function removeVersion($pagename, $version);
 
-    function removeAllVersions($pagename)
+    public function removeAllVersions($pagename)
     {
         /* When deleting a page, also delete all its attachments. */
         $this->removeAllAttachments($this->getPageId($pagename));
@@ -360,7 +360,7 @@ abstract class Wicked_Driver {
      *
      * @return string  The backend's charset
      */
-    function getCharset()
+    public function getCharset()
     {
         return 'UTF-8';
     }
@@ -376,7 +376,7 @@ abstract class Wicked_Driver {
      * @return Wicked_Driver  The newly created concrete Wicked_Driver instance.
      * @throws Wicked_Exception
      */
-    function factory($driver = null, $params = null)
+    public function factory($driver = null, $params = null)
     {
         if ($driver === null) {
             $driver = $GLOBALS['conf']['storage']['driver'];
index ae17109..1783c62 100644 (file)
@@ -21,7 +21,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @var Horde_Db_Adapter
      */
-    var $_db;
+    protected $_db;
 
     /**
      * Retrieves the page of a particular name from the database.
@@ -31,7 +31,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array
      * @throws Wicked_Exception
      */
-    function retrieveByName($pagename)
+    public function retrieveByName($pagename)
     {
         $where = 'page_name = ' . $this->_db->quoteString($this->_convertToDriver($pagename));
 
@@ -53,7 +53,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array  The page hash.
      * @throws Wicked_Exception
      */
-    function retrieveHistory($pagename, $version)
+    public function retrieveHistory($pagename, $version)
     {
         if (empty($version) or !preg_match('/^[0-9]+\.[0-9]+$/', $version)) {
             throw new Wicked_Exception('invalid version number');
@@ -68,24 +68,24 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $this->_retrieve($this->_params['historytable'], $where);
     }
 
-    function getPage($pagename)
+    public function getPage($pagename)
     {
         $where = 'page_name = ' . $this->_db->quoteString($this->_convertToDriver($pagename));
         return $this->_retrieve($this->_params['table'], $where);
     }
 
-    function getPageById($id)
+    public function getPageById($id)
     {
         $where = 'page_id = ' . (int)$id;
         return $this->_retrieve($this->_params['table'], $where);
     }
 
-    function getAllPages()
+    public function getAllPages()
     {
         return $this->_retrieve($this->_params['table'], '', 'page_name');
     }
 
-    function getHistory($pagename)
+    public function getHistory($pagename)
     {
         $where = 'page_name = ' . $this->_db->quoteString($this->_convertToDriver($pagename)) .
                  ' ORDER BY page_majorversion DESC, page_minorversion DESC';
@@ -101,7 +101,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array  Pages.
      * @throws Wicked_Exception
      */
-    function getRecentChanges($days = 3)
+    public function getRecentChanges($days = 3)
     {
         $where = 'version_created > ' . (time() - (86400 * $days));
         $result = $this->_retrieve($this->_params['table'],
@@ -121,7 +121,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array  Pages.
      * @throws Wicked_Exception
      */
-    function mostPopular($limit = 10)
+    public function mostPopular($limit = 10)
     {
         return $this->_retrieve($this->_params['table'], '', 'page_hits DESC', $limit);
     }
@@ -134,12 +134,12 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array  Pages.
      * @throws Wicked_Exception
      */
-    function leastPopular($limit = 10)
+    public function leastPopular($limit = 10)
     {
         return $this->_retrieve($this->_params['table'], '', 'page_hits ASC', $limit);
     }
 
-    function searchTitles($searchtext)
+    public function searchTitles($searchtext)
     {
         require_once 'Horde/SQL.php';
         $searchtext = $this->_convertToDriver($searchtext);
@@ -158,7 +158,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return array  A list of pages.
      * @throws Wicked_Exception
      */
-    function searchText($searchtext, $title = true)
+    public function searchText($searchtext, $title = true)
     {
         require_once 'Horde/SQL/Keywords.php';
         $searchtext = $this->_convertToDriver($searchtext);
@@ -182,7 +182,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $this->_retrieve($this->_params['table'], $where);
     }
 
-    function getBackLinks($pagename)
+    public function getBackLinks($pagename)
     {
         $where = 'page_text LIKE ' . $this->_db->quoteString('%' . $this->_convertToDriver($pagename) . '%');
         $pages = $this->_retrieve($this->_params['table'], $where);
@@ -209,7 +209,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $pages;
     }
 
-    function getMatchingPages($searchtext, $matchType = Wicked_Page::MATCH_ANY)
+    public function getMatchingPages($searchtext, $matchType = Wicked_Page::MATCH_ANY)
     {
         $searchtext = Horde_String::lower($searchtext);
 
@@ -234,7 +234,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $this->_retrieve($this->_params['table'], implode(' OR ', $clauses));
     }
 
-    function getLikePages($pagename)
+    public function getLikePages($pagename)
     {
         if (Horde_String::isUpper($pagename, 'UTF-8')) {
             $firstword = $pagename;
@@ -291,7 +291,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *                files.
      * @throws Wicked_Exception
      */
-    function getAttachedFiles($pageId, $allversions = false)
+    public function getAttachedFiles($pageId, $allversions = false)
     {
         $where = 'page_id = ' . (int)$pageId;
         $data = $this->_retrieve($this->_params['attachmenttable'], $where);
@@ -309,7 +309,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $data;
     }
 
-    function _getAttachedFiles_usort($a, $b)
+    protected function _getAttachedFiles_usort($a, $b)
     {
         $res = strcmp($a['attachment_name'], $b['attachment_name']);
         if ($res != 0) {
@@ -335,7 +335,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function removeAttachment($pageId, $attachment, $version = null)
+    public function removeAttachment($pageId, $attachment, $version = null)
     {
         /* Try to delete from the VFS first. */
         parent::removeAttachment($pageId, $attachment, $version);
@@ -376,7 +376,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function removeAllAttachments($pageId)
+    public function removeAllAttachments($pageId)
     {
         /* Try to delete from the VFS first. */
         $result = parent::removeAllAttachments($pageId);
@@ -413,7 +413,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      * @return string  The new version of the file attached.
      * @throws Wicked_Exception
      */
-    function _attachFile($file)
+    protected function _attachFile($file)
     {
         $where = 'page_id = ' . intval($file['page_id']) .
                  ' AND attachment_name = ' . $this->_db->quoteString($file['attachment_name']);
@@ -474,7 +474,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function logPageView($pagename)
+    public function logPageView($pagename)
     {
         $query = 'UPDATE ' . $this->_params['table'] .
                  ' SET page_hits = page_hits + 1 WHERE page_name = ?';
@@ -493,7 +493,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function newPage($pagename, $text)
+    public function newPage($pagename, $text)
     {
         if (!strlen($pagename)) {
             throw new Wicked_Exception(_("Page name must not be empty"));
@@ -545,7 +545,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function renamePage($pagename, $newname)
+    public function renamePage($pagename, $newname)
     {
         $query = 'UPDATE ' . $this->_params['table'] .
                  ' SET page_name = ? WHERE page_name = ?';
@@ -572,7 +572,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         return $this->updateText($newname, $newPage['page_text'], $changelog, true);
     }
 
-    function updateText($pagename, $text, $changelog, $minorchange)
+    public function updateText($pagename, $text, $changelog, $minorchange)
     {
         if (!$this->pageExists($pagename)) {
             return $this->newPage($pagename, $text);
@@ -622,7 +622,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
         $this->_db->update($query, $values);
     }
 
-    function getPages($special = true, $no_cache = false)
+    public function getPages($special = true, $no_cache = false)
     {
         static $pageNames;
         if (!isset($pageNames) || $no_cache) {
@@ -644,7 +644,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
 
     /**
      */
-    function removeVersion($pagename, $version)
+    public function removeVersion($pagename, $version)
     {
         list($major, $minor) = explode('.', $version);
 
@@ -711,7 +711,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
 
     /**
      */
-    function removeAllVersions($pagename)
+    public function removeAllVersions($pagename)
     {
         $this->_pageNames = null;
 
@@ -748,7 +748,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @return array | object  Either an array of pages or PEAR::Error.
      */
-    function _retrieve($table, $sqlWhere, $orderBy = null, $limit = null)
+    protected function _retrieve($table, $sqlWhere, $orderBy = null, $limit = null)
     {
         $query = sprintf('SELECT * FROM %s%s%s',
                          $table,
@@ -790,7 +790,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @return string  The backend's charset
      */
-    function getCharset()
+    public function getCharset()
     {
         return $this->_params['charset'];
     }
@@ -802,7 +802,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @return mixed        The converted value.
      */
-    function _convertFromDriver($value)
+    protected function _convertFromDriver($value)
     {
         return Horde_String::convertCharset($value, $this->getCharset(), 'UTF-8');
     }
@@ -814,7 +814,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @return mixed        The converted value.
      */
-    function _convertToDriver($value)
+    protected function _convertToDriver($value)
     {
         return Horde_String::convertCharset($value, 'UTF-8', $this->getCharset());
     }
@@ -824,7 +824,7 @@ class Wicked_Driver_Sql extends Wicked_Driver {
      *
      * @throws Wicked_Exception
      */
-    function connect()
+    public function connect()
     {
         try {
             $this->_db = $GLOBALS['injector']->getInstance('Horde_Db_Adapter');
index b6936a1..2850da7 100644 (file)
@@ -32,28 +32,28 @@ class Wicked_Page
      *
      * @var array
      */
-    var $supportedModes = array();
+    public $supportedModes = array();
 
     /**
      * Instance of a Text_Wiki processor.
      *
      * @var Text_Wiki
      */
-    var $_proc;
+    protected $_proc;
 
     /**
      * The loaded page info.
      *
      * @var array
      */
-    var $_page;
+    protected $_page;
 
     /**
      * Is this a validly loaded page?
      *
      * @return boolean  True if we've loaded data, false otherwise.
      */
-    function isValid()
+    public function isValid()
     {
         return !empty($this->_page);
     }
@@ -65,7 +65,7 @@ class Wicked_Page
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions($pageName = null)
+    public function getPermissions($pageName = null)
     {
         global $wicked;
 
@@ -100,7 +100,7 @@ class Wicked_Page
      *
      * @return boolean  True if the mode is allowed.
      */
-    function allows($mode)
+    public function allows($mode)
     {
         global $browser;
 
@@ -179,7 +179,7 @@ class Wicked_Page
      *
      * @return boolean            True or false
      */
-    function supports($mode)
+    public function supports($mode)
     {
         return !empty($this->supportedModes[$mode]);
     }
@@ -190,7 +190,7 @@ class Wicked_Page
      * @return Wicked_Page  The current page.
      * @throws Wicked_Exception
      */
-    function getCurrentPage()
+    public function getCurrentPage()
     {
         return Wicked_Page::getPage(rtrim(Horde_Util::getFormData('page'), '/'),
                                     Horde_Util::getFormData('version'),
@@ -203,7 +203,7 @@ class Wicked_Page
      * @return Wicked_Page  The requested page.
      * @throws Wicked_Exception
      */
-    function getPage($pagename, $pagever = null, $referrer = null)
+    public function getPage($pagename, $pagever = null, $referrer = null)
     {
         global $conf, $notification, $wicked;
 
@@ -234,12 +234,12 @@ class Wicked_Page
         return new Wicked_Page_AddPage($pagename);
     }
 
-    function versionCreated()
+    public function versionCreated()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function formatVersionCreated()
+    public function formatVersionCreated()
     {
         try {
             $v = $this->versionCreated();
@@ -250,7 +250,7 @@ class Wicked_Page
         return _("Never");
     }
 
-    function author()
+    public function author()
     {
         if (isset($this->_page['change_author'])) {
             $modify = $this->_page['change_author'];
@@ -267,12 +267,12 @@ class Wicked_Page
         return $modify;
     }
 
-    function hits()
+    public function hits()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function version()
+    public function version()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
@@ -284,7 +284,7 @@ class Wicked_Page
      *                 is the first version.
      * @throws Wicked_Exception
      */
-    function previousVersion()
+    public function previousVersion()
     {
         global $wicked;
 
@@ -319,7 +319,7 @@ class Wicked_Page
                        $history[$i]['page_minorversion']);
     }
 
-    function isOld()
+    public function isOld()
     {
         return false;
     }
@@ -331,7 +331,7 @@ class Wicked_Page
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         // Get content first, it might throw an exception.
         $inner = $this->displayContents(false);
@@ -349,7 +349,7 @@ class Wicked_Page
      * $param integer $mode    The page render mode.
      * $param array   $params  Any page parameters.
      */
-    function preDisplay($mode, $params)
+    public function preDisplay($mode, $params)
     {
     }
 
@@ -361,12 +361,12 @@ class Wicked_Page
      * @return string  The content.
      * @throws Wicked_Exception
      */
-    function block()
+    public function block()
     {
         return $this->displayContents(true);
     }
 
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
@@ -374,7 +374,7 @@ class Wicked_Page
     /**
      * Renders this page in remove mode.
      */
-    function remove()
+    public function remove()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
@@ -382,7 +382,7 @@ class Wicked_Page
     /**
      * Renders this page in history mode.
      */
-    function history()
+    public function history()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
@@ -390,12 +390,12 @@ class Wicked_Page
     /**
      * Renders this page in diff mode.
      */
-    function diff()
+    public function diff()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function &getProcessor($output_format = 'Xhtml')
+    public function &getProcessor($output_format = 'Xhtml')
     {
         if (isset($this->_proc)) {
             return $this->_proc;
@@ -475,7 +475,7 @@ class Wicked_Page
         return $this->_proc;
     }
 
-    function render($mode, $params = null)
+    public function render($mode, $params = null)
     {
         switch ($mode) {
         case Wicked::MODE_CONTENT:
@@ -501,42 +501,42 @@ class Wicked_Page
         }
     }
 
-    function isLocked()
+    public function isLocked()
     {
         return false;
     }
 
-    function lock()
+    public function lock()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function unlock()
+    public function unlock()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function updateText($newtext, $changelog, $minorchange)
+    public function updateText($newtext, $changelog, $minorchange)
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function getText()
+    public function getText()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
 
-    function pageName()
+    public function pageName()
     {
         return null;
     }
 
-    function referrer()
+    public function referrer()
     {
         return null;
     }
 
-    function pageUrl($linkpage = null, $actionId = null)
+    public function pageUrl($linkpage = null, $actionId = null)
     {
         $params = array('page' => $this->pageName());
         if ($this->referrer()) {
@@ -556,12 +556,12 @@ class Wicked_Page
         return Horde_Util::addParameter($url, $params);
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return $this->pageName();
     }
 
-    function handleAction()
+    public function handleAction()
     {
         throw new Wicked_Exception(_("Unsupported"));
     }
index 0f398c9..f89745a 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_AddPage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true);
 
     /**
@@ -25,15 +25,15 @@ class Wicked_Page_AddPage extends Wicked_Page {
      *
      * @var string
      */
-    var $_newpage;
+    protected $_newpage;
 
     /**
      * Cached search results.
      * @var array
      */
-    var $_results;
+    protected $_results;
 
-    function __construct($newpage)
+    public function __construct($newpage)
     {
         $this->_newpage = $newpage;
         $this->_results = $GLOBALS['wicked']->searchTitles($newpage);
@@ -42,7 +42,7 @@ class Wicked_Page_AddPage extends Wicked_Page {
     /**
      * Bail out if there's no page name.
      */
-    function preDisplay()
+    public function preDisplay()
     {
         if (!strlen($this->referrer())) {
             $GLOBALS['notification']->push(_("Page name must not be empty"));
@@ -55,7 +55,7 @@ class Wicked_Page_AddPage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         try {
             $templates = $GLOBALS['wicked']->getMatchingPages('Template', Wicked_Page::MATCH_ENDS);
@@ -91,17 +91,17 @@ class Wicked_Page_AddPage extends Wicked_Page {
         require WICKED_TEMPLATES . '/edit/create.inc';
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'AddPage';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return sprintf(_("Add Page: %s"), $this->referrer());
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_newpage;
     }
index d920817..1bc4a41 100644 (file)
@@ -15,7 +15,7 @@ class Wicked_Page_AllPages extends Wicked_Page {
     /**
      * Display modes supported by this page.
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -24,7 +24,7 @@ class Wicked_Page_AllPages extends Wicked_Page {
      *
      * @return string  The page content.
      */
-    function content()
+    public function content()
     {
         return $GLOBALS['wicked']->getAllPages();
     }
@@ -35,7 +35,7 @@ class Wicked_Page_AllPages extends Wicked_Page {
      * @return string  The page contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $template = $GLOBALS['injector']->createInstance('Horde_Template');
         $pages = array();
@@ -64,12 +64,12 @@ class Wicked_Page_AllPages extends Wicked_Page {
         return $contents;
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'AllPages';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("All Pages");
     }
index 0846dfb..18f31e2 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_EDIT => true,
         Wicked::MODE_REMOVE => true,
@@ -28,12 +28,12 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
     /**
      * Constructor.
      */
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -43,7 +43,7 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -53,7 +53,7 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function content()
+    public function content()
     {
         global $wicked, $notification;
 
@@ -90,7 +90,7 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         global $registry, $wicked, $notification, $conf;
 
@@ -145,17 +145,17 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
         echo $template->fetch(WICKED_TEMPLATES . '/display/AttachedFiles.html');
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'AttachedFiles';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return sprintf(_("Attached Files: %s"), $this->referrer());
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
@@ -163,7 +163,7 @@ class Wicked_Page_AttachedFiles extends Wicked_Page {
     /**
      * Retrieves the form fields and processes the attachment.
      */
-    function handleAction()
+    public function handleAction()
     {
         global $notification, $wicked, $registry, $conf;
 
index 5722baf..be6c6d2 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_BackLinks extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true);
 
     /**
@@ -25,9 +25,9 @@ class Wicked_Page_BackLinks extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -38,7 +38,7 @@ class Wicked_Page_BackLinks extends Wicked_Page {
      * @return string  The contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $summaries = $GLOBALS['wicked']->getBackLinks($this->_referrer);
         Horde::addScriptFile('tables.js', 'horde', true);
@@ -56,17 +56,17 @@ class Wicked_Page_BackLinks extends Wicked_Page {
         return ob_get_clean();
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'BackLinks';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return sprintf(_("Backlinks: %s"), $this->referrer());
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
index efbfe81..d37818d 100644 (file)
@@ -21,16 +21,16 @@ class Wicked_Page_DeletePage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(Wicked::MODE_DISPLAY => true);
+    public $supportedModes = array(Wicked::MODE_DISPLAY => true);
 
     /**
      * The page that we're confirming deletion for.
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -40,7 +40,7 @@ class Wicked_Page_DeletePage extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -49,7 +49,7 @@ class Wicked_Page_DeletePage extends Wicked_Page {
      * Send them back whence they came if they aren't allowed to
      * delete this page.
      */
-    function preDisplay()
+    public function preDisplay()
     {
         $page = Wicked_Page::getPage($this->referrer());
         if (!$page->allows(Wicked::MODE_REMOVE)) {
@@ -62,7 +62,7 @@ class Wicked_Page_DeletePage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         $version = Horde_Util::getFormData('version');
         $page = Wicked_Page::getPage($this->referrer(), $version);
@@ -100,22 +100,22 @@ class Wicked_Page_DeletePage extends Wicked_Page {
 <?php
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'DeletePage';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Delete Page");
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
 
-    function handleAction()
+    public function handleAction()
     {
         $pagename = $this->referrer();
         $page = Wicked_Page::getPage($pagename);
index b5531d9..8b1986c 100644 (file)
@@ -20,7 +20,7 @@ class Wicked_Page_EditPage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true,
         Wicked::MODE_EDIT => true);
 
@@ -29,9 +29,9 @@ class Wicked_Page_EditPage extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
         if ($GLOBALS['conf']['lock']['driver'] != 'none') {
@@ -49,7 +49,7 @@ class Wicked_Page_EditPage extends Wicked_Page {
      *
      * @return boolean  True if the mode is allowed.
      */
-    function allows($mode)
+    public function allows($mode)
     {
         if ($mode == Wicked::MODE_EDIT) {
             $page = Wicked_Page::getPage($this->referrer());
@@ -65,7 +65,7 @@ class Wicked_Page_EditPage extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -74,7 +74,7 @@ class Wicked_Page_EditPage extends Wicked_Page {
      * Send them back whence they came if they aren't allowed to edit
      * this page.
      */
-    function preDisplay()
+    public function preDisplay()
     {
         if (!$this->allows(Wicked::MODE_EDIT)) {
             Wicked::url($this->referrer(), true)->redirect();
@@ -97,7 +97,7 @@ class Wicked_Page_EditPage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         $page = Wicked_Page::getPage($this->referrer());
         $page_text = Horde_Util::getFormData('page_text');
@@ -107,40 +107,40 @@ class Wicked_Page_EditPage extends Wicked_Page {
         require WICKED_TEMPLATES . '/edit/standard.inc';
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'EditPage';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Edit Page");
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
 
-    function isLocked()
+    public function isLocked()
     {
         $page = Wicked_Page::getPage($this->referrer());
         return $page->isLocked();
     }
 
-    function getLockRequestor()
+    public function getLockRequestor()
     {
         $page = Wicked_Page::getPage($this->referrer());
         return $page->getLockRequestor();
     }
 
-    function getLockTime()
+    public function getLockTime()
     {
         $page = Wicked_Page::getPage($this->referrer());
         return $page->getLockTime();
     }
 
-    function handleAction()
+    public function handleAction()
     {
         global $notification, $conf;
 
index c2596fe..a0fed02 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_LeastPopular extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -28,7 +28,7 @@ class Wicked_Page_LeastPopular extends Wicked_Page {
      *
      * @return string  The page contents.
      */
-    function content($numPages = 10)
+    public function content($numPages = 10)
     {
         return $GLOBALS['wicked']->leastPopular($numPages);
     }
@@ -39,7 +39,7 @@ class Wicked_Page_LeastPopular extends Wicked_Page {
      * @return string  The content.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $template = $GLOBALS['injector']->createInstance('Horde_Template');
         $pages = array();
@@ -68,12 +68,12 @@ class Wicked_Page_LeastPopular extends Wicked_Page {
         return $content;
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'LeastPopular';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Least Popular");
     }
index 4ccb80c..da3e023 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_LikePages extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true);
 
     /**
@@ -25,9 +25,9 @@ class Wicked_Page_LikePages extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -38,7 +38,7 @@ class Wicked_Page_LikePages extends Wicked_Page {
      * @return string  The contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $referrer = $this->referrer();
         $summaries = $GLOBALS['wicked']->getLikePages($referrer);
@@ -57,17 +57,17 @@ class Wicked_Page_LikePages extends Wicked_Page {
         return ob_get_clean();
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'LikePages';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return sprintf(_("Similar Pages: %s"), $this->referrer());
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
index f2f2009..d554321 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_EDIT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -26,16 +26,16 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
     /**
      * Validation errors.
      *
      * @var string
      */
-    var $_errors = array();
+    protected $_errors = array();
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -50,7 +50,7 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
      *
      * @return boolean  True if the mode is allowed.
      */
-    function allows($mode)
+    public function allows($mode)
     {
         if ($mode == Wicked::MODE_EDIT) {
             if (!parent::allows(Wicked::MODE_REMOVE)) {
@@ -69,7 +69,7 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -79,7 +79,7 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         global $wicked, $registry, $notification;
 
@@ -127,17 +127,17 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
         return true;
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'MergeOrRename';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return sprintf(_("Merge/Rename: %s"), $this->referrer());
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
@@ -145,7 +145,7 @@ class Wicked_Page_MergeOrRename extends Wicked_Page {
     /**
      * Retrieve the form fields and process the merge or rename.
      */
-    function handleAction()
+    public function handleAction()
     {
         global $wicked, $notification, $registry;
 
index ed9a3cf..0c86c87 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_MostPopular extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -28,7 +28,7 @@ class Wicked_Page_MostPopular extends Wicked_Page {
      *
      * @return string  The page content.
      */
-    function content($numPages = 10)
+    public function content($numPages = 10)
     {
         return $GLOBALS['wicked']->mostPopular($numPages);
     }
@@ -39,7 +39,7 @@ class Wicked_Page_MostPopular extends Wicked_Page {
      * @return string  The content.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $template = $GLOBALS['injector']->createInstance('Horde_Template');
         $pages = array();
@@ -68,12 +68,12 @@ class Wicked_Page_MostPopular extends Wicked_Page {
         return $contents;
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'MostPopular';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Most Popular");
     }
index 427f9d3..9f07ecf 100644 (file)
@@ -21,7 +21,7 @@ class Wicked_Page_NewPage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true,
         Wicked::MODE_EDIT => true);
 
@@ -30,16 +30,16 @@ class Wicked_Page_NewPage extends Wicked_Page {
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
     /**
      * Page template to use.
      *
      * @var string
      */
-    var $_template = null;
+    protected $_template = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
         $this->_template = Horde_Util::getFormData('template');
@@ -50,7 +50,7 @@ class Wicked_Page_NewPage extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -59,7 +59,7 @@ class Wicked_Page_NewPage extends Wicked_Page {
      * Send them back whence they came if they aren't allowed to edit
      * this page.
      */
-    function preDisplay()
+    public function preDisplay()
     {
         if (!strlen($this->referrer())) {
             $GLOBALS['notification']->push(_("Page name must not be empty"));
@@ -76,7 +76,7 @@ class Wicked_Page_NewPage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         // Load the page template.
         if ($this->_template) {
@@ -94,22 +94,22 @@ class Wicked_Page_NewPage extends Wicked_Page {
         return true;
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'NewPage';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("New Page");
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
 
-    function handleAction()
+    public function handleAction()
     {
         global $notification, $wicked;
 
index 4d380ec..6f5cdd4 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_RecentChanges extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -27,7 +27,7 @@ class Wicked_Page_RecentChanges extends Wicked_Page {
      * @return string  The page content.
      * @throws Wicked_Exception
      */
-    function content()
+    public function content()
     {
         global $wicked;
 
@@ -84,19 +84,19 @@ class Wicked_Page_RecentChanges extends Wicked_Page {
      * @return string  The contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $template = $GLOBALS['injector']->createInstance('Horde_Template');
         $template->set('changes', $this->content());
         return $template->fetch(WICKED_TEMPLATES . '/display/RecentChanges.html');
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'RecentChanges';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Recent Changes");
     }
index 2b8bb20..4dba25d 100644 (file)
@@ -17,16 +17,16 @@ class Wicked_Page_RevertPage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(Wicked::MODE_DISPLAY => true);
+    public $supportedModes = array(Wicked::MODE_DISPLAY => true);
 
     /**
      * The page that we're confirming reversion for.
      *
      * @var string
      */
-    var $_referrer = null;
+    protected $_referrer = null;
 
-    function __construct($referrer)
+    public function __construct($referrer)
     {
         $this->_referrer = $referrer;
     }
@@ -36,7 +36,7 @@ class Wicked_Page_RevertPage extends Wicked_Page {
      *
      * @return integer  The permissions bitmask.
      */
-    function getPermissions()
+    public function getPermissions()
     {
         return parent::getPermissions($this->referrer());
     }
@@ -45,7 +45,7 @@ class Wicked_Page_RevertPage extends Wicked_Page {
      * Send them back whence they came if they aren't allowed to
      * edit this page.
      */
-    function preDisplay()
+    public function preDisplay()
     {
         $page = Wicked_Page::getPage($this->referrer());
         if (!$page->allows(Wicked::MODE_EDIT)) {
@@ -58,7 +58,7 @@ class Wicked_Page_RevertPage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display()
+    public function display()
     {
         $version = Horde_Util::getFormData('version');
         $page = Wicked_Page::getPage($this->referrer(), $version);
@@ -87,22 +87,22 @@ class Wicked_Page_RevertPage extends Wicked_Page {
 <?php
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'RevertPage';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Revert Page");
     }
 
-    function referrer()
+    public function referrer()
     {
         return $this->_referrer;
     }
 
-    function handleAction()
+    public function handleAction()
     {
         global $notification;
 
index 7d6bd9a..6c658fc 100644 (file)
@@ -16,7 +16,7 @@ class Wicked_Page_Search extends Wicked_Page {
      * Display modes supported by this page.
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
@@ -25,7 +25,7 @@ class Wicked_Page_Search extends Wicked_Page {
      *
      * @var array
      */
-    var $_results = array();
+    protected $_results = array();
 
     /**
      * Renders this page in content mode.
@@ -34,7 +34,7 @@ class Wicked_Page_Search extends Wicked_Page {
      *
      * @return string  The page content.
      */
-    function content($searchtext = '')
+    public function content($searchtext = '')
     {
         if (empty($searchtext)) {
             return array();
@@ -54,7 +54,7 @@ class Wicked_Page_Search extends Wicked_Page {
      * $param integer $mode    The page render mode.
      * $param array   $params  Any page parameters.
      */
-    function preDisplay($mode, $params)
+    public function preDisplay($mode, $params)
     {
         $this->_results = $this->content($params);
     }
@@ -66,7 +66,7 @@ class Wicked_Page_Search extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function display($searchtext)
+    public function display($searchtext)
     {
         global $notification;
 
@@ -172,7 +172,7 @@ class Wicked_Page_Search extends Wicked_Page {
         return true;
     }
 
-    function getContext($page, $searchtext)
+    public function getContext($page, $searchtext)
     {
         if (preg_match('/.{0,100}' . preg_quote($searchtext, '/') . '.{0,100}/i', $page->getText(), $context)) {
             return preg_replace('/' . preg_quote($searchtext, '/') . '/i', '<span class="match">' . htmlspecialchars($searchtext) . '</span>', htmlspecialchars($context[0]));
@@ -180,12 +180,12 @@ class Wicked_Page_Search extends Wicked_Page {
         return '';
     }
 
-    function pageName()
+    public function pageName()
     {
         return 'Search';
     }
 
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Search");
     }
index 24388a4..dcfab6d 100644 (file)
@@ -12,7 +12,7 @@ class Wicked_Page_StandardHistoryPage extends Wicked_Page_StandardPage {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true,
         Wicked::MODE_EDIT => false,
         Wicked::MODE_REMOVE => true,
@@ -30,7 +30,7 @@ class Wicked_Page_StandardHistoryPage extends Wicked_Page_StandardPage {
      *
      * @throws Wicked_Exception
      */
-    function __construct($pagename, $version = null)
+    public function __construct($pagename, $version = null)
     {
         if (empty($version)) {
             parent::__construct($pagename);
@@ -48,12 +48,12 @@ class Wicked_Page_StandardHistoryPage extends Wicked_Page_StandardPage {
         $this->_page = $pages[0];
     }
 
-    function isOld()
+    public function isOld()
     {
         return true;
     }
 
-    function pageUrl($linkpage = null, $actionId = null)
+    public function pageUrl($linkpage = null, $actionId = null)
     {
         return Horde_Util::addParameter(parent::pageUrl($linkpage, $actionId), 'version', $this->version());
     }
index acf459e..14e7232 100644 (file)
@@ -17,7 +17,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
      *
      * @var array
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_DISPLAY => true,
         Wicked::MODE_EDIT => true,
         Wicked::MODE_REMOVE => true,
@@ -29,21 +29,21 @@ class Wicked_Page_StandardPage extends Wicked_Page {
      *
      * @var Horde_Lock
      */
-    var $_locks = null;
+    protected $_locks = null;
 
     /**
      * Lock information if this page is currently locked.
      *
      * @var array
      */
-    var $_lock = null;
+    protected $_lock = null;
 
     /**
      * Constructs a standard page class to represent a wiki page.
      *
      * @param string $pagename The name of the page to represent.
      */
-    function __construct($pagename)
+    public function __construct($pagename)
     {
         if (is_array($pagename)) {
             $this->_page = $pagename;
@@ -126,7 +126,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
      *
      * @return boolean  True if the mode is allowed.
      */
-    function allows($mode)
+    public function allows($mode)
     {
         switch ($mode) {
         case Wicked::MODE_EDIT:
@@ -162,7 +162,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
     /**
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         $wiki = $this->getProcessor();
         $text = $wiki->transform($this->getText());
@@ -190,7 +190,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function history()
+    public function history()
     {
         try {
             $summaries = $GLOBALS['wicked']->getHistory($this->pageName());
@@ -225,7 +225,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         require WICKED_TEMPLATES . '/history/footer.inc';
     }
 
-    function isLocked($owner = null)
+    public function isLocked($owner = null)
     {
         if (empty($this->_lock)) {
             return false;
@@ -239,7 +239,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
     /**
      * @throws Wicked_Exception
      */
-    function lock()
+    public function lock()
     {
         if ($this->_locks) {
             $id = $this->_locks->setLock(Wicked::lockUser(), 'wicked', $this->pageName(), $GLOBALS['conf']['wicked']['lock']['time'] * 60, Horde_Lock::TYPE_EXCLUSIVE);
@@ -251,7 +251,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         }
     }
 
-    function unlock()
+    public function unlock()
     {
         if ($this->_locks && $this->_lock) {
             $this->_locks->clearLock($this->_lock['lock_id']);
@@ -259,7 +259,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         }
     }
 
-    function getLockRequestor()
+    public function getLockRequestor()
     {
         $requestor = $this->_lock['lock_owner'];
         if ($requestor) {
@@ -275,7 +275,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         return _("a guest");
     }
 
-    function getLockTime()
+    public function getLockTime()
     {
         $time = ceil(($this->_lock['lock_expiry_timestamp'] - time()) / 60);
         return sprintf(ngettext("%d minute", "%d minutes", $time), $time);
@@ -284,7 +284,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
     /**
      * @throws Wicked_Exception
      */
-    function updateText($newtext, $changelog, $minorchange)
+    public function updateText($newtext, $changelog, $minorchange)
     {
         $version = $this->version();
         $result = $GLOBALS['wicked']->updateText($this->pageName(), $newtext,
@@ -305,45 +305,45 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         $this->_page['page_text'] = $newtext;
     }
 
-    function pageID()
+    public function pageID()
     {
         return isset($this->_page['page_id']) ? $this->_page['page_id'] : '';
     }
 
-    function pageName()
+    public function pageName()
     {
         return isset($this->_page['page_name'])
             ? $this->_page['page_name']
             : '';
     }
 
-    function getText()
+    public function getText()
     {
         return isset($this->_page['page_text'])
             ? $this->_page['page_text']
             : '';
     }
 
-    function versionCreated()
+    public function versionCreated()
     {
         return isset($this->_page['version_created'])
             ? $this->_page['version_created']
             : '';
     }
 
-    function hits()
+    public function hits()
     {
         return !empty($this->_page['page_hits'])
             ? $this->_page['page_hits']
             : 0;
     }
 
-    function changeLog()
+    public function changeLog()
     {
         return $this->_page['change_log'];
     }
 
-    function version()
+    public function version()
     {
         if (isset($this->_page['page_majorversion']) &&
             isset($this->_page['page_minorversion'])) {
@@ -354,7 +354,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
         }
     }
 
-    function diff($version)
+    public function diff($version)
     {
         require WICKED_TEMPLATES . '/diff/diff.inc';
     }
@@ -366,7 +366,7 @@ class Wicked_Page_StandardPage extends Wicked_Page {
      *                          `before the beginning' (empty).
      * @param string $renderer  The diff renderer.
      */
-    function getDiff($version, $renderer = 'unified')
+    public function getDiff($version, $renderer = 'unified')
     {
         if (is_null($version)) {
             $old_page_text = '';
index cf7ddc5..68463e0 100644 (file)
@@ -15,21 +15,21 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
     /**
      * Display modes supported by this page.
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true,
         Wicked::MODE_DISPLAY => true);
 
     /**
      * Sync driver
      */
-    var $_sync;
+    protected $_sync;
 
     /**
      * Working page
      */
-    var $_pageName;
+    protected $_pageName;
 
-    function __construct()
+    public function __construct()
     {
         parent::__construct();
         $this->_pageName = Horde_Util::getGet('sync_page');
@@ -40,7 +40,7 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
      *
      * @throws Wicked_Exception
      */
-    function content()
+    public function content()
     {
         if (!$this->_loadSyncDriver()) {
             throw new Wicked_Exception(_("Synchronization is disabled"));
@@ -83,7 +83,7 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
      * @return string  The page contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         return $this->content();
     }
@@ -91,7 +91,7 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
     /**
      * Page name
      */
-    function pageName()
+    public function pageName()
     {
         return 'SyncDiff';
     }
@@ -99,7 +99,7 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
     /**
      * Page title
      */
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Sync Diff");
     }
@@ -110,7 +110,7 @@ class Wicked_Page_SyncDiff extends Wicked_Page_SyncPages {
      *
      * @throws Wicked_Exception
      */
-    function _getSameVersion()
+    protected function _getSameVersion()
     {
         $local = $GLOBALS['wicked']->getHistory($this->_pageName);
         $info = $this->getLocalPageInfo($this->_pageName);
index 7761bb8..0f38d23 100644 (file)
@@ -15,20 +15,20 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Display modes supported by this page.
      */
-    var $supportedModes = array(
+    public $supportedModes = array(
         Wicked::MODE_CONTENT => true);
 
     /**
      * Sync driver
      */
-    var $_sync;
+    protected $_sync;
 
     /**
      * Constructor
      *
      * @throws Wicked_Exception
      */
-    function __construct()
+    public function __construct()
     {
         $this->_loadSyncDriver();
 
@@ -50,7 +50,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      * @return string  The page content.
      * @throws Wicked_Exception
      */
-    function content()
+    public function content()
     {
         global $wicked;
 
@@ -131,7 +131,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      * @return string  The contents.
      * @throws Wicked_Exception
      */
-    function displayContents($isBlock)
+    public function displayContents($isBlock)
     {
         return $this->content();
     }
@@ -139,7 +139,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Page name
      */
-    function pageName()
+    public function pageName()
     {
         return 'SyncPages';
     }
@@ -147,7 +147,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Page title
      */
-    function pageTitle()
+    public function pageTitle()
     {
         return _("Sync Pages");
     }
@@ -155,7 +155,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Prepare page link
      */
-    function _viewLink($pageName, $local = true)
+    protected function _viewLink($pageName, $local = true)
     {
         if ($local) {
             return  '<a href="' .  Wicked::url($pageName) . '" target="_blank">' . _("View local") . '</a>';
@@ -169,7 +169,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function _syncForm()
+    protected function _syncForm()
     {
         require_once 'Horde/Form.php';
 
@@ -296,7 +296,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      *
      * @param boolean $local Get local or remote info
      */
-    function getLocalPageInfo($pageName)
+    public function getLocalPageInfo($pageName)
     {
         $page = Wicked_Page::getPage($pageName);
         return array(
@@ -316,7 +316,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function getRemotePageInfo($pageName)
+    public function getRemotePageInfo($pageName)
     {
         if (!isset($_SESSION['wicked']['sync']['pages'][$pageName])) {
             $_SESSION['wicked']['sync']['pages'][$pageName] = $this->_sync->getPageInfo($pageName);
@@ -329,7 +329,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
      *
      * @throws Wicked_Exception
      */
-    function download($pageName)
+    public function download($pageName)
     {
         $text = $this->_sync->getPageSource($pageName);
         $page = Wicked_Page::getPage($pageName);
@@ -361,7 +361,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Upload local page to remote server
      */
-    function upload($pageName)
+    public function upload($pageName)
     {
         $page = Wicked_Page::getPage($pageName);
         $content = $page->getText();
@@ -375,7 +375,7 @@ class Wicked_Page_SyncPages extends Wicked_Page {
     /**
      * Load sync driver
      */
-    function _loadSyncDriver()
+    protected function _loadSyncDriver()
     {
         if ($this->_sync) {
             return true;
index e25909c..8505245 100644 (file)
@@ -18,7 +18,7 @@ abstract class Wicked_Sync {
      *
      * @var array
      */
-    var $_params = array();
+    protected $_params = array();
 
     /**
      * Attempts to return a concrete Wicked_Sync instance based on $driver.
@@ -34,7 +34,7 @@ abstract class Wicked_Sync {
      * @return Wicked_Sync    The newly created concrete Wicked_Sync
      *                        instance, or false on an error.
      */
-    function factory($driver = 'Wicked', $params = array())
+    public function factory($driver = 'Wicked', $params = array())
     {
         $driver = Horde_String::ucfirst(basename($driver));
         $class = 'Wicked_Sync_' . $driver;
@@ -57,7 +57,7 @@ abstract class Wicked_Sync {
      *
      * @param array $params  A hash containing connection parameters.
      */
-    function __construct($params = array())
+    public function __construct($params = array())
     {
         $this->_params = $params;
     }
index 02bd9af..b36bd02 100644 (file)
@@ -22,14 +22,14 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      *
      * @return array  An array of all available pages.
      */
-    var $_client;
+    protected $_client;
 
     /**
      * Returns a list of available pages.
      *
      * @return array  An array of all available pages.
      */
-    function listPages()
+    public function listPages()
     {
         return $this->_getData('list');
     }
@@ -42,7 +42,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      * @return string  Page data.
      * @throws Wicked_Exception
      */
-    function getPageSource($pageName)
+    public function getPageSource($pageName)
     {
         return $this->_getData('getPageSource', array($pageName));
     }
@@ -55,7 +55,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      * @return array  Page data.
      * @throws Wicked_Exception
      */
-    function getPageInfo($pageName)
+    public function getPageInfo($pageName)
     {
         return $this->_getData('getPageInfo', array($pageName));
     }
@@ -68,7 +68,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      * @return array  Pages data.
      * @throws Wicked_Exception
      */
-    function getMultiplePageInfo($pages = array())
+    public function getMultiplePageInfo($pages = array())
     {
         return $this->_getData('getMultiplePageInfo', array($pages));
     }
@@ -80,7 +80,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      *
      * @return array  An array of page parameters.
      */
-    function getPageHistory($pagename)
+    public function getPageHistory($pagename)
     {
         return $this->_getData('getPageHistory', array($pagename));
     }
@@ -96,7 +96,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      *
      * @throws Wicked_Exception
      */
-    function editPage($pagename, $text, $changelog = '', $minorchange = false)
+    public function editPage($pagename, $text, $changelog = '', $minorchange = false)
     {
         $this->_getData('edit', array($pagename, $text, $changelog, $minorchange));
     }
@@ -110,7 +110,7 @@ class Wicked_Sync_Wicked extends Wicked_Sync {
      * @return mixed
      * @throws Wicked_Exception
      */
-    function _getData($method, $params = array())
+    protected function _getData($method, $params = array())
     {
         try {
             return Horde_Rpc::request(
index cff5d5f..e709a1f 100644 (file)
@@ -5,17 +5,17 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Parse_Attribute extends Text_Wiki_Parse {
-
+class Text_Wiki_Parse_Attribute extends Text_Wiki_Parse
+{
     /**
      * The regular expression used to find source text matching this rule (this
      * is set in the constructor).
      *
      * @var string
      */
-    var $regex;
+    public $regex;
 
-    function Text_Wiki_Parse_Attribute(&$obj)
+    public function __construct(&$obj)
     {
         parent::Text_Wiki_Parse($obj);
 
@@ -34,7 +34,7 @@ class Text_Wiki_Parse_Attribute extends Text_Wiki_Parse {
      * @return  A delimited token number to be used as a placeholder in
      *          the source text.
      */
-    function process(&$matches)
+    public function process(&$matches)
     {
         $options = array('attributes' => array());
 
@@ -49,5 +49,4 @@ class Text_Wiki_Parse_Attribute extends Text_Wiki_Parse {
 
         return $this->wiki->addToken($this->rule, $options);
     }
-
 }
index 530577f..87cc0f0 100644 (file)
@@ -7,6 +7,7 @@ require_once 'Text/Wiki/Parse/Default/Code.php';
  *
  * @package Wicked
  */
-class Text_Wiki_Parse_Code2 extends Text_Wiki_Parse_Code {
-    var $regex = ';^<code(\s[^>]*)?>(.*?)\n</code>(\s|$);msi';
+class Text_Wiki_Parse_Code2 extends Text_Wiki_Parse_Code
+{
+    public $regex = ';^<code(\s[^>]*)?>(.*?)\n</code>(\s|$);msi';
 }
index a31734d..80d49c2 100644 (file)
@@ -6,8 +6,8 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Parse_Registrylink extends Text_Wiki_Parse {
-
+class Text_Wiki_Parse_Registrylink extends Text_Wiki_Parse
+{
     /**
      * The regular expression used to find registry links.
      *
@@ -15,7 +15,7 @@ class Text_Wiki_Parse_Registrylink extends Text_Wiki_Parse {
      *
      * @var string
      */
-    var $regex = "/\[\[link (.*)\]\]/sU";
+    public $regex = "/\[\[link (.*)\]\]/sU";
 
     /**
      * Generates a token entry for the matched text. Token options are:
@@ -30,7 +30,7 @@ class Text_Wiki_Parse_Registrylink extends Text_Wiki_Parse {
      * @return  A delimited token number to be used as a placeholder in
      *          the source text.
      */
-    function process(&$matches)
+    public function process(&$matches)
     {
         @list($title, $call) = explode('|', $matches[1], 2);
         $opts = explode(' ', trim($call));
@@ -41,5 +41,4 @@ class Text_Wiki_Parse_Registrylink extends Text_Wiki_Parse {
                                                         'method' => $method,
                                                         'args' => $args));
     }
-
 }
index cc42153..f79af97 100644 (file)
@@ -5,8 +5,8 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Parse_Wickedblock extends Text_Wiki_Parse {
-
+class Text_Wiki_Parse_Wickedblock extends Text_Wiki_Parse
+{
     /**
      * The regular expression used to find blocks.
      *
@@ -14,7 +14,7 @@ class Text_Wiki_Parse_Wickedblock extends Text_Wiki_Parse {
      *
      * @var string
      */
-    var $regex = "/\[\[block (.*)?\]\]/sU";
+    public $regex = "/\[\[block (.*)?\]\]/sU";
 
     /**
      * Generates a token entry for the matched text. Token options are:
@@ -29,8 +29,7 @@ class Text_Wiki_Parse_Wickedblock extends Text_Wiki_Parse {
      * @return  A delimited token number to be used as a placeholder in
      *          the source text.
      */
-    function process(&$matches)
+    public function process(&$matches)
     {
     }
-
 }
index dae5d5d..91acea9 100644 (file)
@@ -2,8 +2,8 @@
 /**
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Attribute extends Text_Wiki_Render {
-
+class Text_Wiki_Render_Xhtml_Attribute extends Text_Wiki_Render
+{
     /**
      * Renders a token into text matching the requested format.
      *
@@ -12,7 +12,7 @@ class Text_Wiki_Render_Xhtml_Attribute extends Text_Wiki_Render {
      *
      * @return string  The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         $output = '<table width="100%" class="attributes"><tbody>';
 
@@ -50,5 +50,4 @@ class Text_Wiki_Render_Xhtml_Attribute extends Text_Wiki_Render {
 
         return $output;
     }
-
 }
index 1d0dbd4..600c191 100644 (file)
@@ -12,7 +12,7 @@ class Text_Wiki_Render_Xhtml_Code2 extends Text_Wiki_Render_Xhtml_Code
      *
      * @return string The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         $type = $options['attr']['type'];
 
index d1f2a0d..363596d 100644 (file)
@@ -4,9 +4,9 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Image2 extends Text_Wiki_Render {
-
-    var $conf = array(
+class Text_Wiki_Render_Xhtml_Image2 extends Text_Wiki_Render
+{
+    public $conf = array(
         'base' => '',
         'url_base' => null,
         'css'  => null,
@@ -21,7 +21,7 @@ class Text_Wiki_Render_Xhtml_Image2 extends Text_Wiki_Render {
      *
      * @return string  The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         if (!isset($options['attr']['alt'])) {
             $options['attr']['alt'] = $options['src'];
@@ -71,7 +71,7 @@ class Text_Wiki_Render_Xhtml_Image2 extends Text_Wiki_Render {
      *
      * @return string The text rendered from the token options.
      */
-    function _token($options)
+    protected function _token($options)
     {
         // note the image source
         $src = $options['src'];
@@ -151,5 +151,4 @@ class Text_Wiki_Render_Xhtml_Image2 extends Text_Wiki_Render {
 
         return $output;
     }
-
 }
index c6b01e2..cdf0483 100644 (file)
@@ -2,9 +2,9 @@
 /**
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render {
-
-    var $conf = array(
+class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render
+{
+    public $conf = array(
         'sites' => array(
             'MeatBall' => 'http://www.usemod.com/cgi-bin/mb.pl?%s',
             'Advogato' => 'http://advogato.org/%s',
@@ -22,7 +22,7 @@ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render {
      *
      * @return string  The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         $site = $options['site'];
         $page = $options['page'];
@@ -53,5 +53,4 @@ class Text_Wiki_Render_Xhtml_Interwiki extends Text_Wiki_Render {
 
         return '<a' . $target . ' href="' . Horde::externalUrl($href) . '">' . $text . '</a>';
     }
-
 }
index 60f1ca4..5dabe4f 100644 (file)
@@ -4,8 +4,8 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render {
-
+class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render
+{
     /**
      * Renders a token into text matching the requested format.
      *
@@ -16,7 +16,7 @@ class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render {
      *
      * @return string The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         try {
             $link = new Horde_Url($GLOBALS['registry']->link($options['method'], $options['args']));
@@ -26,5 +26,4 @@ class Text_Wiki_Render_Xhtml_Registrylink extends Text_Wiki_Render {
 
         return $link->link() . $options['title'] . '</a>';
     }
-
 }
index 0901924..722429f 100644 (file)
@@ -2,16 +2,16 @@
 /**
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
-
-    var $conf = array(
+class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render
+{
+    public $conf = array(
         'css_list' => null,
         'css_item' => null,
         'title' => '<strong>Table of Contents</strong>',
         'div_id' => 'toc',
     );
 
-    var $_last_level = null;
+    protected $_last_level = null;
 
     /**
      * Renders a token into text matching the requested format.
@@ -23,7 +23,7 @@ class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
      *
      * @return string The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         // type, id, level, count, attr.
         extract($options);
@@ -89,5 +89,4 @@ class Text_Wiki_Render_Xhtml_Toc extends Text_Wiki_Render {
             return '</a>';
         }
     }
-
 }
index 1049770..73de16f 100644 (file)
@@ -2,9 +2,9 @@
 /**
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
-
-    var $conf = array(
+class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render
+{
+    public $conf = array(
         'target' => '_blank'
     );
 
@@ -16,7 +16,7 @@ class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
      *
      * @return string  The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         // Create local variables from the options array (text, href,
         // type).
@@ -44,5 +44,4 @@ class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render {
 
         return $output;
     }
-
 }
index 83be80d..4047a9e 100644 (file)
@@ -4,8 +4,8 @@
  *
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Wickedblock extends Text_Wiki_Render {
-
+class Text_Wiki_Render_Xhtml_Wickedblock extends Text_Wiki_Render
+{
     /**
      * Renders a token into text matching the requested format.
      *
@@ -16,8 +16,7 @@ class Text_Wiki_Render_Xhtml_Wickedblock extends Text_Wiki_Render {
      *
      * @return string The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
     }
-
 }
index e959dc7..944f969 100644 (file)
@@ -5,8 +5,8 @@ require_once 'Text/Wiki/Render/Xhtml/Wikilink.php';
 /**
  * @package Wicked
  */
-class Text_Wiki_Render_Xhtml_Wikilink2 extends Text_Wiki_Render_Xhtml_Wikilink {
-
+class Text_Wiki_Render_Xhtml_Wikilink2 extends Text_Wiki_Render_Xhtml_Wikilink
+{
     /**
      * Renders a token into XHTML.
      *
@@ -17,7 +17,7 @@ class Text_Wiki_Render_Xhtml_Wikilink2 extends Text_Wiki_Render_Xhtml_Wikilink {
      *
      * @return string The text rendered from the token options.
      */
-    function token($options)
+    public function token($options)
     {
         // make nice variable names (page, anchor, text)
         extract($options);
@@ -107,5 +107,4 @@ class Text_Wiki_Render_Xhtml_Wikilink2 extends Text_Wiki_Render_Xhtml_Wikilink {
         }
         return $output;
     }
-
 }
index 7e2fe40..2f08a77 100644 (file)
@@ -6,7 +6,7 @@ class Wicked_Driver_TC extends HordeUnitTestCase {
      * Driver we are testing
      * @var object
      */
-    var $wicked;
+    public $wicked;
 
     function setUp()
     {