* Superfluous whitespace removed

* Small L10n updates
This commit is contained in:
Siebrand Mazeland 2011-03-11 18:31:22 +01:00
parent e2defc1f7c
commit 76bffe1a64
9 changed files with 2 additions and 60 deletions

View File

@ -64,7 +64,6 @@ class Poll extends Managed_DataObject
* @return User_greeting_count object found, or null for no hits * @return User_greeting_count object found, or null for no hits
* *
*/ */
function staticGet($k, $v=null) function staticGet($k, $v=null)
{ {
return Memcached_DataObject::staticGet('Poll', $k, $v); return Memcached_DataObject::staticGet('Poll', $k, $v);
@ -82,7 +81,6 @@ class Poll extends Managed_DataObject
* @return Bookmark object found, or null for no hits * @return Bookmark object found, or null for no hits
* *
*/ */
function pkeyGet($kv) function pkeyGet($kv)
{ {
return Memcached_DataObject::pkeyGet('Poll', $kv); return Memcached_DataObject::pkeyGet('Poll', $kv);
@ -117,7 +115,6 @@ class Poll extends Managed_DataObject
* *
* @return Poll found poll or null * @return Poll found poll or null
*/ */
function getByNotice($notice) function getByNotice($notice)
{ {
return self::staticGet('uri', $notice->uri); return self::staticGet('uri', $notice->uri);
@ -209,7 +206,6 @@ class Poll extends Managed_DataObject
* *
* @return Notice saved notice * @return Notice saved notice
*/ */
static function saveNew($profile, $question, $opts, $options=null) static function saveNew($profile, $question, $opts, $options=null)
{ {
if (empty($options)) { if (empty($options)) {

View File

@ -43,7 +43,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class PollPlugin extends MicroAppPlugin class PollPlugin extends MicroAppPlugin
{ {
const VERSION = '0.1'; const VERSION = '0.1';
@ -60,7 +59,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onCheckSchema() function onCheckSchema()
{ {
$schema = Schema::get(); $schema = Schema::get();
@ -76,7 +74,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function onEndShowStyles($action) function onEndShowStyles($action)
{ {
$action->cssLink($this->path('poll.css')); $action->cssLink($this->path('poll.css'));
@ -90,7 +87,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onAutoload($cls) function onAutoload($cls)
{ {
$dir = dirname(__FILE__); $dir = dirname(__FILE__);
@ -123,7 +119,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return boolean hook value; true means continue processing, false means stop. * @return boolean hook value; true means continue processing, false means stop.
*/ */
function onRouterInitialized($m) function onRouterInitialized($m)
{ {
$m->connect('main/poll/new', $m->connect('main/poll/new',
@ -151,7 +146,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return value * @return value
*/ */
function onPluginVersion(&$versions) function onPluginVersion(&$versions)
{ {
$versions[] = array('name' => 'Poll', $versions[] = array('name' => 'Poll',
@ -175,7 +169,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return boolean hook value * @return boolean hook value
*/ */
function deleteRelated($notice) function deleteRelated($notice)
{ {
$p = Poll::getByNotice($notice); $p = Poll::getByNotice($notice);
@ -196,7 +189,6 @@ class PollPlugin extends MicroAppPlugin
* *
* @return Notice resulting notice * @return Notice resulting notice
*/ */
function saveNoticeFromActivity($activity, $profile, $options=array()) function saveNoticeFromActivity($activity, $profile, $options=array())
{ {
// @fixme // @fixme

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
* *
* @see DB_DataObject * @see DB_DataObject
*/ */
class Poll_response extends Managed_DataObject class Poll_response extends Managed_DataObject
{ {
public $__table = 'poll_response'; // table name public $__table = 'poll_response'; // table name
@ -63,7 +62,6 @@ class Poll_response extends Managed_DataObject
* @return User_greeting_count object found, or null for no hits * @return User_greeting_count object found, or null for no hits
* *
*/ */
function staticGet($k, $v=null) function staticGet($k, $v=null)
{ {
return Memcached_DataObject::staticGet('Poll_response', $k, $v); return Memcached_DataObject::staticGet('Poll_response', $k, $v);
@ -81,7 +79,6 @@ class Poll_response extends Managed_DataObject
* @return Bookmark object found, or null for no hits * @return Bookmark object found, or null for no hits
* *
*/ */
function pkeyGet($kv) function pkeyGet($kv)
{ {
return Memcached_DataObject::pkeyGet('Poll_response', $kv); return Memcached_DataObject::pkeyGet('Poll_response', $kv);
@ -120,7 +117,6 @@ class Poll_response extends Managed_DataObject
* *
* @return Poll_response found response or null * @return Poll_response found response or null
*/ */
function getByNotice($notice) function getByNotice($notice)
{ {
return self::staticGet('uri', $notice->uri); return self::staticGet('uri', $notice->uri);
@ -159,7 +155,6 @@ class Poll_response extends Managed_DataObject
* *
* @return Notice saved notice * @return Notice saved notice
*/ */
static function saveNew($profile, $poll, $selection, $options=null) static function saveNew($profile, $poll, $selection, $options=null)
{ {
if (empty($options)) { if (empty($options)) {

View File

@ -43,7 +43,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class NewPollAction extends Action class NewPollAction extends Action
{ {
protected $user = null; protected $user = null;
@ -58,7 +57,6 @@ class NewPollAction extends Action
* *
* @return string Action title * @return string Action title
*/ */
function title() function title()
{ {
return _('New poll'); return _('New poll');
@ -71,7 +69,6 @@ class NewPollAction extends Action
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -79,7 +76,7 @@ class NewPollAction extends Action
$this->user = common_current_user(); $this->user = common_current_user();
if (empty($this->user)) { if (empty($this->user)) {
throw new ClientException(_("Must be logged in to post a poll."), throw new ClientException(_("You must be logged in to post a poll."),
403); 403);
} }
@ -105,7 +102,6 @@ class NewPollAction extends Action
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -124,7 +120,6 @@ class NewPollAction extends Action
* *
* @return void * @return void
*/ */
function newPoll() function newPoll()
{ {
if ($this->boolean('ajax')) { if ($this->boolean('ajax')) {
@ -143,7 +138,6 @@ class NewPollAction extends Action
$saved = Poll::saveNew($this->user->getProfile(), $saved = Poll::saveNew($this->user->getProfile(),
$this->question, $this->question,
$this->options); $this->options);
} catch (ClientException $ce) { } catch (ClientException $ce) {
$this->error = $ce->getMessage(); $this->error = $ce->getMessage();
$this->showPage(); $this->showPage();
@ -188,7 +182,6 @@ class NewPollAction extends Action
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if (!empty($this->error)) { if (!empty($this->error)) {
@ -213,7 +206,6 @@ class NewPollAction extends Action
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

@ -44,10 +44,8 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class NewpollForm extends Form class NewpollForm extends Form
{ {
protected $question = null; protected $question = null;
protected $options = array(); protected $options = array();
@ -58,7 +56,6 @@ class NewpollForm extends Form
* *
* @return void * @return void
*/ */
function __construct($out=null, $question=null, $options=null) function __construct($out=null, $question=null, $options=null)
{ {
parent::__construct($out); parent::__construct($out);
@ -69,7 +66,6 @@ class NewpollForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'newpoll-form'; return 'newpoll-form';
@ -80,7 +76,6 @@ class NewpollForm extends Form
* *
* @return string class of the form * @return string class of the form
*/ */
function formClass() function formClass()
{ {
return 'form_settings ajax-notice'; return 'form_settings ajax-notice';
@ -91,7 +86,6 @@ class NewpollForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('newpoll'); return common_local_url('newpoll');
@ -102,7 +96,6 @@ class NewpollForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$this->out->elementStart('fieldset', array('id' => 'newpoll-data')); $this->out->elementStart('fieldset', array('id' => 'newpoll-data'));
@ -142,7 +135,6 @@ class NewpollForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', _m('BUTTON', 'Save')); $this->out->submit('submit', _m('BUTTON', 'Save'));

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class PollResponseForm extends Form class PollResponseForm extends Form
{ {
protected $poll; protected $poll;
@ -57,7 +56,6 @@ class PollResponseForm extends Form
* *
* @return void * @return void
*/ */
function __construct(Poll $poll, HTMLOutputter $out) function __construct(Poll $poll, HTMLOutputter $out)
{ {
parent::__construct($out); parent::__construct($out);
@ -69,7 +67,6 @@ class PollResponseForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'pollresponse-form'; return 'pollresponse-form';
@ -80,7 +77,6 @@ class PollResponseForm extends Form
* *
* @return string class of the form * @return string class of the form
*/ */
function formClass() function formClass()
{ {
return 'form_settings ajax'; return 'form_settings ajax';
@ -91,7 +87,6 @@ class PollResponseForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('respondpoll', array('id' => $this->poll->id)); return common_local_url('respondpoll', array('id' => $this->poll->id));
@ -102,7 +97,6 @@ class PollResponseForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$poll = $this->poll; $poll = $this->poll;
@ -127,7 +121,6 @@ class PollResponseForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
$this->out->submit('submit', _m('BUTTON', 'Submit')); $this->out->submit('submit', _m('BUTTON', 'Submit'));

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class PollResultForm extends Form class PollResultForm extends Form
{ {
protected $poll; protected $poll;
@ -57,7 +56,6 @@ class PollResultForm extends Form
* *
* @return void * @return void
*/ */
function __construct(Poll $poll, HTMLOutputter $out) function __construct(Poll $poll, HTMLOutputter $out)
{ {
parent::__construct($out); parent::__construct($out);
@ -69,7 +67,6 @@ class PollResultForm extends Form
* *
* @return int ID of the form * @return int ID of the form
*/ */
function id() function id()
{ {
return 'pollresult-form'; return 'pollresult-form';
@ -80,7 +77,6 @@ class PollResultForm extends Form
* *
* @return string class of the form * @return string class of the form
*/ */
function formClass() function formClass()
{ {
return 'form_settings ajax'; return 'form_settings ajax';
@ -91,7 +87,6 @@ class PollResultForm extends Form
* *
* @return string URL of the action * @return string URL of the action
*/ */
function action() function action()
{ {
return common_local_url('respondpoll', array('id' => $this->poll->id)); return common_local_url('respondpoll', array('id' => $this->poll->id));
@ -102,7 +97,6 @@ class PollResultForm extends Form
* *
* @return void * @return void
*/ */
function formData() function formData()
{ {
$poll = $this->poll; $poll = $this->poll;
@ -143,7 +137,6 @@ class PollResultForm extends Form
* *
* @return void * @return void
*/ */
function formActions() function formActions()
{ {
} }

View File

@ -43,7 +43,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class RespondPollAction extends Action class RespondPollAction extends Action
{ {
protected $user = null; protected $user = null;
@ -58,7 +57,6 @@ class RespondPollAction extends Action
* *
* @return string Action title * @return string Action title
*/ */
function title() function title()
{ {
return _m('Poll response'); return _m('Poll response');
@ -71,7 +69,6 @@ class RespondPollAction extends Action
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
parent::prepare($argarray); parent::prepare($argarray);
@ -82,7 +79,7 @@ class RespondPollAction extends Action
$this->user = common_current_user(); $this->user = common_current_user();
if (empty($this->user)) { if (empty($this->user)) {
throw new ClientException(_m("Must be logged in to respond to a poll."), throw new ClientException(_m("You must be logged in to respond to a poll."),
403); 403);
} }
@ -112,7 +109,6 @@ class RespondPollAction extends Action
* *
* @return void * @return void
*/ */
function handle($argarray=null) function handle($argarray=null)
{ {
parent::handle($argarray); parent::handle($argarray);
@ -131,7 +127,6 @@ class RespondPollAction extends Action
* *
* @return void * @return void
*/ */
function respondPoll() function respondPoll()
{ {
try { try {
@ -167,7 +162,6 @@ class RespondPollAction extends Action
* *
* @return void * @return void
*/ */
function showContent() function showContent()
{ {
if (!empty($this->error)) { if (!empty($this->error)) {
@ -190,7 +184,6 @@ class RespondPollAction extends Action
* *
* @return boolean is read only action? * @return boolean is read only action?
*/ */
function isReadOnly($args) function isReadOnly($args)
{ {
if ($_SERVER['REQUEST_METHOD'] == 'GET' || if ($_SERVER['REQUEST_METHOD'] == 'GET' ||

View File

@ -44,7 +44,6 @@ if (!defined('STATUSNET')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/ * @link http://status.net/
*/ */
class ShowPollAction extends ShownoticeAction class ShowPollAction extends ShownoticeAction
{ {
protected $poll = null; protected $poll = null;
@ -56,7 +55,6 @@ class ShowPollAction extends ShownoticeAction
* *
* @return boolean true * @return boolean true
*/ */
function prepare($argarray) function prepare($argarray)
{ {
OwnerDesignAction::prepare($argarray); OwnerDesignAction::prepare($argarray);
@ -100,7 +98,6 @@ class ShowPollAction extends ShownoticeAction
* *
* @return string page tile * @return string page tile
*/ */
function title() function title()
{ {
return sprintf(_('%s\'s poll: %s'), return sprintf(_('%s\'s poll: %s'),
@ -124,5 +121,4 @@ class ShowPollAction extends ShownoticeAction
{ {
return Action::etag(); return Action::etag();
} }
} }