Update of /var/cvs/Geeklog-2.x/Geeklog-2.x
In directory iowaoutdoors:/tmp/cvs-serv23707
Modified Files:
config.php
Log Message:
added a constant for the APC index used to allow multiple GL
installs on the same server to coexist peacefully. Added
getWD() function to optimize code against APC (and other
opcode caches)
Index: config.php
============================================================
=======
RCS file: /var/cvs/Geeklog-2.x/Geeklog-2.x/config.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** config.php 12 Jul 2006 03:39:29 -0000 1.9
--- config.php 16 Nov 2006 16:23:28 -0000 1.10
***************
*** 37,42 ****
$glForceLoad = false;
// Attempt to get the configuration from memory.
! if (!$glConf = apc_fetch('GL2_CONFIG') OR $glForceLoad) {
// Configuration isn't in memory, load it
--- 37,44 ----
$glForceLoad = false;
+ define('GL2_CONFIG','GL2_CONFIG');
+
// Attempt to get the configuration from memory.
! if (!$glConf = apc_fetch(GL2_CONFIG) OR $glForceLoad) {
// Configuration isn't in memory, load it
***************
*** 46,53 ****
// Path to the Geeklog 2 directory.
! $glConf['path'] = '/path/to/geeklog' .
DIRECTORY_SEPARATOR;
// The base URL for this Geeklog site. Do *not*
include the trailing '/'
! $glConf['site_url'] = 'http://www.example.com';
// This is the return address for all email sent by
Geeklog:
--- 48,55 ----
// Path to the Geeklog 2 directory.
! $glConf['path'] = '/path/to/Geeklog-2.x' .
DIRECTORY_SEPARATOR;
// The base URL for this Geeklog site. Do *not*
include the trailing '/'
! $glConf['site_url'] = 'http://example.com';
// This is the return address for all email sent by
Geeklog:
***************
*** 83,87 ****
// You shouldn't have to touch anything below here
unless you are a developer or an expert user
// with advanced needs.
- $glConf['path_PEAR'] = 'C:/PHP/PEAR';
$glConf['path_profile_pictures'] = $glConf['path'] .
'/images/ProfilePicture/';
$glConf['path_system'] = $glConf['path'] . 'system' .
DIRECTORY_SEPARATOR;
--- 85,88 ----
***************
*** 134,138 ****
// override this in your AJAX enabled command
$glConf['cache'] = array(
! 'cacheDir'=>'C:/temp/',
'lifeTime'=>600
);
--- 135,139 ----
// override this in your AJAX enabled command
$glConf['cache'] = array(
! 'cacheDir'=>'/tmp',
'lifeTime'=>600
);
***************
*** 150,154 ****
'timeFormat'=>'%b %d %H:%M:%S'));
// Now stored the configuration into memory.
! apc_store('GL2_CONFIG', $glConf);
}
--- 151,155 ----
'timeFormat'=>'%b %d %H:%M:%S'));
// Now stored the configuration into memory.
! apc_store(GL2_CONFIG, $glConf);
}
***************
*** 156,160 ****
// ease support issues.
set_include_path('.' . PATH_SEPARATOR . $glConf['path'] .
PATH_SEPARATOR . $glConf['path_system']
! . PATH_SEPARATOR . $glConf['path_libraries'] .
PATH_SEPARATOR . $glConf['path_PEAR'] . PATH_SEPARATOR);
// ACL constant definitions. If you touch these you will
break your installation. NOTE, these
--- 157,161 ----
// ease support issues.
set_include_path('.' . PATH_SEPARATOR . $glConf['path'] .
PATH_SEPARATOR . $glConf['path_system']
! . PATH_SEPARATOR . $glConf['path_libraries'] .
PATH_SEPARATOR);
// ACL constant definitions. If you touch these you will
break your installation. NOTE, these
***************
*** 178,180 ****
--- 179,188 ----
define('STATE_DELETED', 2);
define('STATE_QUEUED', 3);
+
+ // Helper function used to help APC optimize this
application. DO NOT touch this
+ function getWD($configDir) {
+ global $glConf;
+
+ return $glConf[$configDir];
+ }
?>
No newline at end of file
_______________________________________________
geeklog2-cvs mailing list
geeklog2-cvs lists.geeklog.net
http://lists.geeklog.net/mailman/listinfo/geeklog2-cvs
|