added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
		
					parent
					
						
							
								b936fb8da9
							
						
					
				
			
			
				commit
				
					
						ec57babf89
					
				
			
		
					 11 changed files with 240 additions and 191 deletions
				
			
		| 
						 | 
				
			
			@ -486,7 +486,7 @@ function db_create_table($name, $fields, $verbose, $action, $indexes=null) {
 | 
			
		|||
 | 
			
		||||
	$sql_rows = array();
 | 
			
		||||
	$primary_keys = array();
 | 
			
		||||
	foreach($fields AS $fieldname => $field) {
 | 
			
		||||
	foreach ($fields AS $fieldname => $field) {
 | 
			
		||||
		$sql_rows[] = "`".dbesc($fieldname)."` ".db_field_command($field);
 | 
			
		||||
		if (x($field,'primary') and $field['primary']!=''){
 | 
			
		||||
			$primary_keys[] = $fieldname;
 | 
			
		||||
| 
						 | 
				
			
			@ -1692,11 +1692,11 @@ function db_definition() {
 | 
			
		|||
function dbstructure_run(&$argv, &$argc) {
 | 
			
		||||
	global $a, $db;
 | 
			
		||||
 | 
			
		||||
	if(is_null($a)){
 | 
			
		||||
	if (is_null($a)){
 | 
			
		||||
		$a = new App;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if(is_null($db)) {
 | 
			
		||||
	if (is_null($db)) {
 | 
			
		||||
		@include(".htconfig.php");
 | 
			
		||||
		require_once("include/dba.php");
 | 
			
		||||
		$db = new dba($db_host, $db_user, $db_pass, $db_data);
 | 
			
		||||
| 
						 | 
				
			
			@ -1721,7 +1721,7 @@ function dbstructure_run(&$argv, &$argc) {
 | 
			
		|||
				$current = intval(DB_UPDATE_VERSION);
 | 
			
		||||
 | 
			
		||||
				// run any left update_nnnn functions in update.php
 | 
			
		||||
				for($x = $stored; $x < $current; $x ++) {
 | 
			
		||||
				for ($x = $stored; $x < $current; $x ++) {
 | 
			
		||||
					$r = run_update_function($x);
 | 
			
		||||
					if (!$r) break;
 | 
			
		||||
				}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue