Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing

This commit is contained in:
Brion Vibber 2010-03-03 13:41:00 -08:00
commit 4bad176088
3 changed files with 6 additions and 44 deletions

View File

@ -300,8 +300,8 @@ class ShowgroupAction extends GroupDesignAction
$this->elementStart('div', 'entity_actions'); $this->elementStart('div', 'entity_actions');
$this->element('h2', null, _('Group actions')); $this->element('h2', null, _('Group actions'));
$this->elementStart('ul'); $this->elementStart('ul');
if (Event::handle('StartGroupSubscribe', array($this, $this->group))) {
$this->elementStart('li', 'entity_subscribe'); $this->elementStart('li', 'entity_subscribe');
if (Event::handle('StartGroupSubscribe', array($this, $this->group))) {
$cur = common_current_user(); $cur = common_current_user();
if ($cur) { if ($cur) {
if ($cur->isMember($this->group)) { if ($cur->isMember($this->group)) {
@ -312,10 +312,9 @@ class ShowgroupAction extends GroupDesignAction
$jf->show(); $jf->show();
} }
} }
$this->elementEnd('li');
Event::handle('EndGroupSubscribe', array($this, $this->group)); Event::handle('EndGroupSubscribe', array($this, $this->group));
} }
$this->elementEnd('li');
$this->elementEnd('ul'); $this->elementEnd('ul');
$this->elementEnd('div'); $this->elementEnd('div');
} }

View File

@ -216,17 +216,14 @@ class OStatusPlugin extends Plugin
if (empty($cur)) { if (empty($cur)) {
// Add an OStatus subscribe // Add an OStatus subscribe
$output->elementStart('li', 'entity_subscribe');
$url = common_local_url('ostatusinit', $url = common_local_url('ostatusinit',
array('nickname' => $group->nickname)); array('nickname' => $group->nickname));
$output->element('a', array('href' => $url, $output->element('a', array('href' => $url,
'class' => 'entity_remote_subscribe'), 'class' => 'entity_remote_subscribe'),
_m('Join')); _m('Join'));
$output->elementEnd('li');
} }
return false; return true;
} }
/** /**

View File

@ -228,43 +228,9 @@ class TwitterAdminPanelForm extends AdminForm
$globalConsumerKey = common_config('twitter', 'global_consumer_key'); $globalConsumerKey = common_config('twitter', 'global_consumer_key');
$globalConsumerSec = common_config('twitter', 'global_consumer_secret'); $globalConsumerSec = common_config('twitter', 'global_consumer_secret');
if (!empty($globalConsumerKey)) { if (!empty($globalConsumerKey) && !empty($globalConsumerSec)) {
$this->li(); $this->li();
$this->out->element( $this->out->element('p', 'form_guide', _('Note: a global consumer key and secret are set.'));
'label',
array('for' => 'global_consumer_key'),
''
);
$this->out->element(
'input',
array(
'name' => 'global_consumer_key',
'type' => 'text',
'id' => 'global_consumer_key',
'value' => $globalConsumerKey,
'disabled' => 'true'
)
);
$this->out->element('p', 'form_guide', _('Global consumer key'));
$this->unli();
$this->li();
$this->out->element(
'label',
array('for' => 'global_consumer_secret'),
''
);
$this->out->element(
'input',
array(
'name' => 'global_consumer_secret',
'type' => 'text',
'id' => 'global_consumer_secret',
'value' => $globalConsumerSec,
'disabled' => 'true'
)
);
$this->out->element('p', 'form_guide', _('Global consumer secret'));
$this->unli(); $this->unli();
} }