PDA

View Full Version : cron Perl modify Notice in mysql


KozmoK
12-28-2009, 02:27 AM
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
12-28-2009, 03:23 AM
Just run the rebuild function:


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

KozmoK
12-28-2009, 04:22 AM
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