From: <var...@us...> - 2009-02-26 13:57:16
|
Revision: 6578 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6578&view=rev Author: vargenau Date: 2009-02-26 13:57:14 +0000 (Thu, 26 Feb 2009) Log Message: ----------- Include some action pages only if DEBUG is true Modified Paths: -------------- trunk/lib/IniConfig.php Modified: trunk/lib/IniConfig.php =================================================================== --- trunk/lib/IniConfig.php 2009-02-26 13:34:44 UTC (rev 6577) +++ trunk/lib/IniConfig.php 2009-02-26 13:57:14 UTC (rev 6578) @@ -601,33 +601,28 @@ // or contain basic functionality. /* All pages containing plugins of the same name as the filename: - cd pgsrc - grep -l '\?plugin ' *| perl -ne'$/=0;chop; s/%([\da-fA-F]{2})/pack("C",hex($1))/ge; next LINE if m{^(Help/|Template|Pgsrc)}; print "$_\n"; {local $/;open F,"<$_"; $f=join("",<F>);} push @a,$_ if $f=~/plugin $_/; END{print join(":",@a)};' */ $AllActionPages = explode(':', 'AllPages:AllUsers:AppendText:AuthorHistory:' .'BackLinks:BlogArchives:BlogJournal:' .'CreatePage:' - .'EditMetaData:' .'FindPage:FullTextSearch:FuzzyPages:' .'InterWikiSearch:' .'LdapSearch:LikePages:LinkDatabase:LinkSearch:ListRelations:' .'ModeratedPage:MostPopular:' .'OrphanedPages:' .'PageDump:PageHistory:PageInfo:PasswordReset:PluginManager:' - .'RandomPage:RateIt:RecentChanges:RecentComments:RelatedChanges:' - .'SearchHighlight:SemanticRelations:SemanticSearch:SpellCheck:SystemInfo:' + .'RateIt:RecentChanges:RecentComments:RelatedChanges:' + .'SearchHighlight:SemanticRelations:SemanticSearch:SystemInfo:' .'TitleSearch:TranslateText:' .'UpLoad:UriResolver:UserPreferences:' .'WantedPages:WatchPage:WhoIsOnline:WikiAdminSelect:WikiBlog:' // plus some derivations .'AllPagesCreatedByMe:AllPagesLastEditedByMe:AllPagesOwnedByMe:AllUserPages:' - .'DebugInfo:' .'FullRecentChanges:' .'LeastPopular:LockedPages:' .'MyRecentEdits:MyRecentChanges:' .'PhpWikiAdministration:' - .'PhpWikiAdministration/Chmod:' .'PhpWikiAdministration/Chown:' .'PhpWikiAdministration/Markup:' .'PhpWikiAdministration/Purge:' @@ -637,6 +632,16 @@ .'PhpWikiAdministration/SetAcl:' .'RecentChangesMyPages:RecentEdits:RecentNewPages:' .'UserContribs'); + + // Add some some action pages depending on configuration + if (defined('DEBUG') and DEBUG) { + $AllActionPages[] = 'DebugInfo'; + $AllActionPages[] = 'EditMetaData'; + $AllActionPages[] = 'RandomPage'; // RandomPage does not work + $AllActionPages[] = 'SpellCheck'; // SpellCheck does not work + $AllActionPages[] = 'PhpWikiAdministration/Chmod'; + } + // If user has not defined PHPWIKI_DIR, and we need it if (!defined('PHPWIKI_DIR') and !file_exists("themes/default")) { $themes_dir = FindFile("themes"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |