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
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <var...@us...> - 2014-09-29 16:35:15
|
Revision: 9137 http://sourceforge.net/p/phpwiki/code/9137 Author: vargenau Date: 2014-09-29 16:35:13 +0000 (Mon, 29 Sep 2014) Log Message: ----------- checkCall1 and checkCall2 are not static Modified Paths: -------------- trunk/lib/WikiPluginCached.php Modified: trunk/lib/WikiPluginCached.php =================================================================== --- trunk/lib/WikiPluginCached.php 2014-09-29 16:34:31 UTC (rev 9136) +++ trunk/lib/WikiPluginCached.php 2014-09-29 16:35:13 UTC (rev 9137) @@ -643,7 +643,7 @@ * Param id and param plugincall are * also return values. */ - private static function checkCall1(&$id, &$plugincall, $cache, $request, $errorformat) + private function checkCall1(&$id, &$plugincall, $cache, $request, $errorformat) { $id = $request->getArg('id'); $plugincall = rawurldecode($request->getArg('args')); @@ -671,7 +671,7 @@ * @return bool false if an error occurs, true otherwise. * */ - static private function checkCall2(&$plugincall, $request) + private function checkCall2(&$plugincall, $request) { // if plugincall wasn't sent by URL, it must have been // stored in a session var instead and we can retreive it from there @@ -915,7 +915,7 @@ * @param string $errortext guess what? * @return void */ - protected function printError($imgtype, $errortext) + public function printError($imgtype, $errortext) { $imgtype = $this->decideImgType($imgtype); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 16:34:34
|
Revision: 9136 http://sourceforge.net/p/phpwiki/code/9136 Author: vargenau Date: 2014-09-29 16:34:31 +0000 (Mon, 29 Sep 2014) Log Message: ----------- replaceHelper is public Modified Paths: -------------- trunk/lib/plugin/WikiAdminSearchReplace.php Modified: trunk/lib/plugin/WikiAdminSearchReplace.php =================================================================== --- trunk/lib/plugin/WikiAdminSearchReplace.php 2014-09-29 15:54:08 UTC (rev 9135) +++ trunk/lib/plugin/WikiAdminSearchReplace.php 2014-09-29 16:34:31 UTC (rev 9136) @@ -149,7 +149,7 @@ return $result; } - private function replaceHelper(&$dbi, &$request, $pagename, $from, $to, $case_exact = true, $regex = false) + public function replaceHelper(&$dbi, &$request, $pagename, $from, $to, $case_exact = true, $regex = false) { $page = $dbi->getPage($pagename); if ($page->exists()) { // don't replace default contents This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 15:54:12
|
Revision: 9135 http://sourceforge.net/p/phpwiki/code/9135 Author: vargenau Date: 2014-09-29 15:54:08 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Improve type compatibility Modified Paths: -------------- trunk/lib/WikiTheme.php trunk/lib/display.php trunk/lib/purgepage.php trunk/lib/removepage.php trunk/lib/stdlib.php Modified: trunk/lib/WikiTheme.php =================================================================== --- trunk/lib/WikiTheme.php 2014-09-29 15:24:11 UTC (rev 9134) +++ trunk/lib/WikiTheme.php 2014-09-29 15:54:08 UTC (rev 9135) @@ -595,8 +595,6 @@ function linkExistingWikiWord($wikiword, $linktext = '', $version = false) { - global $request; - if ($version !== false and !$this->HTML_DUMP_SUFFIX) $url = WikiURL($wikiword, array('version' => $version)); else @@ -880,7 +878,7 @@ // //////////////////////////////////////////////////////////////// - function makeButton($text, $url, $class = false, $options = false) + function makeButton($text, $url, $class = false, $options = array()) { // FIXME: don't always try for image button? @@ -902,7 +900,7 @@ $class, $options); } - function makeSubmitButton($text, $name, $class = false, $options = false) + function makeSubmitButton($text, $name, $class = false, $options = array()) { $imgurl = $this->getButtonURL($text); @@ -1853,7 +1851,7 @@ $this->_basepage = $basepage; } - function format($args = false) + function format($args = array()) { return $this->_plugin->box($args ? array_merge($this->_args, $args) : $this->_args, $GLOBALS['request'], Modified: trunk/lib/display.php =================================================================== --- trunk/lib/display.php 2014-09-29 15:24:11 UTC (rev 9134) +++ trunk/lib/display.php 2014-09-29 15:54:08 UTC (rev 9135) @@ -217,6 +217,11 @@ return ''; } +/** + * @param WikiRequest $request + * @param bool $template + * @return string + */ function displayPage(&$request, $template = false) { global $WikiTheme; Modified: trunk/lib/purgepage.php =================================================================== --- trunk/lib/purgepage.php 2014-09-29 15:24:11 UTC (rev 9134) +++ trunk/lib/purgepage.php 2014-09-29 15:54:08 UTC (rev 9135) @@ -2,6 +2,9 @@ require_once 'lib/Template.php'; +/** + * @param WikiRequest $request + */ function PurgePage(&$request) { global $WikiTheme; Modified: trunk/lib/removepage.php =================================================================== --- trunk/lib/removepage.php 2014-09-29 15:24:11 UTC (rev 9134) +++ trunk/lib/removepage.php 2014-09-29 15:54:08 UTC (rev 9135) @@ -2,6 +2,9 @@ require_once 'lib/Template.php'; +/** + * @param WikiRequest $request + */ function RemovePage(&$request) { global $WikiTheme; Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2014-09-29 15:24:11 UTC (rev 9134) +++ trunk/lib/stdlib.php 2014-09-29 15:54:08 UTC (rev 9135) @@ -283,6 +283,7 @@ function IconForLink($protocol_or_url) { global $WikiTheme; +/* if (0 and $filename_suffix == false) { // display apache style icon for file type instead of protocol icon // - archive: unix:gz,bz2,tgz,tar,z; mac:dmg,dmgz,bin,img,cpt,sit; pc:zip; @@ -291,13 +292,14 @@ // - audio: mp3,mp2,aiff,aif,au // - multimedia: mpeg,mpg,mov,qt } else { +*/ list ($proto) = explode(':', $protocol_or_url, 2); $src = $WikiTheme->getLinkIconURL($proto); if ($src) return HTML::img(array('src' => $src, 'alt' => "", 'class' => 'linkicon')); else return false; - } +/* } */ } /** @@ -906,7 +908,8 @@ if (isa($page, 'WikiDB_Page')) return $page->getName(); elseif (isa($page, 'WikiDB_PageRevision')) - return $page->getPageName(); elseif (isa($page, 'WikiPageName')) + return $page->getPageName(); + elseif (isa($page, 'WikiPageName')) return $page->name; // '0' or e.g. '1984' should be allowed though if (!is_string($page) and !is_integer($page)) { @@ -1610,6 +1613,7 @@ return $x->hash(); } trigger_error("Can't hash $x", E_USER_ERROR); + return false; } /** @@ -1686,6 +1690,7 @@ $count += count_all($val); return $count; } + return 0; } function isSubPage($pagename) @@ -2000,6 +2005,7 @@ } } } + return ''; } // use this faster version: only load ExternalReferrer if we came from an external referrer @@ -2108,7 +2114,7 @@ if (function_exists('memory_get_usage') and memory_get_usage()) { return memory_get_usage(); } elseif (function_exists('getrusage') and ($u = @getrusage()) and !empty($u['ru_maxrss'])) { - $mem = $u['ru_maxrss']; + return $u['ru_maxrss']; } elseif (substr(PHP_OS, 0, 3) == 'WIN') { // may require a newer cygwin // what we want is the process memory only: apache or php (if CGI) $pid = getmypid(); @@ -2127,7 +2133,7 @@ //$memstr = exec("pslist $pid|grep -A1 Mem|sed 1d|perl -ane\"print \$"."F[5]\""); } return (integer)trim($memstr); - } elseif (1) { + } else { $pid = getmypid(); //%MEM: Percentage of total memory in use by this process //VSZ: Total virtual memory size, in 1K blocks. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 15:24:23
|
Revision: 9134 http://sourceforge.net/p/phpwiki/code/9134 Author: vargenau Date: 2014-09-29 15:24:11 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Improve type compatibility Modified Paths: -------------- trunk/lib/loadsave.php trunk/lib/main.php trunk/lib/ziplib.php Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2014-09-29 15:22:36 UTC (rev 9133) +++ trunk/lib/loadsave.php 2014-09-29 15:24:11 UTC (rev 9134) @@ -25,6 +25,8 @@ /** * ignore fatal errors during dump + * @param PhpError $error + * @return bool */ function _dump_error_handler($error) { @@ -33,12 +35,6 @@ return true; } return true; // Ignore error - /* - if (preg_match('/Plugin/', $error->errstr)) - return true; - */ - // let the message come through: call the remaining handlers: - // return false; } function StartLoadDump(&$request, $title, $html = '') @@ -306,8 +302,7 @@ else $content = MailifyPage($page); - $zip->addRegularFile(FilenameForPage($pagename), - $content, $attrib); + $zip->addRegularFile(FilenameForPage($pagename), $content, $attrib); } $zip->finish(); @@ -441,15 +436,13 @@ * chown httpd HTML_DUMP_DIR; chmod u+rwx HTML_DUMP_DIR * should be enough. * - * @param string directory (optional) path to dump to. Default: HTML_DUMP_DIR - * @param string pages (optional) Comma-separated of glob-style pagenames to dump. - * Also array of pagenames allowed. - * @param string exclude (optional) Comma-separated of glob-style pagenames to exclude + * @param WikiRequest $request + * */ function DumpHtmlToDir(&$request) { global $WikiTheme; - $directory = $request->getArg('directory'); + $directory = $request->getArg('directory'); // Path to dump to. Default: HTML_DUMP_DIR if (empty($directory)) $directory = HTML_DUMP_DIR; // See lib/plugin/WikiForm.php:87 if (empty($directory)) @@ -468,12 +461,16 @@ StartLoadDump($request, _("Dumping Pages"), $html); $thispage = $request->getArg('pagename'); // for "Return to ..." + // Comma-separated of glob-style pagenames to exclude $dbi =& $request->_dbi; if ($exclude = $request->getArg('exclude')) { // exclude which pagenames $excludeList = explodePageList($exclude); } else { $excludeList = array('DebugAuthInfo', 'DebugGroupInfo', 'AuthInfo'); } + + // Comma-separated of glob-style pagenames to dump. + // Also array of pagenames allowed. if ($pages = $request->getArg('pages')) { // which pagenames if ($pages == '[]') // current page $pages = $thispage; @@ -1141,7 +1138,7 @@ function _tryinsertInterWikiMap($content) { $goback = false; - if (strpos($content, "<verbatim>")) { + if (strpos($content, '<'.'verbatim'.'>')) { // Avoid warning about unknown HTML tag //$error_html = " The newly loaded pgsrc already contains a verbatim block."; $goback = true; } @@ -1313,7 +1310,7 @@ } } -function LoadZip(&$request, $zipfile, $files = false, $exclude = false) +function LoadZip(&$request, $zipfile, $files = array(), $exclude = array()) { $zip = new ZipReader($zipfile); $timeout = (!$request->getArg('start_debug')) ? 20 : 120; @@ -1334,7 +1331,7 @@ } } -function LoadDir(&$request, $dirname, $files = false, $exclude = false) +function LoadDir(&$request, $dirname, $files = array(), $exclude = array()) { $fileset = new LimitedFileSet($dirname, $files, $exclude); @@ -1408,7 +1405,7 @@ return $magic == ZIP_LOCHEAD_MAGIC || $magic == ZIP_CENTHEAD_MAGIC; } -function LoadAny(&$request, $file_or_dir, $files = false, $exclude = false) +function LoadAny(&$request, $file_or_dir, $files = array(), $exclude = array()) { // Try urlencoded filename for accented characters. if (!file_exists($file_or_dir)) { @@ -1556,7 +1553,7 @@ $fd = $upload->open(); if (IsZipFile($fd)) - LoadZip($request, $fd, false, array(_("RecentChanges"))); + LoadZip($request, $fd, array(), array(_("RecentChanges"))); else LoadFile($request, $upload->getName(), $upload->getContents()); Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-09-29 15:22:36 UTC (rev 9133) +++ trunk/lib/main.php 2014-09-29 15:24:11 UTC (rev 9134) @@ -832,7 +832,7 @@ } } - function finish($errormsg = false) + function finish($errormsg = '') { static $in_exit = 0; Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2014-09-29 15:22:36 UTC (rev 9133) +++ trunk/lib/ziplib.php 2014-09-29 15:24:11 UTC (rev 9134) @@ -271,18 +271,15 @@ header("Content-Disposition: attachment; filename=\"$zipname\""); } - function addSrcFile($target, $src, $attrib = false) + function addSrcFile($target, $src, $attrib = array()) { if (empty($attrib['mtime'])) $attrib = array('mtime' => filemtime($src), 'is_ascii' => 0); $this->addRegularFile($target, file_get_contents($src), $attrib); } - function addRegularFile($filename, $content, $attrib = false) + function addRegularFile($filename, $content, $attrib = array()) { - if (!$attrib) - $attrib = array(); - $size = strlen($content); if (function_exists('gzopen')) { list ($data, $crc32, $os_type) = zip_deflate($content); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 15:22:41
|
Revision: 9133 http://sourceforge.net/p/phpwiki/code/9133 Author: vargenau Date: 2014-09-29 15:22:36 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Add global $request; $_currentVersion is public Modified Paths: -------------- trunk/lib/editpage.php Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2014-09-29 12:59:42 UTC (rev 9132) +++ trunk/lib/editpage.php 2014-09-29 15:22:36 UTC (rev 9133) @@ -4,24 +4,23 @@ class PageEditor { - public $request; - public $user; - public $page; - /** - * @var WikiDB_PageRevision - */ - public $current; - public $editaction; - public $locked; - public $public; - public $external; + public $request; + public $user; + public $page; + /** + * @var WikiDB_PageRevision + */ + public $current; + public $editaction; + public $locked; + public $public; + public $external; + public $_currentVersion; - protected $_currentVersion; - - /** - * @var UserPreferences - */ - private $_prefs; + /** + * @var UserPreferences + */ + private $_prefs; private $_isSpam; private $_wikicontent; @@ -125,6 +124,7 @@ HTML::p(HTML::h1($this->Captcha->failed_msg)); } elseif ($this->savePage()) { // noreturn + global $request; $request->setArg('action', false); $r->redirect(WikiURL($r->getArg('save_and_redirect_to'))); return true; // Page saved. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 12:59:45
|
Revision: 9132 http://sourceforge.net/p/phpwiki/code/9132 Author: vargenau Date: 2014-09-29 12:59:42 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Define explicitely class variables Modified Paths: -------------- trunk/lib/editpage.php Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2014-09-29 12:58:35 UTC (rev 9131) +++ trunk/lib/editpage.php 2014-09-29 12:59:42 UTC (rev 9132) @@ -1,9 +1,34 @@ <?php require_once 'lib/Template.php'; +require_once 'lib/WikiUser.php'; class PageEditor { - function PageEditor(&$request) + public $request; + public $user; + public $page; + /** + * @var WikiDB_PageRevision + */ + public $current; + public $editaction; + public $locked; + public $public; + public $external; + + protected $_currentVersion; + + /** + * @var UserPreferences + */ + private $_prefs; + private $_isSpam; + private $_wikicontent; + + /** + * @param WikiRequest $request + */ + function __construct(&$request) { $this->request = &$request; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 12:58:42
|
Revision: 9131 http://sourceforge.net/p/phpwiki/code/9131 Author: vargenau Date: 2014-09-29 12:58:35 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Update PHP Doc Modified Paths: -------------- trunk/lib/WikiDB.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2014-09-29 12:27:30 UTC (rev 9130) +++ trunk/lib/WikiDB.php 2014-09-29 12:58:35 UTC (rev 9131) @@ -1797,7 +1797,7 @@ /** * Get all the revision page meta-data as a hash. * - * @return hash The revision meta-data. + * @return array The revision meta-data. */ function getMetaData() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-29 12:27:38
|
Revision: 9130 http://sourceforge.net/p/phpwiki/code/9130 Author: vargenau Date: 2014-09-29 12:27:30 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/WikiUser.php Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-09-27 17:53:55 UTC (rev 9129) +++ trunk/lib/WikiUser.php 2014-09-29 12:27:30 UTC (rev 9130) @@ -1929,7 +1929,7 @@ { public $notifyPagesAll; - function UserPreferences($saved_prefs = false) + function __construct($saved_prefs = false) { // userid stored too, to ensure the prefs are being loaded for // the correct (currently signing in) userid if stored in a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-27 17:54:03
|
Revision: 9129 http://sourceforge.net/p/phpwiki/code/9129 Author: vargenau Date: 2014-09-27 17:53:55 +0000 (Sat, 27 Sep 2014) Log Message: ----------- Add return Modified Paths: -------------- trunk/lib/main.php Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-09-26 17:02:59 UTC (rev 9128) +++ trunk/lib/main.php 2014-09-27 17:53:55 UTC (rev 9129) @@ -333,6 +333,7 @@ if (isset($this->_prefs)) { return $this->_prefs->get($key); } + return false; } function & getDbh() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 17:03:06
|
Revision: 9128 http://sourceforge.net/p/phpwiki/code/9128 Author: vargenau Date: 2014-09-26 17:02:59 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Rename lib/WikiUserNew.php --> lib/WikiUser.php Modified Paths: -------------- trunk/SOAP.php trunk/lib/PagePerm.php trunk/lib/imagecache.php trunk/lib/main.php trunk/lib/plugin/UserRatings.php trunk/locale/Makefile 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 trunk/pgsrc/Help%2FPagePermissions trunk/pgsrc/ReleaseNotes Added Paths: ----------- trunk/lib/WikiUser.php Removed Paths: ------------- trunk/lib/WikiUserNew.php Modified: trunk/SOAP.php =================================================================== --- trunk/SOAP.php 2014-09-26 16:44:55 UTC (rev 9127) +++ trunk/SOAP.php 2014-09-26 17:02:59 UTC (rev 9128) @@ -33,7 +33,7 @@ class WikiRequest extends Request {} $request = new WikiRequest(); require_once 'lib/PagePerm.php'; -require_once 'lib/WikiUserNew.php'; +require_once 'lib/WikiUser.php'; require_once 'lib/WikiGroup.php'; */ Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2014-09-26 16:44:55 UTC (rev 9127) +++ trunk/lib/PagePerm.php 2014-09-26 17:02:59 UTC (rev 9128) @@ -31,7 +31,7 @@ * optional master page ("."), and predefined default permissions, if "." * is not defined. * Pagenames starting with "." have special default permissions. - * For Authentication see WikiUserNew.php, WikiGroup.php and main.php + * For Authentication see WikiUser.php, WikiGroup.php and main.php * Page Permissions are in PhpWiki since v1.3.9 and enabled since v1.4.0 * * This file might replace the following functions from main.php: Copied: trunk/lib/WikiUser.php (from rev 9127, trunk/lib/WikiUserNew.php) =================================================================== --- trunk/lib/WikiUser.php (rev 0) +++ trunk/lib/WikiUser.php 2014-09-26 17:02:59 UTC (rev 9128) @@ -0,0 +1,2290 @@ +<?php +/* Copyright (C) 2004,2005,2006,2007,2009,2010 $ThePhpWikiProgrammingTeam + * Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent + * Copyright (C) 2009-2010 Roger Guignard, Alcatel-Lucent + * + * This file is part of PhpWiki. + * + * PhpWiki is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * PhpWiki is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with PhpWiki; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +/** + * This is a complete OOP rewrite of the old WikiUser code with various + * configurable external authentication methods. + * + * There's only one entry point, the function WikiUser which returns + * a WikiUser object, which contains the name, authlevel and user's preferences. + * This object might get upgraded during the login step and later also. + * There exist three preferences storage methods: cookie, homepage and db, + * and multiple password checking methods. + * See index.php for $USER_AUTH_ORDER[] and USER_AUTH_POLICY if + * ALLOW_USER_PASSWORDS is defined. + * + * Each user object must define the two preferences methods + * getPreferences(), setPreferences(), + * and the following 1-4 auth methods + * checkPass() must be defined by all classes, + * userExists() only if USER_AUTH_POLICY'=='strict' + * mayChangePass() only if the password is storable. + * storePass() only if the password is storable. + * + * WikiUser() given no name, returns an _AnonUser (anonymous user) + * object, who may or may not have a cookie. + * However, if the there's a cookie with the userid or a session, + * the user is upgraded to the matching user object. + * Given a user name, returns a _BogoUser object, who may or may not + * have a cookie and/or PersonalPage, one of the various _PassUser objects + * or an _AdminUser object. + * BTW: A BogoUser is a userid (loginname) as valid WikiWord, who might + * have stored a password or not. If so, his account is secure, if not + * anybody can use it, because the username is visible e.g. in RecentChanges. + * + * Takes care of passwords, all preference loading/storing in the + * user's page and any cookies. lib/main.php will query the user object to + * verify the password as appropriate. + * + * @author: Reini Urban (the tricky parts), + * Carsten Klapp (started rolling the ball) + * + * Random architectural notes, sorted by date: + * 2004-01-25 rurban + * 1) Now a ForbiddenUser is returned instead of false. + * 2) Previously ALLOW_ANON_USER = false meant that anon users cannot edit, + * but may browse. Now with ALLOW_ANON_USER = false he may not browse, + * which is needed to disable browse PagePermissions. + * I added now ALLOW_ANON_EDIT = true to makes things clear. + * (which replaces REQUIRE_SIGNIN_BEFORE_EDIT) + * 2004-02-27 rurban: + * 3) Removed pear prepare. Performance hog, and using integers as + * handler doesn't help. Do simple sprintf as with adodb. And a prepare + * in the object init is no advantage, because in the init loop a lot of + * objects are tried, but not used. + * 4) Already gotten prefs are passed to the next object to avoid + * duplicate getPreferences() calls. + * 2004-03-18 rurban + * 5) Major php-5 problem: $this re-assignment is disallowed by the parser + * So we cannot just discrimate with + * if (!check_php_version(5)) + * $this = $user; + * A /php5-patch.php is provided, which patches the src automatically + * for php4 and php5. Default is php4. + * Update: not needed anymore. we use eval to fool the load-time syntax checker. + * 2004-03-24 rurban + * 6) enforced new cookie policy: prefs don't get stored in cookies + * anymore, only in homepage and/or database, but always in the + * current session. old pref cookies will get deleted. + * 2004-04-04 rurban + * 7) Certain themes should be able to extend the predefined list + * of preferences. Display/editing is done in the theme specific userprefs.tmpl, + * but storage must be extended to the Get/SetPreferences methods. + * <theme>/themeinfo.php must provide CustomUserPreferences: + * A list of name => _UserPreference class pairs. + * 2010-06-07 rurban + * Fixed a nasty recursion bug (i.e. php crash), when user = new class + * which returned false, did not return false on php-4.4.7. Check for + * a object member now. + */ + +define('WIKIAUTH_FORBIDDEN', -1); // Completely not allowed. +define('WIKIAUTH_ANON', 0); // Not signed in. +define('WIKIAUTH_BOGO', 1); // Any valid WikiWord is enough. +define('WIKIAUTH_USER', 2); // Bogo user with a password. +define('WIKIAUTH_ADMIN', 10); // UserName == ADMIN_USER. +define('WIKIAUTH_UNOBTAINABLE', 100); // Permissions that no user can achieve + +//if (!defined('COOKIE_EXPIRATION_DAYS')) define('COOKIE_EXPIRATION_DAYS', 365); +//if (!defined('COOKIE_DOMAIN')) define('COOKIE_DOMAIN', '/'); +if (!defined('EDITWIDTH_MIN_COLS')) define('EDITWIDTH_MIN_COLS', 30); +if (!defined('EDITWIDTH_MAX_COLS')) define('EDITWIDTH_MAX_COLS', 150); +if (!defined('EDITWIDTH_DEFAULT_COLS')) define('EDITWIDTH_DEFAULT_COLS', 80); + +if (!defined('EDITHEIGHT_MIN_ROWS')) define('EDITHEIGHT_MIN_ROWS', 5); +if (!defined('EDITHEIGHT_MAX_ROWS')) define('EDITHEIGHT_MAX_ROWS', 80); +if (!defined('EDITHEIGHT_DEFAULT_ROWS')) define('EDITHEIGHT_DEFAULT_ROWS', 22); + +define('TIMEOFFSET_MIN_HOURS', -26); +define('TIMEOFFSET_MAX_HOURS', 26); +if (!defined('TIMEOFFSET_DEFAULT_HOURS')) define('TIMEOFFSET_DEFAULT_HOURS', 0); + +/* EMAIL VERIFICATION + * On certain nets or hosts the email domain cannot be determined automatically from the DNS. + * Provide some overrides here. + * ( username @ ) domain => mail-domain + */ +$EMailHosts = array('avl.com' => 'mail.avl.com'); + +/** + * There are be the following constants in config/config.ini to + * establish login parameters: + * + * ALLOW_ANON_USER default true + * ALLOW_ANON_EDIT default true + * ALLOW_BOGO_LOGIN default true + * ALLOW_USER_PASSWORDS default true + * PASSWORD_LENGTH_MINIMUM default 0 + * + * To require user passwords for editing: + * ALLOW_ANON_USER = true + * ALLOW_ANON_EDIT = false (before named REQUIRE_SIGNIN_BEFORE_EDIT) + * ALLOW_BOGO_LOGIN = false + * ALLOW_USER_PASSWORDS = true + * + * To establish a COMPLETELY private wiki, such as an internal + * corporate one: + * ALLOW_ANON_USER = false + * (and probably require user passwords as described above). In this + * case the user will be prompted to login immediately upon accessing + * any page. + * + * There are other possible combinations, but the typical wiki (such + * as http://PhpWiki.sf.net/phpwiki) would usually just leave all four + * enabled. + * + */ + +// The last object in the row is the bad guy... +if (!is_array($USER_AUTH_ORDER)) + $USER_AUTH_ORDER = array("Forbidden"); +else + $USER_AUTH_ORDER[] = "Forbidden"; + +// Local convenience functions. +function _isAnonUserAllowed() +{ + return (defined('ALLOW_ANON_USER') && ALLOW_ANON_USER); +} + +function _isBogoUserAllowed() +{ + return (defined('ALLOW_BOGO_LOGIN') && ALLOW_BOGO_LOGIN); +} + +function _isUserPasswordsAllowed() +{ + return (defined('ALLOW_USER_PASSWORDS') && ALLOW_USER_PASSWORDS); +} + +// Possibly upgrade userobject functions. +function _determineAdminUserOrOtherUser($UserName) +{ + // Sanity check. User name is a condition of the definition of the + // _AdminUser, _BogoUser and _passuser. + if (!$UserName) + return $GLOBALS['ForbiddenUser']; + + //FIXME: check admin membership later at checkPass. Now we cannot raise the level. + //$group = &WikiGroup::getGroup($GLOBALS['request']); + if ($UserName == ADMIN_USER) + return new _AdminUser($UserName); + /* elseif ($group->isMember(GROUP_ADMIN)) { // unneeded code + return _determineBogoUserOrPassUser($UserName); + } + */ + else + return _determineBogoUserOrPassUser($UserName); +} + +function _determineBogoUserOrPassUser($UserName) +{ + global $ForbiddenUser; + + // Sanity check. User name is a condition of the definition of + // _BogoUser and _PassUser. + if (!$UserName) + return $ForbiddenUser; + + // Check for password and possibly upgrade user object. + // $_BogoUser = new _BogoUser($UserName); + if (_isBogoUserAllowed() and isWikiWord($UserName)) { + include_once 'lib/WikiUser/BogoLogin.php'; + $_BogoUser = new _BogoLoginPassUser($UserName); + if ($_BogoUser->userExists() or $GLOBALS['request']->getArg('auth')) + return $_BogoUser; + } + if (_isUserPasswordsAllowed()) { + // PassUsers override BogoUsers if a password is stored + if (isset($_BogoUser) and isset($_BogoUser->_prefs) + and $_BogoUser->_prefs->get('passwd') + ) + return new _PassUser($UserName, $_BogoUser->_prefs); + else { + $_PassUser = new _PassUser($UserName, + isset($_BogoUser) ? $_BogoUser->_prefs : false); + if ($_PassUser->userExists() or $GLOBALS['request']->getArg('auth')) { + if (isset($GLOBALS['request']->_user_class)) + $class = $GLOBALS['request']->_user_class; + elseif (strtolower(get_class($_PassUser)) == "_passuser") + $class = $_PassUser->nextClass(); else + $class = get_class($_PassUser); + if ($user = new $class($UserName, $_PassUser->_prefs) + and $user->_userid + ) { + return $user; + } else { + return $_PassUser; + } + } + } + } + // No Bogo- or PassUser exists, or + // passwords are not allowed, and bogo is disallowed too. + // (Only the admin can sign in). + return $ForbiddenUser; +} + +/** + * Primary WikiUser function, called by lib/main.php. + * + * This determines the user's type and returns an appropriate user + * object. lib/main.php then querys the resultant object for password + * validity as necessary. + * + * If an _AnonUser object is returned, the user may only browse pages + * (and save prefs in a cookie). + * + * To disable access but provide prefs the global $ForbiddenUser class + * is returned. (was previously false) + * + */ +function WikiUser($UserName = '') +{ + global $ForbiddenUser, $HTTP_SESSION_VARS; + + //Maybe: Check sessionvar for username & save username into + //sessionvar (may be more appropriate to do this in lib/main.php). + if ($UserName) { + $ForbiddenUser = new _ForbiddenUser($UserName); + // Found a user name. + return _determineAdminUserOrOtherUser($UserName); + } elseif (!empty($HTTP_SESSION_VARS['userid'])) { + // Found a user name. + $ForbiddenUser = new _ForbiddenUser($_SESSION['userid']); + return _determineAdminUserOrOtherUser($_SESSION['userid']); + } else { + // Check for autologin pref in cookie and possibly upgrade + // user object to another type. + $_AnonUser = new _AnonUser(); + if ($UserName = $_AnonUser->_userid && $_AnonUser->_prefs->get('autologin')) { + // Found a user name. + $ForbiddenUser = new _ForbiddenUser($UserName); + return _determineAdminUserOrOtherUser($UserName); + } else { + $ForbiddenUser = new _ForbiddenUser(); + if (_isAnonUserAllowed()) + return $_AnonUser; + return $ForbiddenUser; // User must sign in to browse pages. + } + } +} + +/** + * WikiUser.php use the name 'WikiUser' + */ +function WikiUserClassname() +{ + return '_WikiUser'; +} + +/** + * Upgrade olduser by copying properties from user to olduser. + * We are not sure yet, for which php's a simple $this = $user works reliably, + * (on php4 it works ok, on php5 it's currently disallowed on the parser level) + * that's why try it the hard way. + */ +function UpgradeUser($user, $newuser) +{ + if (isa($user, '_WikiUser') and isa($newuser, '_WikiUser')) { + // populate the upgraded class $newuser with the values from the current user object + //only _auth_level, _current_method, _current_index, + if (!empty($user->_level) and + $user->_level > $newuser->_level + ) + $newuser->_level = $user->_level; + if (!empty($user->_current_index) and + $user->_current_index > $newuser->_current_index + ) { + $newuser->_current_index = $user->_current_index; + $newuser->_current_method = $user->_current_method; + } + if (!empty($user->_authmethod)) + $newuser->_authmethod = $user->_authmethod; + $GLOBALS['request']->_user_class = get_class($newuser); + /* + foreach (get_object_vars($user) as $k => $v) { + if (!empty($v)) $olduser->$k = $v; + } + */ + $newuser->hasHomePage(); // revive db handle, because these don't survive sessions + //$GLOBALS['request']->_user = $olduser; + return $newuser; + } else { + return false; + } +} + +/** + * 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 (isa($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 +{ + public $_userid = ''; + public $_level = WIKIAUTH_ANON; + public $_prefs = false; + public $_HomePagehandle = false; + + // constructor + function _WikiUser($UserName = '', $prefs = false) + { + + $this->_userid = $UserName; + $this->_HomePagehandle = false; + if ($UserName) { + $this->hasHomePage(); + } + if (empty($this->_prefs)) { + if ($prefs) $this->_prefs = $prefs; + else $this->getPreferences(); + } + } + + function UserName() + { + if (!empty($this->_userid)) { + return $this->_userid; + } else { + return ''; + } + } + + function getPreferences() + { + trigger_error("DEBUG: Note: undefined _WikiUser class trying to load prefs." . " " + . "New subclasses of _WikiUser must override this function."); + return false; + } + + 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; + } + + 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; + } + + // returns page_handle to user's home page or false if none + function hasHomePage() + { + if ($this->_userid) { + if (!empty($this->_HomePagehandle) and is_object($this->_HomePagehandle)) { + return $this->_HomePagehandle->exists(); + } else { + // check db again (maybe someone else created it since + // we logged in.) + global $request; + $this->_HomePagehandle = $request->getPage($this->_userid); + return $this->_HomePagehandle->exists(); + } + } + // nope + return false; + } + + function createHomePage() + { + global $request; + $versiondata = array('author' => ADMIN_USER); + $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences.") . + "\n{{Template/UserPage}}", + 1, $versiondata); + $request->_dbi->touch(); + $this->_HomePagehandle = $request->getPage($this->_userid); + } + + // innocent helper: case-insensitive position in _auth_methods + function array_position($string, $array) + { + $string = strtolower($string); + for ($found = 0; $found < count($array); $found++) { + if (strtolower($array[$found]) == $string) + return $found; + } + return false; + } + + function nextAuthMethodIndex() + { + if (empty($this->_auth_methods)) + $this->_auth_methods = $GLOBALS['USER_AUTH_ORDER']; + if (empty($this->_current_index)) { + if (strtolower(get_class($this)) != '_passuser') { + $this->_current_method = substr(get_class($this), 1, -8); + $this->_current_index = $this->array_position($this->_current_method, + $this->_auth_methods); + } else { + $this->_current_index = -1; + } + } + $this->_current_index++; + if ($this->_current_index >= count($this->_auth_methods)) + return false; + $this->_current_method = $this->_auth_methods[$this->_current_index]; + return $this->_current_index; + } + + function AuthMethod($index = false) + { + return $this->_auth_methods[$index === false + ? count($this->_auth_methods) - 1 + : $index]; + } + + // upgrade the user object + function nextClass() + { + $method = $this->AuthMethod($this->nextAuthMethodIndex()); + include_once("lib/WikiUser/$method.php"); + return "_" . $method . "PassUser"; + } + + //Fixme: for _HttpAuthPassUser + function PrintLoginForm(&$request, $args, $fail_message = false, + $separate_page = false) + { + include_once 'lib/Template.php'; + // Call update_locale in case the system's default language is not 'en'. + // (We have no user pref for lang at this point yet, no one is logged in.) + if ($GLOBALS['LANG'] != DEFAULT_LANGUAGE) + update_locale(DEFAULT_LANGUAGE); + $userid = $this->_userid; + $require_level = 0; + extract($args); // fixme + + $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level)); + + $pagename = $request->getArg('pagename'); + $nocache = 1; + $login = Template('login', + compact('pagename', 'userid', 'require_level', + 'fail_message', 'pass_required', 'nocache')); + // check if the html template was already processed + $separate_page = $separate_page ? true : !alreadyTemplateProcessed('html'); + if ($separate_page) { + $page = $request->getPage($pagename); + $revision = $page->getCurrentRevision(); + return GeneratePage($login, _("Sign In"), $revision); + } else { + return $login->printExpansion(); + } + } + + /** Signed in but not password checked or empty password. + */ + function isSignedIn() + { + return (isa($this, '_BogoUser') or isa($this, '_PassUser')); + } + + /** This is password checked for sure. + */ + function isAuthenticated() + { + //return isa($this,'_PassUser'); + //return isa($this,'_BogoUser') || isa($this,'_PassUser'); + return $this->_level >= WIKIAUTH_BOGO; + } + + function isAdmin() + { + static $group; + if ($this->_level == WIKIAUTH_ADMIN) return true; + if (!$this->isSignedIn()) return false; + if (!$this->isAuthenticated()) return false; + + if (!$group) $group = &$GLOBALS['request']->getGroup(); + return ($this->_level > WIKIAUTH_BOGO and $group->isMember(GROUP_ADMIN)); + } + + /** Name or IP for a signed user. UserName could come from a cookie e.g. + */ + function getId() + { + return ($this->UserName() + ? $this->UserName() + : $GLOBALS['request']->get('REMOTE_ADDR')); + } + + /** Name for an authenticated user. No IP here. + */ + function getAuthenticatedId() + { + return ($this->isAuthenticated() + ? $this->_userid + : ''); //$GLOBALS['request']->get('REMOTE_ADDR') ); + } + + function hasAuthority($require_level) + { + return $this->_level >= $require_level; + } + + /* This is quite restrictive and not according the login description online. + Any word char (A-Za-z0-9_), " ", ".", "@" and "-" + The backends may loosen or tighten this. + */ + function isValidName($userid = false) + { + if (!$userid) $userid = $this->_userid; + if (!$userid) return false; + if (defined('FUSIONFORGE') and FUSIONFORGE) { + return true; + } + return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32; + } + + /** + * Called on an auth_args POST request, such as login, logout or signin. + * TODO: Check BogoLogin users with empty password. (self-signed users) + */ + function AuthCheck($postargs) + { + // Normalize args, and extract. + $keys = array('userid', 'passwd', 'require_level', 'login', 'logout', + 'cancel'); + foreach ($keys as $key) + $args[$key] = isset($postargs[$key]) ? $postargs[$key] : false; + extract($args); + $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level)); + + if ($logout) { // Log out + if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { + 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"', + (string)$request->get('REMOTE_HOST'), + (string)$request->_user->_userid, + $ncsa_time, $zone_offset, + "logout " . get_class($request->_user), + "401", + (string)$request->get('HTTP_REFERER'), + (string)$request->get('HTTP_USER_AGENT') + ); + if (($fp = fopen(LOGIN_LOG, "a"))) { + flock($fp, LOCK_EX); + fputs($fp, "$entry\n"); + fclose($fp); + } + //error_log("$entry\n", 3, LOGIN_LOG); + } + if (method_exists($GLOBALS['request']->_user, "logout")) { //_HttpAuthPassUser + $GLOBALS['request']->_user->logout(); + } + $user = new _AnonUser(); + $user->_userid = ''; + $user->_level = WIKIAUTH_ANON; + return $user; + } elseif ($cancel) + return false; // User hit cancel button. + elseif (!$login && !$userid) + return false; // Nothing to do? + + if (!$this->isValidName($userid)) + return _("Invalid username."); + ; + + $authlevel = $this->checkPass($passwd === false ? '' : $passwd); + + if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { + global $request; + $zone_offset = Request_AccessLogEntry::_zone_offset(); + $ncsa_time = date("d/M/Y:H:i:s", time()); + $manglepasswd = $passwd; + for ($i = 0; $i < strlen($manglepasswd); $i++) { + $c = substr($manglepasswd, $i, 1); + if (ord($c) < 32) $manglepasswd[$i] = "<"; + elseif ($c == '*') $manglepasswd[$i] = "*"; elseif ($c == '?') $manglepasswd[$i] = "?"; elseif ($c == '(') $manglepasswd[$i] = "("; elseif ($c == ')') $manglepasswd[$i] = ")"; elseif ($c == "\\") $manglepasswd[$i] = "\\"; elseif (ord($c) < 127) $manglepasswd[$i] = "x"; elseif (ord($c) >= 127) $manglepasswd[$i] = ">"; + } + if ((DEBUG & _DEBUG_LOGIN) and $authlevel <= 0) $manglepasswd = $passwd; + $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"', + $request->get('REMOTE_HOST'), + (string)$request->_user->_userid, + $ncsa_time, $zone_offset, + "login $userid/$manglepasswd => $authlevel " . get_class($request->_user), + $authlevel > 0 ? "200" : "403", + (string)$request->get('HTTP_REFERER'), + (string)$request->get('HTTP_USER_AGENT') + ); + if (($fp = fopen(LOGIN_LOG, "a"))) { + flock($fp, LOCK_EX); + fputs($fp, "$entry\n"); + fclose($fp); + } + //error_log("$entry\n", 3, LOGIN_LOG); + } + + if ($authlevel <= 0) { // anon or forbidden + if ($passwd) + return _("Invalid password."); + else + return _("Invalid password or userid."); + } elseif ($authlevel < $require_level) { // auth ok, but not enough + if (!empty($this->_current_method) and strtolower(get_class($this)) == '_passuser') { + // upgrade class + $class = "_" . $this->_current_method . "PassUser"; + include_once 'lib/WikiUser/' . $this->_current_method . '.php'; + $user = new $class($userid, $this->_prefs); + $this->_level = $authlevel; + return $user; + } + $this->_userid = $userid; + $this->_level = $authlevel; + return _("Insufficient permissions."); + } + + // Successful login. + //$user = $GLOBALS['request']->_user; + if (!empty($this->_current_method) and + strtolower(get_class($this)) == '_passuser' + ) { + // upgrade class + $class = "_" . $this->_current_method . "PassUser"; + include_once 'lib/WikiUser/' . $this->_current_method . '.php'; + $user = new $class($userid, $this->_prefs); + $user->_level = $authlevel; + return $user; + } + $this->_userid = $userid; + $this->_level = $authlevel; + return $this; + } + +} + +/** + * Not authenticated in user, but he may be signed in. Basicly with view access only. + * prefs are stored in cookies, but only the userid. + */ +class _AnonUser + extends _WikiUser +{ + public $_level = WIKIAUTH_ANON; + + /** Anon only gets to load and save prefs in a cookie, that's it. + */ + function getPreferences() + { + global $request; + + if (empty($this->_prefs)) + $this->_prefs = new UserPreferences; + $UserName = $this->UserName(); + + // Try to read deprecated 1.3.x style cookies + if ($cookie = $request->cookies->get_old(WIKI_NAME)) { + if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) { + trigger_error(_("Empty Preferences or format of UserPreferences cookie not recognised.") + . "\n" + . sprintf("%s='%s'", WIKI_NAME, $cookie) + . "\n" + . _("Default preferences will be used."), + E_USER_NOTICE); + } + /** + * Only set if it matches the UserName who is + * signing in or if this really is an Anon login (no + * username). (Remember, _BogoUser and higher inherit this + * function too!). + */ + if (!$UserName || $UserName == @$unboxedcookie['userid']) { + $this->_prefs->updatePrefs($unboxedcookie); + $UserName = @$unboxedcookie['userid']; + if (is_string($UserName) and (substr($UserName, 0, 2) != 's:')) + $this->_userid = $UserName; + else + $UserName = false; + } + // v1.3.8 policy: don't set PhpWiki cookies, only plaintext WIKI_ID cookies + if (!headers_sent()) + $request->deleteCookieVar(WIKI_NAME); + } + // Try to read deprecated 1.3.4 style cookies + if (!$UserName and ($cookie = $request->cookies->get_old("WIKI_PREF2"))) { + if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) { + if (!$UserName || $UserName == $unboxedcookie['userid']) { + $this->_prefs->updatePrefs($unboxedcookie); + $UserName = $unboxedcookie['userid']; + if (is_string($UserName) and (substr($UserName, 0, 2) != 's:')) + $this->_userid = $UserName; + else + $UserName = false; + } + if (!headers_sent()) + $request->deleteCookieVar("WIKI_PREF2"); + } + } + if (!$UserName) { + // Try reading userid from old PhpWiki cookie formats: + if ($cookie = $request->cookies->get_old(getCookieName())) { + if (is_string($cookie) and (substr($cookie, 0, 2) != 's:')) + $UserName = $cookie; + elseif (is_array($cookie) and !empty($cookie['userid'])) + $UserName = $cookie['userid']; + } + if (!$UserName and !headers_sent()) + $request->deleteCookieVar(getCookieName()); + else + $this->_userid = $UserName; + } + + // initializeTheme() needs at least an empty object + /* + if (empty($this->_prefs)) + $this->_prefs = new UserPreferences; + */ + return $this->_prefs; + } + + /** _AnonUser::setPreferences(): Save prefs in a cookie and session and update all global vars + * + * Allow for multiple wikis in same domain. Encode only the + * _prefs array of the UserPreference object. Ideally the + * prefs array should just be imploded into a single string or + * something so it is completely human readable by the end + * user. In that case stricter error checking will be needed + * when loading the cookie. + */ + function setPreferences($prefs, $id_only = false) + { + if (!is_object($prefs)) { + if (is_object($this->_prefs)) { + $updated = $this->_prefs->updatePrefs($prefs); + $prefs =& $this->_prefs; + } else { + // update the prefs values from scratch. This could lead to unnecessary + // side-effects: duplicate emailVerified, ... + $this->_prefs = new UserPreferences($prefs); + $updated = true; + } + } else { + if (!isset($this->_prefs)) + $this->_prefs =& $prefs; + else + $updated = $this->_prefs->isChanged($prefs); + } + if ($updated) { + if ($id_only and !headers_sent()) { + 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. + $request->setCookieVar(getCookieName(), $this->_userid, + COOKIE_EXPIRATION_DAYS, COOKIE_DOMAIN); + //$request->setCookieVar(WIKI_NAME, array('userid' => $prefs->get('userid')), + // COOKIE_EXPIRATION_DAYS, COOKIE_DOMAIN); + } + } + if (is_object($prefs)) { + $packed = $prefs->store(); + $unpacked = $prefs->unpack($packed); + if (count($unpacked)) { + foreach (array('_method', '_select', '_update', '_insert') as $param) { + if (!empty($this->_prefs->{$param})) + $prefs->{$param} = $this->_prefs->{$param}; + } + $this->_prefs = $prefs; + } + } + return $updated; + } + + function userExists() + { + return true; + } + + function checkPass($submitted_password) + { + return false; + } + +} + +/** + * Helper class to finish the PassUser auth loop. + * This is added automatically to USER_AUTH_ORDER. + */ +class _ForbiddenUser + extends _AnonUser +{ + public $_level = WIKIAUTH_FORBIDDEN; + + function checkPass($submitted_password) + { + return WIKIAUTH_FORBIDDEN; + } + + function userExists() + { + if ($this->_HomePagehandle) return true; + return false; + } +} + +/** + * Do NOT extend _BogoUser to other classes, for checkPass() + * security. (In case of defects in code logic of the new class!) + * The intermediate step between anon and passuser. + * We also have the _BogoLoginPassUser class with stricter + * password checking, which fits into the auth loop. + * Note: This class is not called anymore by WikiUser() + */ +class _BogoUser + extends _AnonUser +{ + function userExists() + { + if (isWikiWord($this->_userid)) { + $this->_level = WIKIAUTH_BOGO; + return true; + } else { + $this->_level = WIKIAUTH_ANON; + return false; + } + } + + function checkPass($submitted_password) + { + // By definition, BogoUser has an empty password. + $this->userExists(); + return $this->_level; + } +} + +class _PassUser + extends _AnonUser + /** + * Called if ALLOW_USER_PASSWORDS and Anon and Bogo failed. + * + * The classes for all subsequent auth methods extend from this class. + * This handles the auth method type dispatcher according $USER_AUTH_ORDER, + * the three auth method policies first-only, strict and stacked + * and the two methods for prefs: homepage or database, + * if $DBAuthParams['pref_select'] is defined. + * + * Default is PersonalPage auth and prefs. + * + * @author: Reini Urban + * @tables: pref + */ +{ + public $_auth_dbi, $_prefs; + public $_current_method, $_current_index; + + // check and prepare the auth and pref methods only once + function _PassUser($UserName = '', $prefs = false) + { + //global $DBAuthParams, $DBParams; + if ($UserName) { + /*if (!$this->isValidName($UserName)) + return false;*/ + $this->_userid = $UserName; + if ($this->hasHomePage()) + $this->_HomePagehandle = $GLOBALS['request']->getPage($this->_userid); + } + $this->_authmethod = substr(get_class($this), 1, -8); + if ($this->_authmethod == 'a') $this->_authmethod = 'admin'; + + // Check the configured Prefs methods + $dbi = $this->getAuthDbh(); + $dbh = $GLOBALS['request']->getDbh(); + if ($dbi + and !$dbh->readonly + and !isset($this->_prefs->_select) + and $dbh->getAuthParam('pref_select') + ) { + if (!$this->_prefs) { + $this->_prefs = new UserPreferences(); + $need_pref = true; + } + $this->_prefs->_method = $dbh->getParam('dbtype'); + $this->_prefs->_select = $this->prepare($dbh->getAuthParam('pref_select'), "userid"); + // read-only prefs? + if (!isset($this->_prefs->_update) and $dbh->getAuthParam('pref_update')) { + $this->_prefs->_update = $this->prepare($dbh->getAuthParam('pref_update'), + array("userid", "pref_blob")); + } + } else { + if (!$this->_prefs) { + $this->_prefs = new UserPreferences(); + $need_pref = true; + } + $this->_prefs->_method = 'HomePage'; + } + + if (!$this->_prefs or isset($need_pref)) { + if ($prefs) $this->_prefs = $prefs; + else $this->getPreferences(); + } + + // Upgrade to the next parent _PassUser class. Avoid recursion. + if (strtolower(get_class($this)) === '_passuser') { + //auth policy: Check the order of the configured auth methods + // 1. first-only: Upgrade the class here in the constructor + // 2. old: ignore USER_AUTH_ORDER and try to use all available methods as + /// in the previous PhpWiki releases (slow) + // 3. strict: upgrade the class after checking the user existance in userExists() + // 4. stacked: upgrade the class after the password verification in checkPass() + // Methods: PersonalPage, HttpAuth, DB, Ldap, Imap, File + //if (!defined('USER_AUTH_POLICY')) define('USER_AUTH_POLICY','old'); + if (defined('USER_AUTH_POLICY')) { + // policy 1: only pre-define one method for all users + if (USER_AUTH_POLICY === 'first-only') { + $class = $this->nextClass(); + return new $class($UserName, $this->_prefs); + } // Use the default behaviour from the previous versions: + elseif (USER_AUTH_POLICY === 'old') { + // Default: try to be smart + // On php5 we can directly return and upgrade the Object, + // before we have to upgrade it manually. + if (!empty($GLOBALS['PHP_AUTH_USER']) or !empty($_SERVER['REMOTE_USER'])) { + include_once 'lib/WikiUser/HttpAuth.php'; + return new _HttpAuthPassUser($UserName, $this->_prefs); + } elseif (in_array('Db', $dbh->getAuthParam('USER_AUTH_ORDER')) and + $dbh->getAuthParam('auth_check') and + ($dbh->getAuthParam('auth_dsn') or $dbh->getParam('dsn')) + ) { + return new _DbPassUser($UserName, $this->_prefs); + } elseif (in_array('LDAP', $dbh->getAuthParam('USER_AUTH_ORDER')) and + defined('LDAP_AUTH_HOST') and defined('LDAP_BASE_DN') and + function_exists('ldap_connect') + ) { + include_once 'lib/WikiUser/LDAP.php'; + return new _LDAPPassUser($UserName, $this->_prefs); + } elseif (in_array('IMAP', $dbh->getAuthParam('USER_AUTH_ORDER')) and + defined('IMAP_AUTH_HOST') and function_exists('imap_open') + ) { + include_once 'lib/WikiUser/IMAP.php'; + return new _IMAPPassUser($UserName, $this->_prefs); + } elseif (in_array('File', $dbh->getAuthParam('USER_AUTH_ORDER')) and + defined('AUTH_USER_FILE') and file_exists(AUTH_USER_FILE) + ) { + include_once 'lib/WikiUser/File.php'; + return new _FilePassUser($UserName, $this->_prefs); + } else { + include_once 'lib/WikiUser/PersonalPage.php'; + return new _PersonalPagePassUser($UserName, $this->_prefs); + } + } else + // else use the page methods defined in _PassUser. + return $this; + } + } + } + + function getAuthDbh() + { + global $request; //, $DBParams, $DBAuthParams; + + $dbh = $request->getDbh(); + // session restauration doesn't re-connect to the database automatically, + // so dirty it here, to force a reconnect. + if (isset($this->_auth_dbi)) { + if (($dbh->getParam('dbtype') == 'SQL') and empty($this->_auth_dbi->connection)) + unset($this->_auth_dbi); + if (($dbh->getParam('dbtype') == 'ADODB') and empty($this->_auth_dbi->_connectionID)) + unset($this->_auth_dbi); + } + if (empty($this->_auth_dbi)) { + if ($dbh->getParam('dbtype') != 'SQL' + and $dbh->getParam('dbtype') != 'ADODB' + and $dbh->getParam('dbtype') != 'PDO' + ) + return false; + if (empty($GLOBALS['DBAuthParams'])) + return false; + if (!$dbh->getAuthParam('auth_dsn')) { + $dbh = $request->getDbh(); // use phpwiki database + } elseif ($dbh->getAuthParam('auth_dsn') == $dbh->getParam('dsn')) { + $dbh = $request->getDbh(); // same phpwiki database + } else { // use another external database handle. needs PHP >= 4.1 + $local_params = array_merge($GLOBALS['DBParams'], $GLOBALS['DBAuthParams']); + $local_params['dsn'] = $local_params['auth_dsn']; + $dbh = WikiDB::open($local_params); + } + $this->_auth_dbi =& $dbh->_backend->_dbh; + } + return $this->_auth_dbi; + } + + function _normalize_stmt_var($var, $oldstyle = false) + { + static $valid_variables = array('userid', 'password', 'pref_blob', 'groupname'); + // old-style: "'$userid'" + // new-style: '"\$userid"' or just "userid" + $new = str_replace(array("'", '"', '\$', '$'), '', $var); + if (!in_array($new, $valid_variables)) { + trigger_error("Unknown DBAuthParam statement variable: " . $new, E_USER_ERROR); + return false; + } + return !$oldstyle ? "'$" . $new . "'" : '\$' . $new; + } + + // TODO: use it again for the auth and member tables + // sprintfstyle vs prepare style: %s or ? + // multiple vars should be executed via prepare(?,?)+execute, + // single vars with execute(sprintf(quote(var))) + // help with position independency + function prepare($stmt, $variables, $oldstyle = false, $sprintfstyle = true) + { + global $request; + $dbi = $request->getDbh(); + $this->getAuthDbh(); + // "'\$userid"' => %s + // variables can be old-style: '"\$userid"' or new-style: "'$userid'" or just "userid" + // old-style strings don't survive pear/Config/IniConfig treatment, that's why we changed it. + $new = array(); + if (is_array($variables)) { + //$sprintfstyle = false; + for ($i = 0; $i < count($variables); $i++) { + $var = $this->_normalize_stmt_var($variables[$i], $oldstyle); + if (!$var) + trigger_error(sprintf("DbAuthParams: Undefined or empty statement variable %s in %s", + $variables[$i], $stmt), E_USER_WARNING); + $variables[$i] = $var; + if (!$var) $new[] = ''; + else { + $s = "%" . ($i + 1) . "s"; + $new[] = $sprintfstyle ? $s : "?"; + } + } + } else { + $var = $this->_normalize_stmt_var($variables, $oldstyle); + if (!$var) + trigger_error(sprintf("DbAuthParams: Undefined or empty statement variable %s in %s", + $variables, $stmt), E_USER_WARNING); + $variables = $var; + if (!$var) $new = ''; + else $new = $sprintfstyle ? '%s' : "?"; + } + $prefix = $dbi->getParam('prefix'); + // probably prefix table names if in same database + if ($prefix and isset($this->_auth_dbi) and isset($dbi->_backend->_dbh) and + ($dbi->getAuthParam('auth_dsn') and $dbi->getParam('dsn') == $dbi->getAuthParam('auth_dsn')) + ) { + if (!stristr($stmt, $prefix)) { + $oldstmt = $stmt; + $stmt = str_replace(array(" user ", " pref ", " member "), + array(" " . $prefix . "user ", + " " . $prefix . "pref ", + " " . $prefix . "member "), $stmt); + //Do it automatically for the lazy admin? Esp. on sf.net it's nice to have + trigger_error("Need to prefix the DBAUTH tablename in config/config.ini:\n $oldstmt \n=> $stmt", + E_USER_WARNING); + } + } + // Preparate the SELECT statement, for ADODB and PearDB (MDB not). + // Simple sprintf-style. + $new_stmt = str_replace($variables, $new, $stmt); + if ($new_stmt == $stmt) { + if ($oldstyle) { + trigger_error(sprintf("DbAuthParams: Invalid statement in %s", + $stmt), E_USER_WARNING); + } else { + trigger_error(sprintf("DbAuthParams: Old statement quoting style in %s", + $stmt), E_USER_WARNING); + $new_stmt = $this->prepare($stmt, $variables, 'oldstyle'); + } + } + return $new_stmt; + } + + function getPreferences() + { + if (!empty($this->_prefs->_method)) { + if ($this->_prefs->_method == 'ADODB') { + // FIXME: strange why this should be needed... + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/AdoDb.php'; + return _AdoDbPassUser::getPreferences(); + } elseif ($this->_prefs->_method == 'SQL') { + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/PearDb.php'; + return _PearDbPassUser::getPreferences(); + } elseif ($this->_prefs->_method == 'PDO') { + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/PdoDb.php'; + return _PdoDbPassUser::getPreferences(); + } + } + + // We don't necessarily have to read the cookie first. Since + // the user has a password, the prefs stored in the homepage + // cannot be arbitrarily altered by other Bogo users. + _AnonUser::getPreferences(); + // User may have deleted cookie, retrieve from his + // PersonalPage if there is one. + if (!empty($this->_HomePagehandle)) { + if ($restored_from_page = $this->_prefs->retrieve + ($this->_HomePagehandle->get('pref')) + ) { + $this->_prefs->updatePrefs($restored_from_page, 'init'); + return $this->_prefs; + } + } + return $this->_prefs; + } + + function setPreferences($prefs, $id_only = false) + { + if (!empty($this->_prefs->_method)) { + if ($this->_prefs->_method == 'ADODB') { + // FIXME: strange why this should be needed... + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/AdoDb.php'; + return _AdoDbPassUser::setPreferences($prefs, $id_only); + } elseif ($this->_prefs->_method == 'SQL') { + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/PearDb.php'; + return _PearDbPassUser::setPreferences($prefs, $id_only); + } elseif ($this->_prefs->_method == 'PDO') { + include_once 'lib/WikiUser/Db.php'; + include_once 'lib/WikiUser/PdoDb.php'; + return _PdoDbPassUser::setPreferences($prefs, $id_only); + } + } + if ($updated = _AnonUser::setPreferences($prefs, $id_only)) { + // Encode only the _prefs array of the UserPreference object + // If no DB method exists to store the prefs we must store it in the page, not in the cookies. + if (empty($this->_HomePagehandle)) { + $this->_HomePagehandle = $GLOBALS['request']->getPage($this->_userid); + } + if (!$this->_HomePagehandle->exists()) { + $this->createHomePage(); + } + if (!empty($this->_HomePagehandle) and !$id_only) { + $this->_HomePagehandle->set('pref', $this->_prefs->store()); + } + } + return $updated; + } + + function mayChangePass() + { + return true; + } + + //The default method is getting the password from prefs. + // child methods obtain $stored_password from external auth. + function userExists() + { + //if ($this->_HomePagehandle) return true; + if (strtolower(get_class($this)) == "_passuser") { + $class = $this->nextClass(); + $user = new $class($this->_userid, $this->_prefs); + } else { + $user = $this; + } + /* new user => false does not return false, but the _userid is empty then */ + while ($user and $user->_userid) { + $user = UpgradeUser($this, $user); + if ($user->userExists()) { + $user = UpgradeUser($this, $user); + return true; + } + // prevent endless loop. does this work on all PHP's? + // it just has to set the classname, what it correctly does. + $class = $user->nextClass(); + if ($class == "_ForbiddenPassUser") + return false; + } + return false; + } + + //The default method is getting the password from prefs. + // child methods obtain $stored_password from external auth. + function checkPass($submitted_password) + { + $stored_password = $this->_prefs->get('passwd'); + if ($this->_checkPass($submitted_password, $stored_password)) { + $this->_level = WIKIAUTH_USER; + return $this->_level; + } else { + if ((USER_AUTH_POLICY === 'strict') and $this->userExists()) { + $this->_level = WIKIAUTH_FORBIDDEN; + return $this->_level; + } + return $this->_tryNextPass($submitted_password); + } + } + + function _checkPassLength($submitted_password) + { + if (strlen($submitted_password) < PASSWORD_LENGTH_MINIMUM) { + trigger_error(_("The length of the password is shorter than the system policy allows.")); + return false; + } + return true; + } + + /** + * The basic password checker for all PassUser objects. + * Uses global ENCRYPTED_PASSWD and PASSWORD_LENGTH_MINIMUM. + * Empty passwords are always false! + * PASSWORD_LENGTH_MINIMUM is enforced here and in the preference set method. + * @see UserPreferences::set + * + * DBPassUser password's have their own crypt definition. + * That's why DBPassUser::checkPass() doesn't call this method, if + * the db password method is 'plain', which means that the DB SQL + * statement just returns 1 or 0. To use CRYPT() or PASSWORD() and + * don't store plain passwords in the DB. + * + * TODO: remove crypt() function check from config.php:396 ?? + */ + function _checkPass($submitted_password, $stored_password) + { + if (!empty($submitted_password)) { + // This works only on plaintext passwords. + if (!ENCRYPTED_PASSWD and (strlen($stored_password) < PASSWORD_LENGTH_MINIMUM)) { + // With the EditMetaData plugin + trigger_error(_("The length of the stored password is shorter than the system policy allows. Sorry, you cannot login.\n You have to ask the System Administrator to reset your password.")); + return false; + } + if (!$this->_checkPassLength($submitted_password)) { + return false; + } + if (ENCRYPTED_PASSWD) { + // Verify against encrypted password. + if (function_exists('crypt')) { + if (crypt($submitted_password, $stored_password) == $stored_password) + return true; // matches encrypted password + else + return false; + } else { + trigger_error(_("The crypt function is not available in this version of PHP.") . " " + . _("Please set ENCRYPTED_PASSWD to false in config/config.ini and probably change ADMIN_PASSWD."), + E_USER_WARNING); + return false; + } + } else { + // Verify against cleartext password. + if ($submitted_password == $stored_password) + return true; + else { + // Check whether we forgot to enable ENCRYPTED_PASSWD + if (function_exists('crypt')) { + if (crypt($submitted_password, $stored_password) == $stored_password) { + trigger_error(_("Please set ENCRYPTED_PASSWD to true in config/config.ini."), + E_USER_WARNING); + return true; + } + } + } + } + } + return false; + } + + /** The default method is storing the password in prefs. + * Child methods (DB, File) may store in external auth also, but this + * must be explicitly enabled. + * This may be called by plugin/UserPreferences or by ->SetPreferences() + */ + function changePass($submitted_password) + { + $stored_password = $this->_prefs->get('passwd'); + // check if authenticated + if (!$this->isAuthenticated()) return false; + if (ENCRYPTED_PASSWD) { + $submitted_password = crypt($submitted_password); + } + // check other restrictions, with side-effects only. + $result = $this->_checkPass($submitted_password, $stored_password); + if ($stored_password != $submitted_password) { + $this->_prefs->set('passwd', $submitted_password); + //update the storage (session, homepage, ...) + $this->SetPreferences($this->_prefs); + return true; + } + //Todo: return an error msg to the caller what failed? + // same password or no privilege + return ENCRYPTED_PASSWD ? true : false; + } + + function _tryNextPass($submitted_password) + { + if (DEBUG & _DEBUG_LOGIN) { + $class = strtolower(get_class($this)); + if (substr($class, -10) == "dbpassuser") $class = "_dbpassuser"; + $GLOBALS['USER_AUTH_ERROR'][$class] = 'wrongpass'; + } + if (USER_AUTH_POLICY === 'strict') { + $class = $this->nextClass(); + if ($user = new $class($this->_userid, $this->_prefs)) { + if ($user->userExists()) { + return $user->checkPass($submitted_password); + } + } + } + if (USER_AUTH_POLICY === 'stacked' or USER_AUTH_POLICY === 'old') { + $class = $this->nextClass(); + if ($user = new $class($this->_userid, $this->_prefs)) + return $user->checkPass($submitted_password); + } + return $this->_level; + } + + function _tryNextUser() + { + if (DEBUG & _DEBUG_LOGIN) { + $class = strtolower(get_class($this)); + if (substr($class, -10) == "dbpassuser") $class = "_dbpassuser"; + $GLOBALS['USER_AUTH_ERROR'][$class] = 'nosuchuser'; + } + if (USER_AUTH_POLICY === 'strict' + or USER_AUTH_POLICY === 'stacked' + ) { + $class = $this->nextClass(); + while ($user = new $class($this->_userid, $this->_prefs)) { + $user = UpgradeUser($this, $user); + if ($user->userExists()) { + $user = UpgradeUser($this, $user); + return true; + } + if ($class == "_ForbiddenPassUser") return false; + $class = $this->nextClass(); + } + } + return false; + } + +} + +/** + * Insert more auth classes here... + * For example a customized db class for another db connection + * or a socket-based auth server. + * + */ + +/** + * For security, this class should not be extended. Instead, extend + * from _PassUser (think of this as unix "root"). + * + * FIXME: This should be a singleton class. Only ADMIN_USER may be of class AdminUser! + * Other members of the Administrators group must raise their level otherwise somehow. + * Currently every member is a AdminUser, which will not work for the various + * storage methods. + */ +class _AdminUser + extends _PassUser +{ + function mayChangePass() + { + return false; + } + + function checkPass($submitted_password) + { + if ($this->_userid == ADMIN_USER) + $stored_password = ADMIN_PASSWD; + else { + // Should not happen! Only ADMIN_USER should use this class. + // return $this->_tryNextPass($submitted_password);... [truncated message content] |
From: <var...@us...> - 2014-09-26 16:45:05
|
Revision: 9127 http://sourceforge.net/p/phpwiki/code/9127 Author: vargenau Date: 2014-09-26 16:44:55 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Update translations Modified Paths: -------------- trunk/locale/Makefile 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/locale/Makefile =================================================================== --- trunk/locale/Makefile 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/Makefile 2014-09-26 16:44:55 UTC (rev 9127) @@ -347,7 +347,6 @@ ${POT_FILE}: ../lib/WikiUser/PdoDb.php ${POT_FILE}: ../lib/WikiUser/PearDb.php ${POT_FILE}: ../lib/WikiUser/PersonalPage.php -${POT_FILE}: ../lib/WikiUser.php ${POT_FILE}: ../lib/WikiUser/POP3.php ${POT_FILE}: ../lib/WikiUser/Session.php ${POT_FILE}: ../lib/WysiwygEdit/FCKeditor.php 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-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/de.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\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." @@ -1020,7 +1020,7 @@ msgid "Users will not be able to sign in." msgstr "Benutzer werden sich nicht anmelden können." -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -5150,48 +5150,7 @@ msgid "Given password ignored." msgstr "Passwort ignoriert." -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" -"Sie haben vergessen ENCRYPTED_PASSWD auf true zu stellen. Bitte " -"aktualisieren Sie config/config.ini" - -# Any good way to write NamensHomePage as a non-wikiword? -# Namens-Homepage? Namenshomepage? or just leave it this way? (note: -# any WikiWords will not link here, better not to use any StudlyCaps -# here). -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" -"Sie haben Ihre persönliche HomePage Seite noch nicht erstellt, deshalb " -"können Ihre Einstellungen nicht gespeichert werden." - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" -"Ihre persönliche HomePage Seite ist gesperrt, deshalb können Ihre Änderungen " -"nicht gespeichert werden." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "Bitte bitten Sie Ihren PhpWiki Administrator um Unterstützung." - -msgid "CategoryHomepage" -msgstr "KategorieHomepage" - -msgid "Preferences" -msgstr "Voreinstellungen" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" -"Ihre alte persönliche HomePage %s ohne gespeichertem Passwort wurde mit " -"einem leeren Password gespeichert. Setzen Sie ein Passwort in Ihren " -"BenutzerEinstellungen." - -#, php-format msgid "Couldn't connect to %s" msgstr "Kann nicht zu »%s« verbinden" @@ -5389,6 +5348,9 @@ msgid "HowToUseWiki" msgstr "WieManWikiBenutzt" +msgid "Preferences" +msgstr "Voreinstellungen" + msgid "Today" msgstr "Heute" @@ -5459,6 +5421,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "Die %s UnterSeite ermöglicht ein einfaches Weblog." +msgid "CategoryHomepage" +msgstr "KategorieHomepage" + msgid "1 word" msgstr "1 Wort" @@ -6085,6 +6050,40 @@ msgid "Edit this page" msgstr "Diese Seite bearbeiten" +#~ msgid "" +#~ "You forgot to set ENCRYPTED_PASSWD to true. Please update your config/" +#~ "config.ini" +#~ msgstr "" +#~ "Sie haben vergessen ENCRYPTED_PASSWD auf true zu stellen. Bitte " +#~ "aktualisieren Sie config/config.ini" + +# Any good way to write NamensHomePage as a non-wikiword? +# Namens-Homepage? Namenshomepage? or just leave it this way? (note: +# any WikiWords will not link here, better not to use any StudlyCaps +# here). +#~ msgid "" +#~ "Your home page has not been created yet so your preferences cannot not be " +#~ "saved." +#~ msgstr "" +#~ "Sie haben Ihre persönliche HomePage Seite noch nicht erstellt, deshalb " +#~ "können Ihre Einstellungen nicht gespeichert werden." + +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "" +#~ "Ihre persönliche HomePage Seite ist gesperrt, deshalb können Ihre " +#~ "Änderungen nicht gespeichert werden." + +#~ msgid "Please contact your PhpWiki administrator for assistance." +#~ msgstr "Bitte bitten Sie Ihren PhpWiki Administrator um Unterstützung." + +#~ msgid "" +#~ "Old UserPage %s without stored password updated with empty password. Set " +#~ "a password in your UserPreferences." +#~ msgstr "" +#~ "Ihre alte persönliche HomePage %s ohne gespeichertem Passwort wurde mit " +#~ "einem leeren Password gespeichert. Setzen Sie ein Passwort in Ihren " +#~ "BenutzerEinstellungen." + #~ msgid "Elapsed time: %s s" #~ msgstr "Dauer: %s s" Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/es.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -1001,7 +1001,7 @@ msgid "Users will not be able to sign in." msgstr "Los usuarios no podrán firmar adentro." -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -5030,45 +5030,7 @@ msgid "Given password ignored." msgstr "Contraseña no hecho caso." -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" -"Usted se olvidó de fijar ENCRYPTED_PASSWD para verdad. Ponga al día por " -"favor su config/config.ini" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" -"Su Home Page no se ha creado todavía así que sus preferencias no pueden ser " -"ahorradas." - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" -"Su Home Page ha sido bloqueada así que sus preferencias no pueden ser " -"ahorradas." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" -"Entre en contacto con por favor a su administrador de PhpWiki para la ayuda." - -# old-style. new style (1.3.x) is CategoryHomePages -msgid "CategoryHomepage" -msgstr "CategoríaHomepage" - -msgid "Preferences" -msgstr "Preferencias" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" -"Viejo UserPage %s sin la contraseña almacenada puesta al día con contraseña " -"vacía. Fije una contraseña en su UsuarioPreferencias." - -#, php-format msgid "Couldn't connect to %s" msgstr "No podía conectar con %s" @@ -5259,6 +5221,9 @@ msgid "HowToUseWiki" msgstr "" +msgid "Preferences" +msgstr "Preferencias" + msgid "Today" msgstr "Hoy" @@ -5328,6 +5293,10 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +# old-style. new style (1.3.x) is CategoryHomePages +msgid "CategoryHomepage" +msgstr "CategoríaHomepage" + msgid "1 word" msgstr "" @@ -5907,6 +5876,37 @@ msgid "Edit this page" msgstr "Corrija esta página" +#~ msgid "" +#~ "You forgot to set ENCRYPTED_PASSWD to true. Please update your config/" +#~ "config.ini" +#~ msgstr "" +#~ "Usted se olvidó de fijar ENCRYPTED_PASSWD para verdad. Ponga al día por " +#~ "favor su config/config.ini" + +#~ msgid "" +#~ "Your home page has not been created yet so your preferences cannot not be " +#~ "saved." +#~ msgstr "" +#~ "Su Home Page no se ha creado todavía así que sus preferencias no pueden " +#~ "ser ahorradas." + +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "" +#~ "Su Home Page ha sido bloqueada así que sus preferencias no pueden ser " +#~ "ahorradas." + +#~ msgid "Please contact your PhpWiki administrator for assistance." +#~ msgstr "" +#~ "Entre en contacto con por favor a su administrador de PhpWiki para la " +#~ "ayuda." + +#~ msgid "" +#~ "Old UserPage %s without stored password updated with empty password. Set " +#~ "a password in your UserPreferences." +#~ msgstr "" +#~ "Viejo UserPage %s sin la contraseña almacenada puesta al día con " +#~ "contraseña vacía. Fije una contraseña en su UsuarioPreferencias." + #~ msgid "PageChange Notification of %s sent to %s" #~ msgstr "Pagine la notificación del cambio de %s enviado a %s" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/fr.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\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." @@ -1000,9 +1000,9 @@ msgid "Users will not be able to sign in." msgstr "Les utilisateurs ne pourront pas s'inscrire." -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" -"Votre version de PHP est trop ancienne. Il faut avoir au moins PHP 5.2." +"Votre version de PHP est trop ancienne. Il faut avoir au moins PHP 5.3." #, php-format msgid "Sort by %s" @@ -5084,43 +5084,7 @@ msgid "Given password ignored." msgstr "Mot de passe ignoré." -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" -"Vous avez oublié de mettre ENCRYPTED_PASSWD à true. Veuillez éditer votre " -"config/config.ini" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" -"Votre page personnelle n'a pas été créée et par conséquent vos préférences " -"n'ont pas pu être enregistrées." - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" -"Votre page personnelle est verrouillée et par conséquent vos préférences " -"n'ont pas pu être enregistrées." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "Veuillez contacter l'administrateur pour l'assistance." - -msgid "CategoryHomepage" -msgstr "CatégoriePagesAccueil" - -msgid "Preferences" -msgstr "Préférences" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" -"L'ancienne page %s sans mot de passe attribué a été mise à jour avec un mot " -"de passe vide. Définissez un mot de passe dans vos PréférencesUtilisateurs." - -#, php-format msgid "Couldn't connect to %s" msgstr "Impossible d'établir une connexion à la base de données : %s" @@ -5316,6 +5280,9 @@ msgid "HowToUseWiki" msgstr "CommentUtiliserWiki" +msgid "Preferences" +msgstr "Préférences" + msgid "Today" msgstr "Aujourd'hui" @@ -5385,6 +5352,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "Les sous-pages de %s permettent l'utilisation d'un blog simple." +msgid "CategoryHomepage" +msgstr "CatégoriePagesAccueil" + msgid "1 word" msgstr "1 mot" @@ -5992,6 +5962,36 @@ msgid "Edit this page" msgstr "Modifier cette page" +#~ msgid "" +#~ "You forgot to set ENCRYPTED_PASSWD to true. Please update your config/" +#~ "config.ini" +#~ msgstr "" +#~ "Vous avez oublié de mettre ENCRYPTED_PASSWD à true. Veuillez éditer votre " +#~ "config/config.ini" + +#~ msgid "" +#~ "Your home page has not been created yet so your preferences cannot not be " +#~ "saved." +#~ msgstr "" +#~ "Votre page personnelle n'a pas été créée et par conséquent vos " +#~ "préférences n'ont pas pu être enregistrées." + +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "" +#~ "Votre page personnelle est verrouillée et par conséquent vos préférences " +#~ "n'ont pas pu être enregistrées." + +#~ msgid "Please contact your PhpWiki administrator for assistance." +#~ msgstr "Veuillez contacter l'administrateur pour l'assistance." + +#~ msgid "" +#~ "Old UserPage %s without stored password updated with empty password. Set " +#~ "a password in your UserPreferences." +#~ msgstr "" +#~ "L'ancienne page %s sans mot de passe attribué a été mise à jour avec un " +#~ "mot de passe vide. Définissez un mot de passe dans vos " +#~ "PréférencesUtilisateurs." + #~ msgid "Elapsed time: %s s" #~ msgstr "Temps écoulé : %s s" Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/it.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\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" @@ -985,7 +985,7 @@ msgid "Users will not be able to sign in." msgstr "" -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -4974,37 +4974,7 @@ msgid "Given password ignored." msgstr "" -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" -"Questa pagina è stata bloccata dall'amministratore in modo da i vostri " -"cambiamenti non possono essere salvati." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" - -msgid "CategoryHomepage" -msgstr "" - -msgid "Preferences" -msgstr "Preferenze" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" - -#, php-format msgid "Couldn't connect to %s" msgstr "Non riesco a stabilire una connessione col database: %s" @@ -5195,6 +5165,9 @@ msgid "HowToUseWiki" msgstr "" +msgid "Preferences" +msgstr "Preferenze" + msgid "Today" msgstr "Oggi" @@ -5264,6 +5237,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +msgid "CategoryHomepage" +msgstr "" + msgid "1 word" msgstr "" @@ -5842,6 +5818,11 @@ msgid "Edit this page" msgstr "" +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "" +#~ "Questa pagina è stata bloccata dall'amministratore in modo da i vostri " +#~ "cambiamenti non possono essere salvati." + #~ msgid "PageChange Notification of %s sent to %s" #~ msgstr "Pagini la notifica del cambiamento di %s trasmesso a %s" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/ja.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -983,7 +983,7 @@ msgid "Users will not be able to sign in." msgstr "" -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -5117,36 +5117,7 @@ msgid "Given password ignored." msgstr "" -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" - -msgid "CategoryHomepage" -msgstr "" - -#, fuzzy -msgid "Preferences" -msgstr "参照一覧" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" - -#, php-format msgid "Couldn't connect to %s" msgstr "" @@ -5352,6 +5323,10 @@ msgid "HowToUseWiki" msgstr "" +#, fuzzy +msgid "Preferences" +msgstr "参照一覧" + msgid "Today" msgstr "今日" @@ -5424,6 +5399,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +msgid "CategoryHomepage" +msgstr "" + msgid "1 word" msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/nl.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -976,7 +976,7 @@ msgid "Users will not be able to sign in." msgstr "" -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -4966,37 +4966,7 @@ msgid "Given password ignored." msgstr "" -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" -"Deze pagina is afgesloten door de beheerder en je veranderingen kan niet " -"bewaar worden." - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "Deze pagina is afgesloten en je veranderingen kan niet bewaar worden." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" - -msgid "CategoryHomepage" -msgstr "" - -msgid "Preferences" -msgstr "" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" - -#, php-format msgid "Couldn't connect to %s" msgstr "Kan verbinding naar data base %s niet tot stand brengen, geef op." @@ -5187,6 +5157,9 @@ msgid "HowToUseWiki" msgstr "" +msgid "Preferences" +msgstr "" + msgid "Today" msgstr "" @@ -5256,6 +5229,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +msgid "CategoryHomepage" +msgstr "" + msgid "1 word" msgstr "" @@ -5834,6 +5810,17 @@ msgid "Edit this page" msgstr "" +#~ msgid "" +#~ "Your home page has not been created yet so your preferences cannot not be " +#~ "saved." +#~ msgstr "" +#~ "Deze pagina is afgesloten door de beheerder en je veranderingen kan niet " +#~ "bewaar worden." + +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "" +#~ "Deze pagina is afgesloten en je veranderingen kan niet bewaar worden." + #~ msgid "from %s" #~ msgstr "van %s" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/phpwiki.pot 2014-09-26 16:44:55 UTC (rev 9127) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -970,7 +970,7 @@ msgid "Users will not be able to sign in." msgstr "" -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -4958,35 +4958,7 @@ msgid "Given password ignored." msgstr "" -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" - -msgid "CategoryHomepage" -msgstr "" - -msgid "Preferences" -msgstr "" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" - -#, php-format msgid "Couldn't connect to %s" msgstr "" @@ -5177,6 +5149,9 @@ msgid "HowToUseWiki" msgstr "" +msgid "Preferences" +msgstr "" + msgid "Today" msgstr "" @@ -5246,6 +5221,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +msgid "CategoryHomepage" +msgstr "" + msgid "1 word" msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/sv.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -971,7 +971,7 @@ msgid "Users will not be able to sign in." msgstr "" -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -4959,35 +4959,7 @@ msgid "Given password ignored." msgstr "" -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "" - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "" - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "" - -msgid "CategoryHomepage" -msgstr "" - -msgid "Preferences" -msgstr "" - #, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" - -#, php-format msgid "Couldn't connect to %s" msgstr "" @@ -5178,6 +5150,9 @@ msgid "HowToUseWiki" msgstr "" +msgid "Preferences" +msgstr "" + msgid "Today" msgstr "" @@ -5247,6 +5222,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "" +msgid "CategoryHomepage" +msgstr "" + msgid "1 word" msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-09-26 16:39:46 UTC (rev 9126) +++ trunk/locale/po/zh.po 2014-09-26 16:44:55 UTC (rev 9127) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-25 12:36+0200\n" +"POT-Creation-Date: 2014-09-26 18:43+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -1013,7 +1013,7 @@ msgid "Users will not be able to sign in." msgstr "使用者將無法簽入." -msgid "Your PHP version is too old. You must have at least PHP 5.2." +msgid "Your PHP version is too old. You must have at least PHP 5.3." msgstr "" #, php-format @@ -5214,38 +5214,6 @@ msgid "Given password ignored." msgstr "" -#, fuzzy -msgid "" -"You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config." -"ini" -msgstr "你忘了設定 ENCRYPTED_PASSWD 為 true. 請更新你的 /index.php" - -msgid "" -"Your home page has not been created yet so your preferences cannot not be " -"saved." -msgstr "你的首頁還未被建立,所以你的偏好設定無法儲存." - -msgid "Your home page is locked so your preferences cannot not be saved." -msgstr "你的首頁已經被鎖定,所以你的偏好設定無法被儲存." - -msgid "Please contact your PhpWiki administrator for assistance." -msgstr "請向你的 PhpWiki 管理者尋求協助." - -msgid "CategoryHomepage" -msgstr "分類首頁" - -#, fuzzy -msgid "Preferences" -msgstr "偏好設定" - -#, php-format -msgid "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." -msgstr "" -"Old UserPage %s without stored password updated with empty password. Set a " -"password in your UserPreferences." - #, fuzzy, php-format msgid "Couldn't connect to %s" msgstr "無法為頁面 “%s” 變更權限為 “%s”." @@ -5451,6 +5419,10 @@ msgid "HowToUseWiki" msgstr "" +#, fuzzy +msgid "Preferences" +msgstr "偏好設定" + msgid "Today" msgstr "今天" @@ -5523,6 +5495,9 @@ msgid "The %s subpage enables simple weblogging." msgstr "%s 子頁面啟動簡易 weblogging." +msgid "CategoryHomepage" +msgstr "分類首頁" + msgid "1 word" msgstr "1 個單字" @@ -6146,6 +6121,24 @@ msgid "Edit this page" msgstr "編輯此頁面" +#~ msgid "" +#~ "Your home page has not been created yet so your preferences cannot not be " +#~ "saved." +#~ msgstr "你的首頁還未被建立,所以你的偏好設定無法儲存." + +#~ msgid "Your home page is locked so your preferences cannot not be saved." +#~ msgstr "你的首頁已經被鎖定,所以你的偏好設定無法被儲存." + +#~ msgid "Please contact your PhpWiki administrator for assistance." +#~ msgstr "請向你的 PhpWiki 管理者尋求協助." + +#~ msgid "" +#~ "Old UserPage %s without stored password updated with empty password. Set " +#~ "a password in your UserPreferences." +#~ msgstr "" +#~ "Old UserPage %s without stored password updated with empty password. Set " +#~ "a password in your UserPreferences." + #~ msgid "Elapsed time: %s s" #~ msgstr "經過時間: %s s" 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-09-26 16:39:57
|
Revision: 9126 http://sourceforge.net/p/phpwiki/code/9126 Author: vargenau Date: 2014-09-26 16:39:46 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Remove ENABLE_USER_NEW (always true), remove lib/WikiUser.php Modified Paths: -------------- trunk/SOAP.php trunk/config/config-default.ini trunk/config/config-dist.ini trunk/configurator.php trunk/doc/README.phpwiki-auth trunk/doc/README.security trunk/lib/IniConfig.php trunk/lib/MailNotify.php trunk/lib/PagePerm.php trunk/lib/Request.php trunk/lib/WikiGroup.php trunk/lib/WikiUserNew.php trunk/lib/XmlRpcServer.php trunk/lib/imagecache.php trunk/lib/loadsave.php trunk/lib/main.php trunk/lib/plugin/DebugAuthInfo.php trunk/lib/plugin/UserRatings.php trunk/lib/plugin/WikiAdminUtils.php trunk/themes/default/templates/userprefs.tmpl Removed Paths: ------------- trunk/lib/WikiUser.php Modified: trunk/SOAP.php =================================================================== --- trunk/SOAP.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/SOAP.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -58,11 +58,7 @@ if (!isset($credentials['password'])) $credentials['password'] = ''; global $request; - if (ENABLE_USER_NEW) { - $request->_user = WikiUser($credentials['username']); - } else { - $request->_user = new WikiUser($request, $credentials['username']); - } + $request->_user = WikiUser($credentials['username']); $request->_user->AuthCheck(array('userid' => $credentials['username'], 'passwd' => $credentials['password'])); if (!mayAccessPage($access, $pagename)) Modified: trunk/config/config-default.ini =================================================================== --- trunk/config/config-default.ini 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/config/config-default.ini 2014-09-26 16:39:46 UTC (rev 9126) @@ -2,7 +2,6 @@ ; recent development and debugging features: DEBUG = 0 -ENABLE_USER_NEW = true ENABLE_PAGEPERM = true ENABLE_EDIT_TOOLBAR = true JS_SEARCHREPLACE = true Modified: trunk/config/config-dist.ini =================================================================== --- trunk/config/config-dist.ini 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/config/config-dist.ini 2014-09-26 16:39:46 UTC (rev 9126) @@ -666,11 +666,6 @@ ; Note: May result in crashes on endless recursion USER_AUTH_POLICY = first-only -; Enable the new extended method of handling WikiUsers to support external auth and PAGEPERM. -; Servers with memory-limit problems might want to turn it off. It costs ~300KB -; Default: true -;ENABLE_USER_NEW = false - ; Use access control lists (as in Solaris and Windows NTFS) per page and group, ; not per user for the whole wiki. ; Modified: trunk/configurator.php =================================================================== --- trunk/configurator.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/configurator.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -981,9 +981,6 @@ <dd>check the given user - password combination for all methods and return true on the first success.</dd></dl>"); -$properties["ENABLE_USER_NEW"] = - new boolean_define_commented_optional('ENABLE_USER_NEW'); - $properties["ENABLE_PAGEPERM"] = new boolean_define_commented_optional('ENABLE_PAGEPERM'); Modified: trunk/doc/README.phpwiki-auth =================================================================== --- trunk/doc/README.phpwiki-auth 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/doc/README.phpwiki-auth 2014-09-26 16:39:46 UTC (rev 9126) @@ -36,10 +36,6 @@ * USER_AUTH_POLICY default: "old" * $DBAuthParams~[~] see below -Temporarily: -; ENABLE_USER_NEW : This will be removed with the 1.3.9 release. -;: It's just to decide if ~WikiUserNew.php should be loaded instead of the old ~WikiUser.php - ! ALLOW_ANON_USER To establish a COMPLETELY private wiki, such as an internal corporate one Modified: trunk/doc/README.security =================================================================== --- trunk/doc/README.security 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/doc/README.security 2014-09-26 16:39:46 UTC (rev 9126) @@ -25,9 +25,6 @@ webserver. ---- <pre> -; require the new login code - the default -;ENABLE_USER_NEW = true - ; allow ACL based permissions on pages - the default ;ENABLE_PAGEPERM = true Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/IniConfig.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -184,7 +184,7 @@ // List of all valid config options to be define()d which take booleans. $_IC_VALID_BOOL = array - ('ENABLE_USER_NEW', 'ENABLE_PAGEPERM', 'ENABLE_EDIT_TOOLBAR', 'JS_SEARCHREPLACE', + ('ENABLE_PAGEPERM', 'ENABLE_EDIT_TOOLBAR', 'JS_SEARCHREPLACE', 'ENABLE_XHTML_XML', 'ENABLE_DOUBLECLICKEDIT', 'ENABLE_LIVESEARCH', 'ENABLE_ACDROPDOWN', 'USECACHE', 'WIKIDB_NOCACHE_MARKUP', 'ENABLE_REVERSE_DNS', 'ENCRYPTED_PASSWD', 'ZIPDUMP_AUTH', @@ -856,22 +856,12 @@ } } // legacy: - if (!defined('ENABLE_USER_NEW')) define('ENABLE_USER_NEW', true); if (!defined('ALLOW_USER_LOGIN')) define('ALLOW_USER_LOGIN', defined('ALLOW_USER_PASSWORDS') && ALLOW_USER_PASSWORDS); if (!defined('ALLOW_ANON_USER')) define('ALLOW_ANON_USER', true); if (!defined('ALLOW_ANON_EDIT')) define('ALLOW_ANON_EDIT', false); if (!defined('REQUIRE_SIGNIN_BEFORE_EDIT')) define('REQUIRE_SIGNIN_BEFORE_EDIT', !ALLOW_ANON_EDIT); if (!defined('ALLOW_BOGO_LOGIN')) define('ALLOW_BOGO_LOGIN', true); - if (!ENABLE_USER_NEW) { - if (!defined('ALLOW_HTTP_AUTH_LOGIN')) - define('ALLOW_HTTP_AUTH_LOGIN', false); - if (!defined('ALLOW_LDAP_LOGIN')) - define('ALLOW_LDAP_LOGIN', function_exists('ldap_connect') and defined('LDAP_AUTH_HOST')); - if (!defined('ALLOW_IMAP_LOGIN')) - define('ALLOW_IMAP_LOGIN', function_exists('imap_open') and defined('IMAP_AUTH_HOST')); - } - if (ALLOW_USER_LOGIN and !empty($DBAuthParams) and empty($DBAuthParams['auth_dsn'])) { if (isset($DBParams['dsn'])) $DBAuthParams['auth_dsn'] = $DBParams['dsn']; Modified: trunk/lib/MailNotify.php =================================================================== --- trunk/lib/MailNotify.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/MailNotify.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -97,14 +97,9 @@ $email = ''; } } else { // not current user - if (ENABLE_USER_NEW) { - $u = WikiUser($userid); - $u->getPreferences(); - $prefs = &$u->_prefs; - } else { - $u = new WikiUser($request, $userid); - $prefs = $u->getPreferences(); - } + $u = WikiUser($userid); + $u->getPreferences(); + $prefs = &$u->_prefs; $email = $prefs->get('email'); if ($doverify and !$prefs->get('emailVerified')) { $email = ''; @@ -431,12 +426,8 @@ $request->_user->_level = WIKIAUTH_USER; $request->_prefs->set('emailVerified', true); } else { // not current user - if (ENABLE_USER_NEW) { - $u = WikiUser($userid); - $u->getPreferences(); - } else { - $u = new WikiUser($request, $userid); - } + $u = WikiUser($userid); + $u->getPreferences(); $u->_level = WIKIAUTH_USER; $request->setUser($u); $request->_prefs->set('emailVerified', true); Modified: trunk/lib/PagePerm.php =================================================================== --- trunk/lib/PagePerm.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/PagePerm.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -412,10 +412,8 @@ if ($group === ACL_ANONYMOUS) return !$user->isSignedIn(); if ($group === ACL_BOGOUSER) - if (ENABLE_USER_NEW) - return isa($user, '_BogoUser') or + return isa($user, '_BogoUser') or (isWikiWord($user->_userid) and $user->_level >= WIKIAUTH_BOGO); - else return isWikiWord($user->UserName()); if ($group === ACL_HASHOMEPAGE) return $user->hasHomePage(); if ($group === ACL_SIGNED) Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/Request.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -506,15 +506,8 @@ unset($val->_group->_request); unset($val->_group->user); } - if (ENABLE_USER_NEW) { - unset($val->_HomePagehandle); - unset($val->_auth_dbi); - } else { - unset($val->_dbi); - unset($val->_authdbi); - unset($val->_homepage); - unset($val->_request); - } + unset($val->_HomePagehandle); + unset($val->_auth_dbi); } return $this->session->set($key, $val); } Modified: trunk/lib/WikiGroup.php =================================================================== --- trunk/lib/WikiGroup.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/WikiGroup.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -267,10 +267,7 @@ } /* WikiDB users from prefs (not from users): */ - if (ENABLE_USER_NEW) - $dbi = _PassUser::getAuthDbh(); - else - $dbi = false; + $dbi = _PassUser::getAuthDbh(); if ($dbi and $dbh->getAuthParam('pref_select')) { //get prefs table @@ -632,7 +629,6 @@ E_USER_WARNING); return new GroupNone(); } - // FIXME: This only works with ENABLE_USER_NEW if (empty($this->user)) { // use _PassUser::prepare instead if (isa($request->getUser(), '_PassUser')) Deleted: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/WikiUser.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -1,813 +0,0 @@ -<?php - -// It is anticipated that when userid support is added to phpwiki, -// this object will hold much more information (e-mail, -// home(wiki)page, etc.) about the user. - -// There seems to be no clean way to "log out" a user when using HTTP -// authentication. So we'll hack around this by storing the currently -// logged in username and other state information in a cookie. - -// 2002-09-08 11:44:04 rurban -// Todo: Fix prefs cookie/session handling: -// _userid and _homepage cookie/session vars still hold the -// serialized string. -// If no homepage, fallback to prefs in cookie as in 1.3.3. - -define('WIKIAUTH_FORBIDDEN', -1); // Completely not allowed. -define('WIKIAUTH_ANON', 0); -define('WIKIAUTH_BOGO', 1); // any valid WikiWord is enough -define('WIKIAUTH_USER', 2); // real auth from a database/file/server. - -define('WIKIAUTH_ADMIN', 10); // Wiki Admin -define('WIKIAUTH_UNOBTAINABLE', 100); // Permissions that no user can achieve - -if (!defined('COOKIE_EXPIRATION_DAYS')) define('COOKIE_EXPIRATION_DAYS', 365); -if (!defined('COOKIE_DOMAIN')) define('COOKIE_DOMAIN', '/'); - -$UserPreferences = array( - 'userid' => new _UserPreference(''), // really store this also? - 'passwd' => new _UserPreference(''), - 'email' => new _UserPreference(''), - 'emailVerified' => new _UserPreference_bool(), - 'notifyPages' => new _UserPreference(''), - 'theme' => new _UserPreference_theme(THEME), - 'lang' => new _UserPreference_language(DEFAULT_LANGUAGE), - 'editWidth' => new _UserPreference_int(80, 30, 150), - 'noLinkIcons' => new _UserPreference_bool(), - 'editHeight' => new _UserPreference_int(22, 5, 80), - 'timeOffset' => new _UserPreference_numeric(0, -26, 26), - 'relativeDates' => new _UserPreference_bool(), - 'googleLink' => new _UserPreference_bool(), // 1.3.10 - 'doubleClickEdit' => new _UserPreference_bool(), // 1.3.11 -); - -function WikiUserClassname() -{ - return 'WikiUser'; -} - -function UpgradeUser($olduser, $user) -{ - if (isa($user, 'WikiUser') and isa($olduser, 'WikiUser')) { - // populate the upgraded class with the values from the old object - foreach (get_object_vars($olduser) as $k => $v) { - $user->$k = $v; - } - $GLOBALS['request']->_user = $user; - return $user; - } else { - return false; - } -} - -class WikiUser -{ - public $_userid = false; - public $_level = false; - public $_request, $_dbi, $_authdbi, $_homepage; - public $_authmethod = '', $_authhow = ''; - - /** - * Populates the instance variables and calls $this->_ok() - * to ensure that the parameters are valid. - * @param Request $request - * @param mixed $userid String of username or WikiUser object. - * @param int|bool $authlevel Authorization level. - */ - function __construct(&$request, $userid = false, $authlevel = false) - { - $this->_request =& $request; - $this->_dbi =& $this->_request->getDbh(); - - if (isa($userid, 'WikiUser')) { - $this->_userid = $userid->_userid; - $this->_level = $userid->_level; - } else { - $this->_userid = $userid; - $this->_level = $authlevel; - } - if (!$this->_ok()) { - // Paranoia: if state is at all inconsistent, log out... - $this->_userid = false; - $this->_level = false; - $this->_homepage = false; - $this->_authhow .= ' paranoia logout'; - } - if ($this->_userid) { - $this->_homepage = $this->_dbi->getPage($this->_userid); - } - } - - /** - * Get the string indicating how the user was authenticated. - * - * Get the string indicating how the user was authenticated. - * Does not seem to be set - jbw - * @return string The method of authentication. - */ - function auth_how() - { - return $this->_authhow; - } - - /** - * Invariant - * - * If the WikiUser object has a valid authorization level and the - * userid is a string returns true, else false. - * @return boolean If valid level and username string true, else false - */ - function _ok() - { - if ((in_array($this->_level, array(WIKIAUTH_BOGO, - WIKIAUTH_USER, - WIKIAUTH_ADMIN)) - && - (is_string($this->_userid))) - ) { - return true; - } - return false; - } - - function UserName() - { - return $this->_userid; - } - - function getId() - { - if ($this->_userid) - return $this->_userid; - if (!empty($this->_request)) - return $this->_request->get('REMOTE_ADDR'); - if (empty($this->_request)) - return Request::get('REMOTE_ADDR'); - return ($this->isSignedIn() - ? $this->_userid - : $this->_request->get('REMOTE_ADDR')); // FIXME: globals - } - - function getAuthenticatedId() - { - //assert($this->_request); - return ($this->isAuthenticated() - ? $this->_userid - : $this->_request->get('REMOTE_ADDR')); // FIXME: globals - } - - function isSignedIn() - { - return $this->_level >= WIKIAUTH_BOGO; - } - - function isAuthenticated() - { - return $this->_level >= WIKIAUTH_BOGO; - } - - function isAdmin() - { - return $this->_level == WIKIAUTH_ADMIN; - } - - function hasAuthority($require_level) - { - return $this->_level >= $require_level; - } - - function isValidName($userid = false) - { - if (!$userid) - $userid = $this->_userid; - return preg_match("/^[\w\.@\-]+$/", $userid) and strlen($userid) < 32; - } - - function AuthCheck($postargs) - { - // Normalize args, and extract. - $keys = array('userid', 'passwd', 'require_level', 'login', 'logout', - 'cancel'); - foreach ($keys as $key) - $args[$key] = isset($postargs[$key]) ? $postargs[$key] : false; - extract($args); - $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level)); - - if ($logout) - return new WikiUser($this->_request); // Log out - elseif ($cancel) - return false; // User hit cancel button. - elseif (!$login && !$userid) - return false; // Nothing to do? - - if (!$this->isValidName($userid)) - return _("Invalid username."); - - $authlevel = $this->_pwcheck($userid, $passwd); - if (!$authlevel) - return _("Invalid password or userid."); - elseif ($authlevel < $require_level) - return _("Insufficient permissions."); - - // Successful login. - $user = new WikiUser($this->_request, $userid, $authlevel); - return $user; - } - - function PrintLoginForm(&$request, $args, $fail_message = false, - $separate_page = true) - { - include_once 'lib/Template.php'; - // Call update_locale in case the system's default language is not 'en'. - // (We have no user pref for lang at this point yet, no one is logged in.) - update_locale(DEFAULT_LANGUAGE); - $userid = ''; - $require_level = 0; - extract($args); // fixme - - $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level)); - - $pagename = $request->getArg('pagename'); - $login = new Template('login', $request, - compact('pagename', 'userid', 'require_level', - 'fail_message', 'pass_required')); - if ($separate_page) { - $request->discardOutput(); - $page = $request->getPage($pagename); - $revision = $page->getCurrentRevision(); - return GeneratePage($login, _("Sign In"), $revision); - } else { - return $login; - } - } - - /** - * Check password. - */ - function _pwcheck($userid, $passwd) - { - global $WikiNameRegexp; - - if (!empty($userid) && $userid == ADMIN_USER) { - // $this->_authmethod = 'pagedata'; - if (defined('ENCRYPTED_PASSWD') && ENCRYPTED_PASSWD) - if (!empty($passwd) - && crypt($passwd, ADMIN_PASSWD) == ADMIN_PASSWD - ) - return WIKIAUTH_ADMIN; - else - return false; - if (!empty($passwd)) { - if ($passwd == ADMIN_PASSWD) - return WIKIAUTH_ADMIN; - else { - // maybe we forgot to enable ENCRYPTED_PASSWD? - if (function_exists('crypt') - && crypt($passwd, ADMIN_PASSWD) == ADMIN_PASSWD - ) { - trigger_error(_("You forgot to set ENCRYPTED_PASSWD to true. Please update your config/config.ini"), - E_USER_WARNING); - return WIKIAUTH_ADMIN; - } - } - } - return false; - } // HTTP Authentication - elseif (ALLOW_HTTP_AUTH_LOGIN && !empty($PHP_AUTH_USER)) { - // if he ignored the password field, because he is already - // authenticated try the previously given password. - if (empty($passwd)) - $passwd = $PHP_AUTH_PW; - } - - // WikiDB_User DB/File Authentication from $DBAuthParams - // Check if we have the user. If not try other methods. - if (ALLOW_USER_LOGIN) { // && !empty($passwd)) { - if (!$this->isValidName($userid)) { - trigger_error(_("Invalid username."), E_USER_WARNING); - return false; - } - $request = $this->_request; - // first check if the user is known - if ($this->exists($userid)) { - $this->_authmethod = 'pagedata'; - return ($this->checkPassword($passwd)) ? WIKIAUTH_USER : false; - } else { - // else try others such as LDAP authentication: - if (ALLOW_LDAP_LOGIN && defined(LDAP_AUTH_HOST) && !empty($passwd) && !strstr($userid, '*')) { - if ($ldap = ldap_connect(LDAP_AUTH_HOST)) { // must be a valid LDAP server! - $r = @ldap_bind($ldap); // this is an anonymous bind - $st_search = "uid=$userid"; - // Need to set the right root search information. see ../index.php - $sr = ldap_search($ldap, LDAP_BASE_DN, - "$st_search"); - $info = ldap_get_entries($ldap, $sr); // there may be more hits with this userid. try every - for ($i = 0; $i < $info["count"]; $i++) { - $dn = $info[$i]["dn"]; - // The password is still plain text. - if ($r = @ldap_bind($ldap, $dn, $passwd)) { - // ldap_bind will return TRUE if everything matches - ldap_close($ldap); - $this->_authmethod = 'LDAP'; - return WIKIAUTH_USER; - } - } - } else { - trigger_error("Unable to connect to LDAP server " - . LDAP_AUTH_HOST, E_USER_WARNING); - } - } - // imap authentication. added by limako - if (ALLOW_IMAP_LOGIN && !empty($passwd)) { - $mbox = @imap_open("{" . IMAP_AUTH_HOST . "}INBOX", - $userid, $passwd, OP_HALFOPEN); - if ($mbox) { - imap_close($mbox); - $this->_authmethod = 'IMAP'; - return WIKIAUTH_USER; - } - } - } - } - if (ALLOW_BOGO_LOGIN - && preg_match('/\A' . $WikiNameRegexp . '\z/', $userid) - ) { - $this->_authmethod = 'BOGO'; - return WIKIAUTH_BOGO; - } - return false; - } - - // Todo: try our WikiDB backends. - function getPreferences() - { - // Restore saved preferences. - - // I'd rather prefer only to store the UserId in the cookie or - // session, and get the preferences from the db or page. - if (isset($this->_request)) { - if (!($prefs = $this->_request->getCookieVar('WIKI_PREFS2'))) - $prefs = $this->_request->getSessionVar('wiki_prefs'); - } - - //if (!$this->_userid && !empty($GLOBALS['HTTP_COOKIE_VARS']['WIKI_ID'])) { - // $this->_userid = $GLOBALS['HTTP_COOKIE_VARS']['WIKI_ID']; - //} - - // before we get his prefs we should check if he is signed in - if (USE_PREFS_IN_PAGE && $this->homePage()) { // in page metadata - // old array - if ($pref = $this->_homepage->get('pref')) { - //trigger_error("pref=".$pref);//debugging - $prefs = unserialize($pref); - } - } - return new UserPreferences($prefs); - } - - // No cookies anymore for all prefs, only the userid. PHP creates - // a session cookie in memory, which is much more efficient, - // but not persistent. Get persistency with a homepage or DB Prefs - // - // Return the number of changed entries - function setPreferences($prefs, $id_only = false) - { - if (!is_object($prefs)) { - $prefs = new UserPreferences($prefs); - } - // update the session and id - $this->_request->setSessionVar('wiki_prefs', $prefs); - // $this->_request->setCookieVar('WIKI_PREFS2', $this->_prefs, 365); - // simple unpacked cookie - if ($this->_userid) setcookie(getCookieName(), $this->_userid, 365, '/'); - - // We must ensure that any password is encrypted. - // We don't need any plaintext password. - if (!$id_only) { - if ($this->isSignedIn()) { - if ($this->isAdmin()) - $prefs->set('passwd', ''); - // already stored in config/config.ini, and it might be - // plaintext! well oh well - if ($homepage = $this->homePage()) { - // check for page revision 0 - if (!$this->_dbi->isWikiPage($this->_userid)) { - trigger_error(_("Your home page has not been created yet so your preferences cannot not be saved."), - E_USER_WARNING); - } else { - if ($this->isAdmin() || !$homepage->get('locked')) { - $homepage->set('pref', serialize($prefs->_prefs)); - return sizeof($prefs->_prefs); - } else { - // An "empty" page could still be - // intentionally locked by admin to - // prevent its creation. - // - // FIXME: This permission situation should - // probably be handled by the DB backend, - // once the new WikiUser code has been - // implemented. - trigger_error(_("Your home page is locked so your preferences cannot not be saved.") - . " " . _("Please contact your PhpWiki administrator for assistance."), - E_USER_WARNING); - } - } - } else { - trigger_error("No homepage for user found. Creating one...", - E_USER_WARNING); - $this->createHomepage($prefs); - //$homepage->set('pref', serialize($prefs->_prefs)); - return sizeof($prefs->_prefs); - } - } else { - trigger_error("you must be signed in", E_USER_WARNING); - } - } - return 0; - } - - // check for homepage with user flag. - // can be overriden from the auth backends - function exists() - { - $homepage = $this->homePage(); - return ($this->_userid && $homepage && $homepage->get('pref')); - } - - // doesn't check for existance!!! hmm. - // how to store metadata in not existing pages? how about versions? - function homePage() - { - if (!$this->_userid) - return false; - if (!empty($this->_homepage)) { - return $this->_homepage; - } else { - if (empty($this->_dbi)) { - if (DEBUG) printSimpleTrace(debug_backtrace()); - } else { - $this->_homepage = $this->_dbi->getPage($this->_userid); - } - return $this->_homepage; - } - } - - function hasHomePage() - { - return !$this->homePage(); - } - - // create user by checking his homepage - function createUser($pref, $createDefaultHomepage = true) - { - if ($this->exists()) - return; - if ($createDefaultHomepage) { - $this->createHomepage($pref); - } else { - // empty page - include 'lib/loadsave.php'; - $pageinfo = array('pagedata' => array('pref' => serialize($pref->_pref)), - 'versiondata' => array('author' => $this->_userid), - 'pagename' => $this->_userid, - 'content' => _('CategoryHomepage')); - SavePage($this->_request, $pageinfo, false, false); - } - $this->setPreferences($pref); - } - - // create user and default user homepage - function createHomepage($pref) - { - $pagename = $this->_userid; - include 'lib/loadsave.php'; - - // create default homepage: - // properly expanded template and the pref metadata - $template = Template('homepage.tmpl', $this->_request); - $text = $template->getExpansion(); - $pageinfo = array('pagedata' => array('pref' => serialize($pref->_pref)), - 'versiondata' => array('author' => $this->_userid), - 'pagename' => $pagename, - 'content' => $text); - SavePage($this->_request, $pageinfo, false, false); - - // create Calendar - $pagename = $this->_userid . SUBPAGE_SEPARATOR . _('Calendar'); - if (!isWikiPage($pagename)) { - $pageinfo = array('pagedata' => array(), - 'versiondata' => array('author' => $this->_userid), - 'pagename' => $pagename, - 'content' => "<?plugin Calendar ?>\n"); - SavePage($this->_request, $pageinfo, false, false); - } - - // create Preferences - $pagename = $this->_userid . SUBPAGE_SEPARATOR . _('Preferences'); - if (!isWikiPage($pagename)) { - $pageinfo = array('pagedata' => array(), - 'versiondata' => array('author' => $this->_userid), - 'pagename' => $pagename, - 'content' => "<?plugin UserPreferences ?>\n"); - SavePage($this->_request, $pageinfo, false, false); - } - } - - function tryAuthBackends() - { - return ''; // crypt('') will never be '' - } - - // Auth backends must store the crypted password where? - // Not in the preferences. - function checkPassword($passwd) - { - $prefs = $this->getPreferences(); - $stored_passwd = $prefs->get('passwd'); // crypted - if (empty($prefs->_prefs['passwd'])) // not stored in the page - // allow empty passwords? At least store a '*' then. - // try other backend. hmm. - $stored_passwd = $this->tryAuthBackends($this->_userid); - if (empty($stored_passwd)) { - trigger_error(sprintf(_("Old UserPage %s without stored password updated with empty password. Set a password in your UserPreferences."), - $this->_userid), E_USER_NOTICE); - $prefs->set('passwd', '*'); - return true; - } - if ($stored_passwd == '*') - return true; - if (!empty($passwd) - && crypt($passwd, $stored_passwd) == $stored_passwd - ) - return true; - else - return false; - } - - function changePassword($newpasswd, $passwd2 = false) - { - if (!$this->mayChangePass()) { - trigger_error(sprintf("Attempt to change an external password for “%s”. Not allowed!", - $this->_userid), E_USER_ERROR); - return false; - } - if ($passwd2 && $passwd2 != $newpasswd) { - trigger_error("The second password must be the same as the first to change it", - E_USER_ERROR); - return false; - } - if (!$this->isAuthenticated()) return false; - - $prefs = $this->getPreferences(); - if (ENCRYPTED_PASSWD) - $prefs->set('passwd', crypt($newpasswd)); - else - $prefs->set('passwd', $newpasswd); - $this->setPreferences($prefs); - return true; - } - - function mayChangePass() - { - // on external DBAuth maybe. on IMAP or LDAP not - // on internal DBAuth yes - if (in_array($this->_authmethod, array('IMAP', 'LDAP'))) - return false; - if ($this->isAdmin()) - return false; - if ($this->_authmethod == 'pagedata') - return true; - if ($this->_authmethod == 'authdb') - return true; - } -} - -// create user and default user homepage -// FIXME: delete this, not used? -/* -function createUser ($userid, $pref) { - global $request; - $user = new WikiUser ($request, $userid); - $user->createUser($pref); -} -*/ - -class _UserPreference -{ - function _UserPreference($default_value) - { - $this->default_value = $default_value; - } - - function sanify($value) - { - return (string)$value; - } - - function update($value) - { - } -} - -class _UserPreference_numeric - extends _UserPreference -{ - function __construct($default, $minval = false, $maxval = false) - { - parent::__construct((double)$default); - $this->_minval = (double)$minval; - $this->_maxval = (double)$maxval; - } - - function sanify($value) - { - $value = (double)$value; - if ($this->_minval !== false && $value < $this->_minval) - $value = $this->_minval; - if ($this->_maxval !== false && $value > $this->_maxval) - $value = $this->_maxval; - return $value; - } -} - -class _UserPreference_int - extends _UserPreference_numeric -{ - function __construct($default, $minval = false, $maxval = false) - { - parent::__construct((int)$default, (int)$minval, (int)$maxval); - } - - function sanify($value) - { - return (int)parent::sanify((int)$value); - } -} - -class _UserPreference_bool - extends _UserPreference -{ - function __construct($default = false) - { - parent::__construct((bool)$default); - } - - function sanify($value) - { - if (is_array($value)) { - /* This allows for constructs like: - * - * <input type="hidden" name="pref[boolPref][]" value="0" /> - * <input type="checkbox" name="pref[boolPref][]" value="1" /> - * - * (If the checkbox is not checked, only the hidden input - * gets sent. If the checkbox is sent, both inputs get - * sent.) - */ - foreach ($value as $val) { - if ($val) - return true; - } - return false; - } - return (bool)$value; - } -} - -class _UserPreference_language - extends _UserPreference -{ - function __construct($default = DEFAULT_LANGUAGE) - { - parent::__construct($default); - } - - // FIXME: check for valid locale - function sanify($value) - { - // Revert to DEFAULT_LANGUAGE if user does not specify - // language in UserPreferences or chooses <system language>. - if ($value == '' or empty($value)) - $value = DEFAULT_LANGUAGE; - - return (string)$value; - } -} - -class _UserPreference_theme - extends _UserPreference -{ - function __construct($default = THEME) - { - parent::__construct($default); - } - - function sanify($value) - { - if (findFile($this->_themefile($value), true)) - return $value; - return $this->default_value; - } - - function update($newvalue) - { - global $WikiTheme; - include_once($this->_themefile($newvalue)); - if (empty($WikiTheme)) - include_once($this->_themefile(THEME)); - } - - function _themefile($theme) - { - return "themes/$theme/themeinfo.php"; - } -} - -// don't save default preferences for efficiency. -class UserPreferences -{ - function UserPreferences($saved_prefs = false) - { - $this->_prefs = array(); - - if (isa($saved_prefs, 'UserPreferences') && $saved_prefs->_prefs) { - foreach ($saved_prefs->_prefs as $name => $value) - $this->set($name, $value); - } elseif (is_array($saved_prefs)) { - foreach ($saved_prefs as $name => $value) - $this->set($name, $value); - } - } - - function _getPref($name) - { - global $UserPreferences; - if (!isset($UserPreferences[$name])) { - if ($name == 'passwd2') return false; - trigger_error("$name: unknown preference", E_USER_NOTICE); - return false; - } - return $UserPreferences[$name]; - } - - function get($name) - { - if (isset($this->_prefs[$name])) - return $this->_prefs[$name]; - if (!($pref = $this->_getPref($name))) - return false; - return $pref->default_value; - } - - function set($name, $value) - { - if (!($pref = $this->_getPref($name))) - return false; - - $newvalue = $pref->sanify($value); - $oldvalue = $this->get($name); - - // update on changes - if ($newvalue != $oldvalue) - $pref->update($newvalue); - - // don't set default values to save space (in cookies, db and - // sesssion) - if ($value == $pref->default_value) - unset($this->_prefs[$name]); - else - $this->_prefs[$name] = $newvalue; - } - - function pack($nonpacked) - { - return serialize($nonpacked); - } - - function unpack($packed) - { - if (!$packed) - return false; - if (substr($packed, 0, 2) == "O:") { - // Looks like a serialized object - return unserialize($packed); - } - //trigger_error("DEBUG: Can't unpack bad UserPreferences", - //E_USER_WARNING); - return false; - } - - function hash() - { - return wikihash($this->_prefs); - } -} - -// Local Variables: -// mode: php -// tab-width: 8 -// c-basic-offset: 4 -// c-hanging-comment-ender-p: nil -// indent-tabs-mode: nil -// End: Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/WikiUserNew.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -60,7 +60,6 @@ * * Random architectural notes, sorted by date: * 2004-01-25 rurban - * Test it by defining ENABLE_USER_NEW in config/config.ini * 1) Now a ForbiddenUser is returned instead of false. * 2) Previously ALLOW_ANON_USER = false meant that anon users cannot edit, * but may browse. Now with ALLOW_ANON_USER = false he may not browse, Modified: trunk/lib/XmlRpcServer.php =================================================================== --- trunk/lib/XmlRpcServer.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/XmlRpcServer.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -445,12 +445,7 @@ $userid = $_ENV['REMOTE_ADDR']; elseif (isset($GLOBALS['REMOTE_ADDR'])) $userid = $GLOBALS['REMOTE_ADDR']; } - - if (ENABLE_USER_NEW) { - return WikiUser($userid); - } else { - return new WikiUser($request, $userid); - } + return WikiUser($userid); } function putPage($params) Modified: trunk/lib/imagecache.php =================================================================== --- trunk/lib/imagecache.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/imagecache.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -29,10 +29,8 @@ include_once 'lib/config.php'; require_once(dirname(__FILE__) . "/stdlib.php"); require_once 'lib/Request.php'; -if (ENABLE_USER_NEW) require_once("lib/WikiUserNew.php"); -else require_once("lib/WikiUser.php"); +require_once("lib/WikiUserNew.php"); require_once 'lib/WikiDB.php'; - require_once 'lib/WikiPluginCached.php'; // ----------------------------------------------------------------------- @@ -75,7 +73,7 @@ if ($user = $request->getSessionVar('wiki_user')) { $request->_user = $user; $request->_user->_authhow = 'session'; - return ENABLE_USER_NEW ? $user->UserName() : $request->_user; + return $user->UserName(); } if ($userid = $request->getCookieVar(getCookieName())) { if (!empty($userid) and substr($userid, 0, 2) != 's:') { @@ -100,13 +98,8 @@ $request->setArg('pagename', deducePagename($request)); $pagename = $request->getArg('pagename'); $request->_dbi = WikiDB::open($GLOBALS['DBParams']); - if (ENABLE_USER_NEW) { - $request->_user = new _AnonUser(); - $request->_prefs =& $request->_user->_prefs; - } else { - $request->_user = new WikiUser($request); - $request->_prefs = new UserPreferences(); - } + $request->_user = new _AnonUser(); + $request->_prefs =& $request->_user->_prefs; // Enable the output of most of the warning messages. // The warnings will screw up zip files and setpref though. Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/loadsave.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -1484,12 +1484,8 @@ // This really needs to be cleaned up... // (I'm working on it.) $real_user = $request->_user; - if (ENABLE_USER_NEW) - $request->_user = new _BogoUser(ADMIN_USER); + $request->_user = new _BogoUser(ADMIN_USER); - else - $request->_user = new WikiUser($request, ADMIN_USER, WIKIAUTH_BOGO); - StartLoadDump($request, _("Loading up virgin wiki")); $pgsrc = FindLocalizedFile(WIKI_PGSRC); Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/main.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -28,10 +28,7 @@ require_once(dirname(__FILE__) . "/stdlib.php"); require_once 'lib/Request.php'; require_once 'lib/WikiDB.php'; -if (ENABLE_USER_NEW) - require_once 'lib/WikiUserNew.php'; -else - require_once 'lib/WikiUser.php'; +require_once 'lib/WikiUserNew.php'; require_once 'lib/WikiGroup.php'; if (ENABLE_PAGEPERM) require_once 'lib/PagePerm.php'; @@ -61,30 +58,28 @@ // force our local copy, until the pear version is fixed. include_once(dirname(__FILE__) . "/pear/File_Passwd.php"); } - if (ENABLE_USER_NEW) { - // Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name - // There's no way to demand-load it later. This way it's much slower, but needs slightly - // less memory than loading all. - if (ALLOW_BOGO_LOGIN) - include_once 'lib/WikiUser/BogoLogin.php'; - // UserPreferences POST Update doesn't reach this. - foreach ($GLOBALS['USER_AUTH_ORDER'] as $method) { - include_once("lib/WikiUser/$method.php"); - if ($method == 'Db') - switch (DATABASE_TYPE) { - case 'SQL' : - include_once 'lib/WikiUser/PearDb.php'; - break; - case 'ADODB': - include_once 'lib/WikiUser/AdoDb.php'; - break; - case 'PDO' : - include_once 'lib/WikiUser/PdoDb.php'; - break; - } - } - unset($method); + // Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name + // There's no way to demand-load it later. This way it's much slower, but needs slightly + // less memory than loading all. + if (ALLOW_BOGO_LOGIN) + include_once 'lib/WikiUser/BogoLogin.php'; + // UserPreferences POST Update doesn't reach this. + foreach ($GLOBALS['USER_AUTH_ORDER'] as $method) { + include_once("lib/WikiUser/$method.php"); + if ($method == 'Db') + switch (DATABASE_TYPE) { + case 'SQL' : + include_once 'lib/WikiUser/PearDb.php'; + break; + case 'ADODB': + include_once 'lib/WikiUser/AdoDb.php'; + break; + case 'PDO' : + include_once 'lib/WikiUser/PdoDb.php'; + break; + } } + unset($method); if (USE_DB_SESSION) { include_once 'lib/DbSession.php'; $dbi =& $this->_dbi; @@ -116,52 +111,47 @@ // Restore auth state. This doesn't check for proper authorization! $userid = $this->_deduceUsername(); - if (ENABLE_USER_NEW) { - if (isset($this->_user) and - !empty($this->_user->_authhow) and + if (isset($this->_user) and + !empty($this->_user->_authhow) and $this->_user->_authhow == 'session' ) { - // users might switch in a session between the two objects. - // restore old auth level here or in updateAuthAndPrefs? - //$user = $this->getSessionVar('wiki_user'); - // revive db handle, because these don't survive sessions - if (isset($this->_user) and - (!isa($this->_user, WikiUserClassname()) - or (strtolower(get_class($this->_user)) == '_passuser') - or (strtolower(get_class($this->_user)) == '_fusionforgepassuser')) - ) { - $this->_user = WikiUser($userid, $this->_user->_prefs); - } - // revive other db handle - if (isset($this->_user->_prefs->_method) - and ($this->_user->_prefs->_method == 'SQL' - or $this->_user->_prefs->_method == 'ADODB' - or $this->_user->_prefs->_method == 'PDO' - or $this->_user->_prefs->_method == 'HomePage') - ) { - $this->_user->_HomePagehandle = $this->getPage($userid); - } - // need to update the lockfile filehandle - if (isa($this->_user, '_FilePassUser') - and $this->_user->_file->lockfile - and !$this->_user->_file->fplock - ) { - //$level = $this->_user->_level; - $this->_user = UpgradeUser($this->_user, - new _FilePassUser($userid, - $this->_user->_prefs, - $this->_user->_file->filename)); - //$this->_user->_level = $level; - } - $this->_prefs = & $this->_user->_prefs; - } else { - $user = WikiUser($userid); - $this->_user = & $user; - $this->_prefs = & $this->_user->_prefs; + // users might switch in a session between the two objects. + // restore old auth level here or in updateAuthAndPrefs? + //$user = $this->getSessionVar('wiki_user'); + // revive db handle, because these don't survive sessions + if (isset($this->_user) and + (!isa($this->_user, WikiUserClassname()) + or (strtolower(get_class($this->_user)) == '_passuser') + or (strtolower(get_class($this->_user)) == '_fusionforgepassuser')) + ) { + $this->_user = WikiUser($userid, $this->_user->_prefs); } + // revive other db handle + if (isset($this->_user->_prefs->_method) + and ($this->_user->_prefs->_method == 'SQL' + or $this->_user->_prefs->_method == 'ADODB' + or $this->_user->_prefs->_method == 'PDO' + or $this->_user->_prefs->_method == 'HomePage') + ) { + $this->_user->_HomePagehandle = $this->getPage($userid); + } + // need to update the lockfile filehandle + if (isa($this->_user, '_FilePassUser') + and $this->_user->_file->lockfile + and !$this->_user->_file->fplock + ) { + //$level = $this->_user->_level; + $this->_user = UpgradeUser($this->_user, + new _FilePassUser($userid, + $this->_user->_prefs, + $this->_user->_file->filename)); + //$this->_user->_level = $level; + } + $this->_prefs = & $this->_user->_prefs; } else { - $this->_user = new WikiUser($this, $userid); - $this->_prefs = $this->_user->getPreferences(); + $user = WikiUser($userid); + $this->_user = & $user; + $this->_prefs = & $this->_user->_prefs; } } @@ -440,16 +430,11 @@ */ private function _signIn($userid) { - if (ENABLE_USER_NEW) { - if (!$this->_user) - $this->_user = new _BogoUser($userid); - // FIXME: is this always false? shouldn't we try passuser first? - if (!$this->_user) - $this->_user = new _PassUser($userid); - } else { - if (!$this->_user) - $this->_user = new WikiUser($this, $userid); - } + if (!$this->_user) + $this->_user = new _BogoUser($userid); + // FIXME: is this always false? shouldn't we try passuser first? + if (!$this->_user) + $this->_user = new _PassUser($userid); $user = $this->_user->AuthCheck(array('userid' => $userid)); if (isa($user, WikiUserClassname())) { $this->_setUser($user); // success! @@ -477,12 +462,6 @@ $this->setSessionVar('wiki_user', $user); $this->_prefs->set('userid', $isSignedIn ? $user->getId() : ''); - if (!ENABLE_USER_NEW) { - if (empty($this->_user->_request)) - $this->_user->_request =& $this; - if (empty($this->_user->_dbi)) - $this->_user->_dbi =& $this->_dbi; - } $this->initializeTheme($isSignedIn ? 'login' : 'logout'); define('MAIN_setUser', true); } @@ -1002,7 +981,7 @@ } elseif (isa($user, WikiUserClassname())) { $this->_user = $user; $this->_user->_authhow = 'session'; - return ENABLE_USER_NEW ? $user->UserName() : $this->_user; + return $user->UserName(); } } Modified: trunk/lib/plugin/DebugAuthInfo.php =================================================================== --- trunk/lib/plugin/DebugAuthInfo.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/plugin/DebugAuthInfo.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -60,7 +60,7 @@ $table = HTML::table(array('class' => 'bordered')); $table->pushContent($this->show_hash("AUTH DEFINES", $this->buildConstHash( - array("ENABLE_USER_NEW", "ALLOW_ANON_USER", + array("ALLOW_ANON_USER", "ALLOW_ANON_EDIT", "ALLOW_BOGO_LOGIN", "REQUIRE_SIGNIN_BEFORE_EDIT", "ALLOW_USER_PASSWORDS", "PASSWORD_LENGTH_MINIMUM", "USE_DB_SESSION")))); @@ -102,20 +102,18 @@ } } $table->pushContent($this->show_hash("User: Object of " . get_class($user), $userdata)); - if (ENABLE_USER_NEW) { - $group = &$request->getGroup(); - $groups = $group->getAllGroupsIn(); - $groupdata = obj2hash($group, array('_dbi', '_request', 'password', 'passwd')); - unset($groupdata['request']); - $table->pushContent($this->show_hash("Group: Object of " . get_class($group), $groupdata)); - $groups = $group->getAllGroupsIn(); - $groupdata = array('getAllGroupsIn' => $groups); - foreach ($groups as $g) { - $groupdata["getMembersOf($g)"] = $group->getMembersOf($g); - $groupdata["isMember($g)"] = $group->isMember($g); - } - $table->pushContent($this->show_hash("Group Methods: ", $groupdata)); + $group = &$request->getGroup(); + $groups = $group->getAllGroupsIn(); + $groupdata = obj2hash($group, array('_dbi', '_request', 'password', 'passwd')); + unset($groupdata['request']); + $table->pushContent($this->show_hash("Group: Object of " . get_class($group), $groupdata)); + $groups = $group->getAllGroupsIn(); + $groupdata = array('getAllGroupsIn' => $groups); + foreach ($groups as $g) { + $groupdata["getMembersOf($g)"] = $group->getMembersOf($g); + $groupdata["isMember($g)"] = $group->isMember($g); } + $table->pushContent($this->show_hash("Group Methods: ", $groupdata)); $html->pushContent($table); } return $html; Modified: trunk/lib/plugin/UserRatings.php =================================================================== --- trunk/lib/plugin/UserRatings.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/plugin/UserRatings.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -23,12 +23,8 @@ require_once 'lib/PageList.php'; require_once 'lib/wikilens/Buddy.php'; require_once 'lib/wikilens/PageListColumns.php'; +require_once 'lib/WikiUserNew.php'; -if (ENABLE_USER_NEW) - require_once 'lib/WikiUserNew.php'; -else - require_once 'lib/WikiUser.php'; - /** * Show a user's ratings in a table, using PageList. * Usage: Modified: trunk/lib/plugin/WikiAdminUtils.php =================================================================== --- trunk/lib/plugin/WikiAdminUtils.php 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/lib/plugin/WikiAdminUtils.php 2014-09-26 16:39:46 UTC (rev 9126) @@ -249,10 +249,7 @@ $allusers = array(); } foreach ($allusers as $username) { - if (ENABLE_USER_NEW) - $user = WikiUser($username); - else - $user = new WikiUser($request, $username); + $user = WikiUser($username); $prefs = $user->getPreferences(); if ($prefs->get('email')) { if (!$prefs->get('userid')) Modified: trunk/themes/default/templates/userprefs.tmpl =================================================================== --- trunk/themes/default/templates/userprefs.tmpl 2014-09-26 14:39:38 UTC (rev 9125) +++ trunk/themes/default/templates/userprefs.tmpl 2014-09-26 16:39:46 UTC (rev 9126) @@ -123,14 +123,14 @@ <?php } else { $fill = " "; // See also plugin DebugAuthInfo - $authmethod = ENABLE_USER_NEW ? @$user->_authmethod : @$user->auth_how; + $authmethod = @$user->_authmethod; ?> <?php echo HTML::pre(sprintf("%12s: [% 10s] %s\n",_("UserId"),$pref->get('userid'), " from " . $authmethod), sprintf("%12s: [% 10s] %16s: [% 10s] | %8s: [%2s]\n","getId",$user->getId(),"getAuthenticatedId",$user->getAuthenticatedId(),"isSignedIn", $user->isSignedIn()), //sprintf("%12s: [% 10s]\n",_("Password"),empty($pref->get('passwd')) ? _("<empty>") : _("<not empty>")), sprintf("%12s: [% 10s] %15s: [% 8s]\n", _("Auth Level"),$user->_level,_("Auth Method"),$authmethod), - sprintf("%12s: [% 10s]\n",_("HomePage"),$user->hasHomePage() ? (ENABLE_USER_NEW ? $user->_HomePagehandle->_pagename : $user->_homepage->_pagename ) : ''), + sprintf("%12s: [% 10s]\n",_("HomePage"),$user->hasHomePage() ? $user->_HomePagehandle->_pagename : ''), sprintf("%12s: [% 10s]\n",_("E-mail"),$pref->get('email')), //sprintf("%12s: [% 10s]\n",_("Notify"),$pref->get('notifyPages')), sprintf("%12s: [% 10s] %16s: [% 10s] \n",_("Theme"), $pref->get('theme'), _("Current theme"),$WikiTheme->_name), @@ -150,7 +150,6 @@ <td></td></tr> <?php } ?> -<?php if (ENABLE_USER_NEW) { ?> <tr><td colspan="2"><h2><?php echo _("E-mail")?></h2></td></tr> <tr><td> @@ -210,8 +209,6 @@ </td> </tr> -<?php } ?> - <tr><td colspan="2"><h2><?php echo _("Appearance")?></h2></td></tr> <tr><td colspan="2"><?php echo _("Here you can override site-specific default values.") ?></td></tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 14:39:43
|
Revision: 9125 http://sourceforge.net/p/phpwiki/code/9125 Author: vargenau Date: 2014-09-26 14:39:38 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Add PHPWIKI_VERSION in meta name generator Modified Paths: -------------- trunk/themes/Crao/templates/head.tmpl trunk/themes/Sidebar/templates/htmldump.tmpl trunk/themes/default/templates/dialog.tmpl trunk/themes/default/templates/head.tmpl trunk/themes/default/templates/htmldump.tmpl trunk/themes/default/templates/redirect.tmpl trunk/themes/wikilens/templates/head.tmpl Modified: trunk/themes/Crao/templates/head.tmpl =================================================================== --- trunk/themes/Crao/templates/head.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/Crao/templates/head.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -8,7 +8,7 @@ <?php if (!empty($PAGE_KEYWORDS)) { ?> <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" /> <?php } ?> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> <link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> Modified: trunk/themes/Sidebar/templates/htmldump.tmpl =================================================================== --- trunk/themes/Sidebar/templates/htmldump.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/Sidebar/templates/htmldump.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -20,7 +20,7 @@ <?php if (!empty($PAGE_KEYWORDS)) { ?> <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" /> <?php } ?> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <?php if (!empty($relative_base)) { ?> <base href="<?php echo $relative_base?>" /> Modified: trunk/themes/default/templates/dialog.tmpl =================================================================== --- trunk/themes/default/templates/dialog.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/default/templates/dialog.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -7,7 +7,7 @@ <head> <meta charset="UTF-8" /> <meta name="robots" content="noindex, nofollow" /> -<meta name="generator" content="phpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <?php echo $WikiTheme->getCSS() ?> <title><?php echo WIKI_NAME . ' - ' . _("Dialog")?></title> Modified: trunk/themes/default/templates/head.tmpl =================================================================== --- trunk/themes/default/templates/head.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/default/templates/head.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -12,7 +12,7 @@ <?php if (!empty($PAGE_KEYWORDS)) { ?> <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" /> <?php } ?> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> <link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> Modified: trunk/themes/default/templates/htmldump.tmpl =================================================================== --- trunk/themes/default/templates/htmldump.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/default/templates/htmldump.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -20,7 +20,7 @@ <?php if (!empty($PAGE_KEYWORDS)) { ?> <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" /> <?php } ?> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <?php if (!empty($relative_base)) { ?> <base href="<?php echo $relative_base?>" /> Modified: trunk/themes/default/templates/redirect.tmpl =================================================================== --- trunk/themes/default/templates/redirect.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/default/templates/redirect.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -8,7 +8,7 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noindex, nofollow" /> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <?php echo $WikiTheme->getCSS() ?> <title><?php echo WIKI_NAME . ' - ' . _("Redirect")?></title> Modified: trunk/themes/wikilens/templates/head.tmpl =================================================================== --- trunk/themes/wikilens/templates/head.tmpl 2014-09-26 14:22:08 UTC (rev 9124) +++ trunk/themes/wikilens/templates/head.tmpl 2014-09-26 14:39:38 UTC (rev 9125) @@ -8,7 +8,7 @@ <?php if (!empty($PAGE_KEYWORDS)) { ?> <meta name="keywords" content="<?php echo $PAGE_KEYWORDS?>" /> <?php } ?> -<meta name="generator" content="PhpWiki" /> +<meta name="generator" content="PhpWiki <?php echo PHPWIKI_VERSION?>" /> <base href="<?php echo PHPWIKI_BASE_URL?>" /> <link rel="shortcut icon" href="<?php echo $WikiTheme->getImageURL('favicon.ico')?>" /> <link rel="stylesheet" type="text/css" href="<?php echo DATA_PATH ?>/highlight.js/styles/github.css"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 14:22:11
|
Revision: 9124 http://sourceforge.net/p/phpwiki/code/9124 Author: vargenau Date: 2014-09-26 14:22:08 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Add Help/WikisUsingPhpWiki Modified Paths: -------------- trunk/pgsrc/PhpWikiManual Added Paths: ----------- trunk/pgsrc/Help%2FWikisUsingPhpWiki Added: trunk/pgsrc/Help%2FWikisUsingPhpWiki =================================================================== --- trunk/pgsrc/Help%2FWikisUsingPhpWiki (rev 0) +++ trunk/pgsrc/Help%2FWikisUsingPhpWiki 2014-09-26 14:22:08 UTC (rev 9124) @@ -0,0 +1,35 @@ +Date: Fri, 26 Sep 2014 16:11:32 +0000 +Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) +Content-Type: application/x-phpwiki; + pagename=Help%2FWikisUsingPhpWiki + flags=PAGE_LOCKED%2CEXTERNAL_PAGE; + charset=UTF-8 +Content-Transfer-Encoding: binary + +Here are some wikis using ~PhpWiki: + +|= URL |= ~PhpWiki release +| http://bh.hallikainen.org/ | 1.4.0 +| http://danm.ucsc.edu/web/ | 1.3.14 +| http://dev.cmeerw.org/HomePage | ? +| http://esk.uz | 1.3.14 +| http://helpdesk.razorline.com/wiki/ | 1.4.0RC1 +| http://pcsgwiki.com/wiki/ | 1.3.14 +| http://php-rql.dnsalias.net/wiki/ | 1.4.0RC1 +| http://profit.colegiolasalleguaparo.edu.ve/wiki/ | 1.3.14 +| http://rec-puzzles.org/ | 1.3.11p1 +| http://rhythsmbox.com/wiki/index.php | 1.4.0RC1 +| http://sldr-test.lpl-aix.fr/phpwiki/ | 1.3.14 +| https://open-innovation.alcatel-lucent.com/wiki/g/help/ | ? +| http://stardrive.genesismuds.com/index.php/ | 1.4.0RC1 +| https://www.geroedel.de/wiki/ | 1.4.0 +| http://utenmelk.no/wiki/ | 1.4.0RC1 +| http://wac-tk.drni.de/ | 1.3.11p1 +| http://wiki.cyberleo.net/ | 1.4.0RC1 +| http://wiki.inde-mayenne.org | 1.3.14 +| http://www-bd.lip6.fr/ens/li345-2011/index.php/Accueil | 1.4.0RC1 +| http://www.dkbush.com/zphpwiki/ | 1.3.14 +| http://www.drtedwilliams.net/kb/ | 1.3.14 +| http://www.e38.org/phpwiki/ | 1.3.14 +| http://www.nantes-wireless.org/actu/ | ? +| http://zombiecouncil.com/zwiki/ | 1.4.0RC1 Modified: trunk/pgsrc/PhpWikiManual =================================================================== --- trunk/pgsrc/PhpWikiManual 2014-09-26 12:37:47 UTC (rev 9123) +++ trunk/pgsrc/PhpWikiManual 2014-09-26 14:22:08 UTC (rev 9124) @@ -1,4 +1,4 @@ -Date: Tue, 29 Jul 2014 10:42:12 +0000 +Date: Fri, 26 Sep 2014 16:11:32 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) Content-Type: application/x-phpwiki; pagename=PhpWikiManual; @@ -10,6 +10,7 @@ <<IncludePage page="Help/WikiWikiWeb">> <<IncludePage page="Help/Steve Wainstead">> <<IncludePage page="Help/WabiSabi">> +<<IncludePage page="Help/WikisUsingPhpWiki">> <<IncludePage page="Help/AddingPages">> <<IncludePage page="Help/EditText">> <<IncludePage page="Help/GoodStyle">> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 12:37:51
|
Revision: 9123 http://sourceforge.net/p/phpwiki/code/9123 Author: vargenau Date: 2014-09-26 12:37:47 +0000 (Fri, 26 Sep 2014) Log Message: ----------- You need PHP >= 5.3 Modified Paths: -------------- trunk/INSTALL trunk/lib/main.php Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2014-09-26 12:29:57 UTC (rev 9122) +++ trunk/INSTALL 2014-09-26 12:37:47 UTC (rev 9123) @@ -3,7 +3,7 @@ PhpWiki 1.5.0 requires a web server with at least PHP version 5.3. All users of PHP are strongly encouraged to upgrade to -PHP 5.3.28 or to PHP 5.4 or 5.5. +PHP 5.3.29 or to PHP 5.4 or 5.5. Visit <http://www.php.net> and <http://php.net/downloads.php> for downloads and information. Modified: trunk/lib/main.php =================================================================== --- trunk/lib/main.php 2014-09-26 12:29:57 UTC (rev 9122) +++ trunk/lib/main.php 2014-09-26 12:37:47 UTC (rev 9123) @@ -1405,8 +1405,8 @@ function main() { - if (version_compare(PHP_VERSION, '5.2', '<')) { - exit(_("Your PHP version is too old. You must have at least PHP 5.2.")); + if (version_compare(PHP_VERSION, '5.3', '<')) { + exit(_("Your PHP version is too old. You must have at least PHP 5.3.")); } if (!USE_DB_SESSION) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 12:30:02
|
Revision: 9122 http://sourceforge.net/p/phpwiki/code/9122 Author: vargenau Date: 2014-09-26 12:29:57 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Remove redundunt CSS Modified Paths: -------------- trunk/themes/Crao/crao.css trunk/themes/MacOSX/MacOSX.css trunk/themes/MonoBook/monobook.css trunk/themes/Sidebar/sidebar.css trunk/themes/Wordpress/Wordpress.css trunk/themes/blog/Kubrick.css trunk/themes/default/phpwiki.css trunk/themes/fusionforge/fusionforge.css trunk/themes/shamino_com/shamino_com.css Modified: trunk/themes/Crao/crao.css =================================================================== --- trunk/themes/Crao/crao.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/Crao/crao.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -335,7 +335,6 @@ } blockquote.mail-style-quote { - border-left: #FF9933; /* MODIFY-color */ margin: 0; margin-bottom: 1em; border: 1px solid #FF9933; /* MODIFY-color */ Modified: trunk/themes/MacOSX/MacOSX.css =================================================================== --- trunk/themes/MacOSX/MacOSX.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/MacOSX/MacOSX.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -875,7 +875,6 @@ .dialog div.message { background-color: white; color: black; - color: black; margin: 0 1em; padding: 0.5em 0.5em; } @@ -969,7 +968,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } /* RssFeed */ Modified: trunk/themes/MonoBook/monobook.css =================================================================== --- trunk/themes/MonoBook/monobook.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/MonoBook/monobook.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -749,10 +749,6 @@ border-left: 1px solid #494f5d; border-bottom: 1px solid #c6d2de; border-right: 1px solid #c6d2de; - padding-top: 1px; - padding-bottom: 1px; - padding-left: .125em; - padding-right: .125em; padding: 0; clear: both; } @@ -1023,7 +1019,7 @@ .portlet h6 { background-color: #ffae2e; - border: 1px solid #2f6fab; + border: 1px #2f6fab; border-style: solid solid none solid; padding: 0 1em 0 1em; text-transform: lowercase; @@ -1061,7 +1057,6 @@ .portlet li { padding: 0; margin: 0 0 0 0; - margin-bottom: 0; } /* @@ -1102,7 +1097,6 @@ height: 86px; width: 86px; background: url("images/wiki_stamp.png") left no-repeat; - background-repeat: no-repeat; overflow: visible; } @@ -1252,7 +1246,6 @@ li#pt-login { /*background: url('images/wikiuser.png') top left bottom no-repeat;*/ background: url('images/wikiuser.png') left no-repeat; - background-repeat: no-repeat; padding-left: 20px; text-transform: none; } @@ -1336,7 +1329,6 @@ /* http://universaleditbutton.org */ #p-cactions li a#btn-edit { background: url('images/UEB16.png') top left no-repeat; - background-repeat: no-repeat; padding-left: 20px !important; text-transform: none; } @@ -1915,7 +1907,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } div#bottom { Modified: trunk/themes/Sidebar/sidebar.css =================================================================== --- trunk/themes/Sidebar/sidebar.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/Sidebar/sidebar.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -1020,7 +1020,7 @@ .portlet h6 { background-color: #ffae2e; - border: 1px solid #2f6fab; + border: 1px #2f6fab; border-style: solid solid none solid; padding: 0 1em 0 1em; /*text-transform: lowercase;*/ @@ -1056,7 +1056,6 @@ .portlet li { padding: 0; margin: 0 0 0 0; - margin-bottom: 0; } /* Modified: trunk/themes/Wordpress/Wordpress.css =================================================================== --- trunk/themes/Wordpress/Wordpress.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/Wordpress/Wordpress.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -513,10 +513,6 @@ border-left: 1px solid #494f5d; border-bottom: 1px solid #c6d2de; border-right: 1px solid #c6d2de; - padding-top: 1px; - padding-bottom: 1px; - padding-left: .125em; - padding-right: .125em; padding: 0; clear: both; } @@ -860,7 +856,6 @@ .dialog div.message { background-color: white; color: black; - color: black; margin: 0 1em; padding: 0.5em 0.5em; } @@ -958,7 +953,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } /* RssFeed */ Modified: trunk/themes/blog/Kubrick.css =================================================================== --- trunk/themes/blog/Kubrick.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/blog/Kubrick.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -51,7 +51,6 @@ /* http://universaleditbutton.org */ div.actionbuttons a#btn-edit { background: url('images/UEB16.png') bottom left no-repeat; - background-repeat: no-repeat; padding-left: 13px !important; } @@ -749,10 +748,6 @@ border-left: 1px solid #494f5d; border-bottom: 1px solid #c6d2de; border-right: 1px solid #c6d2de; - padding-top: 1px; - padding-bottom: 1px; - padding-left: .125em; - padding-right: .125em; padding: 0; clear: both; } @@ -855,7 +850,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } /* RssFeed */ Modified: trunk/themes/default/phpwiki.css =================================================================== --- trunk/themes/default/phpwiki.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/default/phpwiki.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -129,7 +129,6 @@ input#inp-openid { background: url('images/openid.png') bottom left no-repeat; - background-repeat: no-repeat; padding-left: 18px !important; } @@ -561,10 +560,6 @@ border-left: 1px solid #494f5d; border-bottom: 1px solid #c6d2de; border-right: 1px solid #c6d2de; - padding-top: 1px; - padding-bottom: 1px; - padding-left: .125em; - padding-right: .125em; padding: 0; clear: both; } @@ -908,7 +903,6 @@ .dialog div.message { background-color: white; color: black; - color: black; margin: 0 1em; padding: 0.5em 0.5em; } @@ -1006,7 +1000,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } /* RssFeed */ @@ -1219,7 +1212,6 @@ /* http://universaleditbutton.org */ div#actionbuttons a#btn-edit { background: url('images/UEB16.png') bottom left no-repeat; - background-repeat: no-repeat; padding-left: 20px !important; padding-right: 0.5em !important; } Modified: trunk/themes/fusionforge/fusionforge.css =================================================================== --- trunk/themes/fusionforge/fusionforge.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/fusionforge/fusionforge.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -1063,7 +1063,6 @@ .dialog div.message { background-color: white; color: black; - color: black; margin: 0 1em; padding: 0.5em 0.5em; } Modified: trunk/themes/shamino_com/shamino_com.css =================================================================== --- trunk/themes/shamino_com/shamino_com.css 2014-09-26 09:23:38 UTC (rev 9121) +++ trunk/themes/shamino_com/shamino_com.css 2014-09-26 12:29:57 UTC (rev 9122) @@ -317,7 +317,6 @@ padding: 0.5em; float: right; border: thin solid #888888; - padding: 0.5em; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 09:23:41
|
Revision: 9121 http://sourceforge.net/p/phpwiki/code/9121 Author: vargenau Date: 2014-09-26 09:23:38 +0000 (Fri, 26 Sep 2014) Log Message: ----------- wiki: fix pageNames Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-09-26 09:03:15 UTC (rev 9120) +++ trunk/lib/PageList.php 2014-09-26 09:23:38 UTC (rev 9121) @@ -828,6 +828,8 @@ foreach ($this->_pages as $page_handle) { if (is_object($page_handle)) { $pages[] = $page_handle->getName(); + } else { + $pages[] = $page_handle; } if ($limit and count($pages) > $limit) break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 09:03:24
|
Revision: 9120 http://sourceforge.net/p/phpwiki/code/9120 Author: vargenau Date: 2014-09-26 09:03:15 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Test page_handle is an object Modified Paths: -------------- trunk/lib/PageList.php Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2014-09-26 08:58:04 UTC (rev 9119) +++ trunk/lib/PageList.php 2014-09-26 09:03:15 UTC (rev 9120) @@ -826,7 +826,9 @@ $pages = array(); $limit = @$this->_options['limit']; foreach ($this->_pages as $page_handle) { - $pages[] = $page_handle->getName(); + if (is_object($page_handle)) { + $pages[] = $page_handle->getName(); + } if ($limit and count($pages) > $limit) break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 08:58:09
|
Revision: 9119 http://sourceforge.net/p/phpwiki/code/9119 Author: vargenau Date: 2014-09-26 08:58:04 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Wider TOC Modified Paths: -------------- trunk/pgsrc/ReleaseNotes Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-09-26 08:53:39 UTC (rev 9118) +++ trunk/pgsrc/ReleaseNotes 2014-09-26 08:58:04 UTC (rev 9119) @@ -1,4 +1,4 @@ -Date: Fri, 26 Sep 2014 10:48:01 +0000 +Date: Fri, 26 Sep 2014 10:57:34 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -6,7 +6,7 @@ charset=UTF-8 Content-Transfer-Encoding: binary -<<CreateToc with_toclink||=1 headers||=1,2,3>> +<<CreateToc with_toclink||=1 headers||=1,2,3 width=300px position=right>> == 1.5.1 2014-09-xx Marc-Etienne Vargenau == This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-26 08:53:48
|
Revision: 9118 http://sourceforge.net/p/phpwiki/code/9118 Author: vargenau Date: 2014-09-26 08:53:39 +0000 (Fri, 26 Sep 2014) Log Message: ----------- Add link Modified Paths: -------------- trunk/pgsrc/ReleaseNotes Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-09-25 14:28:06 UTC (rev 9117) +++ trunk/pgsrc/ReleaseNotes 2014-09-26 08:53:39 UTC (rev 9118) @@ -1,4 +1,4 @@ -Date: Thu, 25 Sep 2014 14:11:57 +0000 +Date: Fri, 26 Sep 2014 10:48:01 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -11,12 +11,12 @@ == 1.5.1 2014-09-xx Marc-Etienne Vargenau == * fix Bug#456 'Optimizing Database' message sometimes printed on page -* remove FrameInclude plugin (frames are not supported in HTML 5) +* remove ~FrameInclude plugin (frames are not supported in HTML 5) * sort tables with [[http://tablesorter.com|tablesorter jQuery plugin]] instead of sortable.js * fix Bug#636 Recursive include is not trapped * fix Bug#647 undefined method WikiDB_backend_dba::WikiDB_backend_dbaBase * correct total number of pages for AllPagesCreatedByMe, AllPagesOwnedByMe, AllPagesLastEditedByMe -* fix Bug#607 BackLinks do not work inside a RichTable +* fix Bug#607 BackLinks do not work inside a [[Help:RichTablePlugin|RichTable]] * fix Bug#646 Wrong number of links in BackLinks * make <includeonly> work @@ -31,7 +31,7 @@ === Other Changes === * Fix bad display in Toolbox menu (Sidebar and Monobook themes) reported by Harold Hallikainen * Fix Captcha problem reported by Harold Hallikainen -* Merge OldTextFormattingRules into TextFormattingRules +* Merge ~OldTextFormattingRules into ~TextFormattingRules * ~SyntaxHighlighter plugin is now implemented with [[http://highlightjs.org/]] instead of [[http://www.andre-simon.de]]. * Chmod action is removed. * New action: ~DeleteAcl This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-25 14:28:13
|
Revision: 9117 http://sourceforge.net/p/phpwiki/code/9117 Author: vargenau Date: 2014-09-25 14:28:06 +0000 (Thu, 25 Sep 2014) Log Message: ----------- Invert sort_up.gif and sort_down.gif Modified Paths: -------------- trunk/themes/default/buttons/sort_down.gif trunk/themes/default/buttons/sort_up.gif Modified: trunk/themes/default/buttons/sort_down.gif =================================================================== (Binary files differ) Modified: trunk/themes/default/buttons/sort_up.gif =================================================================== (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-09-25 12:51:59
|
Revision: 9116 http://sourceforge.net/p/phpwiki/code/9116 Author: vargenau Date: 2014-09-25 12:51:51 +0000 (Thu, 25 Sep 2014) Log Message: ----------- Make <includeonly> work Modified Paths: -------------- trunk/lib/BlockParser.php trunk/pgsrc/Help%2FIncludePagePlugin trunk/pgsrc/ReleaseNotes Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-09-25 10:38:58 UTC (rev 9115) +++ trunk/lib/BlockParser.php 2014-09-25 12:51:51 UTC (rev 9116) @@ -909,7 +909,7 @@ class Block_pre extends BlockMarkup { - public $_re = '<(?:pre|verbatim|nowiki|noinclude)>'; + public $_re = '<(?:pre|verbatim|nowiki|noinclude|includeonly)>'; function _match(&$input, $m) { @@ -927,6 +927,11 @@ } $input->advance(); + if ($m->match == '<includeonly>') { + $this->_element = new Block_HtmlElement('div', false, ''); + return true; + } + if ($m->match == '<nowiki>') $text = join("<br>\n", $text); else Modified: trunk/pgsrc/Help%2FIncludePagePlugin =================================================================== --- trunk/pgsrc/Help%2FIncludePagePlugin 2014-09-25 10:38:58 UTC (rev 9115) +++ trunk/pgsrc/Help%2FIncludePagePlugin 2014-09-25 12:51:51 UTC (rev 9116) @@ -1,4 +1,4 @@ -Date: Thu, 4 Sep 2014 18:14:45 +0000 +Date: Thu, 25 Sep 2014 14:11:57 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) Content-Type: application/x-phpwiki; pagename=Help%2FIncludePagePlugin; @@ -60,6 +60,12 @@ | false |} +== Inclusion == + +~<noinclude> .. ~</noinclude> is stripped. + +~<includeonly> .. ~</includeonly> is only expanded in included pages. + == Examples == === ~IncludePage page=Help/~AllPagesPlugin === Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2014-09-25 10:38:58 UTC (rev 9115) +++ trunk/pgsrc/ReleaseNotes 2014-09-25 12:51:51 UTC (rev 9116) @@ -1,4 +1,4 @@ -Date: Thu, 25 Sep 2014 10:11:57 +0000 +Date: Thu, 25 Sep 2014 14:11:57 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -18,6 +18,7 @@ * correct total number of pages for AllPagesCreatedByMe, AllPagesOwnedByMe, AllPagesLastEditedByMe * fix Bug#607 BackLinks do not work inside a RichTable * fix Bug#646 Wrong number of links in BackLinks +* make <includeonly> work == 1.5.0 2014-07-29 Marc-Etienne Vargenau == This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-25 10:39:06
|
Revision: 9115 http://sourceforge.net/p/phpwiki/code/9115 Author: vargenau Date: 2014-09-25 10:38:58 +0000 (Thu, 25 Sep 2014) Log Message: ----------- Translate more strings Modified Paths: -------------- trunk/lib/plugin/AppendText.php trunk/lib/plugin/AsciiMath.php trunk/lib/plugin/FoafViewer.php trunk/lib/plugin/PasswordReset.php trunk/lib/plugin/PreferenceApp.php trunk/lib/plugin/RecentReferrers.php trunk/lib/plugin/SemanticSearch.php Modified: trunk/lib/plugin/AppendText.php =================================================================== --- trunk/lib/plugin/AppendText.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/AppendText.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -65,7 +65,7 @@ } else { $html = HTML(); if ($args['page'] != $basepage) - $html->pushContent("pages argument overrides page argument. ignored.", HTML::br()); + $html->pushContent(_("pages argument overrides page argument. ignored."), HTML::br()); foreach ($args['pages'] as $pagename) { $html->pushContent($this->work($pagename, $args, $dbi, $request)); } Modified: trunk/lib/plugin/AsciiMath.php =================================================================== --- trunk/lib/plugin/AsciiMath.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/AsciiMath.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -60,7 +60,7 @@ { $args = $this->getArgs($argstr, $request); if (empty($this->source)) { - return HTML::div(array('class' => "error"), "Please provide a formula to AsciiMath plugin"); + return HTML::div(array('class' => "error"), _("Please provide a formula to AsciiMath plugin")); } include 'lib/ASCIIMathPHP/ASCIIMathPHP.cfg.php'; Modified: trunk/lib/plugin/FoafViewer.php =================================================================== --- trunk/lib/plugin/FoafViewer.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/FoafViewer.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -124,7 +124,7 @@ $foaffile = url_get_contents($foaf); if (!$foaffile) { //TODO: get errormsg - return HTML(HTML::p("Resource isn't available: Something went wrong, probably a 404!")); + return HTML(HTML::p(_("Resource isn't available: Something went wrong, probably a 404!"))); } // Create new Parser object $parser = new XML_FOAF_Parser; Modified: trunk/lib/plugin/PasswordReset.php =================================================================== --- trunk/lib/plugin/PasswordReset.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/PasswordReset.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -150,7 +150,7 @@ $isadmin ? 'wikiadmin' : 'button'), HTML::raw(' '), Button('submit:admin_reset[cancel]', _("Cancel"), 'button')); - $header = HTML::strong("Verify"); + $header = HTML::strong(_("Verify")); if (!$user->isAdmin()) { // check for email if ($userid == $user->UserName() and $user->isAuthenticated()) { @@ -173,7 +173,7 @@ } $verified = $thisuser->_prefs->_prefs['email']->getraw('emailVerified'); if (!$verified) - $header->pushContent(HTML::br(), "Warning: This users email address is unverified!"); + $header->pushContent(HTML::br(), _("Warning: This users email address is unverified!")); } return $this->doForm($request, $userid, $header, Modified: trunk/lib/plugin/PreferenceApp.php =================================================================== --- trunk/lib/plugin/PreferenceApp.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/PreferenceApp.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -77,7 +77,7 @@ $group = $category; } if ($category == null || $pageTextLabel == null) { - return HTML::div(array('class' => "error"), "PreferencesApp Error: You must declare at least parameters category and pageTextLabel."); + return HTML::div(array('class' => "error"), _("PreferencesApp Error: You must declare at least parameters category and pageTextLabel.")); } $dbi = $request->getDbh(); Modified: trunk/lib/plugin/RecentReferrers.php =================================================================== --- trunk/lib/plugin/RecentReferrers.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/RecentReferrers.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -48,7 +48,7 @@ function run($dbi, $argstr, &$request, $basepage) { if (!ACCESS_LOG) { - return HTML::div(array('class' => "error"), "Error: no ACCESS_LOG"); + return HTML::div(array('class' => "error"), _("Error: no ACCESS_LOG")); } $args = $this->getArgs($argstr, $request); $table = HTML::table(array('class' => 'pagelist')); @@ -59,8 +59,8 @@ if ($logiter = $accesslog->get_referer($limit, "external_only") and $logiter->count() ) { - $table->pushContent(HTML::tr(HTML::th("Target"), HTML::th("Referrer"), - HTML::th("Host"), HTML::th("Date"))); + $table->pushContent(HTML::tr(HTML::th(_("Target")), HTML::th(_("Referrer")), + HTML::th(_("Host")), HTML::th(_("Date")))); while ($logentry = $logiter->next()) { $table->pushContent(HTML::tr(HTML::td($logentry['request']), HTML::td($logentry['referer']), Modified: trunk/lib/plugin/SemanticSearch.php =================================================================== --- trunk/lib/plugin/SemanticSearch.php 2014-09-25 10:38:07 UTC (rev 9114) +++ trunk/lib/plugin/SemanticSearch.php 2014-09-25 10:38:58 UTC (rev 9115) @@ -145,10 +145,10 @@ HTML::colgroup(array('span' => 6)), HTML::thead (HTML::tr( - HTML::th('Pagefilter'), - HTML::th('Relation'), + HTML::th(_('Pagefilter')), + HTML::th(_('Relation')), HTML::th(), - HTML::th('Links'), + HTML::th(_('Links')), HTML::th() )), HTML::tbody @@ -228,10 +228,10 @@ HTML::colgroup(array('span' => 6)), HTML::thead (HTML::tr( - HTML::th('Pagefilter'), - HTML::th('Attribute'), - HTML::th('Op'), - HTML::th('Value'), + HTML::th(_('Pagefilter')), + HTML::th(_('Attribute')), + HTML::th(_('Op')), + HTML::th(_('Value')), HTML::th() )), HTML::tbody This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2014-09-25 10:38:16
|
Revision: 9114 http://sourceforge.net/p/phpwiki/code/9114 Author: vargenau Date: 2014-09-25 10:38:07 +0000 (Thu, 25 Sep 2014) Log Message: ----------- Translate more strings Modified Paths: -------------- 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/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-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/de.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\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." @@ -1332,6 +1332,9 @@ msgid "Appending at the end." msgstr "Füge am Ende hinzu." +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "TextHinzufügen" @@ -1353,6 +1356,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1676,6 +1682,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "Titel" @@ -2201,6 +2210,9 @@ msgid "You need to specify the userid!" msgstr "Sie müssen den Benutzernamen angeben!" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "Bereits eingeloggt" @@ -2214,6 +2226,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2334,6 +2349,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "Analysiere Empfehlungen auf Grund von Bewertungen." +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2622,6 +2642,22 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +#, fuzzy +msgid "Referrer" +msgstr "Fußnoten" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2742,6 +2778,10 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +#, fuzzy +msgid "Pagefilter" +msgstr "SeitenProtokoll" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2763,6 +2803,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "Attribut" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2778,12 +2827,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "Attribut" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "Alle BackLinks für %s (rekursiv)." Modified: trunk/locale/po/es.po =================================================================== --- trunk/locale/po/es.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/es.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2000-02-01 00:50-0500\n" "Last-Translator: Pablo Roca <pr...@cl...>\n" "Language-Team: \n" @@ -1310,6 +1310,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1331,6 +1334,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1646,6 +1652,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "" @@ -2144,6 +2153,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2157,6 +2169,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2274,6 +2289,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2552,6 +2572,22 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +#, fuzzy +msgid "Referrer" +msgstr "Referencias" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2667,6 +2703,9 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +msgid "Pagefilter" +msgstr "" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2688,6 +2727,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2703,12 +2751,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/fr.po =================================================================== --- trunk/locale/po/fr.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/fr.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\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." @@ -1310,6 +1310,9 @@ msgid "Appending at the end." msgstr "Ajout à la fin." +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "ApposezLeTexte" @@ -1331,6 +1334,9 @@ msgid "Render ASCII Math as MathML." msgstr "Afficher des maths en ASCII sous forme de MathML." +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "Afficher de l'ASCII sous forme de SVG." @@ -1653,6 +1659,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "Titre" @@ -2161,6 +2170,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "Déjà connecté" @@ -2174,6 +2186,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "Voulez-vous réellement réinitialiser le mot de passe de %s ?" @@ -2294,6 +2309,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2577,6 +2597,22 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +#, fuzzy +msgid "Referrer" +msgstr "Références" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "Redirige vers une autre URL ou page." @@ -2691,6 +2727,10 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +#, fuzzy +msgid "Pagefilter" +msgstr "HistoriqueDeLaPage" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2712,6 +2752,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "Attribut" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "Valeur" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2727,12 +2776,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "Attribut" - -msgid "Value" -msgstr "Valeur" - msgid "Recursively get BackLinks or links." msgstr "Obtenir récursivement des rétroliens ou liens." Modified: trunk/locale/po/it.po =================================================================== --- trunk/locale/po/it.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/it.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\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" @@ -1292,6 +1292,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1313,6 +1316,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1628,6 +1634,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "" @@ -2123,6 +2132,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2136,6 +2148,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2252,6 +2267,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2526,6 +2546,21 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "Referrer" +msgstr "" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2640,6 +2675,10 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +#, fuzzy +msgid "Pagefilter" +msgstr "StoricoPagina" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2661,6 +2700,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2676,12 +2724,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/ja.po =================================================================== --- trunk/locale/po/ja.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/ja.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2003-06-07 09:01+0900\n" "Last-Translator: Tadashi Jokagi <web...@el...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -1298,6 +1298,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + #, fuzzy msgid "AppendText" msgstr "外観" @@ -1320,6 +1323,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1644,6 +1650,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + #, fuzzy msgid "Title" msgstr "タイトル" @@ -2145,6 +2154,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2158,6 +2170,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2275,6 +2290,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2564,6 +2584,22 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +#, fuzzy +msgid "Referrer" +msgstr "参照一覧" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2678,6 +2714,10 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +#, fuzzy +msgid "Pagefilter" +msgstr "ページ履歴" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2699,6 +2739,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2714,12 +2763,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/nl.po =================================================================== --- trunk/locale/po/nl.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/nl.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2000-09-30 02:23+0200\n" "Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n" "Language-Team: Dutch <nl...@li...>\n" @@ -1283,6 +1283,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1304,6 +1307,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1619,6 +1625,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "" @@ -2114,6 +2123,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2127,6 +2139,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2243,6 +2258,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2517,6 +2537,22 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +#, fuzzy +msgid "Referrer" +msgstr "Referenties" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2631,6 +2667,10 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +#, fuzzy +msgid "Pagefilter" +msgstr "PaginaGeschiedenis" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2652,6 +2692,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2667,12 +2716,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/phpwiki.pot =================================================================== --- trunk/locale/po/phpwiki.pot 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/phpwiki.pot 2014-09-25 10:38:07 UTC (rev 9114) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki-1.4.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2002-12-14 17:51-0500\n" "Last-Translator: Reini Urban <ru...@us...>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -1277,6 +1277,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1298,6 +1301,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1613,6 +1619,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "" @@ -2108,6 +2117,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2121,6 +2133,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2237,6 +2252,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2511,6 +2531,21 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "Referrer" +msgstr "" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2625,6 +2660,9 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +msgid "Pagefilter" +msgstr "" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2646,6 +2684,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2661,12 +2708,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/sv.po =================================================================== --- trunk/locale/po/sv.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/sv.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2001-01-27 01:58+0200\n" "Last-Translator: Jon Åslund <jo...@he...>\n" "Language-Team: \n" @@ -1278,6 +1278,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1299,6 +1302,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1614,6 +1620,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + msgid "Title" msgstr "" @@ -2109,6 +2118,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2122,6 +2134,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2238,6 +2253,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2512,6 +2532,21 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + +msgid "Referrer" +msgstr "" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + msgid "Redirect to another URL or page." msgstr "" @@ -2626,6 +2661,9 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +msgid "Pagefilter" +msgstr "" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2647,6 +2685,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2662,12 +2709,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "" Modified: trunk/locale/po/zh.po =================================================================== --- trunk/locale/po/zh.po 2014-09-25 08:54:24 UTC (rev 9113) +++ trunk/locale/po/zh.po 2014-09-25 10:38:07 UTC (rev 9114) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PhpWiki 1.5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-09-24 17:31+0200\n" +"POT-Creation-Date: 2014-09-25 12:36+0200\n" "PO-Revision-Date: 2004-04-21 10:08+0800\n" "Last-Translator: DruryL <dr...@us...>\n" "Language-Team: DruryL <dr...@us...>\n" @@ -1333,6 +1333,9 @@ msgid "Appending at the end." msgstr "" +msgid "pages argument overrides page argument. ignored." +msgstr "" + msgid "AppendText" msgstr "" @@ -1355,6 +1358,9 @@ msgid "Render ASCII Math as MathML." msgstr "" +msgid "Please provide a formula to AsciiMath plugin" +msgstr "" + msgid "Render inline ASCII SVG." msgstr "" @@ -1686,6 +1692,9 @@ msgid "foaf must be a URI starting with http://" msgstr "" +msgid "Resource isn't available: Something went wrong, probably a 404!" +msgstr "" + #, fuzzy msgid "Title" msgstr "標題搜索" @@ -2202,6 +2211,9 @@ msgid "You need to specify the userid!" msgstr "" +msgid "Verify" +msgstr "" + msgid "Already logged in" msgstr "" @@ -2215,6 +2227,9 @@ msgid "You need to ask an Administrator to reset this password. See below: " msgstr "" +msgid "Warning: This users email address is unverified!" +msgstr "" + #, php-format msgid "Do you really want to reset the password of user %s?" msgstr "" @@ -2335,6 +2350,11 @@ msgid "Analyze preferences based on voting budget and ratings." msgstr "" +msgid "" +"PreferencesApp Error: You must declare at least parameters category and " +"pageTextLabel." +msgstr "" + #, php-format msgid "Nobody has used %s on their homepage" msgstr "" @@ -2629,7 +2649,23 @@ msgid "Analyse access log." msgstr "" +msgid "Error: no ACCESS_LOG" +msgstr "" + +msgid "Target" +msgstr "" + #, fuzzy +msgid "Referrer" +msgstr "偏好設定" + +msgid "Host" +msgstr "" + +msgid "Date" +msgstr "" + +#, fuzzy msgid "Redirect to another URL or page." msgstr "重導向到另一個 url 或頁面." @@ -2749,6 +2785,9 @@ msgid "Search in pages for a relation with that value (a pagename)." msgstr "" +msgid "Pagefilter" +msgstr "" + msgid "Filter by this attribute name. With autocompletion." msgstr "" @@ -2770,6 +2809,15 @@ msgid "SemanticSearchAdvanced" msgstr "" +msgid "Attribute" +msgstr "" + +msgid "Op" +msgstr "" + +msgid "Value" +msgstr "" + msgid "No relations nor attributes in the whole wikidb defined!" msgstr "" @@ -2785,12 +2833,6 @@ msgid "Only text operators can be used with strings: %s" msgstr "" -msgid "Attribute" -msgstr "" - -msgid "Value" -msgstr "" - msgid "Recursively get BackLinks or links." msgstr "遞迴地取得 BackLinks 或連結." 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-09-25 08:54:33
|
Revision: 9113 http://sourceforge.net/p/phpwiki/code/9113 Author: vargenau Date: 2014-09-25 08:54:24 +0000 (Thu, 25 Sep 2014) Log Message: ----------- In some <pre> constructs, the equal signs are lost Modified Paths: -------------- trunk/lib/BlockParser.php Modified: trunk/lib/BlockParser.php =================================================================== --- trunk/lib/BlockParser.php 2014-09-25 08:47:58 UTC (rev 9112) +++ trunk/lib/BlockParser.php 2014-09-25 08:54:24 UTC (rev 9113) @@ -932,11 +932,6 @@ else $text = join("\n", $text); - // FIXME: no <img>, <big>, <small>, <sup>, or <sub>'s allowed - // in a <pre>. - if ($m->match == '<pre>') { - $text = TransformInline($text); - } if ($m->match == '<noinclude>') { $text = TransformText($text); $this->_element = new Block_HtmlElement('div', false, $text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |