change of image folder has no effect to static pages

Found a bug? Tell us!!
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

pico is the editor which is used by the mai-program pine - I think it must be part of a normal linux installation.

But for the moment I have make a question in de.comp.gnu - perhaps a solution
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

ok, I do not know what is the problem; but until we figure it out, I will give you the whole files, as you mentioned before:


lang_de.inc.php
http://nopaste.ch/c7bfe16ddc1078a.html

lang_en.inc.php
http://nopaste.ch/f2ea57571626ec6.html

utf8-lang_de.inc.php
http://nopaste.ch/eea4182b0f509d7.html

functions_images.inc.php
http://nopaste.ch/050ca8210385d46.html

serendipity_event_staticpage.php
http://nopaste.ch/60fdd5799d5c92a.html


and, because I found this alternative nopaste, perhaps this time the diffs work?

functions_images.inc.php.diff
http://nopaste.ch/c87f035d544d7c8.html


serendipity_event_staticpage.php.diff
http://nopaste.ch/cb100699f76dfcb.html
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, the functions_images patch won't work. $renameValues is only defined after the IF-query, but it is required within the "if $type == file" area. So it needs to be put earlier.

Sadly I won't have the time to dive into this the next few days/weeks, because I'm working on something else pretty hard right now...so this will have to be delayed a bit. :(

But I committed the staticpage thing. ;)

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:Hm, the functions_images patch won't work. $renameValues is only defined after the IF-query, but it is required within the "if $type == file" area. So it needs to be put earlier.
"won't work" as "the patch does not apply" or "the new code will not work"?


ah, I see: renameValues is even used in "type==filedir - ok, I will change this, so every if-clause gets this renameValues-definition.

But, wondering: I tried it many times at home, for renaming an image, for renaming a folder and for moving an image to another folder - and everthing worked fine!?
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
"won't work" as "the patch does not apply" or "the new code will not work"?
Since it's not a patch anymore, it doesn't need to apply anymore ;-)

So, it's "the new code will not work".
But, wondering: I tried it many times at home, for renaming an image, for renaming a folder and for moving an image to another folder - and everthing worked fine!?
The backend_rename hook is not required for the usual renaming, but it is required for the plugins that use this hook. I believe the imageselectorplus or some other plugin support to create multiple thumbnails for a file, and they would all need to move any subsequent thumbnail properly...

HTH,
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 »

"won't work" as "the patch does not apply" or "the new code will not work"?
Since it's not a patch anymore, it doesn't need to apply anymore ;-)
I thought, the patch-files on the new nopaste-service at the bottom are perhaps useable to you.


for the renameValues-problem:

I will restore the occurrence of renameValues in the if-clauses, so this will be like before.

for the problem and solution in http://board.s9y.org/viewtopic.php?t=9939#56339 ff. I will make a $renameValueBackend at the end instead of my other newcode - because the serendipity_plugin_api::hook_event('backend_media_rename', $renameValues); must get a non empty $oldDir/NewDir:
$oldDir and $newDir are allways with the right and needed content - because the sql-statement for the entries gets the same values! It has the folder when moving an entire folder. It has the folder+filename if only a file is moved or renamed.
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

OK, I did it:

functions_images.inc.php.diff
http://nopaste.ch/07062131512319f.html

or if it does not work:

functions_images.inc.php
http://nopaste.ch/782fd3d4b2eff6b.html

the changes in staticpages are already included, right? And then the lang-files?


BTW, is there any reason to use $file in the one if-clause and $pick in the other (in serendipity_moveMediaDirectory)?
Ciao, Stephan
stm999999999
Regular
Posts: 1531
Joined: Tue Mar 07, 2006 11:25 pm
Location: Berlin, Germany
Contact:

Post by stm999999999 »

Is there still a problem with my code? Or is it a lack of time only? :lol:
Ciao, Stephan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I wasn't aware of that extra patch, sorry. Still lacking time, but now I'll put it on my todo list :)

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/
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Just made a small review: Also this patch won't work, because $renameValues can be modified by plugins. The "foreach" loop after the former hook_event call would then also rename any files that the plugins pushed into the $renameValues array!

In your patch, this foreach-loop is no longer executed, leaving the plugin modifications without any action.

Could you, in a few sentences, tell me what modifications were required for what to get the result you want with this patch? You can switch to german, if you prefer. But I'm lacking the time to reread through this whole thread, it definitely is confusing me :)

Best 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 »

sorry, I hope for the next weekend
Ciao, Stephan
Post Reply