{
parent::prepare($argarray);
+ if ($this->boolean('ajax')) {
+ StatusNet::setApi(true);
+ }
+
$this->user = common_current_user();
if (empty($this->user)) {
*/
function newBookmark()
{
- if ($this->boolean('ajax')) {
- StatusNet::setApi(true);
- }
try {
if (empty($this->title)) {
// TRANS: Client exception thrown when trying to create a new bookmark without a title.
$options);
} catch (ClientException $ce) {
- $this->error = $ce->getMessage();
- $this->showPage();
- return;
+ if ($this->boolean('ajax')) {
+ throw $ce;
+ } else {
+ $this->error = $ce->getMessage();
+ $this->showPage();
+ return;
+ }
}
if ($this->boolean('ajax')) {