]> git.pld-linux.org Git - packages/agata.git/commitdiff
- saving added
authorggodlewski <ggodlewski@pld-linux.org>
Fri, 13 Dec 2002 19:37:31 +0000 (19:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    agata-ini.patch -> 1.2

agata-ini.patch

index f666b1650db540b3c82655a4eb0ca0c567aed7c9..790cce4c7451fef05e1f9f7aeb76f492a5a356df 100644 (file)
 +# DateTimeFmt    = d/m/Y
 +# Orientation    = Portrait
 +# PsLineLen      = 500
+--- agata/classes/AgataCore.class.old  Fri Dec 13 20:17:06 2002
++++ agata/classes/AgataCore.class      Fri Dec 13 20:23:32 2002
+@@ -120,7 +120,7 @@
+   
+   function GravaConfig($project, $Language = null)
+   {
+-    $fd = fopen ("config.php", "w");
++    $fd = @fopen ("config.php", "w");
+     if ($fd)
+     {
+       fwrite ($fd, "<?\n");
+@@ -133,6 +133,20 @@
+         fwrite ($fd, '$setupScreenLanguage = ' . "'" . $this->aAgataConfig[$project]['Language'] . "';\n\n");
+       }
+       
++      fwrite($fd, "\n\n");
++      
++      foreach($this->aDescription as $key => $Config)
++      {
++        $Description = $this->aDescription[$key];
++        fwrite($fd, '$aDescription' . "['$key'] = '$Description';\n");
++      }
++      fwrite ($fd, "?>\n");
++      fclose($fd);  
++    }
++    
++    $fd = @fopen (getenv("HOME")."/.agata", "w");
++    if ($fd)
++    {
+       if ($project=='+')
+       {
+         $project = $this->aAgataConfig[$project]['Project'];
+@@ -142,33 +156,24 @@
+       {
+         if (is_array($Content))
+         {
++        if ($key=='+')
++        {
++          $key = $project;
++        }
++          fwrite($fd, "[$key]\n");
+           foreach ($Content as $Config => $Value)
+         {
+-          if ($key=='+')
+-          {
+-            $key = $project;
+-          }
+-            fwrite($fd, str_pad('$aAgataConfig' . "['$key']['$Config'] ",40, ' ', STR_PAD_RIGHT) .  "= '$Value';\n");
++            fwrite($fd, str_pad($Config,40,' ',STR_PAD_RIGHT)."= $Value\n");
+         }
+         fwrite($fd, "\n");
+         }
+         else if (($key != 'defaultConfiguration') && ($content))
+         {
+-          fwrite($fd, '$aAgataConfig' . "['$key'] = '$Content';\n");
+-        fwrite($fd, "\n");
++          fwrite($fd, "[$key]\n\n$Content\n"); // TESTME!!!
+         }
+       }
+-    
+-      fwrite($fd, "\n\n");
+-      
+-      foreach($this->aDescription as $key => $Config)
+-      {
+-        $Description = $this->aDescription[$key];
+-        fwrite($fd, '$aDescription' . "['$key'] = '$Description';\n");
+-      }
+-      fwrite ($fd, "?>\n");
+-      fclose($fd);  
+     }
++    
+   }
+ }
+ ?>
+\ No newline at end of file
This page took 0.053738 seconds and 4 git commands to generate.