reduce dependency on Diogenes
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 25 Oct 2005 22:37:49 +0000 (22:37 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Tue, 25 Oct 2005 22:37:49 +0000 (22:37 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@138 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/admin/logger.php
include/platal/page.inc.php
include/xorg.table-editor.inc.php

index d46f5a7..acbee4e 100644 (file)
@@ -31,5 +31,6 @@ if (!Env::has('logauth')) {
 $logview = new DiogenesLoggerView;
 $logview->run($page);
 
+$page->fakeDiogenes();
 $page->run();
 ?>
index aa26ae1..daadc3d 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once('diogenes/diogenes.core.page.inc.php');
-require_once('platal/errors.inc.php');
-require_once('platal/smarty.plugins.inc.php');
+require_once 'smarty/libs/Smarty.class.php';
+require_once 'platal/errors.inc.php';
+require_once 'platal/smarty.plugins.inc.php';
 
 // {{{ class PlatalPage
 
-class PlatalPage extends DiogenesCorePage
+class PlatalPage extends Smarty
 {
     // {{{ properties
     
@@ -45,7 +45,7 @@ class PlatalPage extends DiogenesCorePage
     {
         global $globals;
 
-        $this->DiogenesCorePage();
+        $this->Smarty();
 
         $this->template_dir  = $globals->spoolroot."/templates/";
         $this->compile_dir   = $globals->spoolroot."/spool/templates_c/";
@@ -71,6 +71,22 @@ class PlatalPage extends DiogenesCorePage
     }
 
     // }}}
+    // {{{
+    
+    function fakeDiogenes()
+    {
+        require_once 'diogenes/diogenes.core.page.inc.php';
+        $this->register_function("extval","diogenes_func_extval");
+        $this->register_function("flags","diogenes_func_flags");
+        $this->register_function("a","diogenes_func_a");
+        $this->register_function("checkbox","diogenes_func_checkbox");
+        $this->register_function("diff","diogenes_func_diff");
+        $this->register_function("menu_item","diogenes_func_menu_item");
+        $this->register_function("tag","diogenes_func_tag");
+        $this->register_function("toolbar","diogenes_func_toolbar");
+    }
+    
+    // }}}
     // {{{ function changeTpl()
 
     function changeTpl($tpl, $type=SKINNED)
index c8feb7f..e1b478c 100644 (file)
@@ -33,6 +33,7 @@ class XOrgAdminTableEditor extends DiogenesTableEditor {
     
     function run() {
         global $page;
+        $page->fakeDiogenes();
         parent::run($page);
         $page->run();
     }