* 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
*
*/
function staticGet($k, $v=null)
{
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
*
*/
function pkeyGet($kv)
{
return Memcached_DataObject::pkeyGet('Poll', $kv);
@ -117,7 +115,6 @@ class Poll extends Managed_DataObject
*
* @return Poll found poll or null
*/
function getByNotice($notice)
{
return self::staticGet('uri', $notice->uri);
@ -209,7 +206,6 @@ class Poll extends Managed_DataObject
*
* @return Notice saved notice
*/
static function saveNew($profile, $question, $opts, $options=null)
{
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
* @link http://status.net/
*/
class PollPlugin extends MicroAppPlugin
{
const VERSION = '0.1';
@ -60,7 +59,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return boolean hook value; true means continue processing, false means stop.
*/
function onCheckSchema()
{
$schema = Schema::get();
@ -76,7 +74,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return boolean hook value
*/
function onEndShowStyles($action)
{
$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.
*/
function onAutoload($cls)
{
$dir = dirname(__FILE__);
@ -123,7 +119,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return boolean hook value; true means continue processing, false means stop.
*/
function onRouterInitialized($m)
{
$m->connect('main/poll/new',
@ -151,7 +146,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return value
*/
function onPluginVersion(&$versions)
{
$versions[] = array('name' => 'Poll',
@ -175,7 +169,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return boolean hook value
*/
function deleteRelated($notice)
{
$p = Poll::getByNotice($notice);
@ -196,7 +189,6 @@ class PollPlugin extends MicroAppPlugin
*
* @return Notice resulting notice
*/
function saveNoticeFromActivity($activity, $profile, $options=array())
{
// @fixme

View File

@ -42,7 +42,6 @@ if (!defined('STATUSNET')) {
*
* @see DB_DataObject
*/
class Poll_response extends Managed_DataObject
{
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
*
*/
function staticGet($k, $v=null)
{
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
*
*/
function pkeyGet($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
*/
function getByNotice($notice)
{
return self::staticGet('uri', $notice->uri);
@ -159,7 +155,6 @@ class Poll_response extends Managed_DataObject
*
* @return Notice saved notice
*/
static function saveNew($profile, $poll, $selection, $options=null)
{
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
* @link http://status.net/
*/
class NewPollAction extends Action
{
protected $user = null;
@ -58,7 +57,6 @@ class NewPollAction extends Action
*
* @return string Action title
*/
function title()
{
return _('New poll');
@ -71,7 +69,6 @@ class NewPollAction extends Action
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
@ -79,7 +76,7 @@ class NewPollAction extends Action
$this->user = common_current_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);
}
@ -105,7 +102,6 @@ class NewPollAction extends Action
*
* @return void
*/
function handle($argarray=null)
{
parent::handle($argarray);
@ -124,7 +120,6 @@ class NewPollAction extends Action
*
* @return void
*/
function newPoll()
{
if ($this->boolean('ajax')) {
@ -143,7 +138,6 @@ class NewPollAction extends Action
$saved = Poll::saveNew($this->user->getProfile(),
$this->question,
$this->options);
} catch (ClientException $ce) {
$this->error = $ce->getMessage();
$this->showPage();
@ -188,7 +182,6 @@ class NewPollAction extends Action
*
* @return void
*/
function showContent()
{
if (!empty($this->error)) {
@ -213,7 +206,6 @@ class NewPollAction extends Action
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
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
* @link http://status.net/
*/
class NewpollForm extends Form
{
protected $question = null;
protected $options = array();
@ -58,7 +56,6 @@ class NewpollForm extends Form
*
* @return void
*/
function __construct($out=null, $question=null, $options=null)
{
parent::__construct($out);
@ -69,7 +66,6 @@ class NewpollForm extends Form
*
* @return int ID of the form
*/
function id()
{
return 'newpoll-form';
@ -80,7 +76,6 @@ class NewpollForm extends Form
*
* @return string class of the form
*/
function formClass()
{
return 'form_settings ajax-notice';
@ -91,7 +86,6 @@ class NewpollForm extends Form
*
* @return string URL of the action
*/
function action()
{
return common_local_url('newpoll');
@ -102,7 +96,6 @@ class NewpollForm extends Form
*
* @return void
*/
function formData()
{
$this->out->elementStart('fieldset', array('id' => 'newpoll-data'));
@ -142,7 +135,6 @@ class NewpollForm extends Form
*
* @return void
*/
function formActions()
{
$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
* @link http://status.net/
*/
class PollResponseForm extends Form
{
protected $poll;
@ -57,7 +56,6 @@ class PollResponseForm extends Form
*
* @return void
*/
function __construct(Poll $poll, HTMLOutputter $out)
{
parent::__construct($out);
@ -69,7 +67,6 @@ class PollResponseForm extends Form
*
* @return int ID of the form
*/
function id()
{
return 'pollresponse-form';
@ -80,7 +77,6 @@ class PollResponseForm extends Form
*
* @return string class of the form
*/
function formClass()
{
return 'form_settings ajax';
@ -91,7 +87,6 @@ class PollResponseForm extends Form
*
* @return string URL of the action
*/
function action()
{
return common_local_url('respondpoll', array('id' => $this->poll->id));
@ -102,7 +97,6 @@ class PollResponseForm extends Form
*
* @return void
*/
function formData()
{
$poll = $this->poll;
@ -127,7 +121,6 @@ class PollResponseForm extends Form
*
* @return void
*/
function formActions()
{
$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
* @link http://status.net/
*/
class PollResultForm extends Form
{
protected $poll;
@ -57,7 +56,6 @@ class PollResultForm extends Form
*
* @return void
*/
function __construct(Poll $poll, HTMLOutputter $out)
{
parent::__construct($out);
@ -69,7 +67,6 @@ class PollResultForm extends Form
*
* @return int ID of the form
*/
function id()
{
return 'pollresult-form';
@ -80,7 +77,6 @@ class PollResultForm extends Form
*
* @return string class of the form
*/
function formClass()
{
return 'form_settings ajax';
@ -91,7 +87,6 @@ class PollResultForm extends Form
*
* @return string URL of the action
*/
function action()
{
return common_local_url('respondpoll', array('id' => $this->poll->id));
@ -102,7 +97,6 @@ class PollResultForm extends Form
*
* @return void
*/
function formData()
{
$poll = $this->poll;
@ -143,7 +137,6 @@ class PollResultForm extends Form
*
* @return void
*/
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
* @link http://status.net/
*/
class RespondPollAction extends Action
{
protected $user = null;
@ -58,7 +57,6 @@ class RespondPollAction extends Action
*
* @return string Action title
*/
function title()
{
return _m('Poll response');
@ -71,7 +69,6 @@ class RespondPollAction extends Action
*
* @return boolean true
*/
function prepare($argarray)
{
parent::prepare($argarray);
@ -82,7 +79,7 @@ class RespondPollAction extends Action
$this->user = common_current_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);
}
@ -112,7 +109,6 @@ class RespondPollAction extends Action
*
* @return void
*/
function handle($argarray=null)
{
parent::handle($argarray);
@ -131,7 +127,6 @@ class RespondPollAction extends Action
*
* @return void
*/
function respondPoll()
{
try {
@ -167,7 +162,6 @@ class RespondPollAction extends Action
*
* @return void
*/
function showContent()
{
if (!empty($this->error)) {
@ -190,7 +184,6 @@ class RespondPollAction extends Action
*
* @return boolean is read only action?
*/
function isReadOnly($args)
{
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
* @link http://status.net/
*/
class ShowPollAction extends ShownoticeAction
{
protected $poll = null;
@ -56,7 +55,6 @@ class ShowPollAction extends ShownoticeAction
*
* @return boolean true
*/
function prepare($argarray)
{
OwnerDesignAction::prepare($argarray);
@ -100,7 +98,6 @@ class ShowPollAction extends ShownoticeAction
*
* @return string page tile
*/
function title()
{
return sprintf(_('%s\'s poll: %s'),
@ -124,5 +121,4 @@ class ShowPollAction extends ShownoticeAction
{
return Action::etag();
}
}