On Wed, 13 Jun 2007, Richard Heck wrote:
cd /home/lyx/www/pmwiki
find uploads -printf '%TY-%Tm-%Td %TH:%TM %-8s %p\n' > files
Is this the exact command? If not, what is it? Or better yet, can you
send me the script?
The 'find' is pretty close I'd say. I think you've already found the
script according to your comments.
What's going on here?
* Why only a single line, where are the rest of the files?
* Why is the date 2005-05-19 ???
This could be caused here:
if($action == 'browse' || $action == '')
if(FilesNotifyIsItTimeToUpdate())
register_shutdown_function('FilesNotifyUpdate', $pagename, getcwd());
Note the `getcwd()' that provides the second argument. Then when you get
here:
function FilesNotifyUpdate($pagename, $dir='') {
global $FilesNotify;
$curdir = getcwd();
if($dir) { flush(); chdir($dir); }
You'll be chdir'ing to whatever getcwd() returned before, and that must
depend upon what browse action is underway.
Thanks, you led me to the problem. It's not really different actions, but
a different wiki, in combination with how 'find' treats a soft link.
Essentially your analysis is correct. Sometimes this script must be
executed from the "wrong" directory. So I did a 'find' for 'uploads', and
found a link in a test wiki:
lrwxrwxrwx 1 chr chr 28 May 19 2005 uploads -> ....
That test wiki also ran the script, because I had done a so callled "farm
installation". Good for testing, but not in this particular case.
Here's a different idea: Why not just do this as a bash script and
install it as a cron job?
I initially wrote it as a bash script :-) But since I don't have
permissions to do a cron job, I went this way instead...
Many thanks, I think this has solved the problem!
/Christian
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr