From: <var...@us...> - 2009-06-01 09:08:53
|
Revision: 6831 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6831&view=rev Author: vargenau Date: 2009-06-01 09:08:51 +0000 (Mon, 01 Jun 2009) Log Message: ----------- Handle empty table case Modified Paths: -------------- trunk/g trunk/lib/plugin/MediawikiTable.php Modified: trunk/g =================================================================== --- trunk/g 2009-06-01 03:39:10 UTC (rev 6830) +++ trunk/g 2009-06-01 09:08:51 UTC (rev 6831) @@ -57,6 +57,7 @@ $group_name = $project->getUnixName(); $group_public_name = $project->getPublicName(); + $is_external = $project->getIsExternal(); define('VIRTUAL_PATH', '/wiki/g/'.$group_name); define('PAGE_PREFIX', '_g'.$group_id.'_'); @@ -64,8 +65,8 @@ define('THEME', 'gforge'); // For Gforge, we create some specific pages, located in the theme - // except for project "cssforge" - if ($group_name == "cssforge") { + // except for project "help" + if ($group_name == "help") { define('WIKI_PGSRC', 'pgsrc/'); } else { define('WIKI_PGSRC', 'themes/gforge/pgsrc/'); @@ -144,6 +145,9 @@ // Disable public pages define('ENABLE_PAGE_PUBLIC', false); + + // Enable external pages + define('ENABLE_EXTERNAL_PAGES', $is_external); // Let all revisions be stored. Default since 1.3.11 define('MAJOR_MIN_KEEP', 2147483647); Modified: trunk/lib/plugin/MediawikiTable.php =================================================================== --- trunk/lib/plugin/MediawikiTable.php 2009-06-01 03:39:10 UTC (rev 6830) +++ trunk/lib/plugin/MediawikiTable.php 2009-06-01 09:08:51 UTC (rev 6831) @@ -70,7 +70,6 @@ } function run($dbi, $argstr, &$request, $basepage) { - global $WikiTheme; include_once("lib/BlockParser.php"); // MediawikiTablePlugin markup is new. $markup = 2.0; @@ -106,6 +105,10 @@ } } + if (count($lines) == 1) { // empty table, we only have closing "|}" line + return HTML::raw(''); + } + foreach ($lines as $line){ if (substr($line,0,2) == "|}") { // End of table This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |