maj syntaxe accolades, maj jQuery, correction layout contact
[mtweb] / web / app / data / modules / sql / mw_data_config.php
index 280f5c1..0d6f4d2 100644 (file)
@@ -1,13 +1,12 @@
 <?php
 
-  class mw_data_config extends mw_data
-  {
+  class mw_data_config extends mw_data{
 
-    function config($key = null)
-    { $sgbd = $this->sgbd();
+    function config($key = null){
+      $sgbd = $this->sgbd();
       $value = false;
-      if(isset($key))
-      { $sql =
+      if(isset($key)){
+        $sql =
          "SELECT `value` FROM #--config"
         ." WHERE `key`=".$this->eq($key);
         $rst = $sgbd->query($sql);
@@ -16,8 +15,8 @@
         else $value = "";
         $sgbd->free_result($rst);
       }
-      else
-      { $value = array();
+      else{
+        $value = array();
         $sql =
          "SELECT * FROM #--config";
         $rst = $sgbd->query($sql);
@@ -28,8 +27,8 @@
       return $value;
     }
 
-    function config_exists($key)
-    { $sgbd = $this->sgbd();
+    function config_exists($key){
+      $sgbd = $this->sgbd();
       $exists = false;
       $sql = "SELECT count(*) as n FROM #--config"
       ." WHERE `key`=".$this->eq($key);
@@ -40,8 +39,8 @@
       return $exists;
     }
 
-    function set_config($key, $value)
-    { $sgbd = $this->sgbd();
+    function set_config($key, $value){
+      $sgbd = $this->sgbd();
       if($this->config_exists($key)) $sql =
        "UPDATE #--config"
       ." SET `value`=".$this->eq($value)
@@ -54,8 +53,8 @@
       return true;
     }
 
-    function del_config($key)
-    { $sgbd = $this->sgbd();
+    function del_config($key){
+      $sgbd = $this->sgbd();
       return $sgbd->query("DELETE FROM #--config WHERE `key`=".$this->eq($key)) ? true : false;
     }