mirror of
https://github.com/friendica/friendica
synced 2025-04-26 06:30:11 +00:00
Merge pull request #1487 from fabrixxm/projects
new api dfrn/remoteauth, allow plugins to use update_structure
This commit is contained in:
commit
178b7eba1b
2 changed files with 74 additions and 4 deletions
|
@ -120,7 +120,7 @@ function print_structure($database) {
|
|||
}
|
||||
}
|
||||
|
||||
function update_structure($verbose, $action) {
|
||||
function update_structure($verbose, $action, $tables=null, $definition=null) {
|
||||
global $a, $db;
|
||||
|
||||
$errors = false;
|
||||
|
@ -130,7 +130,8 @@ function update_structure($verbose, $action) {
|
|||
// Get the current structure
|
||||
$database = array();
|
||||
|
||||
$tables = q("show tables");
|
||||
if (is_null($tables))
|
||||
$tables = q("show tables");
|
||||
|
||||
foreach ($tables AS $table) {
|
||||
$table = current($table);
|
||||
|
@ -139,7 +140,8 @@ function update_structure($verbose, $action) {
|
|||
}
|
||||
|
||||
// Get the definition
|
||||
$definition = db_definition();
|
||||
if (is_null($definition))
|
||||
$definition = db_definition();
|
||||
|
||||
// Compare it
|
||||
foreach ($definition AS $name => $structure) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue