htmlentities in sql_getparams + check if db not found
This commit is contained in:
		
							parent
							
								
									aef4f58e8a
								
							
						
					
					
						commit
						93ce8ffd0f
					
				|  | @ -38,7 +38,10 @@ if (!$r=$mysql->get_dblist()) { | |||
| 	$error=$err->errstr(); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| $r=$mysql->get_defaultsparam($dbname); | ||||
| if (!$r) { | ||||
| 	$error=$err->errstr(); | ||||
| } | ||||
| 
 | ||||
| ?>
 | ||||
| <h3><?php __("MySQL Databases"); ?></h3>
 | ||||
|  | @ -47,8 +50,9 @@ if (!$r=$mysql->get_dblist()) { | |||
| <?php | ||||
| 	if (isset($error) && $error) { | ||||
| 		echo "<p class=\"alert alert-danger\">$error</p><p> </p>"; | ||||
|         include_once("foot.php");  | ||||
|         exit(); | ||||
|     } | ||||
| $r=$mysql->get_defaultsparam($dbname); | ||||
| ?>
 | ||||
| <p><?php __("Your current connection settings are"); ?> : </p>
 | ||||
| <table class="tedit"> | ||||
|  | @ -61,7 +65,7 @@ $r=$mysql->get_defaultsparam($dbname); | |||
| 	</tr> | ||||
| 	<tr> | ||||
| 		<th><?php __("Database"); ?></th>
 | ||||
| 		<td><code><?php echo $dbname; ?></code></td>
 | ||||
| <td><code><?php ehe($dbname); ?></code></td>
 | ||||
| 	</tr> | ||||
| <?php | ||||
| if(isset($r['user'])){ | ||||
|  |  | |||
|  | @ -589,7 +589,8 @@ class m_mysql { | |||
|         $this->dbus->query("Select * from mysql.db where Db= ? and User!= ? ;", array($dbn, $cuid."_myadm")); | ||||
| 
 | ||||
|         if (!$db->num_rows()) { | ||||
|             return $r; | ||||
|             $err->raise("mysql",_("Database not found")); | ||||
|             return false; | ||||
|         } | ||||
|         while ($db->next_record()) { | ||||
|             $variable = $db->Record; | ||||
|  | @ -652,12 +653,18 @@ class m_mysql { | |||
|                 } | ||||
|             } | ||||
|         } //endwhile
 | ||||
|         if (!count($r)) { | ||||
|             $err->raise("mysql",_("Database not found")); | ||||
|             return false; | ||||
|         } | ||||
|         if (!$db->query("SELECT name,password from dbusers where name= ? ;", array($dbu))) { | ||||
|             return $r; | ||||
|             $err->raise("mysql",_("Database not found")); | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|         if (!$db->num_rows()) { | ||||
|             return $r; | ||||
|             $err->raise("mysql",_("Database not found")); | ||||
|             return false; | ||||
|         } | ||||
|         $db->next_record(); | ||||
|         $r['user'] = $db->f('name'); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Benjamin Sonntag
						Benjamin Sonntag