Merge remote-tracking branch 'upstream/develop' into avoid-duplicates
This commit is contained in:
commit
5c9a5e736c
6 changed files with 362 additions and 333 deletions
3
.github/workflows/transifex.yml
vendored
3
.github/workflows/transifex.yml
vendored
|
@ -20,8 +20,9 @@ jobs:
|
||||||
echo "::group::Check messages.po"
|
echo "::group::Check messages.po"
|
||||||
# Skip first 4 lines in possible diff, because they're header
|
# Skip first 4 lines in possible diff, because they're header
|
||||||
# Skip all lines of the git diff starting with "@@" or comments or starting "POT-Creation-Date"
|
# Skip all lines of the git diff starting with "@@" or comments or starting "POT-Creation-Date"
|
||||||
if [[ $(git diff -U0 ./view/lang/C/messages.po | awk '!/@@|-"POT-Creation-Date|+"POT-Creation-Date|-#|+#/{print }' | wc -l) > 4 ]]; then
|
if [[ $(git diff -U0 ./view/lang/C/messages.po | awk '!/@@|-"POT-Creation-Date|+"POT-Creation-Date|-#|+#/{print }' | wc -l) -gt 4 ]]; then
|
||||||
echo "::error file=messages.po::messages.po is out of date"
|
echo "::error file=messages.po::messages.po is out of date"
|
||||||
|
echo "$(git diff ./view/lang/C/messages.po)"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Nothing to update"
|
echo "Nothing to update"
|
||||||
|
|
|
@ -61,7 +61,7 @@ KEYWORDS="-k -kt -ktt:1,2"
|
||||||
echo "Extract strings to $OUTFILE.."
|
echo "Extract strings to $OUTFILE.."
|
||||||
rm "$OUTFILE"; touch "$OUTFILE"
|
rm "$OUTFILE"; touch "$OUTFILE"
|
||||||
|
|
||||||
find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | sort)
|
find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | LC_ALL=C sort --stable)
|
||||||
|
|
||||||
total_files=$(wc -l <<< "${find_result}")
|
total_files=$(wc -l <<< "${find_result}")
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,10 @@ class User extends \Asika\SimpleConsole\Console
|
||||||
* @var Database
|
* @var Database
|
||||||
*/
|
*/
|
||||||
private $dba;
|
private $dba;
|
||||||
|
/**
|
||||||
|
* @var IPConfig
|
||||||
|
*/
|
||||||
|
private $pConfig;
|
||||||
|
|
||||||
protected function getHelp()
|
protected function getHelp()
|
||||||
{
|
{
|
||||||
|
@ -89,13 +93,14 @@ HELP;
|
||||||
return $help;
|
return $help;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, array $argv = null)
|
public function __construct(App\Mode $appMode, L10n $l10n, Database $dba, IPConfig $pConfig, array $argv = null)
|
||||||
{
|
{
|
||||||
parent::__construct($argv);
|
parent::__construct($argv);
|
||||||
|
|
||||||
$this->appMode = $appMode;
|
$this->appMode = $appMode;
|
||||||
$this->l10n = $l10n;
|
$this->l10n = $l10n;
|
||||||
$this->dba = $dba;
|
$this->dba = $dba;
|
||||||
|
$this->pConfig = $pConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doExecute()
|
protected function doExecute()
|
||||||
|
@ -463,8 +468,7 @@ HELP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$pconfig = \Friendica\DI::pConfig();
|
$values = $this->pConfig->load($user['uid'], $category);
|
||||||
$values = $pconfig->load($user['uid'], $category);
|
|
||||||
|
|
||||||
switch ($subCmd) {
|
switch ($subCmd) {
|
||||||
case 'list':
|
case 'list':
|
||||||
|
|
|
@ -35,7 +35,7 @@ interface IPConfig
|
||||||
* @param int $uid The user_id
|
* @param int $uid The user_id
|
||||||
* @param string $cat The category of the configuration value
|
* @param string $cat The category of the configuration value
|
||||||
*
|
*
|
||||||
* @return void
|
* @return array The loaded config array
|
||||||
* @see Cache
|
* @see Cache
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -68,6 +68,8 @@ class PreloadPConfig extends BasePConfig
|
||||||
|
|
||||||
// load the whole category out of the DB into the cache
|
// load the whole category out of the DB into the cache
|
||||||
$this->configCache->load($uid, $config);
|
$this->configCache->load($uid, $config);
|
||||||
|
|
||||||
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue