Index: trunk/phase3/maintenance/fuzz-tester.php |
— | — | @@ -1612,10 +1612,10 @@ |
1613 | 1613 | $this->params = array ( |
1614 | 1614 | "action" => "protect", |
1615 | 1615 | 'wpEditToken' => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1616 | | - "mwProtect-level-edit" => wikiFuzz::chooseInput( array( '', 'autoconfirmed', 'sysop', wikifuzz::makeFuzz( 2 ) ) ), |
1617 | | - "mwProtect-level-move" => wikiFuzz::chooseInput( array( '', 'autoconfirmed', 'sysop', wikifuzz::makeFuzz( 2 ) ) ), |
| 1616 | + "mwProtect-level-edit" => wikiFuzz::chooseInput( array( '', 'autoconfirmed', 'sysop', wikiFuzz::makeFuzz( 2 ) ) ), |
| 1617 | + "mwProtect-level-move" => wikiFuzz::chooseInput( array( '', 'autoconfirmed', 'sysop', wikiFuzz::makeFuzz( 2 ) ) ), |
1618 | 1618 | "mwProtectUnchained" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1619 | | - 'mwProtect-reason' => wikiFuzz::chooseInput( array( "because it was there", wikifuzz::makeFuzz( 2 ) ) ) |
| 1619 | + 'mwProtect-reason' => wikiFuzz::chooseInput( array( "because it was there", wikiFuzz::makeFuzz( 2 ) ) ) |
1620 | 1620 | ); |
1621 | 1621 | |
1622 | 1622 | |
— | — | @@ -1644,10 +1644,10 @@ |
1645 | 1645 | // something like an IP address, sometimes invalid: |
1646 | 1646 | ( wikiFuzz::randnum( 300, -20 ) . "." . wikiFuzz::randnum( 300, -20 ) . "." |
1647 | 1647 | . wikiFuzz::randnum( 300, -20 ) . "." . wikiFuzz::randnum( 300, -20 ) ) ) ), |
1648 | | - "wpBlockOther" => wikiFuzz::chooseInput( array( '', 'Nickj2', wikifuzz::makeFuzz( 2 ) ) ), |
| 1648 | + "wpBlockOther" => wikiFuzz::chooseInput( array( '', 'Nickj2', wikiFuzz::makeFuzz( 2 ) ) ), |
1649 | 1649 | "wpBlockExpiry" => wikiFuzz::chooseInput( array( "other", "2 hours", "1 day", "3 days", "1 week", "2 weeks", |
1650 | 1650 | "1 month", "3 months", "6 months", "1 year", "infinite", wikiFuzz::makeFuzz( 2 ) ) ), |
1651 | | - "wpBlockReason" => wikiFuzz::chooseInput( array( "because it was there", wikifuzz::makeFuzz( 2 ) ) ), |
| 1651 | + "wpBlockReason" => wikiFuzz::chooseInput( array( "because it was there", wikiFuzz::makeFuzz( 2 ) ) ), |
1652 | 1652 | "wpAnonOnly" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1653 | 1653 | "wpCreateAccount" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1654 | 1654 | "wpBlock" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ) |
— | — | @@ -1673,9 +1673,9 @@ |
1674 | 1674 | $this->pagePath = "index.php?title=Image:Small-email.png"; |
1675 | 1675 | |
1676 | 1676 | $this->params = array ( |
1677 | | - "image" => wikiFuzz::chooseInput( array( "Small-email.png", wikifuzz::makeFuzz( 2 ) ) ), |
1678 | | - "wpReason" => wikifuzz::makeFuzz( 2 ), |
1679 | | - "oldimage" => wikiFuzz::chooseInput( array( "Small-email.png", wikifuzz::makeFuzz( 2 ) ) ), |
| 1677 | + "image" => wikiFuzz::chooseInput( array( "Small-email.png", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1678 | + "wpReason" => wikiFuzz::makeFuzz( 2 ), |
| 1679 | + "oldimage" => wikiFuzz::chooseInput( array( "Small-email.png", wikiFuzz::makeFuzz( 2 ) ) ), |
1680 | 1680 | "wpEditToken" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1681 | 1681 | ); |
1682 | 1682 | |
— | — | @@ -1718,9 +1718,9 @@ |
1719 | 1719 | $this->pagePath = "index.php?title=Special:Revisiondelete"; |
1720 | 1720 | |
1721 | 1721 | $this->params = array ( |
1722 | | - "target" => wikiFuzz::chooseInput( array( "Main Page", wikifuzz::makeFuzz( 2 ) ) ), |
1723 | | - "oldid" => wikifuzz::makeFuzz( 2 ), |
1724 | | - "oldid[]" => wikifuzz::makeFuzz( 2 ), |
| 1722 | + "target" => wikiFuzz::chooseInput( array( "Main Page", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1723 | + "oldid" => wikiFuzz::makeFuzz( 2 ), |
| 1724 | + "oldid[]" => wikiFuzz::makeFuzz( 2 ), |
1725 | 1725 | "wpReason" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1726 | 1726 | "revdelete-hide-text" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1727 | 1727 | "revdelete-hide-comment" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
— | — | @@ -1750,8 +1750,8 @@ |
1751 | 1751 | |
1752 | 1752 | $this->params = array ( |
1753 | 1753 | "action" => "submit", |
1754 | | - "source" => wikiFuzz::chooseInput( array( "upload", "interwiki", wikifuzz::makeFuzz( 2 ) ) ), |
1755 | | - "MAX_FILE_SIZE" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikifuzz::makeFuzz( 2 ) ) ), |
| 1754 | + "source" => wikiFuzz::chooseInput( array( "upload", "interwiki", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1755 | + "MAX_FILE_SIZE" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1756 | 1756 | "xmlimport" => wikiFuzz::chooseInput( array( "/var/www/hosts/mediawiki/wiki/AdminSettings.php", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1757 | 1757 | "namespace" => wikiFuzz::chooseInput( array( wikiFuzz::randnum( 30, -6 ), wikiFuzz::makeFuzz( 2 ) ) ), |
1758 | 1758 | "interwiki" => wikiFuzz::makeFuzz( 2 ), |
— | — | @@ -1781,9 +1781,9 @@ |
1782 | 1782 | $this->pagePath = "thumb.php"; |
1783 | 1783 | |
1784 | 1784 | $this->params = array ( |
1785 | | - "f" => wikiFuzz::chooseInput( array( "..", "\\", "small-email.png", wikifuzz::makeFuzz( 2 ) ) ), |
1786 | | - "w" => wikiFuzz::chooseInput( array( "80", wikiFuzz::randnum( 6000, -200 ), wikifuzz::makeFuzz( 2 ) ) ), |
1787 | | - "r" => wikiFuzz::chooseInput( array( "0", wikifuzz::makeFuzz( 2 ) ) ), |
| 1785 | + "f" => wikiFuzz::chooseInput( array( "..", "\\", "small-email.png", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1786 | + "w" => wikiFuzz::chooseInput( array( "80", wikiFuzz::randnum( 6000, -200 ), wikiFuzz::makeFuzz( 2 ) ) ), |
| 1787 | + "r" => wikiFuzz::chooseInput( array( "0", wikiFuzz::makeFuzz( 2 ) ) ), |
1788 | 1788 | ); |
1789 | 1789 | |
1790 | 1790 | // sometimes we don't want to specify certain parameters. |
— | — | @@ -1802,11 +1802,11 @@ |
1803 | 1803 | $this->pagePath = "trackback.php"; |
1804 | 1804 | |
1805 | 1805 | $this->params = array ( |
1806 | | - "url" => wikifuzz::makeFuzz( 2 ), |
1807 | | - "blog_name" => wikiFuzz::chooseInput( array( "80", wikiFuzz::randnum( 6000, -200 ), wikifuzz::makeFuzz( 2 ) ) ), |
1808 | | - "article" => wikiFuzz::chooseInput( array( "Main Page", wikifuzz::makeFuzz( 2 ) ) ), |
1809 | | - "title" => wikiFuzz::chooseInput( array( "Main Page", wikifuzz::makeFuzz( 2 ) ) ), |
1810 | | - "excerpt" => wikifuzz::makeFuzz( 2 ), |
| 1806 | + "url" => wikiFuzz::makeFuzz( 2 ), |
| 1807 | + "blog_name" => wikiFuzz::chooseInput( array( "80", wikiFuzz::randnum( 6000, -200 ), wikiFuzz::makeFuzz( 2 ) ) ), |
| 1808 | + "article" => wikiFuzz::chooseInput( array( "Main Page", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1809 | + "title" => wikiFuzz::chooseInput( array( "Main Page", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1810 | + "excerpt" => wikiFuzz::makeFuzz( 2 ), |
1811 | 1811 | ); |
1812 | 1812 | |
1813 | 1813 | // sometimes we don't want to specify certain parameters. |
— | — | @@ -1827,9 +1827,9 @@ |
1828 | 1828 | $this->pagePath = "profileinfo.php"; |
1829 | 1829 | |
1830 | 1830 | $this->params = array ( |
1831 | | - "expand" => wikifuzz::makeFuzz( 2 ), |
1832 | | - "sort" => wikiFuzz::chooseInput( array( "time", "count", "name", wikifuzz::makeFuzz( 2 ) ) ), |
1833 | | - "filter" => wikiFuzz::chooseInput( array( "Main Page", wikifuzz::makeFuzz( 2 ) ) ), |
| 1831 | + "expand" => wikiFuzz::makeFuzz( 2 ), |
| 1832 | + "sort" => wikiFuzz::chooseInput( array( "time", "count", "name", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1833 | + "filter" => wikiFuzz::chooseInput( array( "Main Page", wikiFuzz::makeFuzz( 2 ) ) ), |
1834 | 1834 | ); |
1835 | 1835 | |
1836 | 1836 | // sometimes we don't want to specify certain parameters. |
— | — | @@ -1847,7 +1847,7 @@ |
1848 | 1848 | $this->pagePath = "index.php?title=Special:Cite"; |
1849 | 1849 | |
1850 | 1850 | $this->params = array ( |
1851 | | - "page" => wikiFuzz::chooseInput( array( "\" onmouseover=\"alert(1);\"", "Main Page", wikifuzz::makeFuzz( 2 ) ) ), |
| 1851 | + "page" => wikiFuzz::chooseInput( array( "\" onmouseover=\"alert(1);\"", "Main Page", wikiFuzz::makeFuzz( 2 ) ) ), |
1852 | 1852 | "id" => wikiFuzz::chooseInput( array( "-1", "0", "------'-------0", "+1", "-9823412312312412435", wikiFuzz::makeFuzz( 2 ) ) ), |
1853 | 1853 | ); |
1854 | 1854 | |
— | — | @@ -1866,7 +1866,7 @@ |
1867 | 1867 | $this->pagePath = "index.php?title=Special:Filepath"; |
1868 | 1868 | |
1869 | 1869 | $this->params = array ( |
1870 | | - "file" => wikiFuzz::chooseInput( array( "Small-email.png", "Small-email.png" . wikifuzz::makeFuzz( 1 ), wikiFuzz::makeFuzz( 2 ) ) ), |
| 1870 | + "file" => wikiFuzz::chooseInput( array( "Small-email.png", "Small-email.png" . wikiFuzz::makeFuzz( 1 ), wikiFuzz::makeFuzz( 2 ) ) ), |
1871 | 1871 | ); |
1872 | 1872 | } |
1873 | 1873 | } |
— | — | @@ -1880,9 +1880,9 @@ |
1881 | 1881 | $this->pagePath = "index.php?title=Special:Makebot"; |
1882 | 1882 | |
1883 | 1883 | $this->params = array ( |
1884 | | - "username" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikifuzz::makeFuzz( 1 ) ) ), |
1885 | | - "dosearch" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikifuzz::makeFuzz( 2 ) ) ), |
1886 | | - "grant" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikifuzz::makeFuzz( 2 ) ) ), |
| 1884 | + "username" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikiFuzz::makeFuzz( 1 ) ) ), |
| 1885 | + "dosearch" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1886 | + "grant" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1887 | 1887 | "comment" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1888 | 1888 | "token" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1889 | 1889 | ); |
— | — | @@ -1903,9 +1903,9 @@ |
1904 | 1904 | $this->pagePath = "index.php?title=Special:Makesysop"; |
1905 | 1905 | |
1906 | 1906 | $this->params = array ( |
1907 | | - "wpMakesysopUser" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikifuzz::makeFuzz( 1 ) ) ), |
1908 | | - "action" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikifuzz::makeFuzz( 2 ) ) ), |
1909 | | - "wpMakesysopSubmit" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikifuzz::makeFuzz( 2 ) ) ), |
| 1907 | + "wpMakesysopUser" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikiFuzz::makeFuzz( 1 ) ) ), |
| 1908 | + "action" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
| 1909 | + "wpMakesysopSubmit" => wikiFuzz::chooseInput( array( "0", "1", "++--34234", wikiFuzz::makeFuzz( 2 ) ) ), |
1910 | 1910 | "wpEditToken" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1911 | 1911 | "wpSetBureaucrat" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1912 | 1912 | ); |
— | — | @@ -1926,8 +1926,8 @@ |
1927 | 1927 | $this->pagePath = "index.php?title=Special:Renameuser"; |
1928 | 1928 | |
1929 | 1929 | $this->params = array ( |
1930 | | - "oldusername" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikifuzz::makeFuzz( 1 ) ) ), |
1931 | | - "newusername" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikifuzz::makeFuzz( 1 ) ) ), |
| 1930 | + "oldusername" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikiFuzz::makeFuzz( 1 ) ) ), |
| 1931 | + "newusername" => wikiFuzz::chooseInput( array( "Nickj2", "192.168.0.2", wikiFuzz::makeFuzz( 1 ) ) ), |
1932 | 1932 | "token" => wikiFuzz::chooseInput( array( "20398702394", "", wikiFuzz::makeFuzz( 2 ) ) ), |
1933 | 1933 | ); |
1934 | 1934 | } |
— | — | @@ -1942,7 +1942,7 @@ |
1943 | 1943 | $this->pagePath = "index.php?title=Special%3ALinksearch"; |
1944 | 1944 | |
1945 | 1945 | $this->params = array ( |
1946 | | - "target" => wikifuzz::makeFuzz( 2 ), |
| 1946 | + "target" => wikiFuzz::makeFuzz( 2 ), |
1947 | 1947 | ); |
1948 | 1948 | |
1949 | 1949 | // sometimes we don't want to specify certain parameters. |
— | — | @@ -1959,11 +1959,11 @@ |
1960 | 1960 | $this->pagePath = "index.php?title=Special:CategoryTree"; |
1961 | 1961 | |
1962 | 1962 | $this->params = array ( |
1963 | | - "target" => wikifuzz::makeFuzz( 2 ), |
1964 | | - "from" => wikifuzz::makeFuzz( 2 ), |
1965 | | - "until" => wikifuzz::makeFuzz( 2 ), |
1966 | | - "showas" => wikifuzz::makeFuzz( 2 ), |
1967 | | - "mode" => wikiFuzz::chooseInput( array( "pages", "categories", "all", wikifuzz::makeFuzz( 2 ) ) ), |
| 1963 | + "target" => wikiFuzz::makeFuzz( 2 ), |
| 1964 | + "from" => wikiFuzz::makeFuzz( 2 ), |
| 1965 | + "until" => wikiFuzz::makeFuzz( 2 ), |
| 1966 | + "showas" => wikiFuzz::makeFuzz( 2 ), |
| 1967 | + "mode" => wikiFuzz::chooseInput( array( "pages", "categories", "all", wikiFuzz::makeFuzz( 2 ) ) ), |
1968 | 1968 | ); |
1969 | 1969 | |
1970 | 1970 | // sometimes we do want to specify certain parameters. |
— | — | @@ -2008,7 +2008,7 @@ |
2009 | 2009 | } |
2010 | 2010 | |
2011 | 2011 | // and then we append the fuzz input. |
2012 | | - $this->params = array ( $format => $value . wikifuzz::makeFuzz( 2 ) ); |
| 2012 | + $this->params = array ( $format => $value . wikiFuzz::makeFuzz( 2 ) ); |
2013 | 2013 | } |
2014 | 2014 | } |
2015 | 2015 | |
— | — | @@ -2026,8 +2026,8 @@ |
2027 | 2027 | |
2028 | 2028 | // API login mode. |
2029 | 2029 | private static function loginMode() { |
2030 | | - $arr = array ( "lgname" => wikifuzz::makeFuzz( 2 ), |
2031 | | - "lgpassword" => wikifuzz::makeFuzz( 2 ), |
| 2030 | + $arr = array ( "lgname" => wikiFuzz::makeFuzz( 2 ), |
| 2031 | + "lgpassword" => wikiFuzz::makeFuzz( 2 ), |
2032 | 2032 | ); |
2033 | 2033 | // sometimes we want to specify the extra "lgdomain" parameter. |
2034 | 2034 | if ( wikiFuzz::randnum( 3 ) == 0 ) { |
— | — | @@ -2039,18 +2039,18 @@ |
2040 | 2040 | |
2041 | 2041 | // API OpenSearch mode. |
2042 | 2042 | private static function opensearchMode() { |
2043 | | - return array ( "search" => wikifuzz::makeFuzz( 2 ) ); |
| 2043 | + return array ( "search" => wikiFuzz::makeFuzz( 2 ) ); |
2044 | 2044 | } |
2045 | 2045 | |
2046 | 2046 | // API watchlist feed mode. |
2047 | 2047 | private static function feedwatchlistMode() { |
2048 | | - // FIXME: add "wikifuzz::makeFuzz(2)" as possible value below? |
| 2048 | + // FIXME: add "wikiFuzz::makeFuzz(2)" as possible value below? |
2049 | 2049 | return array ( "feedformat" => wikiFuzz::chooseInput( array( "rss", "atom" ) ) ); |
2050 | 2050 | } |
2051 | 2051 | |
2052 | 2052 | // API query mode. |
2053 | 2053 | private static function queryMode() { |
2054 | | - // FIXME: add "wikifuzz::makeFuzz(2)" as possible params for the elements below? |
| 2054 | + // FIXME: add "wikiFuzz::makeFuzz(2)" as possible params for the elements below? |
2055 | 2055 | // Suspect this will stuff up the tests more, but need to check. |
2056 | 2056 | $params = array ( |
2057 | 2057 | // FIXME: More titles. |
— | — | @@ -2103,16 +2103,16 @@ |
2104 | 2104 | case 'start' : |
2105 | 2105 | case 'end' : |
2106 | 2106 | case 'limit' : return wikiFuzz::chooseInput( array( "0", "-1", "---'----------0", "+1", "8134", "320742734234235", "20060230121212", wikiFuzz::randnum( 9000, -100 ), wikiFuzz::makeFuzz( 2 ) ) ); |
2107 | | - case 'dir' : return wikiFuzz::chooseInput( array( "newer", "older", wikifuzz::makeFuzz( 2 ) ) ); |
2108 | | - case 'user' : return wikiFuzz::chooseInput( array( USER_ON_WIKI, wikifuzz::makeFuzz( 2 ) ) ); |
2109 | | - case 'namespace' : return wikiFuzz::chooseInput( array( -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 200000, wikifuzz::makeFuzz( 2 ) ) ); |
2110 | | - case 'filterredir': return wikiFuzz::chooseInput( array( "all", "redirects", "nonredirectsallpages", wikifuzz::makeFuzz( 2 ) ) ); |
| 2107 | + case 'dir' : return wikiFuzz::chooseInput( array( "newer", "older", wikiFuzz::makeFuzz( 2 ) ) ); |
| 2108 | + case 'user' : return wikiFuzz::chooseInput( array( USER_ON_WIKI, wikiFuzz::makeFuzz( 2 ) ) ); |
| 2109 | + case 'namespace' : return wikiFuzz::chooseInput( array( -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 200000, wikiFuzz::makeFuzz( 2 ) ) ); |
| 2110 | + case 'filterredir': return wikiFuzz::chooseInput( array( "all", "redirects", "nonredirectsallpages", wikiFuzz::makeFuzz( 2 ) ) ); |
2111 | 2111 | case 'allrev' : return wikiFuzz::chooseInput( array( "1", 0, "", wikiFuzz::makeFuzz( 2 ) ) ); |
2112 | | - case 'prop' : return wikiFuzz::chooseInput( array( "user", "comment", "timestamp", "patrol", "flags", "user|user|comment|flags", wikifuzz::makeFuzz( 2 ) ) ); |
2113 | | - case 'type' : return wikiFuzz::chooseInput( array( "block", "protect", "rights", "delete", "upload", "move", "import", "renameuser", "newusers", "makebot", wikifuzz::makeFuzz( 2 ) ) ); |
2114 | | - case 'hide' : return wikiFuzz::chooseInput( array( "minor", "bots", "anons", "liu", "liu|bots|", wikifuzz::makeFuzz( 2 ) ) ); |
2115 | | - case 'show' : return wikiFuzz::chooseInput( array( 'minor', '!minor', 'bot', '!bot', 'anon', '!anon', wikifuzz::makeFuzz( 2 ) ) ); |
2116 | | - default : return wikifuzz::makeFuzz( 2 ); |
| 2112 | + case 'prop' : return wikiFuzz::chooseInput( array( "user", "comment", "timestamp", "patrol", "flags", "user|user|comment|flags", wikiFuzz::makeFuzz( 2 ) ) ); |
| 2113 | + case 'type' : return wikiFuzz::chooseInput( array( "block", "protect", "rights", "delete", "upload", "move", "import", "renameuser", "newusers", "makebot", wikiFuzz::makeFuzz( 2 ) ) ); |
| 2114 | + case 'hide' : return wikiFuzz::chooseInput( array( "minor", "bots", "anons", "liu", "liu|bots|", wikiFuzz::makeFuzz( 2 ) ) ); |
| 2115 | + case 'show' : return wikiFuzz::chooseInput( array( 'minor', '!minor', 'bot', '!bot', 'anon', '!anon', wikiFuzz::makeFuzz( 2 ) ) ); |
| 2116 | + default : return wikiFuzz::makeFuzz( 2 ); |
2117 | 2117 | } |
2118 | 2118 | } |
2119 | 2119 | |
— | — | @@ -2125,7 +2125,7 @@ |
2126 | 2126 | "opensearch", |
2127 | 2127 | "feedwatchlist", |
2128 | 2128 | "query" ); |
2129 | | - $action = wikiFuzz::chooseInput( array_merge ( $modes, array( wikifuzz::makeFuzz( 2 ) ) ) ); |
| 2129 | + $action = wikiFuzz::chooseInput( array_merge ( $modes, array( wikiFuzz::makeFuzz( 2 ) ) ) ); |
2130 | 2130 | |
2131 | 2131 | switch ( $action ) { |
2132 | 2132 | case "login" : $this->params = self::loginMode(); |
— | — | @@ -2156,7 +2156,7 @@ |
2157 | 2157 | $this->params["format"] = wikiFuzz::chooseInput( array( "json", "jsonfm", "php", "phpfm", |
2158 | 2158 | "wddx", "wddxfm", "xml", "xmlfm", |
2159 | 2159 | "yaml", "yamlfm", "raw", "rawfm", |
2160 | | - wikifuzz::makeFuzz( 2 ) ) ); |
| 2160 | + wikiFuzz::makeFuzz( 2 ) ) ); |
2161 | 2161 | |
2162 | 2162 | // Page does not produce HTML (sometimes). |
2163 | 2163 | $this->tidyValidate = false; |
— | — | @@ -2173,7 +2173,7 @@ |
2174 | 2174 | return "<source lang=\"" . $this->getLang() . "\" " |
2175 | 2175 | . ( wikiFuzz::randnum( 2 ) == 0 ? "line " : "" ) |
2176 | 2176 | . ( wikiFuzz::randnum( 2 ) == 0 ? "strict " : "" ) |
2177 | | - . "start=" . wikiFuzz::chooseInput( array( wikiFuzz::randnum( -6000, 6000 ), wikifuzz::makeFuzz( 2 ) ) ) |
| 2177 | + . "start=" . wikiFuzz::chooseInput( array( wikiFuzz::randnum( -6000, 6000 ), wikiFuzz::makeFuzz( 2 ) ) ) |
2178 | 2178 | . ">" |
2179 | 2179 | . wikiFuzz::makeFuzz( 2 ) |
2180 | 2180 | . "</source>"; |
— | — | @@ -2184,7 +2184,7 @@ |
2185 | 2185 | "cfdg", "cfm", "cpp", "cpp-qt", "csharp", "css", "d", "delphi", "diff", "div", "dos", "eiffel", "fortran", "freebasic", "gml", "groovy", "html4strict", "idl", |
2186 | 2186 | "ini", "inno", "io", "java", "java5", "javascript", "latex", "lisp", "lua", "matlab", "mirc", "mpasm", "mysql", "nsis", "objc", "ocaml", "ocaml-brief", "oobas", |
2187 | 2187 | "oracle8", "pascal", "perl", "php", "php-brief", "plsql", "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic", "smalltalk", "smarty", |
2188 | | - "sql", "tcl", "text", "thinbasic", "tsql", "vb", "vbnet", "vhdl", "visualfoxpro", "winbatch", "xml", "xpp", "z80", wikifuzz::makeFuzz( 1 ) ) ); |
| 2188 | + "sql", "tcl", "text", "thinbasic", "tsql", "vb", "vbnet", "vhdl", "visualfoxpro", "winbatch", "xml", "xpp", "z80", wikiFuzz::makeFuzz( 1 ) ) ); |
2189 | 2189 | } |
2190 | 2190 | |
2191 | 2191 | function __construct() { |
Index: trunk/phase3/maintenance/tests/HttpTest.php |
— | — | @@ -104,13 +104,13 @@ |
105 | 105 | |
106 | 106 | $timeout = 1; |
107 | 107 | $start_time = time(); |
108 | | - $r = HTTP::get( "http://www.example.com:1/", $timeout ); |
| 108 | + $r = Http::get( "http://www.example.com:1/", $timeout ); |
109 | 109 | $end_time = time(); |
110 | 110 | $this->assertLessThan( $timeout + 2, $end_time - $start_time, |
111 | 111 | "Request took less than {$timeout}s via " . Http::$httpEngine ); |
112 | 112 | $this->assertEquals( $r, false, "false -- what we get on error from Http::get()" ); |
113 | 113 | |
114 | | - $r = HTTP::get( "http://www.example.com/this-file-does-not-exist", $timeout ); |
| 114 | + $r = Http::get( "http://www.example.com/this-file-does-not-exist", $timeout ); |
115 | 115 | $this->assertFalse( $r, "False on 404s" ); |
116 | 116 | |
117 | 117 | |
Index: trunk/phase3/maintenance/initEditCount.php |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | |
46 | 46 | // Autodetect mode... |
47 | 47 | $backgroundMode = count( $wgDBservers ) > 1 || |
48 | | - ( $dbw instanceof DatabaseMySql && version_compare( $dbver, '4.1' ) < 0 ); |
| 48 | + ( $dbw instanceof DatabaseMysql && version_compare( $dbver, '4.1' ) < 0 ); |
49 | 49 | |
50 | 50 | if ( $this->hasOption( 'background' ) ) { |
51 | 51 | $backgroundMode = true; |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -3409,7 +3409,7 @@ |
3410 | 3410 | if ( $s === false ) { |
3411 | 3411 | # No one else ever edited this page |
3412 | 3412 | return array( array( 'cantrollback' ) ); |
3413 | | - } else if ( $s->rev_deleted & REVISION::DELETED_TEXT || $s->rev_deleted & REVISION::DELETED_USER ) { |
| 3413 | + } else if ( $s->rev_deleted & Revision::DELETED_TEXT || $s->rev_deleted & Revision::DELETED_USER ) { |
3414 | 3414 | # Only admins can see this text |
3415 | 3415 | return array( array( 'notvisiblerev' ) ); |
3416 | 3416 | } |
Index: trunk/phase3/includes/api/ApiPurge.php |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | $result[] = $r; |
67 | 67 | continue; |
68 | 68 | } |
69 | | - $article = Mediawiki::articleFromTitle( $title ); |
| 69 | + $article = MediaWiki::articleFromTitle( $title ); |
70 | 70 | $article->doPurge(); // Directly purge and skip the UI part of purge(). |
71 | 71 | $r['purged'] = ''; |
72 | 72 | $result[] = $r; |
Index: trunk/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -50,13 +50,13 @@ |
51 | 51 | } |
52 | 52 | |
53 | 53 | // Validate target |
54 | | - $targetUser = SpecialEmailuser::getTarget( $params['target'] ); |
| 54 | + $targetUser = SpecialEmailUser::getTarget( $params['target'] ); |
55 | 55 | if ( !( $targetUser instanceof User ) ) { |
56 | 56 | $this->dieUsageMsg( array( $targetUser ) ); |
57 | 57 | } |
58 | 58 | |
59 | 59 | // Check permissions and errors |
60 | | - $error = SpecialEmailuser::getPermissionsError( $wgUser, $params['token'] ); |
| 60 | + $error = SpecialEmailUser::getPermissionsError( $wgUser, $params['token'] ); |
61 | 61 | if ( $error ) { |
62 | 62 | $this->dieUsageMsg( array( $error ) ); |
63 | 63 | } |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | 'Subject' => $params['subject'], |
69 | 69 | 'CCMe' => $params['ccme'], |
70 | 70 | ); |
71 | | - $retval = SpecialEmailuser::submit( $data ); |
| 71 | + $retval = SpecialEmailUser::submit( $data ); |
72 | 72 | if ( $retval === true ) { |
73 | 73 | $result = array( 'result' => 'Success' ); |
74 | 74 | } else { |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -311,9 +311,9 @@ |
312 | 312 | ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 |
313 | 313 | ), |
314 | 314 | 'prop' => array( |
315 | | - APIBase::PARAM_ISMULTI => true, |
316 | | - APIBase::PARAM_DFLT => 'ids|title|flags', |
317 | | - APIBase::PARAM_TYPE => array( |
| 315 | + ApiBase::PARAM_ISMULTI => true, |
| 316 | + ApiBase::PARAM_DFLT => 'ids|title|flags', |
| 317 | + ApiBase::PARAM_TYPE => array( |
318 | 318 | 'ids', |
319 | 319 | 'title', |
320 | 320 | 'flags', |
Index: trunk/phase3/includes/ConfEditor.php |
— | — | @@ -427,7 +427,7 @@ |
428 | 428 | */ |
429 | 429 | function findValueRegion( $pathName ) { |
430 | 430 | if ( !isset( $this->pathInfo[$pathName] ) ) { |
431 | | - throw new MWEXception( "Can't find path \"$pathName\"" ); |
| 431 | + throw new MWException( "Can't find path \"$pathName\"" ); |
432 | 432 | } |
433 | 433 | $path = $this->pathInfo[$pathName]; |
434 | 434 | if ( $path['valueStartByte'] === false || $path['valueEndByte'] === false ) { |
Index: trunk/phase3/includes/specials/SpecialUserrights.php |
— | — | @@ -537,7 +537,7 @@ |
538 | 538 | foreach( $columns as $name => $column ) { |
539 | 539 | if( $column === array() ) |
540 | 540 | continue; |
541 | | - $ret .= xml::element( 'th', null, wfMsg( 'userrights-' . $name . '-col' ) ); |
| 541 | + $ret .= Xml::element( 'th', null, wfMsg( 'userrights-' . $name . '-col' ) ); |
542 | 542 | } |
543 | 543 | $ret.= "</tr>\n<tr>\n"; |
544 | 544 | foreach( $columns as $column ) { |
Index: trunk/phase3/includes/specials/SpecialCategories.php |
— | — | @@ -33,13 +33,13 @@ |
34 | 34 | $cap = new CategoryPager( $from ); |
35 | 35 | $cap->doQuery(); |
36 | 36 | $wgOut->addHTML( |
37 | | - XML::openElement( 'div', array('class' => 'mw-spcontent') ) . |
| 37 | + Xml::openElement( 'div', array('class' => 'mw-spcontent') ) . |
38 | 38 | wfMsgExt( 'categoriespagetext', array( 'parse' ), $cap->getNumRows() ) . |
39 | 39 | $cap->getStartForm( $from ) . |
40 | 40 | $cap->getNavigationBar() . |
41 | 41 | '<ul>' . $cap->getBody() . '</ul>' . |
42 | 42 | $cap->getNavigationBar() . |
43 | | - XML::closeElement( 'div' ) |
| 43 | + Xml::closeElement( 'div' ) |
44 | 44 | ); |
45 | 45 | } |
46 | 46 | |
Index: trunk/phase3/includes/specials/SpecialProtectedtitles.php |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | * @todo document |
179 | 179 | * @ingroup Pager |
180 | 180 | */ |
181 | | -class ProtectedtitlesPager extends AlphabeticPager { |
| 181 | +class ProtectedTitlesPager extends AlphabeticPager { |
182 | 182 | public $mForm, $mConds; |
183 | 183 | |
184 | 184 | function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype='', $size=0 ) { |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -276,7 +276,7 @@ |
277 | 277 | |
278 | 278 | # getBody() first to check, if empty |
279 | 279 | $usersbody = $up->getBody(); |
280 | | - $s = XML::openElement( 'div', array('class' => 'mw-spcontent') ); |
| 280 | + $s = Xml::openElement( 'div', array('class' => 'mw-spcontent') ); |
281 | 281 | $s .= $up->getPageHeader(); |
282 | 282 | if( $usersbody ) { |
283 | 283 | $s .= $up->getNavigationBar(); |
— | — | @@ -285,6 +285,6 @@ |
286 | 286 | } else { |
287 | 287 | $s .= '<p>' . wfMsgHTML('listusers-noresult') . '</p>'; |
288 | 288 | }; |
289 | | - $s .= XML::closeElement( 'div' ); |
| 289 | + $s .= Xml::closeElement( 'div' ); |
290 | 290 | $wgOut->addHTML( $s ); |
291 | 291 | } |
Index: trunk/phase3/includes/QueryPage.php |
— | — | @@ -349,7 +349,7 @@ |
350 | 350 | |
351 | 351 | $this->preprocessResults( $dbr, $res ); |
352 | 352 | |
353 | | - $wgOut->addHTML( XML::openElement( 'div', array('class' => 'mw-spcontent') ) ); |
| 353 | + $wgOut->addHTML( Xml::openElement( 'div', array('class' => 'mw-spcontent') ) ); |
354 | 354 | |
355 | 355 | # Top header and navigation |
356 | 356 | if( $shownavigation ) { |
— | — | @@ -364,7 +364,7 @@ |
365 | 365 | # No results to show, so don't bother with "showing X of Y" etc. |
366 | 366 | # -- just let the user know and give up now |
367 | 367 | $wgOut->addHTML( '<p>' . wfMsgHtml( 'specialpage-empty' ) . '</p>' ); |
368 | | - $wgOut->addHTML( XML::closeElement( 'div' ) ); |
| 368 | + $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
369 | 369 | return; |
370 | 370 | } |
371 | 371 | } |
— | — | @@ -384,7 +384,7 @@ |
385 | 385 | $wgOut->addHTML( '<p>' . $paging . '</p>' ); |
386 | 386 | } |
387 | 387 | |
388 | | - $wgOut->addHTML( XML::closeElement( 'div' ) ); |
| 388 | + $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
389 | 389 | |
390 | 390 | return $num; |
391 | 391 | } |