4images Forum & Community

4images Help / Hilfe => Bug Fixes & Patches => Topic started by: Scout on March 26, 2005, 02:02:05 PM

Title: [1.7.1] Small error in functions.php
Post by: Scout on March 26, 2005, 02:02:05 PM
I found a small error in functions.php on line 64:
Code: [Select]
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
Code: [Select]
function check_local_thumb($local_thumb_file) {
Title: Re: Small error in functions.php
Post by: V@no on March 26, 2005, 08:26:37 PM
thank you!
Title: Re: [1.7.1] Small error in functions.php
Post by: michi-w. on April 25, 2005, 01:46:30 AM
Is the bugfix also 1.7?

Gruß
michi-w.
Title: Re: [1.7.1] Small error in functions.php
Post by: V@no on April 25, 2005, 02:09:06 AM
no
Title: Re: [1.7.1] Small error in functions.php
Post by: Filip3rd on June 05, 2005, 02:24:27 AM
I don't even have function.php in on my server. Is this normal?
Title: Re: [1.7.1] Small error in functions.php
Post by: michi-w. on June 05, 2005, 02:53:46 AM
\includes\functions.php
Title: Re: [1.7.1] Small error in functions.php
Post by: IzyB 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
Title: Re: [1.7.1] Small error in functions.php
Post by: V@no 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 ;)
Title: Re: [1.7.1] Small error in functions.php
Post by: IzyB on July 16, 2005, 09:32:34 PM
Thanks again V@no!

Tina