forked from GNUsocial/gnu-social
Some getActionName fiddling in Action class
This commit is contained in:
parent
e086ef3a84
commit
0e4b7148c1
@ -145,7 +145,9 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
|
|
||||||
$this->args = common_copy_args($args);
|
$this->args = common_copy_args($args);
|
||||||
|
|
||||||
$this->action = $this->trimmed('action');
|
// This could be set with get_called_action and then
|
||||||
|
// chop off 'Action' from the class name. In lower case.
|
||||||
|
$this->action = strtolower($this->trimmed('action'));
|
||||||
|
|
||||||
if ($this->ajax || $this->boolean('ajax')) {
|
if ($this->ajax || $this->boolean('ajax')) {
|
||||||
// check with StatusNet::isAjax()
|
// check with StatusNet::isAjax()
|
||||||
@ -536,9 +538,11 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
*/
|
*/
|
||||||
function showBody()
|
function showBody()
|
||||||
{
|
{
|
||||||
$this->elementStart('body', (common_current_user()) ? array('id' => strtolower($this->trimmed('action')),
|
$params = array('id' => $this->getActionName());
|
||||||
'class' => 'user_in')
|
if ($this->scoped instanceof Profile) {
|
||||||
: array('id' => strtolower($this->trimmed('action'))));
|
$params['class'] = 'user_in';
|
||||||
|
}
|
||||||
|
$this->elementStart('body', $params);
|
||||||
$this->elementStart('div', array('id' => 'wrap'));
|
$this->elementStart('div', array('id' => 'wrap'));
|
||||||
if (Event::handle('StartShowHeader', array($this))) {
|
if (Event::handle('StartShowHeader', array($this))) {
|
||||||
$this->showHeader();
|
$this->showHeader();
|
||||||
@ -1499,7 +1503,7 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
*/
|
*/
|
||||||
function returnToArgs()
|
function returnToArgs()
|
||||||
{
|
{
|
||||||
$action = $this->trimmed('action');
|
$action = $this->getActionName();
|
||||||
$args = $this->args;
|
$args = $this->args;
|
||||||
unset($args['action']);
|
unset($args['action']);
|
||||||
if (common_config('site', 'fancy')) {
|
if (common_config('site', 'fancy')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user