Thank you so much Kim, very reassuring to know it's starting to make sense!
I've started adding in changes (not got to the override files yet), there are rather a lot. So far most of the changes have been minor, only one or two lines, but I'm now looking at admin/categories.php in WinMerge and there are large sections of code that are different. I just want to check that I would be doing the right thing by changing it.
For example. The code in the original 1.3.7 categories.php file starting at line 216 is:
PHP Code:
if ($_POST['categories_image_manual'] != '') {
// add image manually
$categories_image_name = $_POST['img_dir'] . $_POST['categories_image_manual'];
$db->Execute("update " . TABLE_CATEGORIES . "
set categories_image = '" . $categories_image_name . "'
where categories_id = '" . (int)$categories_id . "'");
} else {
if ($categories_image = new upload('categories_image')) {
$categories_image->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
if ($categories_image->parse() && $categories_image->save()) {
$categories_image_name = $_POST['img_dir'] . $categories_image->filename;
}
if ($categories_image->filename != 'none' && $categories_image->filename != '' && $_POST['image_delete'] != 1) {
// save filename when not set to none and not blank
$db->Execute("update " . TABLE_CATEGORIES . "
set categories_image = '" . $categories_image_name . "'
where categories_id = '" . (int)$categories_id . "'");
} else {
// remove filename when set to none and not blank
if ($categories_image->filename != '' || $_POST['image_delete'] == 1) {
$db->Execute("update " . TABLE_CATEGORIES . "
set categories_image = ''
where categories_id = '" . (int)$categories_id . "'");
}
The current live site version of the file at that point is:
PHP Code:
if ($categories_image = new upload('categories_image')) {
$categories_image->set_destination(DIR_FS_CATALOG_IMAGES . $_POST['img_dir']);
if ($categories_image->parse() && $categories_image->save()) {
$categories_image_name = $_POST['img_dir'] . $categories_image->filename;
}
if ($categories_image->filename != 'none' && $categories_image->filename != '' && $_POST['image_delete'] != 1) {
// save filename when not set to none and not blank
$db->Execute("update " . TABLE_CATEGORIES . "
set categories_image = '" . $categories_image_name . "'
where categories_id = '" . (int)$categories_id . "'");
} else {
// remove filename when set to none and not blank
if ($categories_image->filename != '' || $_POST['image_delete'] == 1) {
$db->Execute("update " . TABLE_CATEGORIES . "
set categories_image = ''
where categories_id = '" . (int)$categories_id . "'");
It looks as though sections of code from the original file have been removed. Comparing the originial 1.3.7 file with the 1.3.9h version, that section of code appears to be identical. The site is highly customised and there have been a lot of mods installed (before my time so I don't have a complete list) but I can't identify the source of that change and my understanding of php is rather limited. I realise it's purely a confidence issue but I just wanted to double check before I change this....
Many thanks