Merging branches
authorDan
Sat, 17 Jan 2009 11:32:52 -0500
changeset 317 12e099193850
parent 316 42419c99471c (current diff)
parent 314 f379fdf3b4d7 (diff)
child 318 eec2dfd2f0a3
Merging branches
--- a/.hgtags	Sat Jan 17 11:32:18 2009 -0500
+++ b/.hgtags	Sat Jan 17 11:32:52 2009 -0500
@@ -7,3 +7,4 @@
 8be996c3740dccf30ea470a597cd28bf9ce38cfb 1.0.3
 72ecb951b3137f7cb0f07dea50a7dcf2aa323382 1.0.4
 72ecb951b3137f7cb0f07dea50a7dcf2aa323382 current-stable
+36bcc9212837aab62e34fa66f0d600651d2a4814 1.0.5
--- a/index.php	Sat Jan 17 11:32:18 2009 -0500
+++ b/index.php	Sat Jan 17 11:32:52 2009 -0500
@@ -59,7 +59,21 @@
   switch($_GET['do'])
   {
     default:
-      die_friendly('Invalid action', '<p>The action "'.htmlspecialchars($_GET['do']).'" is not defined. Return to <a href="'.makeUrl($paths->page).'">viewing this page\'s text</a>.</p>');
+      $code = $plugins->setHook('page_action');
+      ob_start();
+      foreach ( $code as $cmd )
+      {
+        eval($cmd);
+      }
+      if ( $contents = ob_get_contents() )
+      {
+        ob_end_clean();
+        echo $contents;
+      }
+      else
+      {
+        die_friendly('Invalid action', '<p>The action "'.htmlspecialchars($_GET['do']).'" is not defined. Return to <a href="'.makeUrl($paths->page).'">viewing this page\'s text</a>.</p>');
+      }
       break;
     case 'view':
       // echo PageUtils::getpage($paths->page, true, ( (isset($_GET['oldid'])) ? $_GET['oldid'] : false ));