Calendar Not Loading Preferences [FIXED]

Wow... I was about to post about a problem I was having with the calendar but I figured it out. So to help other people avoid the same problem here is what I learned.

The calendar class only uses the preferences/config of the first instance of its being called.

For example. I called


In the constructor for my classes, I then (in a method of that class) initialized my preferences and attempted to re-load the calendar library with the new preferences

$this->load->library('calendar', $pref);

And it didn't work. Where my $pref is a keyed array as defined by the CI documentation. No matter what I changed my $pref's too... my output was locked to the default from CI.

So if you are having problems that no matter how much you change your $pref's your output doesn't change... make sure you have not already called the calendar class with different configs. Hope this saves someone the 40 min headache it caused me.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.