Changeset 1221

Show
Ignore:
Timestamp:
08/19/2008 11:10:26 AM (2 years ago)
Author:
DotMG
Message:

refs #244

documentation through phpDocumentor (docblocks) for libs/Wakka.class.php

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/libs/Wakka.class.php

    r1215 r1221  
    243243        /** 
    244244         * Constructor. 
    245          * 
    246          * @uses        Wakka::GetConfigValue() 
     245         * Database connection is established when the main class Wakka is constructed. 
     246         * 
     247         * @uses        Config::$mysql_database 
     248         * @uses        Config::$mysql_host 
     249         * @uses        Config::$mysql_password 
     250         * @uses        Config::$mysql_user 
    247251         */ 
    248252        function Wakka($config) 
     
    273277         * are added to the Query-Log. 
    274278         * 
    275          * @uses        Wakka::GetConfigValue() 
     279         * @uses        Config::$sql_debugging 
    276280         * @uses        getmicrotime() 
    277281         * 
     
    358362         * 
    359363         * @access      public 
    360          * @uses        Wakka::GetConfigValue() 
     364         * @uses        Config::$table_prefix 
    361365         * @uses        Wakka::Query() 
    362366         * 
     
    387391         * !param       integer $minor mandatory: INTERFACE CHANGE 
    388392         * !param       integer $subminor mandatory: INTERFACE CHANGE 
     393         * @uses getMysqlVersion() 
    389394         * @param       string  $min_version    optional; default: 3.23, the minimum for Wikka to run 
    390395         * @return      boolean TRUE if version is sufficient (higher or equal specified version); FALSE if not or n/a 
     
    553558         * Buffer the output from an included file. 
    554559         * 
     560         * @uses        Wakka::BuildFullpathFromMultipath() 
     561         * 
    555562         * @param       string  $filename       mandatory: name of the file to be included; 
    556563         *                                      note this may already contain a (partial) path! 
     
    697704         * Strip potentially dangerous tags from embedded HTML. 
    698705         * 
     706         * @uses        Config::$safehtml_path 
     707         * @uses        instantiate() 
     708         * @uses        SafeHTML::parse() 
     709         * 
    699710         * @param       string $html mandatory: HTML to be secured 
    700711         * @return      string sanitized HTML 
     
    726737         * @access      public 
    727738         * @uses        Wakka::Format() 
     739         * @uses        Wakka::Link() 
    728740         * 
    729741         * @param       mixed   $pages                  mandatory: Array of pages returned by LoadAll 
     
    10121024         * @version     1.0 
    10131025         * 
     1026         * @uses        Wakka::htmlspecialchars_ent() 
     1027         * 
    10141028         * @access      public 
    10151029         * 
     
    10671081         * 
    10681082         * @access      public 
    1069          * @uses        Wakka::GetConfigValue() 
     1083         * @uses        Config::$geshi_path 
     1084         * @uses        Config::$geshi_languages_path 
     1085         * @uses        Config::$geshi_header 
     1086         * @uses        Config::$geshi_line_numbers 
     1087         * @uses        Config::$geshi_tab_width 
    10701088         * @uses        GeShi 
    10711089         * 
     
    12241242         * Get the handler used on the page. 
    12251243         * 
     1244         * @uses        Wakka::$handler 
    12261245         * @return string name of the handler. 
    12271246         */ 
     
    12331252         * Get the value of a given item from the wikka config. 
    12341253         * 
    1235          * @uses        Wakka::config 
     1254         * @uses        Wakka::$config 
    12361255         * 
    12371256         * @param       $name   mandatory: name of a key in the config array 
     
    12461265         * Set the value of a given item from the wikka config. 
    12471266         * 
    1248          * @uses        Wakka::config 
     1267         * @uses        Wakka::$config 
    12491268         * 
    12501269         * @param       $name mandatory: name of a key in the config array 
     
    12581277         * Get the name of the Wiki. 
    12591278         * 
    1260          * @uses        Wakka::GetConfigValue() 
     1279         * @uses        Config::$wakka_name 
    12611280         * @return      string the name of the Wiki. 
    12621281         */ 
     
    13031322         * 
    13041323         * @access      public 
    1305          * @uses        Wakka::GetConfigValue() 
     1324         * @uses        Config::$table_prefix 
    13061325         * @uses        Wakka:LoadSingle() 
    13071326         * @uses        Wakka:CachePage() 
     
    13651384         * GetCachedPageById gets a page from cache whose id is $id. 
    13661385         * 
     1386         * @uses        Wakka::GetCachedPageById() 
    13671387         * @access      public 
    13681388         * @param       mixed   $id     the id of the page to retrieve from cache 
     
    13801400         * @see         Wakka::CachePage() 
    13811401         * @uses        Wakka::$pageCache 
    1382          * @uses        Wakka::GetConfigValue() 
    13831402         * @uses        Config::$pagename_case_sensitive 
    13841403         * 
     
    14191438         * @access      public 
    14201439         * @uses        Wakka::$pageCache 
    1421          * @uses        Wakka::GetConfigValue() 
    14221440         * @uses        Config::$pagename_case_sensitive 
    14231441         * 
     
    14441462         * @access      public 
    14451463         * @uses        Wakka::$pageCache 
    1446          * @uses        Wakka::GetConfigValue() 
    14471464         * @uses        Config::$pagename_case_sensitive 
    14481465         * 
     
    14661483         * @access      public 
    14671484         * @uses        Wakka::GetCachedPageById() 
    1468          * @uses        Wakka::GetConfigValue() 
    14691485         * @uses        Wakka::LoadSingle() 
    14701486         * @uses        Wakka::CachePage() 
    14711487         * @uses        Wakka::CacheNonExistentPage() 
     1488         * @uses        Config::$table_prefix 
    14721489         * 
    14731490         * @param       int             $id             mandatory: Id of the page to load. 
     
    15291546         * @access      public 
    15301547         * @uses        Wakka::GetUser() 
    1531          * @uses        Wakka::GetConfigValue() 
    15321548         * @uses        Wakka::LoadAll() 
    15331549         * @uses        Config::$default_revisioncount 
     1550         * @uses        Config::$table_prefix 
    15341551         * @uses        Config::$pagename_case_sensitive 
    15351552         * 
     
    16061623         * @access      public 
    16071624         * @uses        Config::$pagename_case_sensitive 
    1608          * @uses        Wakka::GetConfigValue() 
     1625         * @uses        Config::$table_prefix 
    16091626         * @uses        Wakka::$specialCache 
    1610          * @uses        Wakka::LoadSingle 
     1627         * @uses        Wakka::LoadSingle() 
    16111628         * 
    16121629         * @param       string  $tag    The name of the page to load oldest revision of. 
     
    16461663         * Load pages linking to a given page. 
    16471664         * 
     1665         * @uses        Config::$table_prefix 
     1666         * @uses        Wakka::LoadAll() 
    16481667         * @param       string  $tag    mandatory: name of page to find referring links to 
    16491668         * @return      array   one record with a page name for each page found (empty array if none found). 
     
    16621681         * Load the last x edited pages on the wiki. 
    16631682         * 
    1664          * @uses        Wakka::GetConfigValue() 
     1683         * @uses        Config::$table_prefix 
    16651684         * @uses        Wakka::LoadAll() 
     1685         * @uses        Wakka::CachePage() 
    16661686         * 
    16671687         * @param       integer $limit optional: number of edited pages to show. default: 50 
     
    17031723         * 
    17041724         * @access      public 
    1705          * @uses        Wakka::GetConfigValue() 
     1725         * @uses        Config::$table_prefix 
    17061726         * @uses        Wakka::LoadAll() 
    17071727         * 
     
    17351755                return $pages; 
    17361756        } 
     1757        /** 
     1758         * Ask if a pagename needs to be created. 
     1759         * 
     1760         * When an existing page links to a page that hasn't yet been created, this latter needs 
     1761         * to be created, or the reference needs to be deleted. 
     1762         * 
     1763         * @access      public 
     1764         * @uses        Wakka::LoadWantedPages() 
     1765         * 
     1766         * @param       string  $tag    Name of the page to ask if it needs to be created 
     1767         * @return      boolean TRUE if $tag needs to be created 
     1768         */ 
    17371769        function IsWantedPage($tag)             // #410 - but function not used in 1.1.6.3 -OR- trunk? 
    17381770        { 
     
    17511783                return $wanted; 
    17521784        } 
     1785        /** 
     1786         * Load all orphaned pages. 
     1787         * 
     1788         * Orphaned pages are existing pages that no others page on the wiki links to. 
     1789         * Thus, the only chance this page could be reached may be from search or  
     1790         * special pages like PageIndex. A good quality wiki should not have any orphaned page. 
     1791         * 
     1792         * @uses        Config::$table_prefix 
     1793         * @uses        Wakka::LoadAll() 
     1794         * @access      public 
     1795         * @return      array   List of orphaned pages 
     1796         */ 
    17531797        function LoadOrphanedPages() 
    17541798        { 
     
    17641808                return $pages; 
    17651809        } 
     1810        /** 
     1811         * Load all active page names of the wiki and their respective owners. 
     1812         * 
     1813         * @uses        Config::$table_prefix 
     1814         * @uses        Wakka::LoadAll() 
     1815         * @access      public 
     1816         * @return      array   List of all page titles (and the page owner), ordered by page name 
     1817         */ 
    17661818        function LoadPageTitles()               // @@@ name no longer matches function 
    17671819        { 
     
    17771829         * Get names of pages (tags) owned by the specified user. 
    17781830         * 
    1779          * @uses        Wakka::GetConfigValue() 
     1831         * @uses        Config::$table_prefix 
     1832         * @uses        Wakka::LoadAll() 
    17801833         * 
    17811834         * @param       string  $owner 
     
    17941847                return $pages; 
    17951848        } 
    1796         // DEPRECATED 
     1849        /** 
     1850                * LoadAllPages is deprecated because it could consume too much resources with a big wiki. 
     1851                * Use {@link Wakka::LoadPageTitles()} instead. 
     1852                * @deprecated 
     1853                * @see  Wakka::LoadPageTitles() 
     1854                */ 
    17971855        function LoadAllPages() 
    17981856        { 
     
    18081866         * Save a page. 
    18091867         * 
    1810          * @uses        Wakka::reg_username 
     1868         * @uses        Wakka::$reg_username 
    18111869         * @uses        Wakka::GetPingParams() 
    18121870         * @uses        Wakka::existsUser() 
     
    18141872         * @uses        Wakka::HasAccess() 
    18151873         * @uses        Wakka::LoadPage() 
    1816          * @uses        Wakka::GetConfigValue() 
     1874         * @uses        Config::$table_prefix 
    18171875         * @uses        Wakka::Query() 
    18181876         * @uses        Wakka::WikiPing() 
    18191877         * @uses        Wakka::ParsePageTitle() 
     1878         * @uses        Config::$wikiping_server 
    18201879         * 
    18211880         * @todo        document params and return