Browse Source

Fixed SQL installation requests

Klectik 7 years ago
parent
commit
16139b48a9
3 changed files with 4 additions and 5 deletions
  1. 1 1
      classes/install.class.php
  2. 0 1
      classes/mysql_connection.class.php
  3. 3 3
      config.php

+ 1 - 1
classes/install.class.php View File

82
         $sqlStr[] = "CREATE TABLE `".Table_prefix."feeds` ( `id_feed` INT(11) NOT NULL AUTO_INCREMENT , `url` VARCHAR(255) NOT NULL , `title` VARCHAR(255) NOT NULL , `type` TINYINT(4) NOT NULL DEFAULT '1' , `updated_at` DATETIME NOT NULL , `error` TINYINT(1) NOT NULL DEFAULT '0' , `credits` INT(1) NOT NULL DEFAULT '0' , `site_url` VARCHAR(255) NOT NULL , `id_user` INT(10) NOT NULL , PRIMARY KEY (`id_feed`)) ENGINE = MyISAM;";
82
         $sqlStr[] = "CREATE TABLE `".Table_prefix."feeds` ( `id_feed` INT(11) NOT NULL AUTO_INCREMENT , `url` VARCHAR(255) NOT NULL , `title` VARCHAR(255) NOT NULL , `type` TINYINT(4) NOT NULL DEFAULT '1' , `updated_at` DATETIME NOT NULL , `error` TINYINT(1) NOT NULL DEFAULT '0' , `credits` INT(1) NOT NULL DEFAULT '0' , `site_url` VARCHAR(255) NOT NULL , `id_user` INT(10) NOT NULL , PRIMARY KEY (`id_feed`)) ENGINE = MyISAM;";
83
 
83
 
84
         $sqlStr[] = "INSERT INTO `".Table_prefix."config` VALUES (". $db->sql_escape($this->data['posts_limit']).", ".$db->sql_escape($this->data['title']).", ".$db->sql_escape($this->data['description']).", ".$db->sql_escape($this->data['lang']).", ".$db->sql_escape($this->data['template']).", ".$db->sql_escape($this->data['url_installation']).");";
84
         $sqlStr[] = "INSERT INTO `".Table_prefix."config` VALUES (". $db->sql_escape($this->data['posts_limit']).", ".$db->sql_escape($this->data['title']).", ".$db->sql_escape($this->data['description']).", ".$db->sql_escape($this->data['lang']).", ".$db->sql_escape($this->data['template']).", ".$db->sql_escape($this->data['url_installation']).");";
85
-        $sqlStr[] = "INSERT INTO `".Table_prefix."users` VALUES ('', '', ".$db->sql_escape($this->data['login']).", ".md5($this->data['password']).", ".$db->sql_escape($this->data['email']).", ".$db->sql_escape($this->data['website']).", ".$db->sql_escape($this->data['about']).");";
85
+        $sqlStr[] = "INSERT INTO `".Table_prefix."users` (name, login, password, email, website, about) VALUES ('', ".$db->sql_escape($this->data['login']).", '".md5($this->data['password'])."', ".$db->sql_escape($this->data['email']).", ".$db->sql_escape($this->data['website']).", ".$db->sql_escape($this->data['about']).");";
86
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '0');";
86
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('url_friendly', '0');";
87
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('rich_text', '0');";
87
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('rich_text', '0');";
88
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";
88
         $sqlStr[] = "INSERT INTO `".Table_prefix."options` VALUES ('allow_comments', '0');";

+ 0 - 1
classes/mysql_connection.class.php View File

77
         if (!$this->mid_consulta) {
77
         if (!$this->mid_consulta) {
78
             $this->merror_numero = $this->mid_conexion->errorCode();
78
             $this->merror_numero = $this->mid_conexion->errorCode();
79
             $this->merror = $this->mid_conexion->errorInfo();
79
             $this->merror = $this->mid_conexion->errorInfo();
80
-            die(var_dump($this->merror));
81
             return false;
80
             return false;
82
         }
81
         }
83
         return $this->mid_consulta; // Si todo salio bien regresa el id de la consulta
82
         return $this->mid_consulta; // Si todo salio bien regresa el id de la consulta

+ 3 - 3
config.php View File

14
   =========================== */
14
   =========================== */
15
 
15
 
16
 define('DB_Server', 'localhost');
16
 define('DB_Server', 'localhost');
17
-define('DB_name', 'gelato');
18
-define('DB_User', 'gelato');
19
-define('DB_Password', 'mysqlgelatopassword');
17
+define('DB_name', '');
18
+define('DB_User', '');
19
+define('DB_Password', '');
20
 define('Table_prefix', 'gel_');
20
 define('Table_prefix', 'gel_');