4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 02, 2014, 01:24:21 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Issues / Ausgaben
| |-+  Feedback & Suggestions (Moderator: Acidgod)
| | |-+  [FIX] - admin/checkimages.php file
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [FIX] - admin/checkimages.php file  (Read 4328 times)
thunderstrike
4images Guru
*******
Offline Offline

Posts: 2327

Thank You
-Given: 0
-Receive: 10


View Profile
« on: October 08, 2007, 03:39:03 PM »

This check for all extension in mime type match of includes/upload_definitions.php file and some condition fix include.

Find:

Quote  [Expand]
$thumb_file = 0;
    if (file_exists(THUMB_PATH.$cat_path."/".$image_name.".jpg")) {
      $thumb_file = $image_name.".jpg";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".JPG")) {
      $thumb_file = $image_name.".JPG";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".jpeg")) {
      $thumb_file = $image_name.".jpeg";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".JPEG")) {
      $thumb_file = $image_name.".JPEG";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".gif")) {
      $thumb_file = $image_name.".gif";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".GIF")) {
      $thumb_file = $image_name.".GIF";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".png")) {
      $thumb_file = $image_name.".png";
    }
    elseif (file_exists(THUMB_PATH.$cat_path."/".$image_name.".PNG")) {
      $thumb_file = $image_name.".PNG";
    }

replace:

1
2
3
4
5
6
7
8
@include_once(ROOT_PATH . "includes/upload_definitions.php");
    if (isset($mime_type_match) && is_array($mime_type_match) && !empty($mime_type_match)) {
        foreach ($mime_type_match as $key) {
            if (strtolower($key) == $file_type || strtoupper($key) == $file_type && @file_exists(THUMB_PATH.$cat_path."/".$image_name.".".$file_type)) {
                $thumb_file = get_basefile(trim($image_name . "." . $file_type));
            }
        }
    }

Find (2 time):

Quote  [Expand]
if ($thumb_file) {

replace:

1
if (isset($thumb_file) && !empty($thumb_file)) {

Find:

Quote  [Expand]
show_form_footer($lang['add'], $lang['reset'], $colspan);
  }
  else {
    show_table_footer();
  }

add after:

1
unset ($thumb_file);
« Last Edit: October 08, 2007, 05:13:45 PM by thunderstrike » Logged

8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?
vanish
Jr. Member
**
Offline Offline

Posts: 60

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #1 on: January 21, 2008, 12:59:10 PM »

After applying this FIX checkimages doin't working
Logged
thunderstrike
4images Guru
*******
Offline Offline

Posts: 2327

Thank You
-Given: 0
-Receive: 10


View Profile
« Reply #2 on: January 21, 2008, 02:10:57 PM »

And ... PHP and 4images version ?
Logged

8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.089 seconds with 19 queries.
Post your comments here