You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(43) |
Nov
(73) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(34) |
Feb
(110) |
Mar
(24) |
Apr
(44) |
May
(37) |
Jun
(22) |
Jul
(20) |
Aug
(28) |
Sep
(50) |
Oct
(11) |
Nov
(132) |
Dec
(595) |
2002 |
Jan
(1099) |
Feb
(579) |
Mar
(63) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(125) |
Sep
(101) |
Oct
(25) |
Nov
(34) |
Dec
(47) |
2003 |
Jan
(82) |
Feb
(182) |
Mar
(71) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
|
Aug
|
Sep
(14) |
Oct
(6) |
Nov
(124) |
Dec
(68) |
2004 |
Jan
(64) |
Feb
(191) |
Mar
(199) |
Apr
(298) |
May
(252) |
Jun
(426) |
Jul
(134) |
Aug
(13) |
Sep
(96) |
Oct
(75) |
Nov
(232) |
Dec
(171) |
2005 |
Jan
(205) |
Feb
(165) |
Mar
(8) |
Apr
(74) |
May
(21) |
Jun
(19) |
Jul
(37) |
Aug
(69) |
Sep
(141) |
Oct
(118) |
Nov
(31) |
Dec
(7) |
2006 |
Jan
(5) |
Feb
(10) |
Mar
(35) |
Apr
(24) |
May
(34) |
Jun
(29) |
Jul
(5) |
Aug
(38) |
Sep
(30) |
Oct
(37) |
Nov
(30) |
Dec
(86) |
2007 |
Jan
(414) |
Feb
(40) |
Mar
(18) |
Apr
(10) |
May
(66) |
Jun
(60) |
Jul
(105) |
Aug
(55) |
Sep
(64) |
Oct
(7) |
Nov
(11) |
Dec
(5) |
2008 |
Jan
(26) |
Feb
(28) |
Mar
(79) |
Apr
(34) |
May
(61) |
Jun
(24) |
Jul
(29) |
Aug
(160) |
Sep
(62) |
Oct
(70) |
Nov
(32) |
Dec
(14) |
2009 |
Jan
(140) |
Feb
(135) |
Mar
(153) |
Apr
(53) |
May
(24) |
Jun
(138) |
Jul
(90) |
Aug
(46) |
Sep
(72) |
Oct
(84) |
Nov
(32) |
Dec
(4) |
2010 |
Jan
(13) |
Feb
(7) |
Mar
(14) |
Apr
(55) |
May
(89) |
Jun
(131) |
Jul
(41) |
Aug
(38) |
Sep
(42) |
Oct
(11) |
Nov
(27) |
Dec
(54) |
2011 |
Jan
(127) |
Feb
(16) |
Mar
(71) |
Apr
(52) |
May
(32) |
Jun
(31) |
Jul
(4) |
Aug
|
Sep
(45) |
Oct
(26) |
Nov
(36) |
Dec
(10) |
2012 |
Jan
(23) |
Feb
(6) |
Mar
(13) |
Apr
(18) |
May
(1) |
Jun
(4) |
Jul
(3) |
Aug
(12) |
Sep
(57) |
Oct
(96) |
Nov
(163) |
Dec
(124) |
2013 |
Jan
(11) |
Feb
(17) |
Mar
(7) |
Apr
(48) |
May
(15) |
Jun
(29) |
Jul
(12) |
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
(3) |
2014 |
Jan
(4) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(8) |
Jun
(90) |
Jul
(104) |
Aug
(12) |
Sep
(81) |
Oct
(139) |
Nov
(111) |
Dec
(64) |
2015 |
Jan
(46) |
Feb
(74) |
Mar
(56) |
Apr
(61) |
May
(3) |
Jun
(7) |
Jul
(11) |
Aug
(5) |
Sep
(15) |
Oct
(1) |
Nov
(1) |
Dec
(15) |
2016 |
Jan
(25) |
Feb
(33) |
Mar
(24) |
Apr
(4) |
May
(24) |
Jun
(3) |
Jul
(75) |
Aug
|
Sep
(2) |
Oct
(38) |
Nov
(4) |
Dec
(18) |
2017 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(14) |
Jun
|
Jul
(5) |
Aug
(9) |
Sep
|
Oct
(23) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(9) |
Apr
(60) |
May
(1) |
Jun
|
Jul
(13) |
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(15) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
2021 |
Jan
(24) |
Feb
(33) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(64) |
Jul
(71) |
Aug
(114) |
Sep
(82) |
Oct
(32) |
Nov
(76) |
Dec
(86) |
2022 |
Jan
(162) |
Feb
(41) |
Mar
(11) |
Apr
(9) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(7) |
2023 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2024 |
Jan
(7) |
Feb
(3) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
(90) |
Mar
(19) |
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <var...@us...> - 2014-12-03 16:15:40
|
Revision: 9413 http://sourceforge.net/p/phpwiki/code/9413 Author: vargenau Date: 2014-12-03 16:15:36 +0000 (Wed, 03 Dec 2014) Log Message: ----------- Better error message for limit Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB/backend.php trunk/lib/plugin/AllPages.php trunk/lib/plugin/AllUsers.php trunk/lib/plugin/BackLinks.php trunk/lib/plugin/IncludePages.php trunk/lib/plugin/LinkDatabase.php trunk/lib/plugin/ListSubpages.php trunk/lib/plugin/MostPopular.php trunk/lib/plugin/OrphanedPages.php trunk/lib/plugin/PageHistory.php trunk/lib/plugin/PopularNearby.php trunk/lib/plugin/TitleSearch.php trunk/lib/plugin/WantedPages.php trunk/lib/plugin/WantedPagesOld.php trunk/locale/de/LC_MESSAGES/phpwiki.mo trunk/locale/es/LC_MESSAGES/phpwiki.mo trunk/locale/fr/LC_MESSAGES/phpwiki.mo trunk/locale/it/LC_MESSAGES/phpwiki.mo trunk/locale/ja/LC_MESSAGES/phpwiki.mo trunk/locale/nl/LC_MESSAGES/phpwiki.mo trunk/locale/po/de.po trunk/locale/po/es.po trunk/locale/po/fr.po trunk/locale/po/it.po trunk/locale/po/ja.po trunk/locale/po/nl.po trunk/locale/po/phpwiki.pot trunk/locale/po/sv.po trunk/locale/po/zh.po trunk/locale/sv/LC_MESSAGES/phpwiki.mo trunk/locale/zh/LC_MESSAGES/phpwiki.mo Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/PageList.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -1512,7 +1512,7 @@ if (is_array($limit)) { list($from, $count) = $limit; if ((!empty($from) && !is_numeric($from)) or (!empty($count) && !is_numeric($count))) { - trigger_error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal “limit” argument: must be an integer or two integers separated by comma")); return array(0, 0); } return $limit; @@ -1520,13 +1520,13 @@ if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - trigger_error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal “limit” argument: must be an integer or two integers separated by comma")); return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - trigger_error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal “limit” argument: must be an integer or two integers separated by comma")); return array(0, 0); } return array(0, $limit); Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/WikiDB/backend.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -554,13 +554,13 @@ if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - trigger_error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal “limit” argument: must be an integer or two integers separated by comma")); return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - trigger_error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal “limit” argument: must be an integer or two integers separated by comma")); return array(0, 0); } return array(0, $limit); Modified: trunk/lib/plugin/AllPages.php =================================================================== --- trunk/lib/plugin/AllPages.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/AllPages.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -66,7 +66,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if (empty($args['sortby'])) { Modified: trunk/lib/plugin/AllUsers.php =================================================================== --- trunk/lib/plugin/AllUsers.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/AllUsers.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -70,7 +70,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } extract($args); Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/BackLinks.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -61,7 +61,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } extract($args); Modified: trunk/lib/plugin/IncludePages.php =================================================================== --- trunk/lib/plugin/IncludePages.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/IncludePages.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -57,7 +57,7 @@ if (isset($args['limit']) && !limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } $html = HTML(); Modified: trunk/lib/plugin/LinkDatabase.php =================================================================== --- trunk/lib/plugin/LinkDatabase.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/LinkDatabase.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -103,7 +103,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } $caption = _("All pages with all links in this wiki (%d total):"); Modified: trunk/lib/plugin/ListSubpages.php =================================================================== --- trunk/lib/plugin/ListSubpages.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/ListSubpages.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -66,7 +66,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if ($args['basepage']) Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/MostPopular.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -66,7 +66,7 @@ if (isset($limit) && !is_limit($limit)) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if (strstr($sortby, 'mtime')) { return HTML::p(array('class' => "error"), Modified: trunk/lib/plugin/OrphanedPages.php =================================================================== --- trunk/lib/plugin/OrphanedPages.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/OrphanedPages.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -64,7 +64,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } extract($args); Modified: trunk/lib/plugin/PageHistory.php =================================================================== --- trunk/lib/plugin/PageHistory.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/PageHistory.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -343,7 +343,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::div(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } $pagename = $args['page']; Modified: trunk/lib/plugin/PopularNearby.php =================================================================== --- trunk/lib/plugin/PopularNearby.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/PopularNearby.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -67,7 +67,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::div(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } extract($args); Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/TitleSearch.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -80,7 +80,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if (empty($args['s'])) { Modified: trunk/lib/plugin/WantedPages.php =================================================================== --- trunk/lib/plugin/WantedPages.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/WantedPages.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -71,7 +71,7 @@ if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if (!empty($args['exclude_from'])) Modified: trunk/lib/plugin/WantedPagesOld.php =================================================================== --- trunk/lib/plugin/WantedPagesOld.php 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/lib/plugin/WantedPagesOld.php 2014-12-03 16:15:36 UTC (rev 9413) @@ -63,7 +63,7 @@ if (isset($limit) && !is_limit($limit)) { return HTML::p(array('class' => "error"), - _("Illegal 'limit' argument: must be numeric")); + _("Illegal “limit” argument: must be an integer or two integers separated by comma")); } if ($exclude) { Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/po/de.po =================================================================== --- trunk/locale/po/de.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/de.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2000-10-31 02:23+0200\n" "Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp " "<car...@us...>, Helmer Pardun <pardunpress@t-online." @@ -1122,7 +1122,9 @@ msgid "minor" msgstr "kleinere" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/es.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -1103,7 +1103,9 @@ msgid "minor" msgstr "de menor importancia" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/fr.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2004-06-22 21:10+0200\n" "Last-Translator: Pierrick Meignen <mei...@wa...>, Roland " "Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6." @@ -1103,8 +1103,12 @@ msgid "minor" msgstr "mineur" -msgid "Illegal 'limit' argument: must be numeric" -msgstr "Valeur illégale pour l'argument 'limit' : ce doit être un nombre" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" +msgstr "" +"Valeur illégale pour l'argument « limit » : ce doit être un entier ou deux " +"entiers séparés par une virgule" msgid "Rename" msgstr "Renommer" Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/it.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2005-02-12 16:23+0100\n" "Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n" "Language-Team: \n" @@ -1087,7 +1087,9 @@ msgid "minor" msgstr "" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/ja.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -1087,7 +1087,9 @@ msgid "minor" msgstr "" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" #, fuzzy Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/nl.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -1078,7 +1078,9 @@ msgid "minor" msgstr "" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/phpwiki.pot 2014-12-03 16:15:36 UTC (rev 9413) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -1072,7 +1072,9 @@ msgid "minor" msgstr "" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/sv.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -1073,7 +1073,9 @@ msgid "minor" msgstr "" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-12-03 15:32:04 UTC (rev 9412) +++ trunk/locale/po/zh.po 2014-12-03 16:15:36 UTC (rev 9413) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-11-25 17:59+0100\n" +"POT-Creation-Date: 2014-12-03 17:13+0100\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -1119,7 +1119,9 @@ msgid "minor" msgstr "次要" -msgid "Illegal 'limit' argument: must be numeric" +msgid "" +"Illegal “limit” argument: must be an integer or two integers separated by " +"comma" msgstr "" msgid "Rename" Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-03 14:57:43
|
Revision: 9411 http://sourceforge.net/p/phpwiki/code/9411 Author: vargenau Date: 2014-12-03 14:57:35 +0000 (Wed, 03 Dec 2014) Log Message: ----------- New function is_limit Modified Paths: -------------- trunk/lib/plugin/AllPages.php trunk/lib/plugin/AllUsers.php trunk/lib/plugin/BackLinks.php trunk/lib/plugin/IncludePages.php trunk/lib/plugin/LinkDatabase.php trunk/lib/plugin/ListSubpages.php trunk/lib/plugin/MostPopular.php trunk/lib/plugin/OrphanedPages.php trunk/lib/plugin/PageHistory.php trunk/lib/plugin/PopularNearby.php trunk/lib/plugin/TitleSearch.php trunk/lib/plugin/WantedPages.php trunk/lib/plugin/WantedPagesOld.php trunk/lib/stdlib.php Modified: trunk/lib/plugin/AllPages.php =================================================================== --- trunk/lib/plugin/AllPages.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/AllPages.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -64,7 +64,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/AllUsers.php =================================================================== --- trunk/lib/plugin/AllUsers.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/AllUsers.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -68,7 +68,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/BackLinks.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -59,7 +59,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/IncludePages.php =================================================================== --- trunk/lib/plugin/IncludePages.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/IncludePages.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -55,7 +55,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/LinkDatabase.php =================================================================== --- trunk/lib/plugin/LinkDatabase.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/LinkDatabase.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -101,7 +101,7 @@ global $WikiTheme; $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/ListSubpages.php =================================================================== --- trunk/lib/plugin/ListSubpages.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/ListSubpages.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -64,7 +64,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/MostPopular.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -64,7 +64,7 @@ extract($args); - if (isset($limit) && !is_numeric($limit)) { + if (isset($limit) && !is_limit($limit)) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/OrphanedPages.php =================================================================== --- trunk/lib/plugin/OrphanedPages.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/OrphanedPages.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -62,7 +62,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/PageHistory.php =================================================================== --- trunk/lib/plugin/PageHistory.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/PageHistory.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -341,7 +341,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::div(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/PopularNearby.php =================================================================== --- trunk/lib/plugin/PopularNearby.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/PopularNearby.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -65,7 +65,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::div(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/TitleSearch.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -78,7 +78,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/WantedPages.php =================================================================== --- trunk/lib/plugin/WantedPages.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/WantedPages.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -69,7 +69,7 @@ { $args = $this->getArgs($argstr, $request); - if (isset($args['limit']) && !is_numeric($args['limit'])) { + if (isset($args['limit']) && !is_limit($args['limit'])) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/plugin/WantedPagesOld.php =================================================================== --- trunk/lib/plugin/WantedPagesOld.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/plugin/WantedPagesOld.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -61,7 +61,7 @@ { extract($this->getArgs($argstr, $request)); - if (isset($limit) && !is_numeric($limit)) { + if (isset($limit) && !is_limit($limit)) { return HTML::p(array('class' => "error"), _("Illegal 'limit' argument: must be numeric")); } Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-12-03 12:46:50 UTC (rev 9410) +++ trunk/lib/stdlib.php 2014-12-03 14:57:35 UTC (rev 9411) @@ -1972,6 +1972,22 @@ } /** + * Determine if a variable represents a limit + * It can be an integer or two integers separated by "," + */ + +function is_limit($var) +{ + if (is_whole_number($var)) { + return true; + } + $limits = explode(',', $var); + return (count($limits) == 2) + && is_whole_number($limits[0]) + && is_whole_number($limits[1]); +} + +/** * Determine if a variable represents a whole number */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-03 12:46:53
|
Revision: 9410 http://sourceforge.net/p/phpwiki/code/9410 Author: vargenau Date: 2014-12-03 12:46:50 +0000 (Wed, 03 Dec 2014) Log Message: ----------- functions lock, unlock and close are abstract Modified Paths: -------------- trunk/lib/WikiDB/backend/ADODB.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PearDB.php trunk/lib/WikiDB/backend/cvs.php trunk/lib/WikiDB/backend/dba.php trunk/lib/WikiDB/backend/dbaBase.php trunk/lib/WikiDB/backend/file.php trunk/lib/WikiDB/backend.php Modified: trunk/lib/WikiDB/backend/ADODB.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/ADODB.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -141,7 +141,7 @@ '(lock_count = $this->_lock_count)' . "\n<br />", E_USER_WARNING); } - $this->unlock(false, 'force'); + $this->unlock(array(), 'force'); $this->_dbh->close(); $this->_dbh = false; @@ -542,7 +542,7 @@ array($id, $version + 1, $mtime, 0, '', $this->_serialize($meta))) and $dbh->Execute("DELETE FROM $nonempty_tbl WHERE id=$id") - and $this->set_links($pagename, false) + and $this->set_links($pagename, array()) // need to keep perms and LOCKED, otherwise you can reset the perm // by action=remove and re-create it with default perms // keep hits but delete meta-data @@ -572,7 +572,7 @@ $dbh->Execute("DELETE FROM $nonempty_tbl WHERE id=$id"); $dbh->Execute("DELETE FROM $recent_tbl WHERE id=$id"); $dbh->Execute("DELETE FROM $version_tbl WHERE id=$id"); - $this->set_links($pagename, false); + $this->set_links($pagename, array()); $row = $dbh->GetRow("SELECT COUNT(*) FROM $link_tbl WHERE linkto=$id"); if ($row and $row[0]) { // We're still in the link table (dangling link) so we can't delete this @@ -1212,7 +1212,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - public function lock($tables, $write_lock = true) + public function lock($tables = array(), $write_lock = true) { $this->_dbh->StartTrans(); if ($this->_lock_count++ == 0) { @@ -1232,12 +1232,13 @@ /** * Release a write lock on the tables in the SQL database. * - * @param $force boolean Unlock even if not every call to lock() has been matched + * @param array $tables + * @param bool $force Unlock even if not every call to lock() has been matched * by a call to unlock(). * * @see _lock_database */ - public function unlock($tables = false, $force = false) + public function unlock($tables = array(), $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/PDO.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -212,7 +212,7 @@ '(lock_count = $this->_lock_count)' . "\n<br />", E_USER_WARNING); } - $this->unlock(false, 'force'); + $this->unlock(array(), 'force'); unset($this->_dbh); } @@ -659,7 +659,7 @@ $insert->bindParam(6, $this->_serialize($meta), PDO::PARAM_STR, 100); if ($insert->execute() and $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id") - and $this->set_links($pagename, false) + and $this->set_links($pagename, array()) ) { // need to keep perms and LOCKED, otherwise you can reset the perm // by action=remove and re-create it with default perms @@ -690,7 +690,7 @@ $dbh->query("DELETE FROM $version_tbl WHERE id=$id"); $dbh->query("DELETE FROM $recent_tbl WHERE id=$id"); $dbh->query("DELETE FROM $nonempty_tbl WHERE id=$id"); - $this->set_links($pagename, false); + $this->set_links($pagename, array()); $sth = $dbh->prepare("SELECT COUNT(*) FROM $link_tbl WHERE linkto=$id"); $sth->execute(); if ($sth->fetchColumn()) { @@ -1189,7 +1189,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - public function lock($tables, $write_lock = true) + public function lock($tables = array(), $write_lock = true) { if ($this->_lock_count++ == 0) { $this->_current_lock = $tables; @@ -1218,7 +1218,7 @@ * * @see _lock_database */ - public function unlock($tables = false, $force = false) + public function unlock($tables = array(), $force = false) { if ($this->_lock_count == 0) { $this->_current_lock = false; Modified: trunk/lib/WikiDB/backend/PearDB.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/PearDB.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -1025,7 +1025,7 @@ * Calls can be nested. The tables won't be unlocked until * _unlock_database() is called as many times as _lock_database(). */ - public function lock($tables = false, $write_lock = true) + public function lock($tables = array(), $write_lock = true) { if ($this->_lock_count++ == 0) $this->_lock_tables($write_lock); @@ -1042,12 +1042,12 @@ /** * Release a write lock on the tables in the SQL database. * - * @param $force boolean Unlock even if not every call to lock() has been matched + * @param bool $force Unlock even if not every call to lock() has been matched * by a call to unlock(). * * @see _lock_database */ - public function unlock($tables = false, $force = false) + public function unlock($tables = array(), $force = false) { if ($this->_lock_count == 0) { return; Modified: trunk/lib/WikiDB/backend/cvs.php =================================================================== --- trunk/lib/WikiDB/backend/cvs.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/cvs.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -486,13 +486,13 @@ return new Cvs_Backend_Array_Iterator($returnVal); } - function lock($write_lock = true) + function lock($tables = array(), $write_lock = true) { // TODO: to be implemented trigger_error("lock: Not Implemented", E_USER_WARNING); } - function unlock($force = false) + function unlock($tables = array(), $force = false) { // TODO: to be implemented trigger_error("unlock: Not Implemented", E_USER_WARNING); Modified: trunk/lib/WikiDB/backend/dba.php =================================================================== --- trunk/lib/WikiDB/backend/dba.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/dba.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -34,6 +34,14 @@ parent::__construct($db); } + + function lock($tables = array(), $write_lock = true) + { + } + + function unlock($tables = array(), $force = false) + { + } } // Local Variables: Modified: trunk/lib/WikiDB/backend/dbaBase.php =================================================================== --- trunk/lib/WikiDB/backend/dbaBase.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/dbaBase.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -62,6 +62,14 @@ return array('pagename', 'mtime' /*,'author_id','author'*/); } + function lock($tables = array(), $write_lock = true) + { + } + + function unlock($tables = array(), $force = false) + { + } + function close() { $this->_db->close(); Modified: trunk/lib/WikiDB/backend/file.php =================================================================== --- trunk/lib/WikiDB/backend/file.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend/file.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -624,31 +624,16 @@ /** * Lock backend database. - * - * Calls may be nested. - * - * @param $write_lock boolean Unless this is set to false, a write lock - * is acquired, otherwise a read lock. If the backend doesn't support - * read locking, then it should make a write lock no matter which type - * of lock was requested. - * - * All backends <em>should</em> support write locking. */ - function lock($write_lock = true) + function lock($tables = array(), $write_lock = true) { - //trigger_error("lock: Not Implemented", E_USER_WARNING); } /** * Unlock backend database. - * - * @param $force boolean Normally, the database is not unlocked until - * unlock() is called as many times as lock() has been. If $force is - * set to true, the the database is unconditionally unlocked. */ - function unlock($force = false) + function unlock($tables = array(), $force = false) { - //trigger_error("unlock: Not Implemented", E_USER_WARNING); } /** @@ -656,7 +641,6 @@ */ function close() { - //trigger_error("close: Not Implemented", E_USER_WARNING); } /** @@ -666,7 +650,6 @@ */ function sync() { - //trigger_error("sync: Not Implemented", E_USER_WARNING); } /** Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-12-03 12:40:45 UTC (rev 9409) +++ trunk/lib/WikiDB/backend.php 2014-12-03 12:46:50 UTC (rev 9410) @@ -432,6 +432,7 @@ * * Calls may be nested. * + * @param array $tables * @param bool $write_lock Unless this is set to false, a write lock * is acquired, otherwise a read lock. If the backend doesn't support * read locking, then it should make a write lock no matter which type @@ -439,27 +440,22 @@ * * All backends <em>should</em> support write locking. */ - function lock($write_lock = true) - { - } + abstract function lock($tables = array(), $write_lock = true); /** * Unlock backend database. * + * @param array $tables * @param bool $force Normally, the database is not unlocked until * unlock() is called as many times as lock() has been. If $force is * set to true, the the database is unconditionally unlocked. */ - function unlock($force = false) - { - } + abstract function unlock($tables = array(), $force = false); /** * Close database. */ - function close() - { - } + abstract function close(); /** * Synchronize with filesystem. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-03 12:40:52
|
Revision: 9409 http://sourceforge.net/p/phpwiki/code/9409 Author: vargenau Date: 2014-12-03 12:40:45 +0000 (Wed, 03 Dec 2014) Log Message: ----------- <tt> --> <samp> Modified Paths: -------------- trunk/passencrypt.php Modified: trunk/passencrypt.php =================================================================== --- trunk/passencrypt.php 2014-12-03 11:08:55 UTC (rev 9408) +++ trunk/passencrypt.php 2014-12-03 12:40:45 UTC (rev 9409) @@ -97,8 +97,8 @@ $debug = $HTTP_GET_VARS['debug']; if ($debug) echo "The password was encrypted using a salt length of: $salt_length<br />\n"; - echo "<p>The encrypted password is:<br />\n<br /> \n<tt><strong>", - htmlentities($encrypted_password), "</strong></tt></p>\n"; + echo "<p>The encrypted password is:<br />\n<br /> \n<samp><strong>", + htmlentities($encrypted_password), "</strong></samp></p>\n"; echo "<hr />\n"; } elseif ($posted['password'] != "") { echo "The passwords did not match. Please try again.<br />\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-03 11:08:57
|
Revision: 9408 http://sourceforge.net/p/phpwiki/code/9408 Author: vargenau Date: 2014-12-03 11:08:55 +0000 (Wed, 03 Dec 2014) Log Message: ----------- <tt> --> <samp> Modified Paths: -------------- trunk/passencrypt.php Modified: trunk/passencrypt.php =================================================================== --- trunk/passencrypt.php 2014-12-03 09:33:47 UTC (rev 9407) +++ trunk/passencrypt.php 2014-12-03 11:08:55 UTC (rev 9408) @@ -73,8 +73,8 @@ $posted = $GLOBALS['HTTP_POST_VARS']; if (!empty($posted['create'])) { $new_password = random_good_password(); - echo "<p>The newly created random password is:<br />\n<br /> \n<tt><strong>", - htmlentities($new_password), "</strong></tt></p>\n"; + echo "<p>The newly created random password is:<br />\n<br /> \n<samp><strong>", + htmlentities($new_password), "</strong></samp></p>\n"; $posted['password'] = $new_password; $posted['password2'] = $new_password; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-03 09:33:56
|
Revision: 9407 http://sourceforge.net/p/phpwiki/code/9407 Author: vargenau Date: 2014-12-03 09:33:47 +0000 (Wed, 03 Dec 2014) Log Message: ----------- Set limit to 0 instead of false to please test Modified Paths: -------------- trunk/lib/plugin/PageHistory.php Modified: trunk/lib/plugin/PageHistory.php =================================================================== --- trunk/lib/plugin/PageHistory.php 2014-12-02 15:51:24 UTC (rev 9406) +++ trunk/lib/plugin/PageHistory.php 2014-12-03 09:33:47 UTC (rev 9407) @@ -284,7 +284,7 @@ return array('days' => false, 'show_minor' => true, 'show_major' => true, - 'limit' => false, + 'limit' => 0, 'page' => '[pagename]', 'format' => false); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 15:51:32
|
Revision: 9406 http://sourceforge.net/p/phpwiki/code/9406 Author: vargenau Date: 2014-12-02 15:51:24 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Test limit argument is numeric Modified Paths: -------------- trunk/lib/plugin/AllPages.php trunk/lib/plugin/AllUsers.php trunk/lib/plugin/BackLinks.php trunk/lib/plugin/IncludePages.php trunk/lib/plugin/LinkDatabase.php trunk/lib/plugin/ListSubpages.php trunk/lib/plugin/MostPopular.php trunk/lib/plugin/OrphanedPages.php trunk/lib/plugin/PageHistory.php trunk/lib/plugin/PopularNearby.php trunk/lib/plugin/TitleSearch.php trunk/lib/plugin/WantedPages.php trunk/lib/plugin/WantedPagesOld.php Modified: trunk/lib/plugin/AllPages.php =================================================================== --- trunk/lib/plugin/AllPages.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/AllPages.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -64,6 +64,11 @@ { $args = $this->getArgs($argstr, $request); + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + if (empty($args['sortby'])) { $args['sortby'] = 'pagename'; } Modified: trunk/lib/plugin/AllUsers.php =================================================================== --- trunk/lib/plugin/AllUsers.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/AllUsers.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -68,6 +68,11 @@ { $args = $this->getArgs($argstr, $request); + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + extract($args); $group = $request->getGroup(); Modified: trunk/lib/plugin/BackLinks.php =================================================================== --- trunk/lib/plugin/BackLinks.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/BackLinks.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -59,6 +59,11 @@ { $args = $this->getArgs($argstr, $request); + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + extract($args); if (empty($page) and $page != '0') { return ''; Modified: trunk/lib/plugin/IncludePages.php =================================================================== --- trunk/lib/plugin/IncludePages.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/IncludePages.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -54,6 +54,12 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + $html = HTML(); if (empty($args['pages'])) { return $html; Modified: trunk/lib/plugin/LinkDatabase.php =================================================================== --- trunk/lib/plugin/LinkDatabase.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/LinkDatabase.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -101,6 +101,11 @@ global $WikiTheme; $args = $this->getArgs($argstr, $request); + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + $caption = _("All pages with all links in this wiki (%d total):"); if (!empty($args['owner'])) { Modified: trunk/lib/plugin/ListSubpages.php =================================================================== --- trunk/lib/plugin/ListSubpages.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/ListSubpages.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -63,6 +63,12 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + if ($args['basepage']) $pagename = $args['basepage']; else Modified: trunk/lib/plugin/MostPopular.php =================================================================== --- trunk/lib/plugin/MostPopular.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/MostPopular.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -61,12 +61,18 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + extract($args); + + if (isset($limit) && !is_numeric($limit)) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } if (strstr($sortby, 'mtime')) { - trigger_error(_("sortby=mtime not supported with MostPopular"), - E_USER_WARNING); - $sortby = ''; + return HTML::p(array('class' => "error"), + _("sortby=mtime not supported with MostPopular")); } + $columns = $info ? explode(",", $info) : array(); array_unshift($columns, 'hits'); @@ -77,7 +83,6 @@ } else { $args['count'] = $request->getArg('count'); } - //$dbi->touch(); $pages = $dbi->mostPopular($limit, $sortby); $pagelist = new PageList($columns, $exclude, $args); while ($page = $pages->next()) { Modified: trunk/lib/plugin/OrphanedPages.php =================================================================== --- trunk/lib/plugin/OrphanedPages.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/OrphanedPages.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -61,6 +61,12 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + extract($args); // There's probably a more efficient way to do this (eg a Modified: trunk/lib/plugin/PageHistory.php =================================================================== --- trunk/lib/plugin/PageHistory.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/PageHistory.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -340,6 +340,12 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::div(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + $pagename = $args['page']; if (empty($pagename)) return $this->makeForm("", $request); Modified: trunk/lib/plugin/PopularNearby.php =================================================================== --- trunk/lib/plugin/PopularNearby.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/PopularNearby.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -64,6 +64,12 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::div(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + extract($args); $header = ''; $page = $dbi->getPage($pagename); Modified: trunk/lib/plugin/TitleSearch.php =================================================================== --- trunk/lib/plugin/TitleSearch.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/TitleSearch.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -78,6 +78,11 @@ { $args = $this->getArgs($argstr, $request); + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + if (empty($args['s'])) { return HTML::p(array('class' => 'warning'), _("You must enter a search term.")); Modified: trunk/lib/plugin/WantedPages.php =================================================================== --- trunk/lib/plugin/WantedPages.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/WantedPages.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -68,10 +68,17 @@ function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); + + if (isset($args['limit']) && !is_numeric($args['limit'])) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + if (!empty($args['exclude_from'])) $args['exclude_from'] = is_string($args['exclude_from']) ? explodePageList($args['exclude_from']) : $args['exclude_from']; // <! plugin-list !> + extract($args); if ($page == _("WantedPages")) $page = ""; Modified: trunk/lib/plugin/WantedPagesOld.php =================================================================== --- trunk/lib/plugin/WantedPagesOld.php 2014-12-02 15:09:06 UTC (rev 9405) +++ trunk/lib/plugin/WantedPagesOld.php 2014-12-02 15:51:24 UTC (rev 9406) @@ -61,6 +61,11 @@ { extract($this->getArgs($argstr, $request)); + if (isset($limit) && !is_numeric($limit)) { + return HTML::p(array('class' => "error"), + _("Illegal 'limit' argument: must be numeric")); + } + if ($exclude) { if (!is_array($exclude)) $exclude = explode(',', $exclude); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 15:09:09
|
Revision: 9405 http://sourceforge.net/p/phpwiki/code/9405 Author: vargenau Date: 2014-12-02 15:09:06 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Type compatibility Modified Paths: -------------- trunk/lib/WikiDB.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-12-02 14:26:47 UTC (rev 9404) +++ trunk/lib/WikiDB.php 2014-12-02 15:09:06 UTC (rev 9405) @@ -747,7 +747,7 @@ elseif ($param == 'USER_AUTH_POLICY') return $GLOBALS['USER_AUTH_POLICY']; else - return false; + return array(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 14:26:55
|
Revision: 9404 http://sourceforge.net/p/phpwiki/code/9404 Author: vargenau Date: 2014-12-02 14:26:47 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Add class variables Modified Paths: -------------- trunk/lib/WikiDB.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-12-02 13:41:37 UTC (rev 9403) +++ trunk/lib/WikiDB.php 2014-12-02 14:26:47 UTC (rev 9404) @@ -41,6 +41,37 @@ class WikiDB { /** + * @see open() + */ + function __construct(&$backend, $dbparams) + { + /** + * @var WikiRequest $request + */ + global $request; + + $this->_backend =& $backend; + // don't do the following with the auth_dsn! + if (isset($dbparams['auth_dsn'])) + return; + + $this->_cache = new WikiDB_cache($backend); + if (!empty($request)) + $request->_dbi = $this; + + // If the database doesn't yet have a timestamp, initialize it now. + if ($this->get('_timestamp') === false) + $this->touch(); + + // devel checking. + if ((int)DEBUG & _DEBUG_SQL) { + $this->_backend->check(); + } + // might be changed when opening the database fails + $this->readonly = defined("READONLY") ? READONLY : false; + } + + /** * Open a WikiDB database. * * This function inspects its arguments to determine the proper @@ -105,35 +136,6 @@ } /** - * @see open() - */ - function __construct(&$backend, $dbparams) - { - /** - * @var WikiRequest $request - */ - global $request; - - $this->_backend =& $backend; - // don't do the following with the auth_dsn! - if (isset($dbparams['auth_dsn'])) return; - - $this->_cache = new WikiDB_cache($backend); - if (!empty($request)) $request->_dbi = $this; - - // If the database doesn't yet have a timestamp, initialize it now. - if ($this->get('_timestamp') === false) - $this->touch(); - - // devel checking. - if ((int)DEBUG & _DEBUG_SQL) { - $this->_backend->check(); - } - // might be changed when opening the database fails - $this->readonly = defined("READONLY") ? READONLY : false; - } - - /** * Close database connection. * * The database may no longer be used after it is closed. @@ -602,7 +604,6 @@ /** * Update the database timestamp. - * */ function touch() { @@ -721,10 +722,8 @@ function isOpen() { - global $request; - if (!$request->_dbi) return false; - else return false; /* so far only needed for sql so false it. - later we have to check dba also */ + return false; /* so far only needed for sql so false it. + later we have to check dba also */ } function getParam($param) @@ -761,7 +760,11 @@ */ class WikiDB_Page { - function WikiDB_Page(&$wikidb, $pagename) + public $score; + public $_wikidb; + public $_pagename; + + function __construct(&$wikidb, $pagename) { $this->_wikidb = &$wikidb; $this->_pagename = $pagename; @@ -997,8 +1000,7 @@ $backend->unlock(array('version', 'page', 'recent', 'link', 'nonempty')); - return new WikiDB_PageRevision($this->_wikidb, $pagename, $newversion, - $data); + return new WikiDB_PageRevision($this->_wikidb, $pagename, $newversion, $data); } /** A higher-level interface to createRevision. @@ -1489,15 +1491,19 @@ // The authenticated author of the first revision or empty if not authenticated then. function getCreator() { - if ($current = $this->getRevision(1, false)) return $current->get('author_id'); - else return ''; + if ($current = $this->getRevision(1, false)) + return $current->get('author_id'); + else + return ''; } // The authenticated author of the current revision. function getAuthor() { - if ($current = $this->getCurrentRevision(false)) return $current->get('author_id'); - else return ''; + if ($current = $this->getCurrentRevision(false)) + return $current->get('author_id'); + else + return ''; } /* Semantic Web value, not stored in the links. @@ -1534,10 +1540,13 @@ */ class WikiDB_PageRevision { + public $_wikidb; + public $_pagename; + public $_version; + public $_data; public $_transformedContent = false; // set by WikiDB_Page::save() - function WikiDB_PageRevision(&$wikidb, $pagename, $version, - $versiondata = false) + function __construct(&$wikidb, $pagename, $version, $versiondata = array()) { $this->_wikidb = &$wikidb; $this->_pagename = $pagename; @@ -1559,7 +1568,7 @@ /** * Get the version number of this revision. * - * @return integer The version number of this revision. + * @return int The version number of this revision. */ public function getVersion() { @@ -1862,7 +1871,11 @@ */ class WikiDB_PageIterator { - function WikiDB_PageIterator(&$wikidb, &$iter, $options = array()) + public $_iter; + public $_wikidb; + public $_options; + + function __construct(&$wikidb, &$iter, $options = array()) { $this->_iter = $iter; // a WikiDB_backend_iterator $this->_wikidb = &$wikidb; @@ -2010,7 +2023,11 @@ */ class WikiDB_PageRevisionIterator { - function WikiDB_PageRevisionIterator(&$wikidb, &$revisions, $options = false) + public $_revisions; + public $_wikidb; + public $_options; + + function __construct(&$wikidb, &$revisions, $options = false) { $this->_revisions = $revisions; $this->_wikidb = &$wikidb; @@ -2057,8 +2074,7 @@ } } else assert($version > 0); - return new WikiDB_PageRevision($this->_wikidb, $pagename, $version, - $versiondata); + return new WikiDB_PageRevision($this->_wikidb, $pagename, $version, $versiondata); } /** @@ -2090,9 +2106,16 @@ */ class WikiDB_Array_PageIterator { - function WikiDB_Array_PageIterator($pagenames) + public $_dbi; + public $_pages; + + function __construct ($pagenames) { + /** + * @var WikiRequest $request + */ global $request; + $this->_dbi = $request->getDbh(); $this->_pages = $pagenames; reset($this->_pages); @@ -2128,7 +2151,9 @@ class WikiDB_Array_generic_iter { - function WikiDB_Array_generic_iter($result) + public $_array; + + function __construct($result) { // $result may be either an array or a query result if (is_array($result)) { @@ -2182,7 +2207,14 @@ { // FIXME: beautify versiondata cache. Cache only limited data? - function WikiDB_cache(&$backend) + public $_backend; + public $_pagedata_cache; + public $_versiondata_cache; + public $_glv_cache; + public $_id_cache; + public $readonly; + + function __construct(&$backend) { /** * @var WikiRequest $request @@ -2190,7 +2222,6 @@ global $request; $this->_backend = &$backend; - $this->_pagedata_cache = array(); $this->_versiondata_cache = array(); array_push($this->_versiondata_cache, array()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 13:41:40
|
Revision: 9403 http://sourceforge.net/p/phpwiki/code/9403 Author: vargenau Date: 2014-12-02 13:41:37 +0000 (Tue, 02 Dec 2014) Log Message: ----------- static public --> public static to be consistent Modified Paths: -------------- trunk/lib/WikiDB.php trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-12-02 13:30:43 UTC (rev 9402) +++ trunk/lib/WikiDB.php 2014-12-02 13:41:37 UTC (rev 9403) @@ -95,7 +95,7 @@ * * @return WikiDB A WikiDB object. **/ - static public function open($dbparams) + public static function open($dbparams) { $dbtype = $dbparams{'dbtype'}; include_once("lib/WikiDB/$dbtype.php"); Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-12-02 13:30:43 UTC (rev 9402) +++ trunk/lib/WikiPluginCached.php 2014-12-02 13:41:37 UTC (rev 9403) @@ -474,7 +474,7 @@ * * @return Cache copy of the cache object */ - static public function newCache() + public static function newCache() { static $staticcache; @@ -948,7 +948,7 @@ * @param array $bgcol background color; array(red,green,blue) * @return string image handle for gd routines */ - static public function text2img($txt, $fontnr, $textcol, $bgcol) + public static function text2img($txt, $fontnr, $textcol, $bgcol) { // basic (!) output for error handling This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 13:30:45
|
Revision: 9402 http://sourceforge.net/p/phpwiki/code/9402 Author: vargenau Date: 2014-12-02 13:30:43 +0000 (Tue, 02 Dec 2014) Log Message: ----------- abstract class _WikiUser Modified Paths: -------------- trunk/lib/WikiUser.php Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-12-02 13:07:03 UTC (rev 9401) +++ trunk/lib/WikiUser.php 2014-12-02 13:30:43 UTC (rev 9402) @@ -304,6 +304,11 @@ */ function UpgradeUser($user, $newuser) { + /** + * @var WikiRequest $request + */ + global $request; + if (is_a($user, '_WikiUser') and is_a($newuser, '_WikiUser')) { // populate the upgraded class $newuser with the values from the current user object //only _auth_level, _current_method, _current_index, @@ -333,37 +338,12 @@ } } -/** - * Probably not needed, since we use the various user objects methods so far. - * Anyway, here it is, looping through all available objects. - */ -function UserExists($UserName) -{ - global $request; - if (!($user = $request->getUser())) - $user = WikiUser($UserName); - if (!$user) - return false; - if ($user->userExists($UserName)) { - $request->_user = $user; - return true; - } - if (is_a($user, '_BogoUser')) - $user = new _PassUser($UserName, $user->_prefs); - $class = $user->nextClass(); - if ($user = new $class($UserName, $user->_prefs)) { - return $user->userExists($UserName); - } - $request->_user = $GLOBALS['ForbiddenUser']; - return false; -} - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /** * Base WikiUser class. */ -class _WikiUser +abstract class _WikiUser { public $_userid = ''; public $_level = WIKIAUTH_ANON; @@ -397,34 +377,16 @@ } } - function getPreferences() - { - trigger_error("DEBUG: Note: undefined _WikiUser class trying to load prefs." . " " - . "New subclasses of _WikiUser must override this function."); - return false; - } + abstract function getPreferences(); - function setPreferences($prefs, $id_only) - { - trigger_error("DEBUG: Note: undefined _WikiUser class trying to save prefs." - . " " - . "New subclasses of _WikiUser must override this function."); - return false; - } + abstract function setPreferences($prefs, $id_only); function userExists() { return $this->hasHomePage(); } - function checkPass($submitted_password) - { - // By definition, an undefined user class cannot sign in. - trigger_error("DEBUG: Warning: undefined _WikiUser class trying to sign in." - . " " - . "New subclasses of _WikiUser must override this function."); - return false; - } + abstract function checkPass($submitted_password); // returns page_handle to user's home page or false if none function hasHomePage() @@ -446,7 +408,11 @@ function createHomePage() { + /** + * @var WikiRequest $request + */ global $request; + $versiondata = array('author' => ADMIN_USER); $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences.") . "\n{{Template/UserPage}}", @@ -747,6 +713,9 @@ */ function getPreferences() { + /** + * @var WikiRequest $request + */ global $request; if (empty($this->_prefs)) @@ -847,7 +816,11 @@ } if ($updated) { if ($id_only and !headers_sent()) { + /** + * @var WikiRequest $request + */ global $request; + // new 1.3.8 policy: no array cookies, only plain userid string as in // the pre 1.3.x versions. // prefs should be stored besides the session in the homepagehandle or in a db. @@ -951,8 +924,13 @@ * @tables: pref */ { - public $_auth_dbi, $_prefs; - public $_current_method, $_current_index; + public $_auth_dbi; + /** + * @var UserPreferences $_prefs + */ + public $_prefs; + public $_current_method; + public $_current_index; // check and prepare the auth and pref methods only once function _PassUser($UserName = '', $prefs = false) @@ -1059,6 +1037,9 @@ function getAuthDbh() { + /** + * @var WikiRequest $request + */ global $request; $dbh = $request->getDbh(); @@ -1112,7 +1093,11 @@ // help with position independence function prepare($stmt, $variables, $oldstyle = false, $sprintfstyle = true) { + /** + * @var WikiRequest $request + */ global $request; + $dbi = $request->getDbh(); $this->getAuthDbh(); // "'\$userid"' => %s @@ -1212,6 +1197,11 @@ function setPreferences($prefs, $id_only = false) { + /** + * @var WikiRequest $request + */ + global $request; + if (!empty($this->_prefs->_method)) { if ($this->_prefs->_method == 'ADODB') { // FIXME: strange why this should be needed... @@ -1636,6 +1626,11 @@ function update($newvalue) { + /** + * @var WikiRequest $request + */ + global $request; + if (!$this->_init) { // invalidate etag to force fresh output $request->setValidators(array('%mtime' => false)); @@ -1807,6 +1802,11 @@ */ function update($value) { + /** + * @var WikiRequest $request + */ + global $request; + // e-mail address is already checked by FusionForge if (defined('FUSIONFORGE') and FUSIONFORGE) { return; @@ -1958,6 +1958,10 @@ { public $notifyPagesAll; public $_init; + public $_prefs; + public $_select; + public $_method; + public $_update; function __construct($saved_prefs = false) { @@ -2301,8 +2305,6 @@ if (substr($packed, 0, 2) == "a:") { return unserialize($packed); } - //trigger_error("DEBUG: Can't unpack bad UserPreferences", - //E_USER_WARNING); return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 13:07:10
|
Revision: 9401 http://sourceforge.net/p/phpwiki/code/9401 Author: vargenau Date: 2014-12-02 13:07:03 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Remove unused function callback Modified Paths: -------------- trunk/lib/WikiCallback.php Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-12-02 12:55:31 UTC (rev 9400) +++ trunk/lib/WikiCallback.php 2014-12-02 13:07:03 UTC (rev 9401) @@ -13,29 +13,6 @@ abstract class WikiCallback { /** - * Convert from Pear-style callback specification to a WikiCallback. - * - * @param $pearCb mixed - * For a global function callback, $pearCb should be a string containing - * the name of the function. - * For an object method callback, $pearCb should be a array of length two: - * the first element should contain (a reference to) the object, the second - * element should be a string containing the name of the method to be invoked. - * @return object Returns the appropriate subclass of WikiCallback. - */ - static public function callback($pearCb) - { - if (is_string($pearCb)) - return new WikiFunctionCb($pearCb); - else if (is_array($pearCb)) { - list($object, $method) = $handler; - return new WikiMethodCb($object, $method); - } - trigger_error("WikiCallback::new: bad arg", E_USER_ERROR); - return null; - } - - /** * Call callback. * * @param ? mixed This method takes a variable number of arguments (zero or more). @@ -73,7 +50,7 @@ extends WikiCallback { /** - * @param $functionName string Name of global function to call. + * @param string $functionName Name of global function to call. */ public function __construct($functionName) { @@ -98,8 +75,8 @@ extends WikiCallback { /** - * @param $object object Object on which to invoke method. - * @param $methodName string Name of method to call. + * @param object $object Object on which to invoke method. + * @param string $methodName Name of method to call. */ function __construct(&$object, $methodName) { @@ -126,8 +103,8 @@ extends WikiCallback { /** - * @param $args string Argument declarations - * @param $code string Function body + * @param string $args Argument declarations + * @param string $code Function body * @see create_function(). */ function __construct($args, $code) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 12:55:40
|
Revision: 9400 http://sourceforge.net/p/phpwiki/code/9400 Author: vargenau Date: 2014-12-02 12:55:31 +0000 (Tue, 02 Dec 2014) Log Message: ----------- static Modified Paths: -------------- trunk/lib/PageType.php trunk/lib/Request.php trunk/lib/WikiCallback.php trunk/lib/WikiDB.php Modified: trunk/lib/PageType.php =================================================================== --- trunk/lib/PageType.php 2014-12-02 12:51:39 UTC (rev 9399) +++ trunk/lib/PageType.php 2014-12-02 12:55:31 UTC (rev 9400) @@ -71,8 +71,6 @@ /** * Get a page type descriptor. * - * This is a static member function. - * * @param string $name Name of the page type. * @return PageType An object which is a subclass of PageType. */ Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-12-02 12:51:39 UTC (rev 9399) +++ trunk/lib/Request.php 2014-12-02 12:55:31 UTC (rev 9400) @@ -1106,12 +1106,10 @@ /** * Get time zone offset. * - * This is a static member function. - * * @param int $time Unix timestamp (defaults to current time). * @return string Zone offset, e.g. "-0800" for PST. */ - function _zone_offset($time = 0) + static function _zone_offset($time = 0) { if (!$time) $time = time(); @@ -1129,8 +1127,6 @@ /** * Format time in NCSA format. * - * This is a static member function. - * * @param int $time Unix timestamp (defaults to current time). * @return string Formatted date & time. */ @@ -1248,9 +1244,8 @@ /** Parse tag from header. * - * This is a static member function. */ - function parse($strval) + static function parse($strval) { if (!preg_match(':^(W/)?"(.+)"$:i', trim($strval), $m)) return false; // parse failed Modified: trunk/lib/WikiCallback.php =================================================================== --- trunk/lib/WikiCallback.php 2014-12-02 12:51:39 UTC (rev 9399) +++ trunk/lib/WikiCallback.php 2014-12-02 12:55:31 UTC (rev 9400) @@ -15,8 +15,6 @@ /** * Convert from Pear-style callback specification to a WikiCallback. * - * This is a static member function. - * * @param $pearCb mixed * For a global function callback, $pearCb should be a string containing * the name of the function. @@ -25,7 +23,7 @@ * element should be a string containing the name of the method to be invoked. * @return object Returns the appropriate subclass of WikiCallback. */ - public function callback($pearCb) + static public function callback($pearCb) { if (is_string($pearCb)) return new WikiFunctionCb($pearCb); Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-12-02 12:51:39 UTC (rev 9399) +++ trunk/lib/WikiDB.php 2014-12-02 12:55:31 UTC (rev 9400) @@ -43,9 +43,8 @@ /** * Open a WikiDB database. * - * This is a static member function. This function inspects its - * arguments to determine the proper subclass of WikiDB to - * instantiate, and then it instantiates it. + * This function inspects its arguments to determine the proper + * subclass of WikiDB to instantiate, and then it instantiates it. * * @param array $dbparams Database configuration parameters (hash). * Some pertinent parameters are: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-02 12:51:41
|
Revision: 9399 http://sourceforge.net/p/phpwiki/code/9399 Author: vargenau Date: 2014-12-02 12:51:39 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Use trigger_error, this->error does not exist Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/WikiDB/backend.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-12-01 16:07:25 UTC (rev 9398) +++ trunk/lib/PageList.php 2014-12-02 12:51:39 UTC (rev 9399) @@ -1512,19 +1512,22 @@ if (is_array($limit)) { list($from, $count) = $limit; if ((!empty($from) && !is_numeric($from)) or (!empty($count) && !is_numeric($count))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return $limit; } if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array(0, $limit); } Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2014-12-01 16:07:25 UTC (rev 9398) +++ trunk/lib/WikiDB/backend.php 2014-12-02 12:51:39 UTC (rev 9399) @@ -553,17 +553,19 @@ * Usage: * list($offset,$count) = $this->limit($args['limit']); */ - function limit($limit) + static function limit($limit) { if (strstr($limit, ',')) { list($from, $limit) = explode(',', $limit); if ((!empty($from) && !is_numeric($from)) or (!empty($limit) && !is_numeric($limit))) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array($from, $limit); } else { if (!empty($limit) && !is_numeric($limit)) { - return $this->error(_("Illegal 'limit' argument: must be numeric")); + trigger_error(_("Illegal 'limit' argument: must be numeric")); + return array(0, 0); } return array(0, $limit); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 16:07:33
|
Revision: 9398 http://sourceforge.net/p/phpwiki/code/9398 Author: vargenau Date: 2014-12-01 16:07:25 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Restrict "speak: none" to "@media aural" Modified Paths: -------------- trunk/themes/MonoBook/monobook.css trunk/themes/Sidebar/sidebar.css Modified: trunk/themes/MonoBook/monobook.css =================================================================== --- trunk/themes/MonoBook/monobook.css 2014-12-01 15:52:46 UTC (rev 9397) +++ trunk/themes/MonoBook/monobook.css 2014-12-01 16:07:25 UTC (rev 9398) @@ -601,9 +601,14 @@ .hiddenStructure { display: none; - speak: none; } +@media aural { + .hiddenStructure { + speak: none; + } +} + img.tex { vertical-align: middle; } Modified: trunk/themes/Sidebar/sidebar.css =================================================================== --- trunk/themes/Sidebar/sidebar.css 2014-12-01 15:52:46 UTC (rev 9397) +++ trunk/themes/Sidebar/sidebar.css 2014-12-01 16:07:25 UTC (rev 9398) @@ -624,9 +624,14 @@ .hiddenStructure { display: none; - speak: none; } +@media aural { + .hiddenStructure { + speak: none; + } +} + img.tex { vertical-align: middle; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 15:52:54
|
Revision: 9397 http://sourceforge.net/p/phpwiki/code/9397 Author: vargenau Date: 2014-12-01 15:52:46 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Fix CSS prefixes Modified Paths: -------------- trunk/themes/Sidebar/sidebar.css trunk/themes/fusionforge/fusionforge.css trunk/themes/smaller/phpwiki.css Modified: trunk/themes/Sidebar/sidebar.css =================================================================== --- trunk/themes/Sidebar/sidebar.css 2014-12-01 14:46:35 UTC (rev 9396) +++ trunk/themes/Sidebar/sidebar.css 2014-12-01 15:52:46 UTC (rev 9397) @@ -1210,6 +1210,8 @@ border-style: solid; border-color: #aaa #eee #eee #aaa; -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } /* @@ -1801,7 +1803,7 @@ border: solid 1px silver; padding: 4px; margin: 1em; - -moz-border-radius: 6px; + border-radius: 6px; background-color: #f0f0f0; } Modified: trunk/themes/fusionforge/fusionforge.css =================================================================== --- trunk/themes/fusionforge/fusionforge.css 2014-12-01 14:46:35 UTC (rev 9396) +++ trunk/themes/fusionforge/fusionforge.css 2014-12-01 15:52:46 UTC (rev 9397) @@ -799,8 +799,6 @@ text-align: left; background-repeat: no-repeat; background-position: 10px; - -moz-border-radius: 1em; - -webkit-border-radius: 1em; border-radius: 1em; padding: 10px 10px 10px 50px; } Modified: trunk/themes/smaller/phpwiki.css =================================================================== --- trunk/themes/smaller/phpwiki.css 2014-12-01 14:46:35 UTC (rev 9396) +++ trunk/themes/smaller/phpwiki.css 2014-12-01 15:52:46 UTC (rev 9397) @@ -19,8 +19,11 @@ background-color: #dddddd; border: 0; -moz-appearance: none; + -webkit-appearance: none; -moz-box-sizing: content-box; - -moz-border-radius: 0; + -webkit-box-sizing: content-box; + box-sizing: content-box; + border-radius: 0; } .wiki, .named-wiki { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 14:46:43
|
Revision: 9396 http://sourceforge.net/p/phpwiki/code/9396 Author: vargenau Date: 2014-12-01 14:46:35 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Add @var WikiRequest $request Modified Paths: -------------- trunk/lib/WikiDB/ADODB.php trunk/lib/WikiDB/PDO.php trunk/lib/WikiDB/SQL.php trunk/lib/WikiTheme.php Modified: trunk/lib/WikiDB/ADODB.php =================================================================== --- trunk/lib/WikiDB/ADODB.php 2014-12-01 14:02:03 UTC (rev 9395) +++ trunk/lib/WikiDB/ADODB.php 2014-12-01 14:46:35 UTC (rev 9396) @@ -45,7 +45,9 @@ function isWikiPage($pagename) { $pagename = (string)$pagename; - if ($pagename === '') return false; + if ($pagename === '') { + return false; + } if (!array_key_exists($pagename, $this->_cache->_id_cache)) { $this->_cache->_id_cache[$pagename] = $this->_backend->is_wiki_page($pagename); } @@ -75,8 +77,14 @@ function isOpen() { + /** + * @var WikiRequest $request + */ global $request; - if (!$request->_dbi) return false; + + if (!$request->_dbi) { + return false; + } return is_resource($this->_backend->connection()); } Modified: trunk/lib/WikiDB/PDO.php =================================================================== --- trunk/lib/WikiDB/PDO.php 2014-12-01 14:02:03 UTC (rev 9395) +++ trunk/lib/WikiDB/PDO.php 2014-12-01 14:46:35 UTC (rev 9396) @@ -43,7 +43,9 @@ function isWikiPage($pagename) { $pagename = (string)$pagename; - if ($pagename === '') return false; + if ($pagename === '') { + return false; + } if (!array_key_exists($pagename, $this->_cache->_id_cache)) { $this->_cache->_id_cache[$pagename] = $this->_backend->is_wiki_page($pagename); } @@ -51,7 +53,6 @@ } // With PDO we should really use native quoting using prepared statements with ? - // Supported since PDO-0.3 (?) // Add surrounding quotes '' if string function quote($in) { @@ -76,8 +77,14 @@ function isOpen() { + /** + * @var WikiRequest $request + */ global $request; - if (!$request->_dbi) return false; + + if (!$request->_dbi) { + return false; + } return is_object($this->_backend->_dbh); } Modified: trunk/lib/WikiDB/SQL.php =================================================================== --- trunk/lib/WikiDB/SQL.php 2014-12-01 14:02:03 UTC (rev 9395) +++ trunk/lib/WikiDB/SQL.php 2014-12-01 14:46:35 UTC (rev 9396) @@ -11,7 +11,7 @@ $backend = $dbparams['dsn']['phptype']; elseif (preg_match('/^(\w+):/', $dbparams['dsn'], $m)) $backend = $m[1]; - if ($backend == 'postgres7') { // ADODB cross-compatiblity hack (for unit testing) + if ($backend == 'postgres7') { // ADODB cross-compatibility hack (for unit testing) $backend = 'pgsql'; if (is_string($dbparams['dsn'])) $dbparams['dsn'] = $backend . ':' . substr($dbparams['dsn'], 10); @@ -44,8 +44,9 @@ function isWikiPage($pagename) { $pagename = (string)$pagename; - if ($pagename === '') return false; - //if (empty($this->_iwpcache)) { $this->_iwpcache = array(); } + if ($pagename === '') { + return false; + } if (empty($this->_cache->id_cache[$pagename])) { $this->_cache->_id_cache[$pagename] = $this->_backend->is_wiki_page($pagename); } @@ -66,8 +67,14 @@ function isOpen() { + /** + * @var WikiRequest $request + */ global $request; - if (!$request->_dbi) return false; + + if (!$request->_dbi) { + return false; + } return is_resource($this->_backend->connection()); } Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-12-01 14:02:03 UTC (rev 9395) +++ trunk/lib/WikiTheme.php 2014-12-01 14:46:35 UTC (rev 9396) @@ -1365,6 +1365,9 @@ // new arg: named elements to be able to remove them. such as DoubleClickEdit for htmldumps function addMoreAttr($tag, $name, $element) { + /** + * @var WikiRequest $request + */ global $request; // protect from duplicate attr (body jscript: themes, prefs, ...) static $_attr_cache = array(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 14:02:13
|
Revision: 9395 http://sourceforge.net/p/phpwiki/code/9395 Author: vargenau Date: 2014-12-01 14:02:03 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Spelling Modified Paths: -------------- trunk/UPGRADING trunk/configurator.php trunk/doc/INSTALL.mSQL trunk/doc/INSTALL.mysql trunk/doc/README.phpwiki-auth trunk/doc/THEMES trunk/pgsrc/Help%2FHelloWorldPlugin trunk/pgsrc/Help%2FMagicPhpWikiURLs trunk/pgsrc/ReleaseNotes trunk/themes/MonoBook/templates/info.tmpl trunk/themes/default/templates/info.tmpl trunk/wiki Modified: trunk/UPGRADING =================================================================== --- trunk/UPGRADING 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/UPGRADING 2014-12-01 14:02:03 UTC (rev 9395) @@ -66,7 +66,7 @@ your HomePage url and press "Enter", which will add all fresh pages from pgsrc to your pageset. If you deleted some pages on purpose, you'll have to removed -them again with PhpWikiAdminisstration/Remove then. +them again with PhpWikiAdministration/Remove then. There's no smart "Merge Diffs" yet to upgrade existing docs, this will come with the next release. Also upgrading the Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/configurator.php 2014-12-01 14:02:03 UTC (rev 9395) @@ -586,7 +586,7 @@ <dt>LOOSE</dt> <dd>Cached pages will be invalidated whenever they are edited, or, if the pages include plugins, when the plugin output could - concievably have changed. + conceivably have changed. <p>Behavior should be much like STRICT, except that sometimes wikilinks will show up as undefined (with the question mark) when in fact they refer to (recently) created pages. @@ -600,7 +600,7 @@ page, etc...</p> <p>This setting is generally not advisable, however it may be useful in certain cases (e.g. if your wiki gets lots of page views, - and few edits by knowledgable people who won't freak over the quirks.)</p> + and few edits by knowledgeable people who won't freak over the quirks.)</p> </dd> </dl> The default is currently LOOSE."); Modified: trunk/doc/INSTALL.mSQL =================================================================== --- trunk/doc/INSTALL.mSQL 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/doc/INSTALL.mSQL 2014-12-01 14:02:03 UTC (rev 9395) @@ -17,7 +17,7 @@ http://www.hughes.com.au/ for information on downloading and instructions. -Create the database. You might need system privledges to do this: +Create the database. You might need system privileges to do this: [root@localhost phpwiki]# msqladmin create wiki Database "wiki" created. Modified: trunk/doc/INSTALL.mysql =================================================================== --- trunk/doc/INSTALL.mysql 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/doc/INSTALL.mysql 2014-12-01 14:02:03 UTC (rev 9395) @@ -73,7 +73,7 @@ Or you can run ?action=upgrade (also from "Upgrade" at PhpWikiAdministration), but then your database user needs the necessary ALTER and CREATE permissions. -You might want to set DBADMIN_USER temporarly in your config.ini. +You might want to set DBADMIN_USER temporarily in your config.ini. ?action=upgrade also brings all changed pgsrc files up-to-date. /Reini Urban and Arno aho...@ma... Modified: trunk/doc/README.phpwiki-auth =================================================================== --- trunk/doc/README.phpwiki-auth 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/doc/README.phpwiki-auth 2014-12-01 14:02:03 UTC (rev 9395) @@ -76,7 +76,7 @@ ! ALLOW_USER_PASSWORDS -True User Authentification is used with Bogo Login and not-empty +True User Authentication is used with Bogo Login and not-empty passwords or ALLOW_USER_PASSWORDS = true. To require user passwords set Modified: trunk/doc/THEMES =================================================================== --- trunk/doc/THEMES 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/doc/THEMES 2014-12-01 14:02:03 UTC (rev 9395) @@ -29,7 +29,7 @@ Other file extensions are reserved for future use (i.e. .tpl for Smarty or .html for our old template expansion.) -Only one template is called, ususally the "html.tmpl" template, +Only one template is called, usually the "html.tmpl" template, which includes all other templates then. WikiTheme templates are regular xhtml, but the php parts within "<?php" and "?>" Modified: trunk/pgsrc/Help%2FHelloWorldPlugin =================================================================== --- trunk/pgsrc/Help%2FHelloWorldPlugin 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/pgsrc/Help%2FHelloWorldPlugin 2014-12-01 14:02:03 UTC (rev 9395) @@ -17,7 +17,7 @@ }}} ---- -~PhpWiki's plugin architecture allows you to add custom page elements to your wiki. All you have to do is extend (subclass) the ~WikiPlugin class and create your output via the run() method, dependend on the Wiki- or Request arguments, +~PhpWiki's plugin architecture allows you to add custom page elements to your wiki. All you have to do is extend (subclass) the ~WikiPlugin class and create your output via the run() method, dependent on the Wiki- or Request arguments, * either with the predefined HTML classes to create valid XHTML, * or by using templates, which are easier customizable, but generally more a mess to use and easier to create invalid XHTML. Modified: trunk/pgsrc/Help%2FMagicPhpWikiURLs =================================================================== --- trunk/pgsrc/Help%2FMagicPhpWikiURLs 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/pgsrc/Help%2FMagicPhpWikiURLs 2014-12-01 14:02:03 UTC (rev 9395) @@ -59,7 +59,7 @@ will generate a link which will take you directly to editing the SandBox, like so: [Edit the SandBox | phpwiki:SandBox?action=edit]. -Other possibilites: +Other possibilities: * [ Diff the SandBox | phpwiki:SandBox?action=diff ], * [ Lock the HomePage | phpwiki:HomePage?action=lock ], * [ Get a Full Zip Dump | phpwiki:?action=zip&include=all ], Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/pgsrc/ReleaseNotes 2014-12-01 14:02:03 UTC (rev 9395) @@ -835,7 +835,7 @@ == 1.3.8 Jan-Apr 2004, Reini Urban == -External plugable authentification, DB prefs and sessions, +External plugable authentication, DB prefs and sessions, some more fixes, docs, themes and plugins. * new ~WikiUserNew class (started by Carsten Klapp), Modified: trunk/themes/MonoBook/templates/info.tmpl =================================================================== --- trunk/themes/MonoBook/templates/info.tmpl 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/themes/MonoBook/templates/info.tmpl 2014-12-01 14:02:03 UTC (rev 9395) @@ -1,6 +1,6 @@ <?php if (empty($revision)) $revision = $page->getCurrentRevision(false); -$modifed = $WikiTheme->formatDateTime($revision->get('mtime')); +$modified = $WikiTheme->formatDateTime($revision->get('mtime')); $author = $revision->get('author'); global $WikiNameRegexp; @@ -96,7 +96,7 @@ <tr> <td class="align-right nowrap pageinfo"><?php echo $label['date'] ?></td> - <td><?php echo $modifed ?><?php echo $minor_flag ?></td> + <td><?php echo $modified ?><?php echo $minor_flag ?></td> </tr> <tr> <td class="align-right pageinfo"><?php echo $label['author'] ?></td> Modified: trunk/themes/default/templates/info.tmpl =================================================================== --- trunk/themes/default/templates/info.tmpl 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/themes/default/templates/info.tmpl 2014-12-01 14:02:03 UTC (rev 9395) @@ -1,6 +1,6 @@ <?php if (empty($revision)) $revision = $page->getCurrentRevision(false); -$modifed = $WikiTheme->formatDateTime($revision->get('mtime')); +$modified = $WikiTheme->formatDateTime($revision->get('mtime')); $dbi = $request->getDbh(); $author = $revision->get('author'); @@ -82,7 +82,7 @@ <tr> <td class="align-right nowrap pageinfo"><?php echo $label['date'] ?></td> - <td><?php echo $modifed ?><?php echo $minor_flag ?></td> + <td><?php echo $modified ?><?php echo $minor_flag ?></td> </tr> <tr> <td class="align-right pageinfo"><?php echo $label['author'] ?></td> Modified: trunk/wiki =================================================================== --- trunk/wiki 2014-12-01 13:45:20 UTC (rev 9394) +++ trunk/wiki 2014-12-01 14:02:03 UTC (rev 9395) @@ -5,7 +5,7 @@ Also For Wiki farms. Simplifies USE_PATH_INFO paths: "/<home>/wiki/HomePage" instead of "/<home>/wiki/index.php/HomePage" -The simpliest version is +The simplest version is <?php include "index.php"; include "lib/main.php"; ?> Note: This needs a webserver handler to PHP like this on Apache: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 13:45:22
|
Revision: 9394 http://sourceforge.net/p/phpwiki/code/9394 Author: vargenau Date: 2014-12-01 13:45:20 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Comment out unreachable code Modified Paths: -------------- trunk/configurator.php trunk/lib/WikiDB/backend/ADODB_postgres7.php trunk/lib/WikiDB/backend/PearDB_pgsql.php trunk/lib/WikiUser/HttpAuth.php trunk/lib/WikiUser/IMAP.php Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2014-12-01 13:41:58 UTC (rev 9393) +++ trunk/configurator.php 2014-12-01 13:45:20 UTC (rev 9394) @@ -1697,6 +1697,7 @@ function _config_format($value) { return ''; + /* $v = $this->get_config_item_name(); // handle arrays: a|b --> a['b'] if (strpos($v, '|')) { @@ -1706,6 +1707,7 @@ if (preg_match("/[\"']/", $value)) $value = '"' . $value . '"'; return sprintf("%s = \"%s\"", $v, $value); + */ } function get_config_item_name() Modified: trunk/lib/WikiDB/backend/ADODB_postgres7.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_postgres7.php 2014-12-01 13:41:58 UTC (rev 9393) +++ trunk/lib/WikiDB/backend/ADODB_postgres7.php 2014-12-01 13:45:20 UTC (rev 9394) @@ -39,10 +39,12 @@ { return 0; // if the wikiuser is not the table owner + /* foreach ($this->_table_names as $table) { $this->_dbh->Execute("VACUUM ANALYZE $table"); } return 1; + */ } // just for blobs. the rest is escaped with qstr() Modified: trunk/lib/WikiDB/backend/PearDB_pgsql.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_pgsql.php 2014-12-01 13:41:58 UTC (rev 9393) +++ trunk/lib/WikiDB/backend/PearDB_pgsql.php 2014-12-01 13:45:20 UTC (rev 9394) @@ -53,10 +53,12 @@ { return 0; // if the wikiuser is not the table owner + /* foreach ($this->_table_names as $table) { $this->_dbh->query("VACUUM ANALYZE $table"); } return 1; + */ } function _quote($s) @@ -329,7 +331,7 @@ return $word; // clause specified above. - return $this->_pagename_match_clause($node) . " OR idxFTI @@ to_tsquery('$word')"; + // return $this->_pagename_match_clause($node) . " OR idxFTI @@ to_tsquery('$word')"; } } Modified: trunk/lib/WikiUser/HttpAuth.php =================================================================== --- trunk/lib/WikiUser/HttpAuth.php 2014-12-01 13:41:58 UTC (rev 9393) +++ trunk/lib/WikiUser/HttpAuth.php 2014-12-01 13:45:20 UTC (rev 9394) @@ -58,6 +58,7 @@ { return false; + /* header('WWW-Authenticate: Basic realm="' . WIKI_NAME . '"'); header("Authorization: Basic " . base64_encode($userid . ":" . $passwd)); if (!isset($_SERVER)) @@ -66,6 +67,7 @@ $_SERVER['PHP_AUTH_USER'] = $userid; $_SERVER['PHP_AUTH_PW'] = $passwd; //$GLOBALS['request']->setStatus(200); + */ } function logout() Modified: trunk/lib/WikiUser/IMAP.php =================================================================== --- trunk/lib/WikiUser/IMAP.php 2014-12-01 13:41:58 UTC (rev 9393) +++ trunk/lib/WikiUser/IMAP.php 2014-12-01 13:45:20 UTC (rev 9394) @@ -64,12 +64,14 @@ { return true; + /* if ($this->checkPass($this->_prefs->get('passwd'))) { if (DEBUG & _DEBUG_LOGIN) trigger_error(get_class($this) . "::userExists => true (pass ok)", E_USER_WARNING); return true; } if (DEBUG & _DEBUG_LOGIN) trigger_error(get_class($this) . "::userExists => false (pass wrong)", E_USER_WARNING); return $this->_tryNextUser(); + */ } function mayChangePass() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 13:42:01
|
Revision: 9393 http://sourceforge.net/p/phpwiki/code/9393 Author: vargenau Date: 2014-12-01 13:41:58 +0000 (Mon, 01 Dec 2014) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/XMLRPC/utils.php Modified: trunk/lib/XMLRPC/utils.php =================================================================== --- trunk/lib/XMLRPC/utils.php 2014-12-01 13:17:52 UTC (rev 9392) +++ trunk/lib/XMLRPC/utils.php 2014-12-01 13:41:58 UTC (rev 9393) @@ -159,6 +159,7 @@ * @param pass password for authentication * @param secure secure. wether to use fsockopen_ssl. (requires special php build). * @param output array. xml output options. can be null. details below: + * @return string * * output_type: return data as either php native data types or xml * encoded. if php is used, then the other values are ignored. default = xml @@ -206,7 +207,7 @@ $output = array('version' => 'xmlrpc'); } - $retval = ""; + $retval = ''; if ($host && $uri && $port) { $request_xml = xmlrpc_encode_request($method, $args, $output); $response_buf = xu_query_http_post($request_xml, $host, $uri, $port, $debug, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 13:17:55
|
Revision: 9392 http://sourceforge.net/p/phpwiki/code/9392 Author: vargenau Date: 2014-12-01 13:17:52 +0000 (Mon, 01 Dec 2014) Log Message: ----------- Use default value Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-12-01 09:23:39 UTC (rev 9391) +++ trunk/lib/PageList.php 2014-12-01 13:17:52 UTC (rev 9392) @@ -447,7 +447,7 @@ } include_once 'lib/BlockParser.php'; // false --> don't bother processing hrefs for embedded WikiLinks - $ct = TransformText($c, false); + $ct = TransformText($c); if (empty($pagelist->_sortby[$this->_field])) unset($revision_handle->_data['%pagedata']['_cached_html']); return HTML::div(array('style' => 'font-size:x-small'), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-12-01 09:23:41
|
Revision: 9391 http://sourceforge.net/p/phpwiki/code/9391 Author: vargenau Date: 2014-12-01 09:23:39 +0000 (Mon, 01 Dec 2014) Log Message: ----------- global $request; Modified Paths: -------------- trunk/lib/WikiUser.php Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-11-28 16:16:21 UTC (rev 9390) +++ trunk/lib/WikiUser.php 2014-12-01 09:23:39 UTC (rev 9391) @@ -549,12 +549,19 @@ function isAdmin() { + /** + * @var WikiRequest $request + */ + global $request; + static $group; + if ($this->_level == WIKIAUTH_ADMIN) return true; if (!$this->isSignedIn()) return false; if (!$this->isAuthenticated()) return false; - if (!$group) $group = &$request->getGroup(); + if (!$group) + $group = &$request->getGroup(); return ($this->_level > WIKIAUTH_BOGO and $group->isMember(GROUP_ADMIN)); } @@ -616,7 +623,11 @@ if ($logout) { // Log out if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { + /** + * @var WikiRequest $request + */ global $request; + $zone_offset = Request_AccessLogEntry::_zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"', @@ -654,7 +665,11 @@ $authlevel = $this->checkPass($passwd === false ? '' : $passwd); if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { + /** + * @var WikiRequest $request + */ global $request; + $zone_offset = Request_AccessLogEntry::_zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $manglepasswd = $passwd; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-28 16:16:23
|
Revision: 9390 http://sourceforge.net/p/phpwiki/code/9390 Author: vargenau Date: 2014-11-28 16:16:21 +0000 (Fri, 28 Nov 2014) Log Message: ----------- global $request Modified Paths: -------------- trunk/lib/WikiTheme.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-11-28 14:54:59 UTC (rev 9389) +++ trunk/lib/WikiTheme.php 2014-11-28 16:16:21 UTC (rev 9390) @@ -53,7 +53,11 @@ */ function WikiLink($page_or_rev, $type = 'known', $label = false) { - global $WikiTheme, $request; + global $WikiTheme; + /** + * @var WikiRequest $request + */ + global $request; if ($type == 'button') { return $WikiTheme->makeLinkButton($page_or_rev, $label); @@ -193,6 +197,11 @@ */ function WikiTheme($theme_name = 'default', $noinit = false) { + /** + * @var WikiRequest $request + */ + global $request; + $this->_name = $theme_name; $this->_themes_dir = NormalizeLocalFileName("themes"); $this->_path = defined('PHPWIKI_DIR') ? NormalizeLocalFileName("") : ""; @@ -369,6 +378,9 @@ */ function formatDate($time_t) { + /** + * @var WikiRequest $request + */ global $request; $offset_time = $time_t + 3600 * $request->getPref('timeOffset'); @@ -391,7 +403,12 @@ function formatTime($time_t) { //FIXME: make 24-hour mode configurable? + + /** + * @var WikiRequest $request + */ global $request; + $offset_time = $time_t + 3600 * $request->getPref('timeOffset'); return preg_replace('/^0/', ' ', strtolower(strftime($this->_timeFormat, $offset_time))); @@ -432,6 +449,9 @@ */ function getDay($time_t) { + /** + * @var WikiRequest $request + */ global $request; if ($request->getPref('relativeDates') && ($date = $this->_relativeDay($time_t))) { @@ -454,9 +474,14 @@ */ function getLastModifiedMessage($revision, $show_version = 'auto') { + /** + * @var WikiRequest $request + */ global $request; - if (!$revision) return ''; + if (!$revision) + return ''; + // dates >= this are considered invalid. if (!defined('EPOCH')) define('EPOCH', 0); // seconds since ~ January 1 1970 @@ -492,6 +517,9 @@ function _relativeDay($time_t) { + /** + * @var WikiRequest $request + */ global $request; if (is_numeric($request->getPref('timeOffset'))) @@ -647,6 +675,9 @@ function linkUnknownWikiWord($wikiword, $linktext = '') { + /** + * @var WikiRequest $request + */ global $request; // Get rid of anchors on unknown wikiwords @@ -1062,6 +1093,9 @@ $version = false; if (empty($page_or_rev)) { + /** + * @var WikiRequest $request + */ global $request; $pagename = $request->getArg("pagename"); $version = $request->getArg("version"); @@ -1292,7 +1326,11 @@ */ function getMoreHeaders() { + /** + * @var WikiRequest $request + */ global $request; + // actionpages cannot add headers, because recursive template expansion // already expanded the head template before. $this->_headers_printed = 1; @@ -1342,7 +1380,11 @@ function getMoreAttr($tag) { + /** + * @var WikiRequest $request + */ global $request; + if (empty($request->_MoreAttr[$tag])) return ''; $out = ''; @@ -1510,7 +1552,11 @@ function initGlobals() { + /** + * @var WikiRequest $request + */ global $request; + static $already = 0; if (!$already) { $script_url = deduce_script_name(); @@ -1583,6 +1629,9 @@ function calendarBase() { static $UserCalPageTitle = false; + /** + * @var WikiRequest $request + */ global $request; if (!$UserCalPageTitle) @@ -1727,7 +1776,11 @@ */ function Button($text, $url, $class = '', $options = array()) { + /** + * @var WikiRequest $request + */ global $request; + $this->_init('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); @@ -1760,6 +1813,11 @@ */ function ImageButton($text, $url, $class, $img_url, $img_attr = array()) { + /** + * @var WikiRequest $request + */ + global $request; + $this->__construct('a', array('href' => $url)); if ($class) $this->setAttr('class', $class); @@ -1904,7 +1962,11 @@ { function RelatedLinksBox($title = false, $body = '', $limit = 20) { + /** + * @var WikiRequest $request + */ global $request; + $this->title = $title ? $title : _("Related Links"); $this->body = HTML($body); $page = $request->getPage($request->getArg('pagename')); @@ -1927,7 +1989,11 @@ { function RelatedExternalLinksBox($title = false, $body = '', $limit = 20) { + /** + * @var WikiRequest $request + */ global $request; + $this->title = $title ? $title : _("External Links"); $this->body = HTML($body); $page = $request->getPage($request->getArg('pagename')); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-28 14:55:02
|
Revision: 9389 http://sourceforge.net/p/phpwiki/code/9389 Author: vargenau Date: 2014-11-28 14:54:59 +0000 (Fri, 28 Nov 2014) Log Message: ----------- Simplify backlinks Modified Paths: -------------- trunk/lib/InlineParser.php trunk/lib/plugin/IncludePage.php trunk/lib/plugin/Template.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2014-11-28 14:49:43 UTC (rev 9388) +++ trunk/lib/InlineParser.php 2014-11-28 14:54:59 UTC (rev 9389) @@ -441,7 +441,7 @@ } global $backlinks; - $backlinks[] = array('linkto' => $pagename, 'relation' => 0); + $backlinks[] = array('linkto' => $pagename); return new Cached_WikiLink($pagename, $label, $anchor); } Modified: trunk/lib/plugin/IncludePage.php =================================================================== --- trunk/lib/plugin/IncludePage.php 2014-11-28 14:49:43 UTC (rev 9388) +++ trunk/lib/plugin/IncludePage.php 2014-11-28 14:54:59 UTC (rev 9389) @@ -68,7 +68,7 @@ $this->run($request->_dbi, $argstr, $request, $basepage); } - $backlinks[] = array('linkto' => $page->name, 'relation' => 0); + $backlinks[] = array('linkto' => $page->name); return $backlinks; } Modified: trunk/lib/plugin/Template.php =================================================================== --- trunk/lib/plugin/Template.php 2014-11-28 14:49:43 UTC (rev 9388) +++ trunk/lib/plugin/Template.php 2014-11-28 14:54:59 UTC (rev 9389) @@ -100,7 +100,7 @@ $this->run($request->_dbi, $argstr, $request, $basepage); } - $backlinks[] = array('linkto' => $page->name, 'relation' => 0); + $backlinks[] = array('linkto' => $page->name); return $backlinks; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-11-28 14:49:46
|
Revision: 9388 http://sourceforge.net/p/phpwiki/code/9388 Author: vargenau Date: 2014-11-28 14:49:43 +0000 (Fri, 28 Nov 2014) Log Message: ----------- Type compatibility Modified Paths: -------------- trunk/lib/plugin/RecentChangesCached.php Modified: trunk/lib/plugin/RecentChangesCached.php =================================================================== --- trunk/lib/plugin/RecentChangesCached.php 2014-11-28 14:27:41 UTC (rev 9387) +++ trunk/lib/plugin/RecentChangesCached.php 2014-11-28 14:49:43 UTC (rev 9388) @@ -158,7 +158,7 @@ } // force box cache update on major changes. - function box_update($args = false, $request = false, $basepage = false) + function box_update($args = '', $request = null, $basepage = '') { $this->box($args, $request, $basepage, true); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |