diff --git a/exporter/Exporter.php b/exporter/Exporter.php index bcdbb0d..c98cbc1 100644 --- a/exporter/Exporter.php +++ b/exporter/Exporter.php @@ -25,6 +25,16 @@ + /* REMOVES ENABLED MODULES + * + */ + public function init(){ + $this->modules['enabled'] = []; + $this->store(); + + return true; + } + /* RETURNS AVAILABLE MODULE LIST * * @return modules Set containing modules and their versions @@ -38,7 +48,7 @@ foreach($versions as $version=>$dependencies) // if version of module enabled - if( isset($this->modules['enabled'][$module]) && is_array($this->modules['enabled'][$module]) && in_array($version, $this->modules['enabled'][$module]) ) + if( isset($this->modules['enabled'][$module]) && $version == $this->modules['enabled'][$module] ) $modules[$module][] = [ 'version' => $version, 'enabled' => true ]; else $modules[$module][] = [ 'version' => $version, 'enabled' => false ]; diff --git a/exporter/main.php b/exporter/main.php index 910b3bf..cf13023 100644 --- a/exporter/main.php +++ b/exporter/main.php @@ -22,6 +22,16 @@ =========================================================*/ switch($arguments[0]){ + /* (0) Reset enabled modules + ---------------------------------------------------------*/ + case 'init': { + + $exporter->init(); + + echo "** success **\n"; + + } break; + /* (1) Modules listing ---------------------------------------------------------*/ case 'modules': { diff --git a/exporter/modules.json b/exporter/modules.json index 434867c..7a02dc8 100644 --- a/exporter/modules.json +++ b/exporter/modules.json @@ -1,43 +1,43 @@ { - "available": { - "error": { - "1.0": [], - "2.0": [] - }, - "api": { - "1.0": { - "error": "1.0" - }, - "2.0": { - "error": "2.0" - } - }, - "orm": { - "0.8-1": { - "database": "1.0" - }, - "0.8-2": { - "database": "2.0" - } - }, - "database": { - "1.0": { - "error": "1.0" - }, - "2.0": { - "error": "2.0" - } - }, - "lightdb": { - "1.0": [] - }, - "router": { - "1.0": [] - } - }, - "enabled": { - "orm": "0.8", - "database": "1.0", - "error": "1.0" - } -} + "available": { + "error": { + "1.0": [], + "2.0": [] + }, + "api": { + "1.0": { + "error": "1.0" + }, + "2.0": { + "error": "2.0" + } + }, + "orm": { + "0.8.1": { + "database": "1.0" + }, + "0.8.2": { + "database": "2.0" + } + }, + "database": { + "1.0": { + "error": "1.0" + }, + "2.0": { + "error": "2.0" + } + }, + "lightdb": { + "1.0": [] + }, + "router": { + "1.0": [] + } + }, + "enabled": { + "api": "2.0", + "error": "2.0", + "database": "2.0" + } +} \ No newline at end of file diff --git a/src/modules/orm/0.8-1/core/Rows.php b/src/modules/orm/0.8.1/core/Rows.php similarity index 100% rename from src/modules/orm/0.8-1/core/Rows.php rename to src/modules/orm/0.8.1/core/Rows.php diff --git a/src/modules/orm/0.8-1/core/SQLBuilder.php b/src/modules/orm/0.8.1/core/SQLBuilder.php similarity index 100% rename from src/modules/orm/0.8-1/core/SQLBuilder.php rename to src/modules/orm/0.8.1/core/SQLBuilder.php diff --git a/src/modules/orm/0.8-1/core/Table.php b/src/modules/orm/0.8.1/core/Table.php similarity index 100% rename from src/modules/orm/0.8-1/core/Table.php rename to src/modules/orm/0.8.1/core/Table.php diff --git a/src/modules/orm/0.8-2/core/Rows.php b/src/modules/orm/0.8.2/core/Rows.php similarity index 100% rename from src/modules/orm/0.8-2/core/Rows.php rename to src/modules/orm/0.8.2/core/Rows.php diff --git a/src/modules/orm/0.8-2/core/SQLBuilder.php b/src/modules/orm/0.8.2/core/SQLBuilder.php similarity index 100% rename from src/modules/orm/0.8-2/core/SQLBuilder.php rename to src/modules/orm/0.8.2/core/SQLBuilder.php diff --git a/src/modules/orm/0.8-2/core/Table.php b/src/modules/orm/0.8.2/core/Table.php similarity index 100% rename from src/modules/orm/0.8-2/core/Table.php rename to src/modules/orm/0.8.2/core/Table.php