Code

Updated patch
[gosa.git] / gosa-core / debian / patches / 03_fix_class_mapping.patch
1 Author: <cajus@debian.org>
2 Description: Fix location of auto-generated class mapping file
3 Index: gosa/gosa-core/include/class_config.inc
4 ===================================================================
5 --- gosa.orig/gosa-core/include/class_config.inc        2010-02-05 13:51:35.000000000 +0000
6 +++ gosa/gosa-core/include/class_config.inc     2010-10-01 06:51:28.478555098 +0000
7 @@ -100,12 +100,12 @@
8          if we have installed or removed plugins. 
9       */
10      if(session::global_is_set("class_location.inc:timestamp")){
11 -      $tmp = stat("../include/class_location.inc");
12 +      $tmp = stat("/var/cache/gosa/class.cache");
13        if($tmp['mtime'] != session::global_get("class_location.inc:timestamp")){
14          session::global_un_set("plist");
15        }
16      }
17 -    $tmp = stat("../include/class_location.inc");
18 +    $tmp = stat("/var/cache/gosa/class.cache");
19      session::global_set("class_location.inc:timestamp",$tmp['mtime']);
20  
21      if($this->filename != "" && filemtime($this->filename) != $this->last_modified){
22 Index: gosa/gosa-core/include/functions.inc
23 ===================================================================
24 --- gosa.orig/gosa-core/include/functions.inc   2010-10-01 06:51:28.000000000 +0000
25 +++ gosa/gosa-core/include/functions.inc        2010-10-01 06:51:55.250554318 +0000
26 @@ -73,7 +73,7 @@
27  $svn_revision = '$Revision: 19652 $';
28  
29  /* Include required files */
30 -require_once("class_location.inc");
31 +require_once("/var/cache/gosa/class.cache");
32  require_once ("functions_debug.inc");
33  require_once ("accept-to-gettext.inc");
34  
35 Index: gosa/gosa-core/update-gosa
36 ===================================================================
37 --- gosa.orig/gosa-core/update-gosa     2008-06-10 07:56:22.000000000 +0000
38 +++ gosa/gosa-core/update-gosa  2010-10-01 06:51:28.481554589 +0000
39 @@ -21,7 +21,7 @@
40   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
41   */
42  
43 -define ("GOSA_HOME", dirname(__FILE__));
44 +define ("GOSA_HOME", "/usr/share/gosa");
45  define ("LOCALE_DIR", GOSA_HOME."/locale");
46  define ("PLUGSTATE_DIR", GOSA_HOME."/state");
47  
48 @@ -122,8 +122,8 @@
49  function rescan_classes()
50  {
51         echo "Updating class cache...\n";
52 -       $class_mapping= get_classes();
53 -       $filename= GOSA_HOME."/include/class_location.inc";
54 +       $class_mapping= get_classes("/usr/share/gosa");
55 +       $filename= "/var/cache/gosa/class.cache";
56  
57         /* Sanity checks */
58         if (!file_exists($filename) || is_writable($filename)) {