minor coding fixes

This commit is contained in:
Mikael Nordfeldth 2015-04-22 18:41:54 +02:00
parent 529b2f6613
commit 0a0455b8d2

View File

@ -27,21 +27,13 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
class InfiniteScrollPlugin extends Plugin class InfiniteScrollPlugin extends Plugin
{ {
public $on_next_only = false; public $on_next_only = false;
function __construct() function onEndShowScripts(Action $action)
{
parent::__construct();
}
function onEndShowScripts($action)
{ {
$action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';'); $action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';');
$action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";'); $action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";');
@ -49,7 +41,7 @@ class InfiniteScrollPlugin extends Plugin
$action->script($this->path('infinitescroll.js')); $action->script($this->path('infinitescroll.js'));
} }
function onPluginVersion(&$versions) function onPluginVersion(array &$versions)
{ {
$versions[] = array('name' => 'InfiniteScroll', $versions[] = array('name' => 'InfiniteScroll',
'version' => GNUSOCIAL_VERSION, 'version' => GNUSOCIAL_VERSION,