summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-06-15 21:24:22 -0700
committerZach Copley <zach@controlyourself.ca>2009-06-15 21:24:22 -0700
commit44343986c31b20158ef07438f85a6bf35b93a3ab (patch)
treedb0df1a417ffbce747d59ae9bdc8647bdbd9ea31 /lib
parente7e3709ae0294b8400b85d87f2ebeade5b31858d (diff)
parent8c24a3bc92484d19ed4ba489d2d7b1172f4b355d (diff)
Merge branch '0.8.x' into userdesign
* 0.8.x: a little better query handling in redirect code a little better query handling in redirect code forgot some functions aren't available at status time redirect on non-canonical server name don't show create-a-group link if not logged in allow a configured base for cache keys Missing call to getProfile() caused verify_credentials to fail. change mods for setup script Script to set up new status networks strncmp -> strcasecmp Return network from network setup function Configurable avatar directory
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php5
-rw-r--r--lib/util.php8
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/common.php b/lib/common.php
index eb3bf4e4d..1381d8047 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -116,7 +116,9 @@ $config =
'profile' =>
array('banned' => array()),
'avatar' =>
- array('server' => null),
+ array('server' => null,
+ 'dir' => INSTALLDIR . '/avatar/',
+ 'path' => $_path . '/avatar/'),
'public' =>
array('localonly' => true,
'blacklist' => array(),
@@ -158,6 +160,7 @@ $config =
'memcached' =>
array('enabled' => false,
'server' => 'localhost',
+ 'base' => null,
'port' => 11211),
'ping' =>
array('notify' => array()),
diff --git a/lib/util.php b/lib/util.php
index 49c6ae108..1d5708bd6 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1322,7 +1322,13 @@ function common_session_token()
function common_cache_key($extra)
{
- return 'laconica:' . common_keyize(common_config('site', 'name')) . ':' . $extra;
+ $base_key = common_config('memcached', 'base');
+
+ if (empty($base_key)) {
+ $base_key = common_keyize(common_config('site', 'name'));
+ }
+
+ return 'laconica:' . $base_key . ':' . $extra;
}
function common_keyize($str)