Magic array used for cheating when loading/saving stories from/to db.
List of database field names (which are translated into member variables by prepending _ to the value) as pointers to whether or not they are used to save data. Everything with a save value of 1 will be saved, those with a save value of 0 will just be loaded.
This allows us to automate the loading of story, user and topic from a database result array, and generate saving of a story, from the same magic array.
This is a peudo-property, implementing a getter for story details as if as an associative array. Personally, I'd rather be able to assign getters and setters to actual properties to mask controlled access to private member variables. But, you get what you get with PHP. So here it is in all it's nastyness.
This is a pseudo-property, implementing a getter for story details as if as an associative array. Personally, I'd rather be able to assign getters and setters to actual properties to mask controlled access to private member variables. But, you get what you get with PHP. So here it is in all its nastiness.
Tags:
return:
The clean and ready to use (in edit mode) value requested.
Loads a story from the post data. This is the most exciting function in the whole entire world. First it'll clean up that horrible Magic Quotes crap. Then it'll do all Geeklog's funky security stuff, anti XSS, anti SQL Injection. Yay.
Load a Story object from the sid specified, returning a status result.
The result will either be a permission denied message, invalid SID message, or a loaded ok message. If it's loaded ok, then we've got all the exciting gubbins here.
Only used from story admin and submit.php!
Tags:
return:
from a constant.
Parameters:
$sid
$sid
string Story Identifier, valid geeklog story id from the db.