forked from GNUsocial/gnu-social
Making us less dependant on javascript trust
Many of the microapps are pretty javascript dependant, but at least we should allow users to get to the new notice field without allowing javascript to run in the browser. :)
This commit is contained in:
@@ -162,6 +162,14 @@ abstract class MicroAppPlugin extends Plugin
|
||||
*/
|
||||
abstract function deleteRelated($notice);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function newFormAction() {
|
||||
// such as 'newbookmark' or 'newevent' route
|
||||
return 'new'.$this->tag();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given notice object should be handled by this micro-app
|
||||
* plugin.
|
||||
@@ -536,7 +544,9 @@ abstract class MicroAppPlugin extends Plugin
|
||||
|
||||
function onStartShowEntryForms(&$tabs)
|
||||
{
|
||||
$tabs[$this->tag()] = $this->appTitle();
|
||||
$tabs[$this->tag()] = array('title' => $this->appTitle(),
|
||||
'href' => common_local_url($this->newFormAction()),
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user