return $this->scoped;
}
+ public function getActionName()
+ {
+ return $this->action;
+ }
+
/**
* Show page, a template method.
*
function showNoticeForm()
{
// TRANS: Tab on the notice form.
- $tabs = array('status' => _m('TAB','Status'));
+ $tabs = array('status' => array('title' => _m('TAB','Status'),
+ 'href' => common_local_url('newnotice')));
$this->elementStart('div', 'input_forms');
$this->elementStart('ul', array('class' => 'nav',
'id' => 'input_form_nav'));
- foreach ($tabs as $tag => $title) {
+ foreach ($tabs as $tag => $data) {
+ $tag = htmlspecialchars($tag);
$attrs = array('id' => 'input_form_nav_'.$tag,
'class' => 'input_form_nav_tab');
$this->elementStart('li', $attrs);
$this->element('a',
- array('href' => 'javascript:SN.U.switchInputFormTab("'.$tag.'")'),
- $title);
+ array('onclick' => 'return SN.U.switchInputFormTab("'.$tag.'");',
+ 'href' => $data['href']),
+ $data['title']);
$this->elementEnd('li');
}
$form->show();
$this->elementEnd('div');
- foreach ($tabs as $tag => $title) {
+ foreach ($tabs as $tag => $data) {
$attrs = array('class' => 'input_form',
'id' => 'input_form_'.$tag);
*/
function int($key, $defValue=null, $maxValue=null, $minValue=null)
{
- $arg = strtolower($this->trimmed($key));
+ $arg = intval($this->arg($key));
- if (is_null($arg) || !is_integer($arg)) {
+ if (!is_numeric($this->arg($key)) || $arg != $this->arg($key)) {
return $defValue;
}