Changeset 77
- Timestamp:
- 28/05/05 17:55:46 (4 years ago)
- Files:
-
- admin.lib.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
admin.lib.php
r76 r77 16 16 //Our Blogs Class 17 17 class admin { 18 var $id; //Blog ID19 var $userName; //Blogger's User Name18 var $id; //Blog ID 19 var $userName; //Blogger's User Name 20 20 var $realName; //Blogger's Real Name 21 var $sessionError; //login or session errors22 var $shortDateFormat; //Short date format23 var $longDateFormat; //Long date format21 var $sessionError; //login or session errors 22 var $shortDateFormat; //Short date format 23 var $longDateFormat; //Long date format 24 24 var $httpPath; //http Path for files 25 25 var $adminPath; //path to admin 26 var $blog; 26 var $blog; //[temporary] holder for instance of blog class 27 27 28 //Constructor ,checks we've been given a valid username, and pulls in generic blog info28 //Constructor - checks we've been given a valid username, and pulls in generic blog info 29 29 function admin() 30 30 { … … 130 130 } 131 131 132 //d istroys the session and presents you with a login screen132 //destroys the session and presents you with a login screen 133 133 function logout () 134 134 { … … 199 199 $sqlRow = db_getrow($sql); 200 200 (int)$newNum = array_shift(array_reverse(explode('_',$sqlRow['shortsubject']))); 201 $shortsubject .= '_'.++$newNum; //new non-col ideing short subject201 $shortsubject .= '_'.++$newNum; //new non-colliding short subject 202 202 } 203 203 //shortsubject is now safe.. … … 212 212 } 213 213 } 214 //re display entry form if there are errors214 //re-display entry form if there are errors 215 215 else { 216 216 $this->printEntryForm(); … … 234 234 } 235 235 236 //sanitise subject (make sure it s not a number!)236 //sanitise subject (make sure it's not a number!) 237 237 if (isset($_POST['subject']) && trim($_POST['subject']) != "" && (int)$_POST['subject'] != 0) { 238 238 $subject = $_POST['subject']; … … 259 259 260 260 } else { 261 error(2,_("Cannot update entry - It never existed!".db_error()));261 error(2,_("Cannot update entry - it never existed!".db_error())); 262 262 } 263 263 } else { … … 373 373 } 374 374 375 //sanitise enabled -- not really sure about this. i think creation and enabli g should be375 //sanitise enabled -- not really sure about this. i think creation and enabling should be 376 376 // done seperately... ??? 377 377 /*if (isset($_POST['enabled'])) { // if its not set its defaulted...
