- Timestamp:
- 11/26/10 12:11:27 (18 months ago)
- Location:
- branches/1.5/libs
- Files:
-
- 3 modified
-
AdminPages.php (modified) (1 diff)
-
Announcements.php (modified) (1 diff)
-
Initialize.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/libs/AdminPages.php
r2197 r2239 371 371 DB_PREFIX . 'posts', 372 372 DB_PREFIX . 'postvotes', 373 DB_PREFIX . 'relates',374 373 DB_PREFIX . 'site', 375 374 DB_PREFIX . 'tags', -
branches/1.5/libs/Announcements.php
r2001 r2239 88 88 $announcements = array(); 89 89 90 if (SITEID == 1) { 91 // Check if install file has been deleted 92 $filename = INSTALL . 'install.php'; 93 if (file_exists($filename)) { 94 array_push($announcements, $h->lang['admin_announcement_delete_install']); 95 } 90 // Check if install file has been deleted 91 $filename = INSTALL . 'install.php'; 92 if (file_exists($filename)) { 93 array_push($announcements, $h->lang['admin_announcement_delete_install']); 94 } 96 95 97 // Check if install file has not been run 98 $sql = "SELECT miscdata_value FROM " . TABLE_MISCDATA . " WHERE miscdata_key = %s"; 99 $hotaru_version = $h->db->get_var($h->db->prepare($sql, 'hotaru_version')); 100 if (version_compare($h->version, $hotaru_version, '>')) { 101 array_push($announcements, $h->lang['admin_announcement_run_install']); 102 } 103 } 96 // Check if install file has not been run 97 $sql = "SELECT miscdata_value FROM " . TABLE_MISCDATA . " WHERE miscdata_key = %s"; 98 $hotaru_version = $h->db->get_var($h->db->prepare($sql, 'hotaru_version')); 99 if (version_compare($h->version, $hotaru_version, '>')) { 100 array_push($announcements, $h->lang['admin_announcement_run_install']); 101 } 104 102 105 103 // Site is currently undergoing maintenance -
branches/1.5/libs/Initialize.php
r2197 r2239 46 46 $this->setTableConstants(); 47 47 48 $this->MakeCacheFolders(); 48 49 $this->getFiles(); 49 50 $this->cage = $this->initInspektCage(); 50 51 $this->db = $this->initDatabase(); 51 52 52 $this->getCurrentSiteID();53 53 $this->errorReporting(); 54 54 … … 109 109 "TABLE_POSTVOTES" => "postvotes", 110 110 "TABLE_SETTINGS" => "settings", 111 "TABLE_SITE" => "site",112 111 "TABLE_TAGS" => "tags", 113 112 "TABLE_TEMPDATA" => "tempdata", … … 125 124 } 126 125 127 /**128 * Sets the current SiteID if multiple sites.129 */130 public function getCurrentSiteID()131 {132 $siteid = 1;133 $siteurl = BASEURL;134 135 if (!defined('SITEID')) {136 define('SITEID', $siteid);137 }138 if (!defined('SITEURL')) {139 define('SITEURL', $siteurl);140 }141 if (!defined('CACHE')) {142 143 define('CACHE', BASE.'cache/'.$siteid.'/');144 145 // first array item is needed to create the SITEID base folder146 $dirs = array('', 'debug_logs/', 'db_cache/', 'css_js_cache/', 'html_cache/', 'rss_cache/', 'lang_cache/');147 148 foreach ($dirs as $dir) {149 if (!is_dir(CACHE.$dir)) {150 mkdir(CACHE.$dir);151 }152 }153 }154 155 return FALSE;156 }157 126 158 127 /** … … 248 217 } 249 218 219 220 /** 221 * Make cache folders if they don't already exist 222 */ 223 public function MakeCacheFolders() 224 { 225 // create a debug_logs folder if one doesn't exist. 226 if (!is_dir(CACHE . 'debug_logs')) { mkdir(CACHE . 'debug_logs'); } 227 228 // create a db_cache folder if one doesn't exist. 229 if (!is_dir(CACHE . 'db_cache')) { mkdir(CACHE . 'db_cache'); } 230 231 // create a css_js_cache folder if one doesn't exist. 232 if (!is_dir(CACHE . 'css_js_cache')) { mkdir(CACHE . 'css_js_cache'); } 233 234 // create a lang_cache folder if one doesn't exist. 235 if (!is_dir(CACHE . 'lang_cache')) { mkdir(CACHE . 'lang_cache'); } 236 237 // create an rss_cache folder if one doesn't exist. 238 if (!is_dir(CACHE . 'rss_cache')) { mkdir(CACHE . 'rss_cache'); } 239 240 // create an html_cache folder if one doesn't exist. 241 if (!is_dir(CACHE . 'html_cache')) { mkdir(CACHE . 'html_cache'); } 242 } 243 244 250 245 /** 251 246 * Set up database cache