[zi-cvs] packages/com.zzoss.zic.plugin.filerole role_php.php,1.6,1.7
Christian Zonsius <[email protected]> Tue, 23 Mar 2004 15:24:12 +0000
| Newsgroups | gmane.comp.php.zzoss.installer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.filerole
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16328
Modified Files:
role_php.php
Log Message:
make use of ZZOSS_InstallerUtils::fixPath() function
Index: role_php.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic.plugin.filerole/role_php.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** role_php.php 22 Mar 2004 20:45:45 -0000 1.6
--- role_php.php 23 Mar 2004 15:24:09 -0000 1.7
***************
*** 24,40 ****
*/
- // hack since there is no real plugin base class yet ;)
- if(!function_exists('ZZOSS_fixPath')) {
- function ZZOSS_fixPath($path) {
- $path = str_replace('\\', DIRECTORY_SEPARATOR, $path);
- $path = str_replace('/', DIRECTORY_SEPARATOR, $path);
- if(($path==".")||($path==".".DIRECTORY_SEPARATOR)) {
- return '';
- } else {
- return $path;
- }
- }
- }
-
echo '['.$GLOBALS['ZI']['package_action'].' '.$GLOBALS['ZI']['package_name'].'-'.$GLOBALS['ZI']['package_version'].']'."\n";
--- 24,27 ----
***************
*** 62,66 ****
);
}
! $file_dest = ZZOSS_fixPath($fileroles_dirs[$GLOBALS['ZI']['file_role']].DIRECTORY_SEPARATOR).ZZOSS_fixPath($GLOBALS['ZI']['file_baseinstalldir']).$GLOBALS['ZI']['file_name_dest'];
switch($GLOBALS['ZI']['package_action']){
--- 49,53 ----
);
}
! $file_dest = ZZOSS_InstallerUtils::fixPath($fileroles_dirs[$GLOBALS['ZI']['file_role']].DIRECTORY_SEPARATOR.$GLOBALS['ZI']['file_baseinstalldir'].$GLOBALS['ZI']['file_name_dest']);
switch($GLOBALS['ZI']['package_action']){
***************
*** 85,89 ****
//$log .= 'src: '.$src. 'dest: '.$dest."\n";
//echo 'src: '.$GLOBALS['ZI']['file_src']. 'dest: '.$file_dest."\n<br>";
! if(!copy(ZZOSS_fixPath($GLOBALS['ZI']['file_src']),$file_dest)) {
$GLOBALS['ZI']['plugin_log'] .=
'Cannot copy '.$GLOBALS['ZI']['file_src']."\n".
--- 72,76 ----
//$log .= 'src: '.$src. 'dest: '.$dest."\n";
//echo 'src: '.$GLOBALS['ZI']['file_src']. 'dest: '.$file_dest."\n<br>";
! if(!copy(ZZOSS_InstallerUtils::fixPath($GLOBALS['ZI']['file_src']),$file_dest)) {
$GLOBALS['ZI']['plugin_log'] .=
'Cannot copy '.$GLOBALS['ZI']['file_src']."\n".
-------------------------------------------------------
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