On 11/29/2013 02:03 PM, Daniel Berteaud wrote:
> The problem is that the expire.php script needs to be run from
> include/scripts (because it require_once("../init.php")), but the
> switchLocale function expects to be in the top directory, because it
> inits gettext using a relative path :
> 
> T_bindtextdomain('messages', 'include/locale');
> 
> The attached patch simply detects the top directory, and chdir into it
> before running everything else. With this, you don't need to worry about
> the current dir of your cron job, I just use this for example:

Thanks for investigating this, didn't have time so far.

I'd rather not change the cwd for the utilities (at least), although for
expire.php would be ok as no input is expected.

I fixed switchLocale to use the absolute path.



Reply via email to