|
@@ -50,6 +50,36 @@ class Schema_SystemSourceStorageAcl extends Core_AclSimpleSchemaBase {
|
|
|
}
|
|
}
|
|
|
return $line;
|
|
return $line;
|
|
|
}
|
|
}
|
|
|
|
|
+ foreach (glob(APP_PATH_CONFIG . "/.cnf--zasob_*-{$host}.inc.php", GLOB_NOSORT) as $file) {
|
|
|
|
|
+ $fname = basename($file);
|
|
|
|
|
+ // DBG::nicePrint($fname, '$fname');
|
|
|
|
|
+ $idZasob = (int)substr($fname, strlen('.cnf--zasob_'), strpos($fname, '-', strlen('.cnf--zasob_') + 1) - strlen('.cnf--zasob_'));// '.cnf--zasob_931-...'
|
|
|
|
|
+ // DBG::nicePrint($idZasob, '$idZasob');
|
|
|
|
|
+ if (!$idZasob) continue;
|
|
|
|
|
+ {
|
|
|
|
|
+ $fun = include $file;
|
|
|
|
|
+ if (!is_callable($fun)) throw new Exception("Config func is not callable");
|
|
|
|
|
+ $conf = $fun('secret-p5-password');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!$conf) continue;
|
|
|
|
|
+ if (in_array(V::get('type', '', $conf), ['mysql', 'pgsql', 'mssql'])) {
|
|
|
|
|
+ DB::getPDO()->insertOrUpdate($this->_rootTableName, [
|
|
|
|
|
+ 'idZasob' => $idZasob,
|
|
|
|
|
+ 'nsPrefix' => "zasob_{$idZasob}",
|
|
|
|
|
+ 'name' => V::get('database', $idZasob, $conf),
|
|
|
|
|
+ 'hasConfig' => 1,
|
|
|
|
|
+ '@insert' => [
|
|
|
|
|
+ 'A_RECORD_CREATE_AUTHOR' => User::getLogin(),
|
|
|
|
|
+ 'A_RECORD_CREATE_DATE' => 'NOW()',
|
|
|
|
|
+ ],
|
|
|
|
|
+ '@update' => [
|
|
|
|
|
+ 'A_RECORD_UPDATE_AUTHOR' => User::getLogin(),
|
|
|
|
|
+ 'A_RECORD_UPDATE_DATE' => 'NOW()',
|
|
|
|
|
+ ]
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+ // DBG::nicePrint(implode("\n", array_map( hideConfPass, explode("\n", var_export($conf, true)) ) ), '$conf');
|
|
|
|
|
+ }
|
|
|
foreach (glob(APP_PATH_CONFIG . "/.cnf--zasob_*-{$host}.ini.php", GLOB_NOSORT) as $file) {
|
|
foreach (glob(APP_PATH_CONFIG . "/.cnf--zasob_*-{$host}.ini.php", GLOB_NOSORT) as $file) {
|
|
|
$fname = basename($file);
|
|
$fname = basename($file);
|
|
|
// DBG::nicePrint($fname, '$fname');
|
|
// DBG::nicePrint($fname, '$fname');
|