Revert "Coding convention applied - part 1"

This commit is contained in:
Hypolite Petovan 2017-03-21 12:02:59 -04:00 committed by GitHub
parent 9c2c483996
commit 7b352f3f74
181 changed files with 3507 additions and 4338 deletions

View file

@ -404,7 +404,7 @@ function db_create_table($name, $fields, $charset, $verbose, $action, $indexes=n
$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;
@ -1621,11 +1621,11 @@ function db_definition($charset) {
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);
@ -1650,7 +1650,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;
}