PDA

View Full Version : cron Perl modify Notice in mysql


KozmoK
28 Dec 2009, 03:27
I have a cron job that executes a perl script that modifies one of my Notices's. However,
the changes are not reflected until I manually go into the notice manager and change something.

I am seeing I need to update the datastore.

//update the datastore notice cache
if ($changes)
{
build_notice_datastore();
}


Is there a way I can call this progmatically, or by modifying the notice cache directly?

Thanks,

Koz

Ted S
28 Dec 2009, 04:23
Just run the rebuild function:


require_once(DIR . '/includes/adminfunctions_notice.php');
build_notice_datastore();

KozmoK
28 Dec 2009, 05:22
I can issue the rebuild comand, but the data is still old.


EDIT:

I see I have to rebuild the languages..

I added :
build_language(-1);

and its throwing this error:
Fatal error: Call to undefined function fetch_js_safe_string()

require_once(DIR . '/includes/adminfunctions_notice.php');
build_notice_datastore();
require_once(DIR . '/includes/adminfunctions_language.php');
build_language(-1);


Edit again: I figured it out...needed to include fetch_js_safe_string include.


Thanks,

Koz