[zi-cvs] packages/com.zzoss.plugin.lib Plugin.php,1.23,1.24
Christian Zonsius <[email protected]> Mon, 17 May 2004 22:47:44 +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-serv22680
Modified Files:
Plugin.php
Log Message:
added support for rel attribute in build element
Index: Plugin.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.plugin.lib/Plugin.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** Plugin.php 17 May 2004 15:55:45 -0000 1.23
--- Plugin.php 17 May 2004 22:47:41 -0000 1.24
***************
*** 1,3 ****
! <?php
/*
Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com
--- 1,3 ----
! <?php
/*
Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com
***************
*** 75,79 ****
*/
var $filelist_dirs_roles = array();
!
/**
* Debug mode on/off.
--- 75,79 ----
*/
var $filelist_dirs_roles = array();
!
/**
* Debug mode on/off.
***************
*** 116,120 ****
return is_array($this->queue);
}
!
function setRegistry(&$registry)
{
--- 116,120 ----
return is_array($this->queue);
}
!
function setRegistry(&$registry)
{
***************
*** 280,284 ****
break;
}
!
return true;
}
--- 280,284 ----
break;
}
!
return true;
}
***************
*** 358,365 ****
{
$status = ZZOSS_PLUGIN_STATUS_UNDEFINED;
!
ob_start();
$this->log .= "* Processing plugins.\n";
!
// not a build plugin
if(is_null($plugin)) {
--- 358,365 ----
{
$status = ZZOSS_PLUGIN_STATUS_UNDEFINED;
!
ob_start();
$this->log .= "* Processing plugins.\n";
!
// not a build plugin
if(is_null($plugin)) {
***************
*** 372,375 ****
--- 372,399 ----
// it should be a specific plugin
$name = $plugin["@"]["plugin"].'-'.$plugin["@"]["version"];
+ if(!is_array($plugins[$name])) {
+ if(is_array($plugins)) {
+ if(!isset($plugin['@']['rel'])) {
+ $plugin['@']['rel'] = 'ge';
+ }
+ foreach($plugins as $p_key => $p_value) {
+ if($p_value['name'] == $plugin['@']['plugin']) {
+ switch($plugin['@']['rel']) {
+ case 'has': $name = $p_key;
+ break;
+ case 'le':
+ case 'ge':
+ case 'eq':
+ default: if(version_compare($p_value['version'], $plugin['@']['version'], $plugin['@']['rel'])) {
+ $name = $p_key;
+ }
+ break;
+
+ }
+ }
+ }
+
+ }
+ }
$status = $this->includePlugin($name, $plugins[$name]['file']);
}
***************
*** 398,402 ****
// START Plugins Runtime Environment
!
// remember include path
$inc_path_old = ini_get('include_path');
--- 422,426 ----
// START Plugins Runtime Environment
!
// remember include path
$inc_path_old = ini_get('include_path');
***************
*** 518,527 ****
// remember parameters to later register plugin files
$file_path = ZZOSS_InstallerUtils::fixPath($this->dest_dir.DIRECTORY_SEPARATOR.$this->pkg_root.$file["@"]["baseinstalldir"].DIRECTORY_SEPARATOR.$file["@"]["name"]);
!
$plugin_params[$this->package['name'].'-'.$this->package['release']['version']]['file'] = $file_path;
$plugin_params[$this->package['name'].'-'.$this->package['release']['version']]['name'] = $this->package['name'];
// remember the available versions
//$plugin_params[$this->package['name']][] = $this->package['release']['version'];
!
if(!isset($file['@']['role'])){
$role = '';
--- 542,553 ----
// remember parameters to later register plugin files
$file_path = ZZOSS_InstallerUtils::fixPath($this->dest_dir.DIRECTORY_SEPARATOR.$this->pkg_root.$file["@"]["baseinstalldir"].DIRECTORY_SEPARATOR.$file["@"]["name"]);
!
$plugin_params[$this->package['name'].'-'.$this->package['release']['version']]['file'] = $file_path;
$plugin_params[$this->package['name'].'-'.$this->package['release']['version']]['name'] = $this->package['name'];
+ $plugin_params[$this->package['name'].'-'.$this->package['release']['version']]['version'] = $this->package['version'];
+
// remember the available versions
//$plugin_params[$this->package['name']][] = $this->package['release']['version'];
!
if(!isset($file['@']['role'])){
$role = '';
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click