Code

Updated to load index.php from html directory
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 18:41:10 +0000 (18:41 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 13 Nov 2007 18:41:10 +0000 (18:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-playground@7793 594d385d-05f5-0310-b6e9-bd551577e9d8

html/index.php [new file with mode: 0755]
include/class_ViewportController.inc
index.php [deleted file]

diff --git a/html/index.php b/html/index.php
new file mode 100755 (executable)
index 0000000..857f1cd
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+/* This is good for testing... */
+error_reporting (E_ALL | E_STRICT);
+
+/* Escape all preg_* relevant characters */
+function normalizePreg($input)
+{
+  return (addcslashes($input, '[]()|/.*+-'));
+}
+
+
+
+/* Initiate autoloader... */
+require_once("../include/autoload.inc");
+restore_error_handler();
+try {
+
+       /* Get new test instance of the Configuration */
+       $cr= Registry::getInstance("ConfigManager");
+       $cr->load("../gosa.conf");
+
+       /* Get a new instance of the main Viewport */
+       $vc= new ViewportController();
+       echo $vc->render();
+
+} catch (Exception $e) {
+       echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
+            $e->__toString().
+            "\n\n--------------------------------------------------------------------------\n\n";
+}
+
+exit (0);
+
+?>
index 692de5018939e39789db1730367fdfbd3090d120..9eeda233ac613ce7f8582dc6533b4e90e067585d 100644 (file)
@@ -55,7 +55,7 @@ class ViewportController {
 
     /* Do Smarty setup */
     $this->Smarty= new Smarty;
-    $this->Smarty->template_dir= $BASE_DIR.'/templates/';
+    $this->Smarty->template_dir= BASE_DIR.'/templates/';
     $this->Smarty->caching= $config->getValue('cache-templates', FALSE);
     $this->Smarty->php_handling= SMARTY_PHP_REMOVE;
 
@@ -64,7 +64,7 @@ class ViewportController {
 
     /* Check if our template directory is accessible */
     if (!(is_dir($this->Smarty->compile_dir) && is_writable($this->Smarty->compile_dir))){
-      throw new ViewportControllerException(sprintf(_("Directory '%s' specified as compile-directory is not accessible!"), $smarty->compile_dir));
+      throw new ViewportControllerException(sprintf(_("Directory '%s' specified as compile-directory is not accessible!"), $this->Smarty->compile_dir));
     }
 
     /* Check for old files in compile directory */
@@ -74,7 +74,6 @@ class ViewportController {
 
   private function cleanSmartyCompileDir() {
     #TODO: Clean compile dir
-    echo "TODO: clean compile dir\n";
   }
 
 
@@ -83,7 +82,7 @@ class ViewportController {
     /* Get the browser language if */
     $lang= Utils::getBrowserLanguage();
     if ($this->language != $lang){
-      echo "Emit EventObject for changed language\n";
+      #TODO: Emit EventObject for changed language
       $this->language= $lang;
     }
 
diff --git a/index.php b/index.php
deleted file mode 100755 (executable)
index 5d71f7c..0000000
--- a/index.php
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/php
-<?php
-
-
-/* This is good for testing... */
-error_reporting (E_ALL | E_STRICT);
-
-/* Escape all preg_* relevant characters */
-function normalizePreg($input)
-{
-  return (addcslashes($input, '[]()|/.*+-'));
-}
-
-
-
-/* Initiate autoloader... */
-require_once("include/autoload.inc");
-restore_error_handler();
-try {
-
-       /* Get new test instance of the Configuration */
-       $cr= Registry::getInstance("ConfigManager");
-       $cr->load("gosa.conf");
-
-       /* Get a new instance of the main Viewport */
-       $vc= new ViewportController();
-       echo $vc->render();
-
-} catch (Exception $e) {
-       echo "\n-GOsa Exception-----------------------------------------------------------\n\n".
-            $e->__toString().
-            "\n\n--------------------------------------------------------------------------\n\n";
-}
-
-exit (0);
-
-?>