forked from GNUsocial/gnu-social
Merge branch 'nightly' of git.gnu.io:gnu/gnu-social into nightly
This commit is contained in:
commit
9dc8250956
@ -49,16 +49,9 @@ class ApiconversationAction extends ApiAuthAction
|
||||
protected $conversation = null;
|
||||
protected $notices = null;
|
||||
|
||||
/**
|
||||
* For initializing members of the class.
|
||||
*
|
||||
* @param array $argarray misc. arguments
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
function prepare($argarray)
|
||||
protected function prepare(array $args=array())
|
||||
{
|
||||
parent::prepare($argarray);
|
||||
parent::prepare($args);
|
||||
|
||||
$convId = $this->trimmed('id');
|
||||
|
||||
|
@ -97,7 +97,7 @@ class ConversationAction extends ManagedAction
|
||||
Event::handle('EndShowConversation', array($this, $this->conv, $this->scoped));
|
||||
}
|
||||
|
||||
function isReadOnly()
|
||||
function isReadOnly($args)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -488,13 +488,13 @@ class File extends Managed_DataObject
|
||||
throw new ServerException('URL already exists in DB');
|
||||
}
|
||||
$sql = 'UPDATE %1$s SET urlhash=%2$s, url=%3$s WHERE urlhash=%4$s;';
|
||||
$result = $this->query(sprintf($sql, $this->__table,
|
||||
$result = $this->query(sprintf($sql, $this->tableName(),
|
||||
$this->_quote((string)self::hashurl($url)),
|
||||
$this->_quote((string)$url),
|
||||
$this->_quote((string)$this->urlhash)));
|
||||
if ($result === false) {
|
||||
common_log_db_error($this, 'UPDATE', __FILE__);
|
||||
throw new ServerException("Could not UPDATE {$this->__table}.url");
|
||||
throw new ServerException("Could not UPDATE {$this->tableName()}.url");
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
234
classes/GS_DataObject.php
Normal file
234
classes/GS_DataObject.php
Normal file
@ -0,0 +1,234 @@
|
||||
<?php
|
||||
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||
|
||||
class GS_DataObject extends DB_DataObject
|
||||
{
|
||||
public function _autoloadClass($class, $table=false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::_autoloadClass($class, $table);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// wraps the _connect call so we don't throw E_STRICT warnings during it
|
||||
public function _connect()
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::_connect();
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// wraps the _loadConfig call so we don't throw E_STRICT warnings during it
|
||||
// doesn't actually return anything, but we'll follow the same model as the rest of the wrappers
|
||||
public function _loadConfig()
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::_loadConfig();
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// wraps the count call so we don't throw E_STRICT warnings during it
|
||||
public function count($countWhat = false,$whereAddOnly = false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::count($countWhat, $whereAddOnly);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
static public function debugLevel($v = null)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::debugLevel($v);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// delete calls PEAR::isError from DB_DataObject, so let's make that disappear too
|
||||
public function delete($useWhere = false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::delete($useWhere);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
static public function factory($table = '')
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::factory($table);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function get($k = null, $v = null)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::get($k, $v);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function fetch()
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::fetch();
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function find($n = false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::find($n);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function fetchRow($row = null)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::fetchRow($row);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// insert calls PEAR::isError from DB_DataObject, so let's make that disappear too
|
||||
public function insert()
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::insert();
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// DB_DataObject's joinAdd calls DB_DataObject::factory explicitly, so our factory-override doesn't work
|
||||
public function joinAdd($obj = false, $joinType='INNER', $joinAs=false, $joinCol=false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::joinAdd($obj, $joinType, $joinAs, $joinCol);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function links()
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::links();
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
// wraps the update call so we don't throw E_STRICT warnings during it
|
||||
public function update($dataObject = false)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::update($dataObject);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
static public function staticGet($class, $k, $v = null)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::staticGet($class, $k, $v);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function staticGetAutoloadTable($table)
|
||||
{
|
||||
// avoid those annoying PEAR::DB strict standards warnings it causes
|
||||
$old = error_reporting();
|
||||
error_reporting(error_reporting() & ~E_STRICT);
|
||||
|
||||
$res = parent::staticGetAutoloadTable($table);
|
||||
|
||||
// reset
|
||||
error_reporting($old);
|
||||
return $res;
|
||||
}
|
||||
}
|
@ -406,7 +406,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
|
||||
common_log_db_error($this, 'UPDATE', __FILE__);
|
||||
// rollback as something bad occurred
|
||||
$this->query('ROLLBACK');
|
||||
throw new ServerException("Could not UPDATE non-keys for {$this->__table}");
|
||||
throw new ServerException("Could not UPDATE non-keys for {$this->tableName()}");
|
||||
}
|
||||
$orig->decache();
|
||||
$this->encache();
|
||||
@ -428,7 +428,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
|
||||
common_log_db_error($this, 'UPDATE', __FILE__);
|
||||
// rollback as something bad occurred
|
||||
$this->query('ROLLBACK');
|
||||
throw new ServerException("Could not UPDATE key fields for {$this->__table}");
|
||||
throw new ServerException("Could not UPDATE key fields for {$this->tableName()}");
|
||||
}
|
||||
|
||||
// Update non-keys too, if the previous endeavour worked.
|
||||
@ -438,7 +438,7 @@ abstract class Managed_DataObject extends Memcached_DataObject
|
||||
common_log_db_error($this, 'UPDATE', __FILE__);
|
||||
// rollback as something bad occurred
|
||||
$this->query('ROLLBACK');
|
||||
throw new ServerException("Could not UPDATE non-keys for {$this->__table}");
|
||||
throw new ServerException("Could not UPDATE non-keys for {$this->tableName()}");
|
||||
}
|
||||
$orig->decache();
|
||||
$this->encache();
|
||||
|
@ -461,11 +461,11 @@ class Memcached_DataObject extends Safe_DataObject
|
||||
}
|
||||
|
||||
global $_DB_DATAOBJECT;
|
||||
if (!isset($_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"])) {
|
||||
if (!isset($_DB_DATAOBJECT['INI'][$this->_database][$this->tableName()."__keys"])) {
|
||||
$this->databaseStructure();
|
||||
|
||||
}
|
||||
return $_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"];
|
||||
return $_DB_DATAOBJECT['INI'][$this->_database][$this->tableName()."__keys"];
|
||||
}
|
||||
|
||||
function encache()
|
||||
@ -824,7 +824,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||
global $_DB_DATAOBJECT;
|
||||
|
||||
if (empty($_DB_DATAOBJECT['CONFIG'])) {
|
||||
DB_DataObject::_loadConfig();
|
||||
self::_loadConfig();
|
||||
}
|
||||
|
||||
$options = &$_DB_DATAOBJECT['CONFIG'];
|
||||
@ -836,7 +836,7 @@ class Memcached_DataObject extends Safe_DataObject
|
||||
if (!$dsn) {
|
||||
|
||||
if (!$this->_database) {
|
||||
$this->_database = isset($options["table_{$this->__table}"]) ? $options["table_{$this->__table}"] : null;
|
||||
$this->_database = isset($options["table_{$this->tableName()}"]) ? $options["table_{$this->tableName()}"] : null;
|
||||
}
|
||||
|
||||
if ($this->_database && !empty($options["database_{$this->_database}"])) {
|
||||
|
@ -979,12 +979,14 @@ class Notice extends Managed_DataObject
|
||||
|
||||
// Force the scope for private groups
|
||||
foreach ($groups as $group_id) {
|
||||
$group = User_group::staticGet('id', $group_id);
|
||||
if ($group instanceof User_group) {
|
||||
try {
|
||||
$group = User_group::getByID($group_id);
|
||||
if ($group->force_scope) {
|
||||
$scope |= Notice::GROUP_SCOPE;
|
||||
break;
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
common_log(LOG_ERR, 'Notice figureOutScope threw exception: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||
|
||||
/**
|
||||
* Extended DB_DataObject to improve a few things:
|
||||
@ -26,7 +26,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
|
||||
* - don't leak memory when loading already-used .ini files
|
||||
* (eg when using the same schema on thousands of databases)
|
||||
*/
|
||||
class Safe_DataObject extends DB_DataObject
|
||||
class Safe_DataObject extends GS_DataObject
|
||||
{
|
||||
/**
|
||||
* Destructor to free global memory resources associated with
|
||||
@ -177,7 +177,6 @@ class Safe_DataObject extends DB_DataObject
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!$this->_database) {
|
||||
$this->_connect();
|
||||
}
|
||||
@ -187,7 +186,7 @@ class Safe_DataObject extends DB_DataObject
|
||||
|
||||
// database loaded - but this is table is not available..
|
||||
if (
|
||||
empty($_DB_DATAOBJECT['INI'][$this->_database][$this->__table])
|
||||
empty($_DB_DATAOBJECT['INI'][$this->_database][$this->tableName()])
|
||||
&& !empty($_DB_DATAOBJECT['CONFIG']['proxy'])
|
||||
) {
|
||||
if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) {
|
||||
@ -198,13 +197,13 @@ class Safe_DataObject extends DB_DataObject
|
||||
|
||||
|
||||
$x = new DB_DataObject_Generator;
|
||||
$x->fillTableSchema($this->_database,$this->__table);
|
||||
$x->fillTableSchema($this->_database,$this->tableName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (empty($_DB_DATAOBJECT['CONFIG'])) {
|
||||
DB_DataObject::_loadConfig();
|
||||
self::_loadConfig();
|
||||
}
|
||||
|
||||
// if you supply this with arguments, then it will take those
|
||||
@ -226,7 +225,7 @@ class Safe_DataObject extends DB_DataObject
|
||||
|
||||
// now have we loaded the structure..
|
||||
|
||||
if (!empty($_DB_DATAOBJECT['INI'][$this->_database][$this->__table])) {
|
||||
if (!empty($_DB_DATAOBJECT['INI'][$this->_database][$this->tableName()])) {
|
||||
return true;
|
||||
}
|
||||
// - if not try building it..
|
||||
@ -235,11 +234,11 @@ class Safe_DataObject extends DB_DataObject
|
||||
require_once 'DB/DataObject/Generator.php';
|
||||
|
||||
$x = new DB_DataObject_Generator;
|
||||
$x->fillTableSchema($this->_database,$this->__table);
|
||||
$x->fillTableSchema($this->_database,$this->tableName());
|
||||
// should this fail!!!???
|
||||
return true;
|
||||
}
|
||||
$this->debug("Cant find database schema: {$this->_database}/{$this->__table} \n".
|
||||
$this->debug("Cant find database schema: {$this->_database}/{$this->tableName()} \n".
|
||||
"in links file data: " . print_r($_DB_DATAOBJECT['INI'],true),"databaseStructure",5);
|
||||
// we have to die here!! - it causes chaos if we don't (including looping forever!)
|
||||
// Low level exception. No need for i18n as discussed with Brion.
|
||||
|
@ -38,7 +38,7 @@ class Status_network_tag extends Safe_DataObject
|
||||
$sn = new Status_network();
|
||||
$sn->_connect();
|
||||
|
||||
$config['db']['table_'. $this->__table] = $sn->_database;
|
||||
$config['db']['table_'. $this->tableName()] = $sn->_database;
|
||||
|
||||
$this->_connect();
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
$this->_query['derive_select']
|
||||
.' FROM ( SELECT'.
|
||||
$this->_query['data_select'] . " \n" .
|
||||
" FROM $tn \n" .
|
||||
" FROM $tn " . $this->_query['useindex'] . " \n" .
|
||||
$this->_join . " \n" .
|
||||
$this->_query['condition'] . " \n" .
|
||||
$this->_query['group_by'] . " \n" .
|
||||
@ -362,7 +362,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
|
||||
$sql = 'SELECT ' .
|
||||
$this->_query['data_select'] . " \n" .
|
||||
" FROM $tn \n" .
|
||||
" FROM $tn " . $this->_query['useindex'] . " \n" .
|
||||
$this->_join . " \n" .
|
||||
$this->_query['condition'] . " \n" .
|
||||
$this->_query['group_by'] . " \n" .
|
||||
@ -862,6 +862,43 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
$this->_query['having'] .= " AND {$having}";
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a using Index
|
||||
*
|
||||
* $object->useIndex(); //reset the use Index
|
||||
* $object->useIndex("some_index");
|
||||
*
|
||||
* Note do not put unfiltered user input into theis method.
|
||||
* This is mysql specific at present? - might need altering to support other databases.
|
||||
*
|
||||
* @param string|array $index index or indexes to use.
|
||||
* @access public
|
||||
* @return none|PEAR::Error - invalid args only
|
||||
*/
|
||||
function useIndex($index = false)
|
||||
{
|
||||
if ($this->_query === false) {
|
||||
$this->raiseError(
|
||||
"You cannot do two queries on the same object (copy it before finding)",
|
||||
DB_DATAOBJECT_ERROR_INVALIDARGS);
|
||||
return false;
|
||||
}
|
||||
if ($index=== false) {
|
||||
$this->_query['useindex'] = '';
|
||||
return;
|
||||
}
|
||||
// check input...= 0 or ' ' == error!
|
||||
if ((is_string($index) && !trim($index)) || (is_array($index) && !count($index)) ) {
|
||||
return $this->raiseError("Having: No Valid Arguments", DB_DATAOBJECT_ERROR_INVALIDARGS);
|
||||
}
|
||||
$index = is_array($index) ? implode(', ', $index) : $index;
|
||||
|
||||
if (!$this->_query['useindex']) {
|
||||
$this->_query['useindex'] = " USE INDEX ({$index}) ";
|
||||
return;
|
||||
}
|
||||
$this->_query['useindex'] = substr($this->_query['useindex'],0, -2) . ", {$index}) ";
|
||||
}
|
||||
/**
|
||||
* Sets the Limit
|
||||
*
|
||||
@ -1090,11 +1127,9 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Ignore variables which aren't set to a value
|
||||
if ( (!isset($this->$k) || ($v == 1 && $this->$k == ''))
|
||||
|
||||
// Ignore INTEGERS which aren't set to a value - or empty string..
|
||||
if ( (!isset($this->$k) || ($v == 1 && $this->$k === ''))
|
||||
&& $ignore_null
|
||||
) {
|
||||
continue;
|
||||
@ -1342,7 +1377,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
|
||||
foreach($items as $k => $v) {
|
||||
|
||||
if ((!isset($this->$k) || ($v == 1 && $this->$k == ''))
|
||||
// I think this is ignoring empty vlalues
|
||||
if ((!isset($this->$k) || ($v == 1 && $this->$k === ''))
|
||||
&& $ignore_null
|
||||
) {
|
||||
continue;
|
||||
@ -1808,6 +1844,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
'group_by' => '', // the GROUP BY condition
|
||||
'order_by' => '', // the ORDER BY condition
|
||||
'having' => '', // the HAVING condition
|
||||
'useindex' => '', // the USE INDEX condition
|
||||
'limit_start' => '', // the LIMIT condition
|
||||
'limit_count' => '', // the LIMIT condition
|
||||
'data_select' => '*', // the columns to be SELECTed
|
||||
@ -2458,7 +2495,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
} else {
|
||||
$_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5] = DB::connect($dsn);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
/* assumption is MDB2 */
|
||||
require_once 'MDB2.php';
|
||||
@ -2774,7 +2811,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
|
||||
|
||||
|
||||
function factory($table = '')
|
||||
static function factory($table = '')
|
||||
{
|
||||
global $_DB_DATAOBJECT;
|
||||
|
||||
@ -2792,13 +2829,14 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
}
|
||||
// no configuration available for database
|
||||
if (!empty($database) && empty($_DB_DATAOBJECT['CONFIG']['database_'.$database])) {
|
||||
return DB_DataObject::raiseError(
|
||||
$do = new DB_DataObject();
|
||||
$do->raiseError(
|
||||
"unable to find database_{$database} in Configuration, It is required for factory with database"
|
||||
, 0, PEAR_ERROR_DIE );
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if ($table === '') {
|
||||
if (is_a($this,'DB_DataObject') && strlen($this->tableName())) {
|
||||
$table = $this->tableName();
|
||||
@ -2809,6 +2847,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
// does this need multi db support??
|
||||
$cp = isset($_DB_DATAOBJECT['CONFIG']['class_prefix']) ?
|
||||
explode(PATH_SEPARATOR, $_DB_DATAOBJECT['CONFIG']['class_prefix']) : '';
|
||||
@ -2859,7 +2898,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
}
|
||||
|
||||
if (!$rclass || !class_exists($rclass)) {
|
||||
return DB_DataObject::raiseError(
|
||||
$dor = new DB_DataObject();
|
||||
return $dor->raiseError(
|
||||
"factory could not find class " .
|
||||
(is_array($class) ? implode(PATH_SEPARATOR, $class) : $class ).
|
||||
"from $table",
|
||||
@ -2944,7 +2984,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
}
|
||||
}
|
||||
if (!$found) {
|
||||
DB_DataObject::raiseError(
|
||||
$dor = new DB_DataObject();
|
||||
$dor->raiseError(
|
||||
"autoload:Could not find class " . implode(',', $cls) .
|
||||
" using class_location value :" . $search .
|
||||
" using include_path value :" . ini_get('include_path'),
|
||||
@ -2965,7 +3006,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
}
|
||||
}
|
||||
if (!$ce) {
|
||||
DB_DataObject::raiseError(
|
||||
$dor = new DB_DataObject();
|
||||
$dor->raiseError(
|
||||
"autoload:Could not autoload " . implode(',', $cls) ,
|
||||
DB_DATAOBJECT_ERROR_INVALIDCONFIG);
|
||||
return false;
|
||||
@ -3975,6 +4017,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
global $_DB_DATAOBJECT;
|
||||
$keys = $this->keys();
|
||||
$items = $this->table();
|
||||
|
||||
if (!$items) {
|
||||
$this->raiseError(
|
||||
"setFrom:Could not find table definition for {$this->tableName()}",
|
||||
@ -4592,7 +4635,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
* @access public
|
||||
* @return none
|
||||
*/
|
||||
function debugLevel($v = null)
|
||||
static function debugLevel($v = null)
|
||||
{
|
||||
global $_DB_DATAOBJECT;
|
||||
if (empty($_DB_DATAOBJECT['CONFIG'])) {
|
||||
@ -4646,7 +4689,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
$error = $message;
|
||||
} else {
|
||||
require_once 'DB/DataObject/Error.php';
|
||||
$error = PEAR::raiseError($message, $type, $behaviour,
|
||||
$dor = new PEAR();
|
||||
$error = $dor->raiseError($message, $type, $behaviour,
|
||||
$opts=null, $userinfo=null, 'DB_DataObject_Error'
|
||||
);
|
||||
}
|
||||
@ -4773,7 +4817,7 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
/**
|
||||
* (deprecated - use ::get / and your own caching method)
|
||||
*/
|
||||
function staticGet($class, $k, $v = null)
|
||||
static function staticGet($class, $k, $v = null)
|
||||
{
|
||||
$lclass = strtolower($class);
|
||||
global $_DB_DATAOBJECT;
|
||||
@ -4799,7 +4843,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
|
||||
$obj = DB_DataObject::factory(substr($class,strlen($_DB_DATAOBJECT['CONFIG']['class_prefix'])));
|
||||
if (PEAR::isError($obj)) {
|
||||
DB_DataObject::raiseError("could not autoload $class", DB_DATAOBJECT_ERROR_NOCLASS);
|
||||
$dor = new DB_DataObject();
|
||||
$dor->raiseError("could not autoload $class", DB_DATAOBJECT_ERROR_NOCLASS);
|
||||
$r = false;
|
||||
return $r;
|
||||
}
|
||||
@ -4808,7 +4853,8 @@ class DB_DataObject extends DB_DataObject_Overload
|
||||
$_DB_DATAOBJECT['CACHE'][$lclass] = array();
|
||||
}
|
||||
if (!$obj->get($k,$v)) {
|
||||
DB_DataObject::raiseError("No Data return from get $k $v", DB_DATAOBJECT_ERROR_NODATA);
|
||||
$dor = new DB_DataObject();
|
||||
$dor->raiseError("No Data return from get $k $v", DB_DATAOBJECT_ERROR_NODATA);
|
||||
|
||||
$r = false;
|
||||
return $r;
|
||||
|
@ -125,11 +125,10 @@ class Action extends HTMLOutputter // lawsuit
|
||||
} else {
|
||||
common_debug('Prepare failed for Action.');
|
||||
}
|
||||
|
||||
$this->flush();
|
||||
Event::handle('EndActionExecute', array($this));
|
||||
}
|
||||
|
||||
$this->flush();
|
||||
|
||||
Event::handle('EndActionExecute', array($this));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,25 +54,10 @@ class ApiOAuthAction extends ApiAction
|
||||
return false;
|
||||
}
|
||||
|
||||
function prepare($args)
|
||||
protected function prepare(array $args=array())
|
||||
{
|
||||
parent::prepare($args);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle input, produce output
|
||||
*
|
||||
* Switches on request method; either shows the form or handles its input.
|
||||
*
|
||||
* @param array $args $_REQUEST data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function handle($args)
|
||||
{
|
||||
parent::handle($args);
|
||||
self::cleanRequest();
|
||||
return parent::prepare($args);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -72,9 +72,9 @@ class ClientErrorAction extends ErrorAction
|
||||
|
||||
// XXX: Should these error actions even be invokable via URI?
|
||||
|
||||
function handle($args)
|
||||
protected function handle()
|
||||
{
|
||||
parent::handle($args);
|
||||
parent::handle();
|
||||
|
||||
$this->code = $this->trimmed('code');
|
||||
|
||||
|
@ -48,7 +48,7 @@ if (!defined('STATUSNET')) {
|
||||
|
||||
class FullThreadedNoticeList extends ThreadedNoticeList
|
||||
{
|
||||
function newListItem($notice)
|
||||
function newListItem(Notice $notice)
|
||||
{
|
||||
return new FullThreadedNoticeListItem($notice, $this->out, $this->userProfile);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ class Plugin
|
||||
. ' (' . get_class($this) . ' v' . $this->version() . ')';
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$name = $this->name();
|
||||
|
||||
|
@ -78,9 +78,9 @@ class ServerErrorAction extends ErrorAction
|
||||
|
||||
// XXX: Should these error actions even be invokable via URI?
|
||||
|
||||
function handle($args)
|
||||
protected function handle()
|
||||
{
|
||||
parent::handle($args);
|
||||
parent::handle();
|
||||
|
||||
$this->code = $this->trimmed('code');
|
||||
|
||||
|
@ -87,7 +87,7 @@ class AccountManagerPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'AccountManager',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -339,7 +339,7 @@ class ActivityPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Activity',
|
||||
'version' => self::VERSION,
|
||||
|
@ -215,7 +215,7 @@ class ActivitySpamPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ActivitySpam',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -44,7 +44,7 @@ class ActivityVerbPlugin extends Plugin
|
||||
'verb' => '[a-z]+'));
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Activity Verb',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -271,7 +271,7 @@ class AnonymousFavePlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$url = 'http://status.net/wiki/Plugin:AnonymousFave';
|
||||
|
||||
|
@ -68,7 +68,7 @@ class AntiBrutePlugin extends Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'AntiBrute',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -75,7 +75,7 @@ class ApiLoggerPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ApiLogger',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -150,7 +150,7 @@ class AuthCryptPlugin extends AuthenticationPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'AuthCrypt',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -56,7 +56,7 @@ class AutoSandboxPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'AutoSandbox',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -52,7 +52,7 @@ class AutocompletePlugin extends Plugin
|
||||
$m->connect('main/autocomplete/suggest', array('action'=>'autocomplete'));
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Autocomplete',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -44,7 +44,7 @@ class AwesomenessPlugin extends Plugin
|
||||
{
|
||||
const VERSION = '0.0.42';
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'Awesomeness',
|
||||
|
@ -145,7 +145,7 @@ class BitlyUrlPlugin extends UrlShortenerPlugin
|
||||
return null;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => sprintf('BitlyUrl (%s)', $this->shortenerName),
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -291,7 +291,7 @@ class BlacklistPlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Blacklist',
|
||||
'version' => self::VERSION,
|
||||
|
@ -117,7 +117,7 @@ class BlankAdPlugin extends UAPPlugin
|
||||
'');
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'BlankAd',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -148,7 +148,7 @@ class BlogspamNetPlugin extends Plugin
|
||||
return BLOGSPAMNETPLUGIN_VERSION;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'BlogspamNet',
|
||||
'version' => BLOGSPAMNETPLUGIN_VERSION,
|
||||
|
@ -181,7 +181,7 @@ class BookmarkPlugin extends MicroAppPlugin
|
||||
*
|
||||
* @return value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Bookmark',
|
||||
'version' => self::VERSION,
|
||||
|
@ -96,7 +96,7 @@ class CacheLogPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'CacheLog',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -147,7 +147,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin
|
||||
$casSettings['takeOverLogin']=$this->takeOverLogin;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'CAS Authentication',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -54,7 +54,7 @@ class ClientSideShortenPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Shorten',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -104,7 +104,7 @@ class CometPlugin extends RealtimePlugin
|
||||
return '/' . implode('/', $path);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Comet',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -45,7 +45,7 @@ class CronishPlugin extends Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Cronish',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -43,7 +43,7 @@ class DefaultLayoutPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Default Layout',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -244,7 +244,7 @@ class DirectionDetectorPlugin extends Plugin {
|
||||
/**
|
||||
* plugin details
|
||||
*/
|
||||
function onPluginVersion(&$versions){
|
||||
function onPluginVersion(array &$versions){
|
||||
$url = 'http://status.net/wiki/Plugin:DirectionDetector';
|
||||
|
||||
$versions[] = array(
|
||||
|
@ -251,7 +251,7 @@ class DirectoryPlugin extends Plugin
|
||||
/*
|
||||
* Version info
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'Directory',
|
||||
|
@ -161,7 +161,7 @@ class DiskCachePlugin extends Plugin
|
||||
return false;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'DiskCache',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -190,7 +190,7 @@ class DomainStatusNetworkPlugin extends Plugin
|
||||
return null;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'DomainStatusNetwork',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -267,7 +267,7 @@ class DomainWhitelistPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'DomainWhitelist',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -49,7 +49,7 @@ class EmailAuthenticationPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Email Authentication',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -172,7 +172,7 @@ class EmailRegistrationPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'EmailRegistration',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -179,7 +179,7 @@ class EmailReminderPlugin extends Plugin
|
||||
* @param type $versions
|
||||
* @return type
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'EmailReminder',
|
||||
|
@ -66,7 +66,7 @@ class EmailSummaryPlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value; true means continue processing, false means stop.
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'EmailSummary',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -90,7 +90,7 @@ class EventPlugin extends MicroAppPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Event',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -29,7 +29,7 @@ if (!defined('STATUSNET')) {
|
||||
*/
|
||||
class ExtendedProfilePlugin extends Plugin
|
||||
{
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'ExtendedProfile',
|
||||
|
@ -612,7 +612,7 @@ ENDOFSCRIPT;
|
||||
*
|
||||
* @param array &$versions plugin version descriptions
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'Facebook Bridge',
|
||||
|
@ -47,7 +47,7 @@ class FeedPollerPlugin extends Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'FeedPoller',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -58,7 +58,7 @@ class FirePHPPlugin extends Plugin
|
||||
$this->firephp->fb($msg, $fp_priority);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'FirePHP',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -165,7 +165,7 @@ class FollowEveryonePlugin extends Plugin
|
||||
* @return boolean hook value
|
||||
*
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'FollowEveryone',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -105,7 +105,7 @@ class ForceGroupPlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$url = 'http://status.net/wiki/Plugin:ForceGroup';
|
||||
|
||||
|
@ -114,7 +114,7 @@ class GeoURLPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'GeoURL',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -487,7 +487,7 @@ class GeonamesPlugin extends Plugin
|
||||
return $document->geoname;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Geonames',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -105,7 +105,7 @@ ENDOFSCRIPT2;
|
||||
$action->inlineScript($js);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'GoogleAnalytics',
|
||||
'version' => self::VERSION,
|
||||
|
@ -59,7 +59,7 @@ class GravatarPlugin extends Plugin
|
||||
return $url;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Gravatar',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -405,7 +405,7 @@ class GroupPrivateMessagePlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'GroupPrivateMessage',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -132,7 +132,7 @@ class ImageMagickPlugin extends Plugin
|
||||
return getimagesize($outpath); // Verify that we wrote an understandable image.
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ImageMagick',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -76,7 +76,7 @@ class ImapPlugin extends Plugin
|
||||
$classes[] = new ImapManager($this);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'IMAP',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -170,7 +170,7 @@ class InProcessCachePlugin extends Plugin
|
||||
*
|
||||
* @return boolean true
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$url = 'http://status.net/wiki/Plugin:InProcessCache';
|
||||
|
||||
|
@ -51,7 +51,7 @@ class LRDDPlugin extends Plugin
|
||||
$disco->registerMethod('LRDDMethod_LinkHTML');
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'LRDD',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -142,7 +142,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
|
||||
return common_nicknamize($nickname);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'LDAP Authentication',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -118,7 +118,7 @@ class LdapAuthorizationPlugin extends AuthorizationPlugin
|
||||
return false;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'LDAP Authorization',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -57,7 +57,7 @@ class LilUrlPlugin extends UrlShortenerPlugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => sprintf('LilUrl (%s)', $this->shortenerName),
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -29,7 +29,7 @@ if (!defined('STATUSNET')) {
|
||||
*/
|
||||
class LinkPreviewPlugin extends Plugin
|
||||
{
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'LinkPreview',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -232,7 +232,7 @@ class LinkbackPlugin extends Plugin
|
||||
return LINKBACKPLUGIN_VERSION;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Linkback',
|
||||
'version' => LINKBACKPLUGIN_VERSION,
|
||||
|
@ -39,7 +39,7 @@ class LogFilterPlugin extends Plugin
|
||||
public $priority = array(); // override by priority: array(LOG_ERR => true, LOG_DEBUG => false)
|
||||
public $regex = array(); // override by regex match of message: array('/twitter/i' => false)
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'LogFilter',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -169,7 +169,7 @@ class MapstractionPlugin extends Plugin
|
||||
$action->elementEnd('div');
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Mapstraction',
|
||||
'version' => self::VERSION,
|
||||
|
@ -236,7 +236,7 @@ class MemcachePlugin extends Plugin
|
||||
return $out;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Memcache',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -207,7 +207,7 @@ class MemcachedPlugin extends Plugin
|
||||
return $flag;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Memcached',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -160,7 +160,7 @@ class MeteorPlugin extends RealtimePlugin
|
||||
return implode('-', $path);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Meteor',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -157,7 +157,7 @@ class MinifyPlugin extends Plugin
|
||||
return Minify_CSS::minify($code,$options);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Minify',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -43,7 +43,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) {
|
||||
|
||||
class WAP20Plugin extends Plugin
|
||||
{
|
||||
function onStartShowHTML($action)
|
||||
function onStartShowHTML(Action $action)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ class MobileProfilePlugin extends WAP20Plugin
|
||||
return $proto.'://'.$serverpart.'/'.$pathpart.$relative;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'MobileProfile',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -29,7 +29,7 @@ class ModHelperPlugin extends Plugin
|
||||
{
|
||||
static $rights = array(Right::SILENCEUSER, Right::TRAINSPAM, Right::REVIEWSPAM);
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ModHelper',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -183,7 +183,7 @@ class ModLogPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ModLog',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -27,7 +27,7 @@ if (!defined('GNUSOCIAL')) { exit(1); }
|
||||
*/
|
||||
class ModPlusPlugin extends Plugin
|
||||
{
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'ModPlus',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -84,7 +84,7 @@ class NoticeTitlePlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$url = 'http://status.net/wiki/Plugin:NoticeTitle';
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ class OStatusPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OStatus',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -71,7 +71,7 @@ class OfflineBackupPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OfflineBackup',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -49,7 +49,7 @@ class OpenExternalLinkTargetPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OpenExternalLinkTarget',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -615,7 +615,7 @@ class OpenIDPlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OpenID',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -199,7 +199,7 @@ ENDOFSCRIPT;
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OpenX',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -32,7 +32,7 @@ class OpportunisticQMPlugin extends Plugin {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'OpportunisticQM',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -159,7 +159,7 @@ class OrbitedPlugin extends RealtimePlugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Orbited',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -103,7 +103,7 @@ ENDOFPIWIK;
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'PiwikAnalytics',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -120,7 +120,7 @@ class PollPlugin extends MicroAppPlugin
|
||||
*
|
||||
* @return value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Poll',
|
||||
'version' => self::VERSION,
|
||||
|
@ -48,7 +48,7 @@ class PostDebugPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'PostDebug',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -57,7 +57,7 @@ class PtitUrlPlugin extends UrlShortenerPlugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => sprintf('PtitUrl (%s)', $this->shortenerName),
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -124,7 +124,7 @@ class QnAPlugin extends MicroAppPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array(
|
||||
'name' => 'QnA',
|
||||
@ -260,7 +260,7 @@ class QnAPlugin extends MicroAppPlugin
|
||||
* @return boolean hook value
|
||||
*/
|
||||
|
||||
function onStartOpenNoticeListItemElement($nli)
|
||||
function onStartOpenNoticeListItemElement(NoticeListItem $nli)
|
||||
{
|
||||
$type = $nli->notice->object_type;
|
||||
|
||||
@ -325,7 +325,7 @@ class QnAPlugin extends MicroAppPlugin
|
||||
*
|
||||
* @todo FIXME: WARNING WARNING WARNING this closes a 'div' that is implicitly opened in BookmarkPlugin's showNotice implementation
|
||||
*/
|
||||
function onStartShowNoticeItem($nli)
|
||||
function onStartShowNoticeItem(NoticeListItem $nli)
|
||||
{
|
||||
if (!$this->isMyNotice($nli->notice)) {
|
||||
return true;
|
||||
|
@ -198,7 +198,7 @@ class RSSCloudPlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'RSSCloud',
|
||||
'version' => RSSCLOUDPLUGIN_VERSION,
|
||||
|
@ -104,7 +104,7 @@ class RecaptchaPlugin extends Plugin
|
||||
}
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Recaptcha',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -175,7 +175,7 @@ class RegisterThrottlePlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
public function onPluginVersion(&$versions)
|
||||
public function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'RegisterThrottle',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -209,7 +209,7 @@ class RequireValidatedEmailPlugin extends Plugin
|
||||
*
|
||||
* @return boolean hook value
|
||||
*/
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] =
|
||||
array('name' => 'Require Validated Email',
|
||||
|
@ -57,7 +57,7 @@ class ReverseUsernameAuthenticationPlugin extends AuthenticationPlugin
|
||||
return User::register($registration_data);
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Reverse Username Authentication',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -31,7 +31,7 @@ class SQLProfilePlugin extends Plugin
|
||||
{
|
||||
private $recursionGuard = false;
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'SQLProfile',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -34,7 +34,7 @@ class SQLStatsPlugin extends Plugin
|
||||
protected $queryTimes = array();
|
||||
protected $queries = array();
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'SQLStats',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
@ -222,7 +222,7 @@ class SamplePlugin extends Plugin
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPluginVersion(&$versions)
|
||||
function onPluginVersion(array &$versions)
|
||||
{
|
||||
$versions[] = array('name' => 'Sample',
|
||||
'version' => GNUSOCIAL_VERSION,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user