verification de la version
[mtweb] / mw / app / data / modules / share / mw_data_versions.php
diff --git a/mw/app/data/modules/share/mw_data_versions.php b/mw/app/data/modules/share/mw_data_versions.php
new file mode 100644 (file)
index 0000000..26bc0ee
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+  class mw_data_versions extends mw_data{
+
+    function version($application_name){
+      if(
+        $version = $this->data_read(
+          array(
+            "table_name" => "versions",
+            "index_name" => "application",
+            "index_value" => $application_name
+          )
+        )
+      ) return $version["version"];
+      return false;
+    }
+
+  }