Various improvements #51

Merged
MrPetovan merged 13 commits from master into master 2018-07-11 05:34:03 +02:00
4 changed files with 452 additions and 122 deletions
Showing only changes of commit ac41f7caf3 - Show all commits

137
src/Core/Console/Config.php Normal file
View File

@ -0,0 +1,137 @@
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
<?php
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
/*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* To change this license header, choose License Headers in Project Properties.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* To change this template file, choose Tools | Templates
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* and open the template in the editor.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*/
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
namespace Friendica\Directory\Core\Console;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
use Asika\SimpleConsole\CommandArgsException;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
use dba;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
use Friendica\Core;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
require_once 'include/dba.php';
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
require_once 'include/text.php';
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
/**
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* @brief tool to access the system config from the CLI
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* With this script you can access the system configuration of your node from
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* the CLI. You can do both, reading current values stored in the database and
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* set new values to config variables.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* Usage:
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* If you specify no parameters at the CLI, the script will list all config
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* variables defined.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* If you specify one parameter, the script will list all config variables
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* defined in this section of the configuration (e.g. "system").
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* If you specify two parameters, the script will show you the current value
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* of the named configuration setting. (e.g. "system loglevel")
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* If you specify three parameters, the named configuration setting will be
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* set to the value of the last parameter. (e.g. "system loglevel 0" will
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* disable logging)
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* @author Tobias Diekershoff
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
* @author Hypolite Petovan <mrpetovan@gmail.com>
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
*/
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
class Config extends \Asika\SimpleConsole\Console
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
{
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
protected $helpOptions = ['h', 'help', '?'];
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
protected function getHelp()
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
{
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$help = <<<HELP
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
console config - Manage site configuration
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Synopsis
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config [-h|--help|-?] [-v]
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category> [-h|--help|-?] [-v]
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category> <key> [-h|--help|-?] [-v]
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category> <key> <value> [-h|--help|-?] [-v]
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Description
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Lists all config values
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category>
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Lists all config values in the provided category
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category> <key>
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Shows the value of the provided key in the category
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
bin/console config <category> <key> <value>
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Sets the value of the provided key in the category
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Notes:
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Setting config entries which are manually set in .htconfig.php may result in
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
conflict between database settings and the manual startup settings.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Options
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
-h|--help|-? Show help information
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
-v Show more debug information.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
HELP;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
return $help;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
protected function doExecute()
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
{
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$a = get_app();
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if ($this->getOption('v')) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out('Executable: ' . $this->executable);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out('Class: ' . __CLASS__);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out('Arguments: ' . var_export($this->args, true));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out('Options: ' . var_export($this->options, true));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (count($this->args) > 3) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
throw new CommandArgsException('Too many arguments');
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
require_once '.htconfig.php';
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$db = new dba($db_host, $db_user, $db_pass, $db_data);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
unset($db_host, $db_user, $db_pass, $db_data);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (!$result) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
throw new \RuntimeException('Unable to connect to database');
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (count($this->args) == 3) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Core\Config::set($this->getArgument(0), $this->getArgument(1), $this->getArgument(2));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out("config[{$this->getArgument(0)}][{$this->getArgument(1)}] = " . Core\Config::get($this->getArgument(0),
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->getArgument(1)));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (count($this->args) == 2) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out("config[{$this->getArgument(0)}][{$this->getArgument(1)}] = " . Core\Config::get($this->getArgument(0),
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->getArgument(1)));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (count($this->args) == 1) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
Core\Config::load($this->getArgument(0));
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$a = get_app();
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (!is_null($a->config[$this->getArgument(0)])) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
foreach ($a->config[$this->getArgument(0)] as $k => $x) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out("config[{$this->getArgument(0)}][{$k}] = " . $x);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
} else {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out('Config section ' . $this->getArgument(0) . ' returned nothing');
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
if (count($this->args) == 0) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$configs = dba::select('config');
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
foreach ($configs as $config) {
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
$this->out("config[{$config['cat']}][{$config['k']}] = " . $config['v']);
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
return 0;
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.
}
tobiasd commented 2018-05-08 08:08:41 +02:00 (Migrated from github.com)
Review

Should this be changed?

Should this be changed?
MrPetovan commented 2018-05-08 09:28:30 +02:00 (Migrated from github.com)
Review

Totally, this is added by my IDE and has no business in the repo.

Totally, this is added by my IDE and has no business in the repo.

View File

@ -0,0 +1,201 @@
<?php
namespace Friendica\Directory\Core\Console;
/**
* Read a messages.po file and create strings.php in the same directory
*
* @author Hypolite Petovan <mrpetovan@gmail.com>
*/
class PoToPhp extends \Asika\SimpleConsole\Console
{
protected $helpOptions = ['h', 'help', '?'];
const DQ_ESCAPE = "__DQ__";
protected function getHelp()
{
$help = <<<HELP
console php2po - Generate a strings.php file from a messages.po file
Usage
bin/console php2po <path/to/messages.po> [-h|--help|-?] [-v]
Description
Read a messages.po file and create the according strings.php in the same directory
Options
-h|--help|-? Show help information
-v Show more debug information.
HELP;
return $help;
}
protected function doExecute()
{
if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__);
$this->out('Arguments: ' . var_export($this->args, true));
$this->out('Options: ' . var_export($this->options, true));
}
if (count($this->args) == 0) {
$this->out($this->getHelp());
return 0;
}
if (count($this->args) > 1) {
throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments');
}
$a = get_app();
$pofile = realpath($this->getArgument(0));
if (!file_exists($pofile)) {
throw new \RuntimeException('Supplied file path doesn\'t exist.');
}
if (!is_writable(dirname($pofile))) {
throw new \RuntimeException('Supplied directory isn\'t writable.');
}
$outfile = dirname($pofile) . DIRECTORY_SEPARATOR . 'strings.php';
if (strstr($outfile, 'util')) {
$lang = 'en';
} else {
$lang = str_replace('-', '_', basename(dirname($pofile)));
}
$this->out('Out to ' . $outfile);
$out = "<?php\n\n";
$infile = file($pofile);
$k = '';
$v = '';
$arr = false;
$ink = false;
$inv = false;
$escape_s_exp = '|[^\\\\]\$[a-z]|';
foreach ($infile as $l) {
$l = str_replace('\"', self::DQ_ESCAPE, $l);
$len = strlen($l);
if ($l[0] == "#") {
$l = "";
}
if (substr($l, 0, 15) == '"Plural-Forms: ') {
$match = [];
preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
$cond = str_replace('n', '$n', $match[2]);
// define plural select function if not already defined
$fnname = 'string_plural_select_' . $lang;
$out .= 'if(! function_exists("' . $fnname . '")) {' . "\n";
$out .= 'function ' . $fnname . '($n){' . "\n";
$out .= ' return ' . $cond . ';' . "\n";
$out .= '}}' . "\n";
}
if ($k != '' && substr($l, 0, 7) == 'msgstr ') {
if ($ink) {
$ink = false;
$out .= '$a->strings["' . $k . '"] = ';
}
if ($inv) {
$inv = false;
$out .= '"' . $v . '"';
}
$v = substr($l, 8, $len - 10);
$v = preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $v);
$inv = true;
}
if ($k != "" && substr($l, 0, 7) == 'msgstr[') {
if ($ink) {
$ink = false;
$out .= '$a->strings["' . $k . '"] = ';
}
if ($inv) {
$inv = false;
$out .= '"' . $v . '"';
}
if (!$arr) {
$arr = true;
$out .= "[\n";
}
$match = [];
preg_match("|\[([0-9]*)\] (.*)|", $l, $match);
$out .= "\t"
. preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $match[1])
. ' => '
. preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $match[2])
. ",\n";
}
if (substr($l, 0, 6) == 'msgid_') {
$ink = false;
$out .= '$a->strings["' . $k . '"] = ';
}
if ($ink) {
$k .= trim($l, "\"\r\n");
$k = preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $k);
}
if (substr($l, 0, 6) == 'msgid ') {
if ($inv) {
$inv = false;
$out .= '"' . $v . '"';
}
if ($k != "") {
$out .= ($arr) ? "];\n" : ";\n";
}
$arr = false;
$k = str_replace("msgid ", "", $l);
if ($k != '""') {
$k = trim($k, "\"\r\n");
} else {
$k = '';
}
$k = preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $k);
$ink = true;
}
if ($inv && substr($l, 0, 6) != "msgstr") {
$v .= trim($l, "\"\r\n");
$v = preg_replace_callback($escape_s_exp, [$this, 'escapeDollar'], $v);
}
}
if ($inv) {
$inv = false;
$out .= '"' . $v . '"';
}
if ($k != '') {
$out .= ($arr ? "];\n" : ";\n");
}
$out = str_replace(self::DQ_ESCAPE, '\"', $out);
if (!file_put_contents($outfile, $out)) {
throw new \RuntimeException('Unable to write to ' . $outfile);
}
return 0;
}
private function escapeDollar($match)
{
return str_replace('$', '\$', $match[0]);
}
}

114
src/Core/Console/Probe.php Normal file
View File

@ -0,0 +1,114 @@
<?php
namespace Friendica\Directory\Core\Console;
use Asika\SimpleConsole\CommandArgsException;
use Asika\SimpleConsole\Console;
use dba;
use Net_Ping;
require_once 'include/dba.php';
require_once 'include/site-health.php';
/**
* @brief Probe a single site
*
* License: AGPLv3 or later, same as Friendica
*
* @author Hypolite Petovan <mrpetovan@gmail.com>
*/
class Probe extends Console
{
protected $helpOptions = ['h', 'help', '?'];
protected function getHelp()
{
$help = <<<HELP
console globalcommunityblock - Block remote profile from interacting with this node
Usage
bin/console globalcommunityblock <profile_url> [-h|--help|-?] [-v]
Description
Blocks an account in such a way that no postings or comments this account writes are accepted to this node.
Options
-h|--help|-? Show help information
-v Show more debug information.
HELP;
return $help;
}
protected function doExecute()
{
global $db, $a;
$a = new \Friendica\Directory\App();
if ($this->getOption('v')) {
$this->out('Class: ' . __CLASS__);
$this->out('Arguments: ' . var_export($this->args, true));
$this->out('Options: ' . var_export($this->options, true));
}
require_once '.htconfig.php';
$db = new dba($db_host, $db_user, $db_pass, $db_data);
unset($db_host, $db_user, $db_pass, $db_data);
if ($this->getOption('all')) {
$sites = q('SELECT * FROM `site-health` WHERE `health_score` >= 0');
if (is_bool($sites)) {
throw new \RuntimeException('SQL Error');
} elseif (!count($sites)) {
throw new \RuntimeException('No sites to probe ' . intval($this->getArgument(0)));
} else {
foreach($sites as $site) {
$this->out('Running probe for site ID ' . $site['id']);
run_site_probe($site['id'], $site);
}
}
return 0;
}
if (count($this->args) == 0) {
$this->out($this->getHelp());
return 0;
}
if (count($this->args) > 1) {
throw new CommandArgsException('Too many arguments');
}
if (is_numeric($this->getArgument(0))) {
$site_health = q('SELECT * FROM `site-health` WHERE `id` = %u LIMIT 1', intval($this->getArgument(0)));
if (is_bool($site_health)) {
throw new \RuntimeException('SQL Error');
} elseif (!count($site_health)) {
throw new \RuntimeException('Unknown site with ID ' . intval($this->getArgument(0)));
} else {
$site_health = $site_health[0];
}
} else {
$site_health = q('SELECT * FROM `site-health` WHERE `base_url` LIKE "%%%s%%" OR `effective_base_url` LIKE "%%%s%%" LIMIT 1',
$this->getArgument(0), $this->getArgument(0));
if (is_bool($site_health)) {
throw new \RuntimeException('SQL Error');
} elseif (!count($site_health)) {
throw new \RuntimeException('Unknown site with base URL ' . $this->getArgument(0));
} else {
$site_health = $site_health[0];
}
}
$this->out(var_export($site_health, true));
$this->out('Running probe for site ID ' . $site_health['id']);
run_site_probe($site_health['id'], $site_health);
$this->out(var_export($site_health, true));
return 0;
}
}

