Code

* Created "old" branch and moved stuff
[gosa.git] / branches / old / gosa-core / debian / patches / 03_fix_class_mapping.dpatch
diff --git a/branches/old/gosa-core/debian/patches/03_fix_class_mapping.dpatch b/branches/old/gosa-core/debian/patches/03_fix_class_mapping.dpatch
new file mode 100755 (executable)
index 0000000..bf6f696
--- /dev/null
@@ -0,0 +1,60 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_fix_class_mapping.dpatch by  <cajus@localhost>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad gosa-core~/include/class_config.inc gosa-core/include/class_config.inc
+--- gosa-core~/include/class_config.inc        2008-07-10 17:18:52.000000000 +0200
++++ gosa-core/include/class_config.inc 2008-07-15 10:00:12.000000000 +0200
+@@ -76,12 +76,12 @@
+         if we have installed or removed plugins. 
+      */
+     if(session::is_set("class_location.inc:timestamp")){
+-      $tmp = stat("../include/class_location.inc");
++      $tmp = stat("/var/cache/gosa/class.cache");
+       if($tmp['mtime'] != session::get("class_location.inc:timestamp")){
+         session::un_set("plist");
+       }
+     }
+-    $tmp = stat("../include/class_location.inc");
++    $tmp = stat("/var/cache/gosa/class.cache");
+     session::set("class_location.inc:timestamp",$tmp['mtime']);
+diff -urNad gosa-core~/include/functions.inc gosa-core/include/functions.inc
+--- gosa-core~/include/functions.inc   2008-07-15 09:58:50.000000000 +0200
++++ gosa-core/include/functions.inc    2008-07-15 09:58:51.000000000 +0200
+@@ -73,7 +73,7 @@
+ $svn_revision = '$Revision: 9246 $';
+ /* Include required files */
+-require_once("class_location.inc");
++require_once("/var/cache/gosa/class.cache");
+ require_once ("functions_debug.inc");
+ require_once ("accept-to-gettext.inc");
+diff -urNad gosa-core~/update-gosa gosa-core/update-gosa
+--- gosa-core~/update-gosa     2008-06-10 09:56:22.000000000 +0200
++++ gosa-core/update-gosa      2008-07-15 09:58:51.000000000 +0200
+@@ -21,7 +21,7 @@
+  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+-define ("GOSA_HOME", dirname(__FILE__));
++define ("GOSA_HOME", "/usr/share/gosa");
+ define ("LOCALE_DIR", GOSA_HOME."/locale");
+ define ("PLUGSTATE_DIR", GOSA_HOME."/state");
+@@ -122,8 +122,8 @@
+ function rescan_classes()
+ {
+       echo "Updating class cache...\n";
+-      $class_mapping= get_classes();
+-      $filename= GOSA_HOME."/include/class_location.inc";
++      $class_mapping= get_classes("/usr/share/gosa");
++      $filename= "/var/cache/gosa/class.cache";
+       /* Sanity checks */
+       if (!file_exists($filename) || is_writable($filename)) {