PDA

View Full Version : Fetching a column from the datastore in global_start messes up the forum time


Yellow Slider
04-11-2011, 10:09 PM
I'm trying to fetch a column from the datastore in global_start using the following code:
$vbulletin->datastore->fetch(array('datastore'));

And for some reason, the forum time get set to GMT (not everywhere though), ignoring users preferences.
Anyone familiar with this issue?

Thanks.

Boofo
04-11-2011, 10:44 PM
Grab it from the init_startup hook instead, like so:

$datastore_fetch[] = "'your column name here'";


Make sure it has the single and double quotes like in the example.

Yellow Slider
04-11-2011, 11:19 PM
Grab it from the init_startup hook instead, like so:

$datastore_fetch[] = "'your column name here'";Make sure it has the single and double quotes like in the example.
That did the job, thanks.
By the way, a new var has been added, $new_datastore_fetch, which doesn't require single quotes.

Boofo
04-11-2011, 11:40 PM
Have you tried the new variable?

Yellow Slider
04-12-2011, 04:16 PM
Have you tried the new variable?
I was actually too lazy to change it afterwards, but the comment says '$new_datastore_fetch does not require single quotes', so I guess it should be working of that what you mean.

Boofo
04-12-2011, 05:46 PM
I tested it and it works fine without the single quotes. Thanks for pointing it out to me. I didn't know about the change. Actually, it is better to use the new way as it doesn't need to parse the extra quotes. These all work for it:

$new_datastore_fetch[] = 'your column name here';
$new_datastore_fetch[] = "your column name here"; <-- I am using this one
$new_datastore_fetch[] = your column name here;