diff --git a/dbd/sql/pg/util_copy_api_table_by_groupa.sql b/dbd/sql/pg/util_copy_api_table_by_groupa.sql new file mode 100644 index 0000000..3f6ba41 --- /dev/null +++ b/dbd/sql/pg/util_copy_api_table_by_groupa.sql @@ -0,0 +1,13 @@ +-- delete old entries of group +DELETE FROM system.api where "group" = 101; +-- get data from group 0 and write it in your group +INSERT INTO system.api ( "ID", "group","type","parentID","parentValue","name","verify" ) + SELECT "ID", + '101' as "group", -- target group + "type", + "parentID", + "parentValue", + "name", + "verify" + FROM system.api + WHERE "group" = 0; -- pattern group \ No newline at end of file diff --git a/img/img.php b/img/img.php index 0cf0be6..f55a8bd 100644 --- a/img/img.php +++ b/img/img.php @@ -56,7 +56,7 @@ class img { private static function getFolder($folder, $mask) { $files = array(); - foreach (glob($folder . $mask) as $file) { + foreach (glob($folder . $mask,GLOB_BRACE) as $file) { $files[] = basename($file); } return $files;