4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 24, 2018, 08:26:53 PM

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 Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7.1] Small error in functions.php
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [1.7.1] Small error in functions.php  (Read 32468 times)
Scout
Pre-Newbie

Offline Offline

Posts: 3

Thank You
-Given: 0
-Receive: 0


View Profile
« on: March 26, 2005, 02:02:05 PM »

I found a small error in functions.php on line 64:
1
2
3
function check_local_thumb($remote_thumb_file) {
  return !is_remote($local_thumb_file) && strpos($local_thumb_file, '/') !== false && preg_match("#\.[gif|jpg|jpeg|png]+$#i", $local_thumb_file) ? 1 : 0;
}
I suppose that function definition should look like
1
function check_local_thumb($local_thumb_file) {
« Last Edit: November 13, 2005, 04:16:14 PM by Nicky » Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 576

mmm PHP...


View Profile WWW
« Reply #1 on: March 26, 2005, 08:26:37 PM »

thank you!
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
michi-w.
Hero Member
*****
Offline Offline

Posts: 505

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #2 on: April 25, 2005, 01:46:30 AM »

Is the bugfix also 1.7?

Gruß
michi-w.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 576

mmm PHP...


View Profile WWW
« Reply #3 on: April 25, 2005, 02:09:06 AM »

no
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Filip3rd
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #4 on: June 05, 2005, 02:24:27 AM »

I don't even have function.php in on my server. Is this normal?
Logged
michi-w.
Hero Member
*****
Offline Offline

Posts: 505

Thank You
-Given: 0
-Receive: 2


View Profile
« Reply #5 on: June 05, 2005, 02:53:46 AM »

\includes\functions.php
Logged
IzyB
Jr. Member
**
Offline Offline

Posts: 69

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #6 on: July 16, 2005, 08:41:32 PM »

I just want to  make sure before I do this...am I correct in thinking that only "function check_local_thumb($remote_thumb_file)" needs to be changed? So that it should look like:

function check_local_thumb($local_thumb_file) {
  return !is_remote($local_thumb_file) && strpos($local_thumb_file, '/') !== false && preg_match("#\.[gif|jpg|jpeg|png]+$#i", $local_thumb_file) ? 1 : 0;
}

Or does everything after "function check_local_thumb($local_thumb_file)" get deleted?

Also, what does this change fix exactly?

Thanks!
Tina
Logged

Namaste,
Tina
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 576

mmm PHP...


View Profile WWW
« Reply #7 on: July 16, 2005, 08:53:33 PM »

Or does everything after "function check_local_thumb($local_thumb_file)" get deleted?
No, only one line should be changed.

Also, what does this change fix exactly?
it fixes the function, which would return incorrect result without the fix Wink
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
IzyB
Jr. Member
**
Offline Offline

Posts: 69

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #8 on: July 16, 2005, 09:32:34 PM »

Thanks again V@no!

Tina
Logged

Namaste,
Tina
Pages: [1] Print 
« previous next »
Jump to:  

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