Changeset 1221
- Timestamp:
- 08/19/2008 11:10:26 AM (2 years ago)
- Files:
-
- 1 modified
-
trunk/libs/Wakka.class.php (modified) (31 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/Wakka.class.php
r1215 r1221 243 243 /** 244 244 * 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 247 251 */ 248 252 function Wakka($config) … … 273 277 * are added to the Query-Log. 274 278 * 275 * @uses Wakka::GetConfigValue()279 * @uses Config::$sql_debugging 276 280 * @uses getmicrotime() 277 281 * … … 358 362 * 359 363 * @access public 360 * @uses Wakka::GetConfigValue()364 * @uses Config::$table_prefix 361 365 * @uses Wakka::Query() 362 366 * … … 387 391 * !param integer $minor mandatory: INTERFACE CHANGE 388 392 * !param integer $subminor mandatory: INTERFACE CHANGE 393 * @uses getMysqlVersion() 389 394 * @param string $min_version optional; default: 3.23, the minimum for Wikka to run 390 395 * @return boolean TRUE if version is sufficient (higher or equal specified version); FALSE if not or n/a … … 553 558 * Buffer the output from an included file. 554 559 * 560 * @uses Wakka::BuildFullpathFromMultipath() 561 * 555 562 * @param string $filename mandatory: name of the file to be included; 556 563 * note this may already contain a (partial) path! … … 697 704 * Strip potentially dangerous tags from embedded HTML. 698 705 * 706 * @uses Config::$safehtml_path 707 * @uses instantiate() 708 * @uses SafeHTML::parse() 709 * 699 710 * @param string $html mandatory: HTML to be secured 700 711 * @return string sanitized HTML … … 726 737 * @access public 727 738 * @uses Wakka::Format() 739 * @uses Wakka::Link() 728 740 * 729 741 * @param mixed $pages mandatory: Array of pages returned by LoadAll … … 1012 1024 * @version 1.0 1013 1025 * 1026 * @uses Wakka::htmlspecialchars_ent() 1027 * 1014 1028 * @access public 1015 1029 * … … 1067 1081 * 1068 1082 * @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 1070 1088 * @uses GeShi 1071 1089 * … … 1224 1242 * Get the handler used on the page. 1225 1243 * 1244 * @uses Wakka::$handler 1226 1245 * @return string name of the handler. 1227 1246 */ … … 1233 1252 * Get the value of a given item from the wikka config. 1234 1253 * 1235 * @uses Wakka:: config1254 * @uses Wakka::$config 1236 1255 * 1237 1256 * @param $name mandatory: name of a key in the config array … … 1246 1265 * Set the value of a given item from the wikka config. 1247 1266 * 1248 * @uses Wakka:: config1267 * @uses Wakka::$config 1249 1268 * 1250 1269 * @param $name mandatory: name of a key in the config array … … 1258 1277 * Get the name of the Wiki. 1259 1278 * 1260 * @uses Wakka::GetConfigValue()1279 * @uses Config::$wakka_name 1261 1280 * @return string the name of the Wiki. 1262 1281 */ … … 1303 1322 * 1304 1323 * @access public 1305 * @uses Wakka::GetConfigValue()1324 * @uses Config::$table_prefix 1306 1325 * @uses Wakka:LoadSingle() 1307 1326 * @uses Wakka:CachePage() … … 1365 1384 * GetCachedPageById gets a page from cache whose id is $id. 1366 1385 * 1386 * @uses Wakka::GetCachedPageById() 1367 1387 * @access public 1368 1388 * @param mixed $id the id of the page to retrieve from cache … … 1380 1400 * @see Wakka::CachePage() 1381 1401 * @uses Wakka::$pageCache 1382 * @uses Wakka::GetConfigValue()1383 1402 * @uses Config::$pagename_case_sensitive 1384 1403 * … … 1419 1438 * @access public 1420 1439 * @uses Wakka::$pageCache 1421 * @uses Wakka::GetConfigValue()1422 1440 * @uses Config::$pagename_case_sensitive 1423 1441 * … … 1444 1462 * @access public 1445 1463 * @uses Wakka::$pageCache 1446 * @uses Wakka::GetConfigValue()1447 1464 * @uses Config::$pagename_case_sensitive 1448 1465 * … … 1466 1483 * @access public 1467 1484 * @uses Wakka::GetCachedPageById() 1468 * @uses Wakka::GetConfigValue()1469 1485 * @uses Wakka::LoadSingle() 1470 1486 * @uses Wakka::CachePage() 1471 1487 * @uses Wakka::CacheNonExistentPage() 1488 * @uses Config::$table_prefix 1472 1489 * 1473 1490 * @param int $id mandatory: Id of the page to load. … … 1529 1546 * @access public 1530 1547 * @uses Wakka::GetUser() 1531 * @uses Wakka::GetConfigValue()1532 1548 * @uses Wakka::LoadAll() 1533 1549 * @uses Config::$default_revisioncount 1550 * @uses Config::$table_prefix 1534 1551 * @uses Config::$pagename_case_sensitive 1535 1552 * … … 1606 1623 * @access public 1607 1624 * @uses Config::$pagename_case_sensitive 1608 * @uses Wakka::GetConfigValue()1625 * @uses Config::$table_prefix 1609 1626 * @uses Wakka::$specialCache 1610 * @uses Wakka::LoadSingle 1627 * @uses Wakka::LoadSingle() 1611 1628 * 1612 1629 * @param string $tag The name of the page to load oldest revision of. … … 1646 1663 * Load pages linking to a given page. 1647 1664 * 1665 * @uses Config::$table_prefix 1666 * @uses Wakka::LoadAll() 1648 1667 * @param string $tag mandatory: name of page to find referring links to 1649 1668 * @return array one record with a page name for each page found (empty array if none found). … … 1662 1681 * Load the last x edited pages on the wiki. 1663 1682 * 1664 * @uses Wakka::GetConfigValue()1683 * @uses Config::$table_prefix 1665 1684 * @uses Wakka::LoadAll() 1685 * @uses Wakka::CachePage() 1666 1686 * 1667 1687 * @param integer $limit optional: number of edited pages to show. default: 50 … … 1703 1723 * 1704 1724 * @access public 1705 * @uses Wakka::GetConfigValue()1725 * @uses Config::$table_prefix 1706 1726 * @uses Wakka::LoadAll() 1707 1727 * … … 1735 1755 return $pages; 1736 1756 } 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 */ 1737 1769 function IsWantedPage($tag) // #410 - but function not used in 1.1.6.3 -OR- trunk? 1738 1770 { … … 1751 1783 return $wanted; 1752 1784 } 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 */ 1753 1797 function LoadOrphanedPages() 1754 1798 { … … 1764 1808 return $pages; 1765 1809 } 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 */ 1766 1818 function LoadPageTitles() // @@@ name no longer matches function 1767 1819 { … … 1777 1829 * Get names of pages (tags) owned by the specified user. 1778 1830 * 1779 * @uses Wakka::GetConfigValue() 1831 * @uses Config::$table_prefix 1832 * @uses Wakka::LoadAll() 1780 1833 * 1781 1834 * @param string $owner … … 1794 1847 return $pages; 1795 1848 } 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 */ 1797 1855 function LoadAllPages() 1798 1856 { … … 1808 1866 * Save a page. 1809 1867 * 1810 * @uses Wakka:: reg_username1868 * @uses Wakka::$reg_username 1811 1869 * @uses Wakka::GetPingParams() 1812 1870 * @uses Wakka::existsUser() … … 1814 1872 * @uses Wakka::HasAccess() 1815 1873 * @uses Wakka::LoadPage() 1816 * @uses Wakka::GetConfigValue()1874 * @uses Config::$table_prefix 1817 1875 * @uses Wakka::Query() 1818 1876 * @uses Wakka::WikiPing() 1819 1877 * @uses Wakka::ParsePageTitle() 1878 * @uses Config::$wikiping_server 1820 1879 * 1821 1880 * @todo document params and return