View File

@ -1,122 +0,0 @@
<?php
function po2php_run($argv, $argc) {
if ($argc!=2) {
print "Usage: ".$argv[0]." <file.po>\n\n";
return;
}
$pofile = $argv[1];
$outfile = dirname($pofile)."/strings.php";
if(strstr($outfile,'util'))
$lang = 'en';
else
$lang = str_replace('-','_',basename(dirname($pofile)));
if (!file_exists($pofile)){
print "Unable to find '$pofile'\n";
return;
}
print "Out to '$outfile'\n";
$out="<?php\n\n";
$infile = file($pofile);
$k="";
$v="";
$arr = False;
$ink = False;
$inv = False;
$escape_s_exp = '|[^\\\\]\$[a-z]|';
function escape_s($match){
return str_replace('$','\$',$match[0]);
}
foreach ($infile as $l) {
$len = strlen($l);
if ($l[0]=="#") $l="";
if (substr($l,0,15)=='"Plural-Forms: '){
$match=Array();
preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
$cond = str_replace('n','$n',$match[2]);
$out .= 'function string_plural_select_' . $lang . '($n){'."\n";
$out .= ' return '.$cond.';'."\n";
$out .= '}'."\n";
}
if ($k!="" && substr($l,0,7)=="msgstr "){
if ($ink) { $ink = False; $out .= '$a->strings["'.$k.'"] = '; }
if ($inv) { $inv = False; $out .= '"'.$v.'"'; }
$v = substr($l,8,$len-10);
$v = preg_replace_callback($escape_s_exp,'escape_s',$v);
$inv = True;
//$out .= $v;
}
if ($k!="" && substr($l,0,7)=="msgstr["){
if ($ink) { $ink = False; $out .= '$a->strings["'.$k.'"] = '; }
if ($inv) { $inv = False; $out .= '"'.$v.'"'; }
if (!$arr) {
$arr=True;
$out .= "array(\n";
}
$match=Array();
preg_match("|\[([0-9]*)\] (.*)|", $l, $match);
$out .= "\t".
preg_replace_callback($escape_s_exp,'escape_s',$match[1])
." => "
.preg_replace_callback($escape_s_exp,'escape_s',$match[2]) .",\n";
}
if (substr($l,0,6)=="msgid_") { $ink = False; $out .= '$a->strings["'.$k.'"] = '; };
if ($ink) {
$k .= trim($l,"\"\r\n");
$k = preg_replace_callback($escape_s_exp,'escape_s',$k);
//$out .= '$a->strings['.$k.'] = ';
}
if (substr($l,0,6)=="msgid "){
if ($inv) { $inv = False; $out .= '"'.$v.'"'; }
if ($k!="") $out .= $arr?");\n":";\n";
$arr=False;
$k = str_replace("msgid ","",$l);
if ($k != '""' ) {
$k = trim($k,"\"\r\n");
} else {
$k = "";
}
$k = preg_replace_callback($escape_s_exp,'escape_s',$k);
$ink = True;
}
if ($inv && substr($l,0,6)!="msgstr") {
$v .= trim($l,"\"\r\n");
$v = preg_replace_callback($escape_s_exp,'escape_s',$v);
//$out .= '$a->strings['.$k.'] = ';
}
}
if ($inv) { $inv = False; $out .= '"'.$v.'"'; }
if ($k!="") $out .= $arr?");\n":";\n";
file_put_contents($outfile, $out);
}
if (array_search(__file__,get_included_files())===0){
po2php_run($argv,$argc);
}