[zi-cvs] packages/com.zzoss.plugin.lib Plugin.php,1.12,1.13

Sandro Zic <[email protected]> Fri, 26 Mar 2004 11:07:48 +0000
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.plugin.lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30933

Modified Files:
	Plugin.php 
Log Message:
also do not register plugins if fileroles have not been processed (aka that package src is not new)

Index: Plugin.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.plugin.lib/Plugin.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Plugin.php	26 Mar 2004 10:16:07 -0000	1.12
--- Plugin.php	26 Mar 2004 11:07:46 -0000	1.13
***************
*** 178,184 ****
          switch($this->role){
              case 'role':
!                 $this->execRole();
!                 $this->registerPlugins();
!                 $this->registry->setPlugins($this->plugins);
                  break;
              case 'build':
--- 178,186 ----
          switch($this->role){
              case 'role':
!                 if($this->execRole()){
!                     // register new plugins only, if fileroles have been executed
!                     $this->registerPlugins();
!                     $this->registry->setPlugins($this->plugins);
!                 }
                  break;
              case 'build':
***************
*** 204,220 ****
      
      function execRole()
!     {
!         /*
!         if($this->package['name'] == 'Auth_HTTP'){
!             echo '<h1>'.$this->package['name'].'</h1>';
!             echo '<pre>';
!             print_r($this->package["release"]['filelist']);
!             echo '</pre>';
!             unlink('C:\WINDOWS\Temp\zzoss_installer\1\dev\distributions\com.zzoss-1.0.0\applications\zic-1.1.0dev1\installer\packages_packages.reg');
!             //die();
!         }
!         //return true;
!         */
!         
          // Upon install or update, we check if the src package is newer then
          // the installed package, only then we perform the filerole routines
--- 206,210 ----
      
      function execRole()
!     {      
          // Upon install or update, we check if the src package is newer then
          // the installed package, only then we perform the filerole routines
***************
*** 226,230 ****
              if(filemtime($pkg_src_dir) < filemtime($pkg_installed_dir)){
                  $this->log .= "Package has not changed since last installation.\n";
!                 return true;
              }
          }
--- 216,220 ----
              if(filemtime($pkg_src_dir) < filemtime($pkg_installed_dir)){
                  $this->log .= "Package has not changed since last installation.\n";
!                 return false;
              }
          }
***************
*** 254,257 ****
--- 244,249 ----
                  break;
          }
+         
+         return true;
      }
      
***************
*** 452,456 ****
              */}
          }
!         
          $this->output .= ob_get_contents();
          ob_end_clean();
--- 444,454 ----
              */}
          }
!         /*
!         echo '<pre>';
!         echo $this->log;
!         print_r($this->plugins);
!         echo '<pre>';
!         die();
!         */
          $this->output .= ob_get_contents();
          ob_end_clean();



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click