Browse files

rename tep_writeable() to tep_is_writable()

  • Loading branch information...
1 parent 322b751 commit f204d6a03389fed8bcb86cc127728f726e2448dd @haraldpdl haraldpdl committed May 5, 2010
View
2 catalog/admin/backup.php
@@ -317,7 +317,7 @@
// check if the backup directory exists
$dir_ok = false;
if (is_dir(DIR_FS_BACKUP)) {
- if (is_writeable(DIR_FS_BACKUP)) {
+ if (tep_is_writable(DIR_FS_BACKUP)) {
$dir_ok = true;
} else {
$messageStack->add(ERROR_BACKUP_DIRECTORY_NOT_WRITEABLE, 'error');
View
12 catalog/admin/banner_manager.php
@@ -125,7 +125,7 @@
$banner = tep_db_fetch_array($banner_query);
if (is_file(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {
- if (is_writeable(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {
+ if (tep_is_writable(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {
unlink(DIR_FS_CATALOG_IMAGES . $banner['banners_image']);
} else {
$messageStack->add_session(ERROR_IMAGE_IS_NOT_WRITEABLE, 'error');
@@ -140,25 +140,25 @@
if (function_exists('imagecreate') && tep_not_null($banner_extensio)) {
if (is_file(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {
unlink(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banners_id . '.' . $banner_extension);
}
}
if (is_file(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {
unlink(DIR_WS_IMAGES . 'graphs/banner_yearly-' . $banners_id . '.' . $banner_extension);
}
}
if (is_file(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {
unlink(DIR_WS_IMAGES . 'graphs/banner_monthly-' . $banners_id . '.' . $banner_extension);
}
}
if (is_file(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {
unlink(DIR_WS_IMAGES . 'graphs/banner_daily-' . $banners_id . '.' . $banner_extension);
}
}
@@ -175,7 +175,7 @@
$dir_ok = false;
if (function_exists('imagecreate') && tep_not_null($banner_extension)) {
if (is_dir(DIR_WS_IMAGES . 'graphs')) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs')) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs')) {
$dir_ok = true;
} else {
$messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error');
View
2 catalog/admin/banner_statistics.php
@@ -20,7 +20,7 @@
$dir_ok = false;
if (function_exists('imagecreate') && tep_not_null($banner_extension)) {
if (is_dir(DIR_WS_IMAGES . 'graphs')) {
- if (is_writeable(DIR_WS_IMAGES . 'graphs')) {
+ if (tep_is_writable(DIR_WS_IMAGES . 'graphs')) {
$dir_ok = true;
} else {
$messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error');
View
2 catalog/admin/cache.php
@@ -24,7 +24,7 @@
// check if the cache directory exists
if (is_dir(DIR_FS_CACHE)) {
- if (!is_writeable(DIR_FS_CACHE)) $messageStack->add(ERROR_CACHE_DIRECTORY_NOT_WRITEABLE, 'error');
+ if (!tep_is_writable(DIR_FS_CACHE)) $messageStack->add(ERROR_CACHE_DIRECTORY_NOT_WRITEABLE, 'error');
} else {
$messageStack->add(ERROR_CACHE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
View
2 catalog/admin/categories.php
@@ -327,7 +327,7 @@
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
- if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
+ if (!tep_is_writable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
} else {
$messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
View
2 catalog/admin/includes/classes/upload.php
@@ -139,7 +139,7 @@ function set_extensions($extensions) {
function check_destination() {
global $messageStack;
- if (!is_writeable($this->destination)) {
+ if (!tep_is_writable($this->destination)) {
if (is_dir($this->destination)) {
if ($this->message_location == 'direct') {
$messageStack->add(sprintf(ERROR_DESTINATION_NOT_WRITEABLE, $this->destination), 'error');
View
6 catalog/admin/includes/functions/general.php
@@ -1022,7 +1022,7 @@ function tep_remove($source) {
$dir = dir($source);
while ($file = $dir->read()) {
if ( ($file != '.') && ($file != '..') ) {
- if (is_writeable($source . '/' . $file)) {
+ if (tep_is_writable($source . '/' . $file)) {
tep_remove($source . '/' . $file);
} else {
$messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source . '/' . $file), 'error');
@@ -1032,14 +1032,14 @@ function tep_remove($source) {
}
$dir->close();
- if (is_writeable($source)) {
+ if (tep_is_writable($source)) {
rmdir($source);
} else {
$messageStack->add(sprintf(ERROR_DIRECTORY_NOT_REMOVEABLE, $source), 'error');
$tep_remove_error = true;
}
} else {
- if (is_writeable($source)) {
+ if (tep_is_writable($source)) {
unlink($source);
} else {
$messageStack->add(sprintf(ERROR_FILE_NOT_REMOVEABLE, $source), 'error');
View
8 catalog/install/templates/pages/index.php
@@ -124,19 +124,19 @@
<?php
$configfile_array = array();
- if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
+ if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
@chmod(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php', 0777);
}
- if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
+ if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
@chmod(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php', 0777);
}
- if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
+ if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
$configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php';
}
- if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
+ if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
$configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php';
}

0 comments on commit f204d6a

Please sign in to comment.