* improved - after adding a page, return to the calling url
[diogenes.git] / include / admin / plugins.php
index 5ae4ae3..3f2f3fe 100644 (file)
@@ -20,7 +20,7 @@ if ($dir != 0)
 {
   $bpage = Diogenes_Barrel_Page::fromDb($bbarrel, $dir);
   $page->assign('greeting',__("Page plugins ") . " - " . ($bpage->props['location'] ? $bpage->props['location'] : __("home")) );    
-  $page->toolbar(__("Page"), $bpage->make_toolbar());
+  $page->toolbar(__("Page"), $bpage->make_toolbar($page));
   $wperms = $bpage->props['wperms'];
 } else {
   $page->assign('greeting',__("Available plugins"));
@@ -30,7 +30,8 @@ if ($dir != 0)
 /* plugin editor */
 $editor = new Diogenes_Plugin_Editor($page->alias, $dir, $wperms);
 if ($dir == 0) {
-  $editor->set_mode(MODE_NOPARAMS);
+  $editor->readonly = 1;
+  $editor->hide_params(1);
 }
 $editor->run($page,'page_content');
 $page->display('');