Merge pull request #5789 from friendica/master
Update develop from master-2019.09
This commit is contained in:
@@ -17,7 +17,7 @@ use Friendica\Util\Network;
|
||||
/**
|
||||
* Handle ACL management and display
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class ACL extends BaseObject
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ use Friendica\Util\DateTimeFormat;
|
||||
/**
|
||||
* Database Cache Driver
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class DatabaseCacheDriver extends AbstractCacheDriver implements ICacheDriver
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ use Friendica\Core\Cache;
|
||||
/**
|
||||
* Cache Driver Interface
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
interface ICacheDriver
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ use Memcache;
|
||||
/**
|
||||
* Memcache Cache Driver
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class MemcacheCacheDriver extends AbstractCacheDriver implements IMemoryCacheDriver
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ use Memcached;
|
||||
/**
|
||||
* Memcached Cache Driver
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class MemcachedCacheDriver extends AbstractCacheDriver implements IMemoryCacheDriver
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ use Redis;
|
||||
/**
|
||||
* Redis Cache Driver. This driver is based on Memcache driver
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
* @author Roland Haeder <roland@mxchange.org>
|
||||
*/
|
||||
class RedisCacheDriver extends AbstractCacheDriver implements IMemoryCacheDriver
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Friendica\Core\Config;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
interface IConfigAdapter
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ require_once 'include/dba.php';
|
||||
*
|
||||
* Default Config Adapter. Provides the best performance for pages loading few configuration variables.
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class JITConfigAdapter extends BaseObject implements IConfigAdapter
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ require_once 'include/dba.php';
|
||||
*
|
||||
* Default PConfig Adapter. Provides the best performance for pages loading few configuration variables.
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class JITPConfigAdapter extends BaseObject implements IPConfigAdapter
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ require_once 'include/dba.php';
|
||||
*
|
||||
* Minimizes the number of database queries to retrieve configuration values at the cost of memory.
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class PreloadConfigAdapter extends BaseObject implements IConfigAdapter
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ require_once 'include/dba.php';
|
||||
*
|
||||
* Minimizes the number of database queries to retrieve configuration values at the cost of memory.
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class PreloadPConfigAdapter extends BaseObject implements IPConfigAdapter
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Friendica\Core;
|
||||
/**
|
||||
* Description of Console
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Console extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@ require_once 'include/text.php';
|
||||
* set to the value of the last parameter. (e.g. "system loglevel 0" will
|
||||
* disable logging)
|
||||
*
|
||||
* @author Tobias Diekershoff
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Config extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Friendica\Core\Console;
|
||||
/**
|
||||
* Description of CreateDoxygen
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class CreateDoxygen extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -11,9 +11,9 @@ require_once 'boot.php';
|
||||
require_once 'include/dba.php';
|
||||
|
||||
/**
|
||||
* @brief Does database updates from the command line
|
||||
* @brief Performs database updates from the command line
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class DatabaseStructure extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
@@ -22,7 +22,7 @@ class DatabaseStructure extends \Asika\SimpleConsole\Console
|
||||
protected function getHelp()
|
||||
{
|
||||
$help = <<<HELP
|
||||
console dbstructure - Does database updates
|
||||
console dbstructure - Performs database updates
|
||||
Usage
|
||||
bin/console dbstructure <command> [-h|--help|-?] [-v]
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Friendica\Core\Console;
|
||||
* This is done for all files, so, in the end removing one file leads to a working doc build.
|
||||
*
|
||||
* @author Alexander Kampmann
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class DocBloxErrorChecker extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Friendica\Core\Console;
|
||||
*
|
||||
* Outputs a PHP file with language strings used by Friendica
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Extract extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -13,8 +13,8 @@ use Friendica\Model\Contact;
|
||||
*
|
||||
* License: AGPLv3 or later, same as Friendica
|
||||
*
|
||||
* @author Tobias Diekershoff <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class GlobalCommunityBlock extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -19,8 +19,8 @@ require_once 'include/text.php';
|
||||
*
|
||||
* License: AGPLv3 or later, same as Friendica
|
||||
*
|
||||
* @author Tobias Diekershoff
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class GlobalCommunitySilence extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ require_once 'include/dba.php';
|
||||
/**
|
||||
* @brief Sets maintenance mode for this node
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Maintenance extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Friendica\Core\Console;
|
||||
/**
|
||||
* Read a strings.php file and create messages.po in the same directory
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class PhpToPo extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Friendica\Core\Console;
|
||||
/**
|
||||
* Read a messages.po file and create strings.php in the same directory
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class PoToPhp extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -3,26 +3,51 @@
|
||||
namespace Friendica\Core\Console;
|
||||
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\Config;
|
||||
|
||||
/**
|
||||
* @brief tool to block an account from the node
|
||||
*
|
||||
* With this tool, you can block an account in such a way, that no postings
|
||||
* or comments this account writes are accepted to the node.
|
||||
* Performs database post updates
|
||||
*
|
||||
* License: AGPLv3 or later, same as Friendica
|
||||
*
|
||||
* @author Tobias Diekershoff <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class PostUpdate extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
protected $helpOptions = ['h', 'help', '?'];
|
||||
|
||||
protected function getHelp()
|
||||
{
|
||||
$help = <<<HELP
|
||||
console postupdate - Performs database post updates
|
||||
Usage
|
||||
bin/console postupdate [-h|--help|-?] [--reset <version>]
|
||||
|
||||
Options
|
||||
-h|--help|-? Show help information
|
||||
--reset <version> Reset the post update version
|
||||
HELP;
|
||||
return $help;
|
||||
}
|
||||
|
||||
protected function doExecute()
|
||||
{
|
||||
$a = get_app();
|
||||
|
||||
if (count($this->args) > 0) {
|
||||
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
|
||||
if ($this->getOption($this->helpOptions)) {
|
||||
$this->out($this->getHelp());
|
||||
return 0;
|
||||
}
|
||||
|
||||
$reset_version = $this->getOption('reset');
|
||||
if (is_bool($reset_version)) {
|
||||
$this->out($this->getHelp());
|
||||
return 0;
|
||||
} elseif ($reset_version) {
|
||||
Config::set('system', 'post_update_version', $reset_version);
|
||||
echo L10n::t('Post update version number has been set to %s.', $reset_version) . "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($a->isInstallMode()) {
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Friendica\Core\Console;
|
||||
* Tired of chasing typos and finding them after a commit.
|
||||
* Run this and quickly see if we've got any parse errors in our application files.
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Typo extends \Asika\SimpleConsole\Console
|
||||
{
|
||||
|
||||
@@ -183,6 +183,10 @@ class L10n extends BaseObject
|
||||
{
|
||||
$a = self::getApp();
|
||||
|
||||
if (!is_numeric($count)) {
|
||||
logger('Non numeric count called by ' . System::callstack(20));
|
||||
}
|
||||
|
||||
$lang = Config::get('system', 'language');
|
||||
|
||||
if (!empty($a->strings[$singular])) {
|
||||
|
||||
@@ -9,31 +9,37 @@ use Friendica\Util\Network;
|
||||
/**
|
||||
* Manage compatibility with federated networks
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Protocol
|
||||
{
|
||||
const DFRN = 'dfrn'; // Friendica, Mistpark, other DFRN implementations
|
||||
const DIASPORA = 'dspr'; // Diaspora
|
||||
const DIASPORA2 = 'dspc'; // Diaspora connector
|
||||
const STATUSNET = 'stac'; // Statusnet connector
|
||||
const OSTATUS = 'stat'; // GNU-social, Pleroma, Mastodon, other OStatus implementations
|
||||
const FEED = 'feed'; // RSS/Atom feeds with no known "post/notify" protocol
|
||||
const MAIL = 'mail'; // IMAP/POP
|
||||
const XMPP = 'xmpp'; // XMPP - Currently unsupported
|
||||
// Native support
|
||||
const ACTIVITYPUB = 'apub'; // ActivityPub
|
||||
const DFRN = 'dfrn'; // Friendica, Mistpark, other DFRN implementations
|
||||
const DIASPORA = 'dspr'; // Diaspora
|
||||
const FEED = 'feed'; // RSS/Atom feeds with no known "post/notify" protocol
|
||||
const MAIL = 'mail'; // IMAP/POP
|
||||
const OSTATUS = 'stat'; // GNU-social, Pleroma, Mastodon, other OStatus implementations
|
||||
|
||||
const FACEBOOK = 'face'; // Facebook API
|
||||
const LINKEDIN = 'lnkd'; // LinkedIn
|
||||
const MYSPACE = 'mysp'; // MySpace - Currently unsupported
|
||||
const GPLUS = 'goog'; // Google+
|
||||
const PUMPIO = 'pump'; // pump.io
|
||||
const TWITTER = 'twit'; // Twitter
|
||||
const NATIVE_SUPPORT = [self::DFRN, self::DIASPORA, self::OSTATUS, self::FEED, self::MAIL, self::ACTIVITYPUB];
|
||||
|
||||
// Supported through a connector
|
||||
const APPNET = 'apdn'; // app.net - Dead protocol
|
||||
const DIASPORA2 = 'dspc'; // Diaspora connector
|
||||
const FACEBOOK = 'face'; // Facebook API
|
||||
const GPLUS = 'goog'; // Google+
|
||||
const LINKEDIN = 'lnkd'; // LinkedIn
|
||||
const PUMPIO = 'pump'; // pump.io
|
||||
const STATUSNET = 'stac'; // Statusnet connector
|
||||
const TWITTER = 'twit'; // Twitter
|
||||
|
||||
const NEWS = 'nntp'; // Network News Transfer Protocol - Currently unsupported
|
||||
const ICALENDAR = 'ical'; // iCalendar - Currently unsupported
|
||||
const PNUT = 'pnut'; // pnut.io - Currently unsupported
|
||||
const ZOT = 'zot!'; // Zot! - Currently unsupported
|
||||
// Currently unsupported
|
||||
const ICALENDAR = 'ical'; // iCalendar
|
||||
const MYSPACE = 'mysp'; // MySpace
|
||||
const NEWS = 'nntp'; // Network News Transfer Protocol
|
||||
const PNUT = 'pnut'; // pnut.io
|
||||
const XMPP = 'xmpp'; // XMPP
|
||||
const ZOT = 'zot!'; // Zot!
|
||||
|
||||
const PHANTOM = 'unkn'; // Place holder
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ use Friendica\Core\Session\DatabaseSessionHandler;
|
||||
/**
|
||||
* High-level Session service class
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class Session
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ require_once 'include/text.php';
|
||||
/**
|
||||
* SessionHandler using Friendica Cache
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class CacheSessionHandler extends BaseObject implements SessionHandlerInterface
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ require_once 'include/text.php';
|
||||
/**
|
||||
* SessionHandler using database
|
||||
*
|
||||
* @author Hypolite Petovan <mrpetovan@gmail.com>
|
||||
* @author Hypolite Petovan <hypolite@mrpetovan.com>
|
||||
*/
|
||||
class DatabaseSessionHandler extends BaseObject implements SessionHandlerInterface
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user