Explorar el Código

Added CHARSET key into database db.

Serghey Rodin hace 14 años
padre
commit
7717f0be5c
Se han modificado 3 ficheros con 6 adiciones y 5 borrados
  1. 2 2
      bin/v_add_db_base
  2. 1 1
      bin/v_list_db_base
  3. 3 2
      bin/v_list_db_bases

+ 2 - 2
bin/v_add_db_base

@@ -23,7 +23,7 @@ db_password=$4
 type=$5
 type=$5
 host=$6
 host=$6
 encoding=${7-UTF8}
 encoding=${7-UTF8}
-
+encoding=$(echo "$encoding" |tr '[:lower:]' '[:upper:]')
 # Importing variables
 # Importing variables
 source $VESTA/conf/vars.conf
 source $VESTA/conf/vars.conf
 source $V_CONF/vesta.conf
 source $V_CONF/vesta.conf
@@ -89,7 +89,7 @@ increase_user_value "$user" '$U_DATABASES'
 
 
 # Adding db to db conf
 # Adding db to db conf
 v_str="DB='$database' USER='$db_user' HOST='$host' TYPE='$type'"
 v_str="DB='$database' USER='$db_user' HOST='$host' TYPE='$type'"
-v_str="$v_str U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
+v_str="$v_str LOCALE='$encoding' U_DISK='0' SUSPEND='no' DATE='$V_DATE'"
 echo "$v_str">>$V_USERS/$user/db.conf
 echo "$v_str">>$V_USERS/$user/db.conf
 
 
 # Hiding password
 # Hiding password

+ 1 - 1
bin/v_list_db_base

@@ -107,7 +107,7 @@ is_db_valid
 conf=$V_USERS/$user/db.conf
 conf=$V_USERS/$user/db.conf
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
+fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
 
 
 # Listing database
 # Listing database
 case $format in 
 case $format in 

+ 3 - 2
bin/v_list_db_bases

@@ -40,13 +40,14 @@ is_user_valid
 conf=$V_USERS/$user/db.conf
 conf=$V_USERS/$user/db.conf
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields='$DB $USER $HOST $TYPE $U_DISK $SUSPEND $DATE'
+fields='$DB $USER $HOST $TYPE $CHARSET $U_DISK $SUSPEND $DATE'
 
 
 # Listing databases
 # Listing databases
 case $format in 
 case $format in 
     json)   json_list ;;
     json)   json_list ;;
     plain)  nohead=1; shell_list ;;
     plain)  nohead=1; shell_list ;;
-    shell)  shell_list | column -t ;;
+    shell)  fields='$DB $USER $HOST $TYPE $U_DISK $DATE';
+            shell_list | column -t ;;
     *)      check_args '1' '0' 'user [format]'
     *)      check_args '1' '0' 'user [format]'
 esac
 esac