From: <var...@us...> - 2009-06-04 16:44:49
|
Revision: 6896 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6896&view=rev Author: vargenau Date: 2009-06-04 16:44:46 +0000 (Thu, 04 Jun 2009) Log Message: ----------- Do not hardcode "The PhpWiki programming team", use ADMIN_USER instead Modified Paths: -------------- trunk/g trunk/lib/PageList.php trunk/lib/WikiDB.php trunk/lib/WikiUserNew.php trunk/lib/loadsave.php Modified: trunk/g =================================================================== --- trunk/g 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/g 2009-06-04 16:44:46 UTC (rev 6896) @@ -99,8 +99,7 @@ // Disable VACUUM (they are performed every night) define('DATABASE_OPTIMISE_FREQUENCY', 0); - // It is not used but it is required by libs. - define('ADMIN_USER', 'The PhpWiki programming team'); + define('ADMIN_USER', 'ACOS Forge Administrator'); define('ADMIN_PASSWD', 'xxx'); // Allow ".jpeg" as extension Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/PageList.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -1111,7 +1111,7 @@ return $allPages; } - // UserPages are pages NOT created by "The PhpWiki programming team" + // UserPages are pages NOT created by ADMIN_USER function allUserPages($include_empty=false, $sortby='', $limit='', $exclude='') { $dbi = $GLOBALS['request']->getDbh(); @@ -1120,7 +1120,7 @@ while ($pagehandle = $allPagehandles->next()) { $name = $pagehandle->getName(); $creator = $pagehandle->getCreator(); - if ($creator !== _("The PhpWiki programming team")) { + if ($creator !== ADMIN_USER) { $allPages[] = $name; } } Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/WikiDB.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -1400,7 +1400,7 @@ // May be empty. Either the stored owner (/Chown), or the first authorized author function getOwner() { if ($owner = $this->get('owner')) - return ($owner == _("The PhpWiki programming team")) ? ADMIN_USER : $owner; + return $owner; // check all revisions forwards for the first author_id $backend = &$this->_wikidb->_backend; $pagename = &$this->_pagename; @@ -1408,7 +1408,7 @@ for ($v=1; $v <= $latestversion; $v++) { $rev = $this->getRevision($v,false); if ($rev and $owner = $rev->get('author_id')) { - return ($owner == _("The PhpWiki programming team")) ? ADMIN_USER : $owner; + return $owner; } } return ''; Modified: trunk/lib/WikiUserNew.php =================================================================== --- trunk/lib/WikiUserNew.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/WikiUserNew.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -426,7 +426,7 @@ // function createHomePage() { global $request; - $versiondata = array('author' => _("The PhpWiki programming team")); + $versiondata = array('author' => ADMIN_USER); $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences."). "\n{{Template/UserPage}}", 1, $versiondata); Modified: trunk/lib/loadsave.php =================================================================== --- trunk/lib/loadsave.php 2009-06-04 14:51:28 UTC (rev 6895) +++ trunk/lib/loadsave.php 2009-06-04 16:44:46 UTC (rev 6896) @@ -974,7 +974,7 @@ fmt("has edit conflicts - overwriting anyway")); $skip = false; if (substr_count($source, 'pgsrc')) { - $versiondata['author'] = _("The PhpWiki programming team"); + $versiondata['author'] = ADMIN_USER; // but leave authorid as userid who loaded the file } } @@ -1497,17 +1497,16 @@ // This is a bogo-bogo-login: Login without // saving login information in session state. // This avoids logging in the unsuspecting - // visitor as "The PhpWiki programming team". + // visitor as ADMIN_USER // // This really needs to be cleaned up... // (I'm working on it.) $real_user = $request->_user; if (ENABLE_USER_NEW) - $request->_user = new _BogoUser(_("The PhpWiki programming team")); + $request->_user = new _BogoUser(ADMIN_USER); else - $request->_user = new WikiUser($request, _("The PhpWiki programming team"), - WIKIAUTH_BOGO); + $request->_user = new WikiUser($request, ADMIN_USER, WIKIAUTH_BOGO); StartLoadDump($request, _("Loading up virgin wiki")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |