Changeset 7023
- Timestamp:
- 11/20/08 18:16:50 (7 weeks ago)
- Location:
- trunk
- Files:
-
- 9 modified
-
dispatcher.php (modified) (3 diffs)
-
library/context.php (modified) (1 diff)
-
library/data/Setting.php (modified) (1 diff)
-
library/environment/Needlworks.PHP.Core.php (modified) (1 diff)
-
library/include.php (modified) (1 diff)
-
library/initialize.php (modified) (2 diffs)
-
library/model/blog.service.php (modified) (1 diff)
-
library/model/common.plugin.php (modified) (1 diff)
-
library/settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dispatcher.php
r7022 r7023 16 16 exit; 17 17 } 18 /// Initialize PHP environment. 19 include(ROOT.'/library/environment/Needlworks.PHP.UnifiedEnvironment.php'); 18 20 19 21 /// Initialize class loader. … … 60 62 ); 61 63 Validator::validateArray($_SERVER, $basicIV); 62 if(isset($accessInfo)) { 63 $basicIV = array( 64 'fullpath' => array('string'), 65 'input' => array('string'), 66 'position' => array('string'), 67 'root' => array('string'), 68 'input' => array('string', 'mandatory' => false) 69 ); 70 $accessInfo['fullpath'] = urldecode($accessInfo['fullpath']); 71 Validator::validateArray($accessInfo, $basicIV); 64 65 /* Database Initialization (if necessary) */ 66 if(POD::bind($config->database) === false) { 67 Respond::MessagePage('Problem with connecting database.<br /><br />Please re-visit later.'); 68 exit; 72 69 } 73 74 /* TODO: Database Initialization (if necessary)75 76 70 77 71 /* TODO: Parse virtual blog information (if necessary)*/ … … 80 74 $context->globalVariableParser(); 81 75 76 /* TODO: Include required files */ 77 82 78 /* TODO: Session management. (if necessary) */ 79 if (!defined('NO_SESSION')) { 80 session_name(Session::getName()); 81 Session::set(); 82 session_set_save_handler( array('Session','open'), array('Session','close'), array('Session','read'), array('Session','write'), array('Session','destroy'), array('Session','gc') ); 83 session_cache_expire(1); 84 session_set_cookie_params(0, '/', $service['domain']); 85 if (session_start() !== true) { 86 header('HTTP/1.1 503 Service Unavailable'); 87 } 88 } 89 83 90 /* TODO: ACL validation */ 84 91 -
trunk/library/context.php
r7022 r7023 126 126 127 127 // TODO: Parse $_GET, $_POST, and etc./ 128 129 /// Validate URI information. 130 if(isset($accessInfo)) { 131 $basicIV = array( 132 'fullpath' => array('string'), 133 'input' => array('string'), 134 'position' => array('string'), 135 'root' => array('string'), 136 'input' => array('string', 'mandatory' => false) 137 ); 138 $accessInfo['fullpath'] = urldecode($accessInfo['fullpath']); 139 Validator::validateArray($accessInfo, $basicIV); 140 } 128 141 $this->accessInfo = $accessInfo; 129 142 } -
trunk/library/data/Setting.php
r7022 r7023 5 5 6 6 global $__gCacheBlogSettings; // share blog.service.php 7 $__gCacheBlogSettings = array(); 8 7 9 class Setting { 8 10 function fetchConfigVal( $DATA ){ -
trunk/library/environment/Needlworks.PHP.Core.php
r6987 r7023 158 158 159 159 static function lessenAsEncoding($str, $length = 255, $tail = '...') { 160 global $database;161 if(! isset($database['utf8']) || empty($database['utf8']) || $database['utf8'] == true)160 $charset = POD::charset(); 161 if(!empty($charset) && $charset == 'utf8') 162 162 return UTF8::lessen($str, $length, $tail); 163 163 else -
trunk/library/include.php
r7014 r7023 42 42 /***** Pre-define basic components *****/ 43 43 $__coreLibrary = array( 44 'environment/Needlworks.PHP.UnifiedEnvironment',45 //'environment/Needlworks.PHP.Core',46 44 'environment/Locale', 47 45 'data/Core', -
trunk/library/initialize.php
r7020 r7023 4 4 /// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 5 5 6 /** 7 Database I/O initialization. 8 -------------------------------- 9 **/ 10 if(!empty($database) && !empty($database["database"])) { 11 if(POD::bind($database) === false) { 12 Respond::MessagePage('Problem with connecting database.<br /><br />Please re-visit later.'); 13 exit; 14 } 15 } 16 $database['utf8'] = (POD::charset() == 'utf8') ? true : false; 6 17 7 /** 18 8 Memcache module bind (if possible) … … 24 14 $memcache->connect((isset($memcached['server']) && $memcached['server'] ? $memcached['server'] : 'localhost')); 25 15 endif; 26 27 /**28 Path-dependent environment setting29 ----------------------------------30 **/31 //require ROOT.'/library/suri.php';32 33 /* Session initializing */34 if (!defined('NO_SESSION')) {35 session_name(Session::getName());36 Session::set();37 session_set_save_handler( array('Session','open'), array('Session','close'), array('Session','read'), array('Session','write'), array('Session','destroy'), array('Session','gc') );38 session_cache_expire(1);39 session_set_cookie_params(0, '/', $service['domain']);40 if (session_start() !== true) {41 header('HTTP/1.1 503 Service Unavailable');42 }43 }44 16 45 17 /* Get User information */ -
trunk/library/model/blog.service.php
r7022 r7023 3 3 /// All rights reserved. Licensed under the GPL. 4 4 /// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 5 6 // for Global Cache7 $__gCacheBlogSettings = array();8 5 9 6 function getBlogSettings($blogid) { -
trunk/library/model/common.plugin.php
r7020 r7023 423 423 if (($previewMode == false) && !is_null($sidebarAllOrders)) { 424 424 setBlogSetting("sidebarOrder", serialize($sidebarAllOrders)); 425 Skin::purgeCache();425 BlogSkin::purgeCache(); 426 426 } 427 427 } -
trunk/library/settings.php
r7022 r7023 81 81 return $val; 82 82 } 83 84 public function set($category, $name, $value) { 85 $this->$category[$name] = $value; 86 } 83 87 } 84 88
