fogftp.class.php (fogproject-1.5.6) | : | fogftp.class.php (fogproject-1.5.7) | ||
---|---|---|---|---|
skipping to change at line 133 | skipping to change at line 133 | |||
* | * | |||
* @return object | * @return object | |||
*/ | */ | |||
public function chmod( | public function chmod( | |||
$mode, | $mode, | |||
$filename | $filename | |||
) { | ) { | |||
if (!$mode) { | if (!$mode) { | |||
$mode = $this->get('mode'); | $mode = $this->get('mode'); | |||
} | } | |||
ftp_chmod( | @ftp_chmod( | |||
$this->_link, | $this->_link, | |||
$mode, | $mode, | |||
$filename | $filename | |||
); | ); | |||
return $this; | return $this; | |||
} | } | |||
/** | /** | |||
* Close the current ftp session | * Close the current ftp session | |||
* | * | |||
* @return object | * @return object | |||
skipping to change at line 245 | skipping to change at line 245 | |||
* @param string $path the item to delete | * @param string $path the item to delete | |||
* | * | |||
* @return object | * @return object | |||
*/ | */ | |||
public function delete($path) | public function delete($path) | |||
{ | { | |||
if (!$this->exists($path)) { | if (!$this->exists($path)) { | |||
return $this; | return $this; | |||
} | } | |||
if (!$this->rmdir($path) | if (!$this->rmdir($path) | |||
&& !ftp_delete($this->_link, $path) | && !@ftp_delete($this->_link, $path) | |||
) { | ) { | |||
$filelist = $this->nlist($path); | $filelist = $this->nlist($path); | |||
foreach ((array)$filelist as &$file) { | foreach ((array)$filelist as &$file) { | |||
$this->delete($file); | $this->delete($file); | |||
unset($file); | unset($file); | |||
} | } | |||
$this->rmdir($path); | $this->rmdir($path); | |||
$rawfilelist = $this->rawlist("-a $path"); | $rawfilelist = $this->rawlist("-a $path"); | |||
$path = trim($path, '/'); | $path = trim($path, '/'); | |||
$path = trim($path); | $path = trim($path); | |||
skipping to change at line 824 | skipping to change at line 824 | |||
} | } | |||
/** | /** | |||
* Remove directory | * Remove directory | |||
* | * | |||
* @param string $directory the directory to remove | * @param string $directory the directory to remove | |||
* | * | |||
* @return ftp_rmdir | * @return ftp_rmdir | |||
*/ | */ | |||
public function rmdir($directory) | public function rmdir($directory) | |||
{ | { | |||
return ftp_rmdir($this->_link, $directory); | return @ftp_rmdir($this->_link, $directory); | |||
} | } | |||
/** | /** | |||
* Set the options for the ftp session | * Set the options for the ftp session | |||
* | * | |||
* @param string $option the option to set | * @param string $option the option to set | |||
* @param mixed $value the value to set to | * @param mixed $value the value to set to | |||
* | * | |||
* @return ftp_set_option | * @return ftp_set_option | |||
*/ | */ | |||
public function set_option( | public function set_option( | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |