We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3ba165cf authored by Brion Vibber's avatar Brion Vibber

Merge branch 'master' into testing

parents 2f2fa100 f4539b52
...@@ -57,7 +57,7 @@ require_once INSTALLDIR . '/lib/apiauth.php'; ...@@ -57,7 +57,7 @@ require_once INSTALLDIR . '/lib/apiauth.php';
class ApiStatusesDestroyAction extends ApiAuthAction class ApiStatusesDestroyAction extends ApiAuthAction
{ {
var $status = null; var $status = null;
/** /**
* Take arguments for running * Take arguments for running
...@@ -120,18 +120,11 @@ class ApiStatusesDestroyAction extends ApiAuthAction ...@@ -120,18 +120,11 @@ class ApiStatusesDestroyAction extends ApiAuthAction
$replies->get('notice_id', $this->notice_id); $replies->get('notice_id', $this->notice_id);
$replies->delete(); $replies->delete();
$this->notice->delete(); $this->notice->delete();
$this->showNotice();
if ($this->format == 'xml') {
$this->showSingleXmlStatus($this->notice);
} elseif ($this->format == 'json') {
$this->show_single_json_status($this->notice);
}
} else { } else {
$this->clientError(_('You may not delete another user\'s status.'), $this->clientError(_('You may not delete another user\'s status.'),
403, $this->format); 403, $this->format);
} }
$this->showNotice();
} }
/** /**
......
...@@ -61,7 +61,7 @@ if (!function_exists('dpgettext')) { ...@@ -61,7 +61,7 @@ if (!function_exists('dpgettext')) {
* Not currently exposed in PHP's gettext module; implemented to be compat * Not currently exposed in PHP's gettext module; implemented to be compat
* with gettext.h's macros. * with gettext.h's macros.
* *
* @param string $domain domain identifier, or null for default domain * @param string $domain domain identifier
* @param string $context context identifier, should be some key like "menu|file" * @param string $context context identifier, should be some key like "menu|file"
* @param string $msgid English source text * @param string $msgid English source text
* @return string original or translated message * @return string original or translated message
...@@ -106,7 +106,7 @@ if (!function_exists('dnpgettext')) { ...@@ -106,7 +106,7 @@ if (!function_exists('dnpgettext')) {
* Not currently exposed in PHP's gettext module; implemented to be compat * Not currently exposed in PHP's gettext module; implemented to be compat
* with gettext.h's macros. * with gettext.h's macros.
* *
* @param string $domain domain identifier, or null for default domain * @param string $domain domain identifier
* @param string $context context identifier, should be some key like "menu|file" * @param string $context context identifier, should be some key like "menu|file"
* @param string $msg singular English source text * @param string $msg singular English source text
* @param string $plural plural English source text * @param string $plural plural English source text
...@@ -180,7 +180,11 @@ function _m($msg/*, ...*/) ...@@ -180,7 +180,11 @@ function _m($msg/*, ...*/)
} }
/** /**
* Looks for which plugin we've been called from to set the gettext domain. * Looks for which plugin we've been called from to set the gettext domain;
* if not in a plugin subdirectory, we'll use the default 'statusnet'.
*
* Note: we can't return null for default domain since most of the PHP gettext
* wrapper functions turn null into "" before passing to the backend library.
* *
* @param array $backtrace debug_backtrace() output * @param array $backtrace debug_backtrace() output
* @return string * @return string
...@@ -207,8 +211,8 @@ function _mdomain($backtrace) ...@@ -207,8 +211,8 @@ function _mdomain($backtrace)
} }
$plug = strpos($path, '/plugins/'); $plug = strpos($path, '/plugins/');
if ($plug === false) { if ($plug === false) {
// We're not in a plugin; return null for the default domain. // We're not in a plugin; return default domain.
return null; return 'statusnet';
} else { } else {
$cut = $plug + 9; $cut = $plug + 9;
$cut2 = strpos($path, '/', $cut); $cut2 = strpos($path, '/', $cut);
...@@ -217,7 +221,7 @@ function _mdomain($backtrace) ...@@ -217,7 +221,7 @@ function _mdomain($backtrace)
} else { } else {
// We might be running directly from the plugins dir? // We might be running directly from the plugins dir?
// If so, there's no place to store locale info. // If so, there's no place to store locale info.
return null; return 'statusnet';
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment