Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
This commit is contained in:
commit
dccc995446
@ -944,6 +944,8 @@ class Notice extends Memcached_DataObject
|
|||||||
$reply->profile_id = $user->id;
|
$reply->profile_id = $user->id;
|
||||||
|
|
||||||
$id = $reply->insert();
|
$id = $reply->insert();
|
||||||
|
|
||||||
|
self::blow('reply:stream:%d', $user->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
22
lib/util.php
22
lib/util.php
@ -856,7 +856,7 @@ function common_relative_profile($sender, $nickname, $dt=null)
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function common_local_url($action, $args=null, $params=null, $fragment=null)
|
function common_local_url($action, $args=null, $params=null, $fragment=null, $addSession=true)
|
||||||
{
|
{
|
||||||
$r = Router::get();
|
$r = Router::get();
|
||||||
$path = $r->build($action, $args, $params, $fragment);
|
$path = $r->build($action, $args, $params, $fragment);
|
||||||
@ -864,12 +864,12 @@ function common_local_url($action, $args=null, $params=null, $fragment=null)
|
|||||||
$ssl = common_is_sensitive($action);
|
$ssl = common_is_sensitive($action);
|
||||||
|
|
||||||
if (common_config('site','fancy')) {
|
if (common_config('site','fancy')) {
|
||||||
$url = common_path(mb_substr($path, 1), $ssl);
|
$url = common_path(mb_substr($path, 1), $ssl, $addSession);
|
||||||
} else {
|
} else {
|
||||||
if (mb_strpos($path, '/index.php') === 0) {
|
if (mb_strpos($path, '/index.php') === 0) {
|
||||||
$url = common_path(mb_substr($path, 1), $ssl);
|
$url = common_path(mb_substr($path, 1), $ssl, $addSession);
|
||||||
} else {
|
} else {
|
||||||
$url = common_path('index.php'.$path, $ssl);
|
$url = common_path('index.php'.$path, $ssl, $addSession);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $url;
|
return $url;
|
||||||
@ -888,7 +888,7 @@ function common_is_sensitive($action)
|
|||||||
return $ssl;
|
return $ssl;
|
||||||
}
|
}
|
||||||
|
|
||||||
function common_path($relative, $ssl=false)
|
function common_path($relative, $ssl=false, $addSession=true)
|
||||||
{
|
{
|
||||||
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
|
$pathpart = (common_config('site', 'path')) ? common_config('site', 'path')."/" : '';
|
||||||
|
|
||||||
@ -912,7 +912,9 @@ function common_path($relative, $ssl=false)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$relative = common_inject_session($relative, $serverpart);
|
if ($addSession) {
|
||||||
|
$relative = common_inject_session($relative, $serverpart);
|
||||||
|
}
|
||||||
|
|
||||||
return $proto.'://'.$serverpart.'/'.$pathpart.$relative;
|
return $proto.'://'.$serverpart.'/'.$pathpart.$relative;
|
||||||
}
|
}
|
||||||
@ -1134,14 +1136,15 @@ function common_broadcast_profile(Profile $profile)
|
|||||||
|
|
||||||
function common_profile_url($nickname)
|
function common_profile_url($nickname)
|
||||||
{
|
{
|
||||||
return common_local_url('showstream', array('nickname' => $nickname));
|
return common_local_url('showstream', array('nickname' => $nickname),
|
||||||
|
null, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should make up a reasonable root URL
|
// Should make up a reasonable root URL
|
||||||
|
|
||||||
function common_root_url($ssl=false)
|
function common_root_url($ssl=false)
|
||||||
{
|
{
|
||||||
$url = common_path('', $ssl);
|
$url = common_path('', $ssl, false);
|
||||||
$i = strpos($url, '?');
|
$i = strpos($url, '?');
|
||||||
if ($i !== false) {
|
if ($i !== false) {
|
||||||
$url = substr($url, 0, $i);
|
$url = substr($url, 0, $i);
|
||||||
@ -1426,7 +1429,8 @@ function common_remove_magic_from_request()
|
|||||||
|
|
||||||
function common_user_uri(&$user)
|
function common_user_uri(&$user)
|
||||||
{
|
{
|
||||||
return common_local_url('userbyid', array('id' => $user->id));
|
return common_local_url('userbyid', array('id' => $user->id),
|
||||||
|
null, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function common_notice_uri(&$notice)
|
function common_notice_uri(&$notice)
|
||||||
|
@ -99,7 +99,7 @@ class HubSub extends Memcached_DataObject
|
|||||||
return array_keys($this->keyTypes());
|
return array_keys($this->keyTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
function sequenceKeys()
|
function sequenceKey()
|
||||||
{
|
{
|
||||||
return array(false, false, false);
|
return array(false, false, false);
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,10 @@ class Magicsig extends Memcached_DataObject
|
|||||||
return array('user_id' => 'K');
|
return array('user_id' => 'K');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sequenceKey() {
|
||||||
|
return array(false, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
function insert()
|
function insert()
|
||||||
{
|
{
|
||||||
$this->keypair = $this->toString();
|
$this->keypair = $this->toString();
|
||||||
|
@ -54,8 +54,9 @@ class SalmonAction extends Action
|
|||||||
common_log(LOG_DEBUG, "Salmon signature verification failed.");
|
common_log(LOG_DEBUG, "Salmon signature verification failed.");
|
||||||
$this->clientError(_m('Salmon signature verification failed.'));
|
$this->clientError(_m('Salmon signature verification failed.'));
|
||||||
} else {
|
} else {
|
||||||
$env = MagicEnvelope::parse($xml);
|
$magic_env = new MagicEnvelope();
|
||||||
$xml = MagicEnvelope::unfold($env);
|
$env = $magic_env->parse($xml);
|
||||||
|
$xml = $magic_env->unfold($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user