mirror of
https://github.com/friendica/friendica
synced 2024-12-23 20:00:16 +00:00
0dfa57948f
Replace deprecated functions with new syntax.
36 lines
690 B
PHP
36 lines
690 B
PHP
#!/usr/bin/env php
|
|
<?php
|
|
|
|
// Red config utility
|
|
|
|
use Friendica\Core\Config;
|
|
|
|
require_once('include/cli_startup.php');
|
|
|
|
cli_startup();
|
|
|
|
if($argc > 3) {
|
|
Config::set($argv[1],$argv[2],$argv[3]);
|
|
echo "config[{$argv[1]}][{$argv[2]}] = " . Config::get($argv[1],$argv[2]) . "\n";
|
|
}
|
|
|
|
if($argc == 3) {
|
|
echo "config[{$argv[1]}][{$argv[2]}] = " . Config::get($argv[1],$argv[2]) . "\n";
|
|
}
|
|
|
|
if($argc == 2) {
|
|
load_config($argv[1]);
|
|
foreach($a->config[$argv[1]] as $k => $x) {
|
|
echo "config[{$argv[1]}][{$k}] = " . $x . "\n";
|
|
}
|
|
}
|
|
|
|
if($argc == 1) {
|
|
$r = q("select * from config where 1");
|
|
if($r) {
|
|
foreach($r as $rr) {
|
|
echo "config[{$rr['cat']}][{$rr['k']}] = " . $rr['v'] . "\n";
|
|
}
|
|
}
|
|
}
|
|
|