change of image folder has no effect to static pages

Found a bug? Tell us!!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Can you please provided a (unified) diff for the required patches against current versions of the patched files? Thanks!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

a patch to what version of my suggestions?

the version with the single occurrence of the $renameValues + hook-call?

And, where should this code be inserted?
and all these code - which works only with mysql(i) - is behind the mysql-test. Or, if you think, that the hook should be called even if there is not mysql(i), - perhaps some further plugin would use it for something independant from mysql(i) - we can move the new code directly before the

Code: Select all

    // Only MySQL supported, since I don't know how to use REGEXPs differently.
But in this case we have to add these mysql(i)-test in the staticpage-php, because this special code needs mysql(i).


and what is about the structure? Is this

Code: Select all

if ($type == 'dir') {do something 

} elseif ($type == 'file') {do something 

} elseif ($type == 'filedir') {do something }
ok?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
stm999999999 wrote:a patch to what version of my suggestions?
Preferably to the one that works best for you - the single $renameValues call, I think. I'm willing to modify the core for that, so that's fine! :)

The mysqli-check should be added to the staticpage plugin itself, yes.

Thanks alot,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

I will do it in the next days.
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

garvinhicking wrote: The mysqli-check should be added to the staticpage plugin itself, yes.
would this be the right mysqli-check? with "break" instead of "return true"?

Code: Select all

                
case 'backend_sidebar_entries_event_display_staticpages':
                    $this->showBackend();
                    break;

                
case 'backend_media_rename':
                    
// Only MySQL supported, since I don't know how to use REGEXPs differently.
                    
if ($serendipity['dbType'] != 'mysql' && $serendipity['dbType'] != 'mysqli') {
                        break;
                    }

staticpage-media-rename-code ...

break;

case 'external_plugin':
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, that would do!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

so, now:

http://nopaste.linux-dev.org/?1562

http://nopaste.linux-dev.org/?1563

both diffs are for the latest file-versions on the svn-servers

perhaps the file-headers must be corrected by you.
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The second patch doesn't apply here on my linux system, could you try to create a unified diff without that extra CSDiff output you have in that file?

Alternatively, paste the whole functions_images.inc.php file and SVN will take care of the DIFFing for me.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

garvinhicking wrote:Hi!

The second patch doesn't apply here on my linux system, could you try to create a unified diff without that extra CSDiff output you have in that file?
What do you mean with "extra CSDiff output"? This?

Code: Select all

File difference report generated by CSDiff by ComponentSoftware on 14.06.2007 23:11 

Base file: \Alt\functions_images.inc.php 
Compared file: \neu\functions_images.inc.php
if yes: it is a problem for you simply to delete this in the diff-file?

if not: what extra output do you mean?

And BTW, why do the first patch works?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
What do you mean with "extra CSDiff output"? This?
Exactly.
if yes: it is a problem for you simply to delete this in the diff-file?
I tried. Then it doesn't work at all applying the diff with "patch functions_images.inc.php < yourpatch.diff".
And BTW, why do the first patch works?
I applied it manually and did not use your file. That's too much work for the other diff, though.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

hm, did you tried it with the option for ed-style-diffs?

Code: Select all

patch -e xxxxxx

Code: Select all

         Upon startup, patch attempts to determine the type of the
          diff listing, unless overruled by a -c (--context), -e
          (--ed), -n (--normal), or -u (--unified) option.  Context
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Same problem:
patch unexpectedly ends in middle of line
patch: **** Only garbage was found in the patch input.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

OK, I will try another diff-tool.

BTW, why did you not adopt the code-comment in the first patch?

Code: Select all

// Only MySQL supported, since I don't know how to use REGEXPs differently.
1) comments in code are helpfull vor further developers, or?

2) this is in your functions_images.inc.php, too
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

BTW, why did you not adopt the code-comment in the first patch?
Because I applied it manually and thought the comment was not really useful :). But I can add it tomorrow, you are right.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

ok, I tried another diff-tool on windows:

http://nopaste.linux-dev.org/?1575

this patch is still a patch to the unchanged file-version. Give it a try - if it not work I have to use the non-GUI-diffutils.

and please, try it with and without -e.
Ciao, Stephan
Post Reply