Commit 2821eef2 authored by claes's avatar claes

Open volume works again

parent 852f2264
......@@ -18,6 +18,8 @@ wb_adm_opendb_func ()
local password=$3
local database=$4
local volume=$5
echo "args: $1 $2 $3 $4 $5"
source pwrp_env.sh set project $project
......@@ -70,7 +72,7 @@ wb_adm_parse ()
cmd="opendb"
if [ -z $1 ] || [ $1 = $cmd ] || [ ${cmd#$1} != $cmd ]; then
shift
wb_adm_opendb_func $@
wb_adm_opendb_func $1 $2 $3 $4 $5
return
fi
cmd="create"
......
......@@ -542,9 +542,15 @@ int Admin::open_project()
case adminnav_eItemType_ProjVolume:
{
ItemProjVolume *item = (ItemProjVolume *)base_item;
char db[80];
if ( strcmp( item->db, "") == 0)
strcpy( db, "_no_");
else
strcpy( db, item->db);
sprintf( cmd, "wb_admin.sh opendb %s \"%s\" \"%s\" %s %s", item->project,
login_prv.username, login_prv.password, item->db,
login_prv.username, login_prv.password, db,
item->volume);
system( cmd);
break;
......
......@@ -1134,7 +1134,8 @@ int ItemProject::open_children( AdminNav *adminnav, double x, double y)
sizeof( item_str) / sizeof( item_str[0]), sizeof( item_str[0]), 0);
if ( nr < 4)
continue;
if ( !(cdh_NoCaseStrcmp( item_str[2], "RootVolume") == 0 &&
if ( !((cdh_NoCaseStrcmp( item_str[2], "RootVolume") == 0 ||
cdh_NoCaseStrcmp( item_str[2], "SubVolume") == 0) &&
cdh_NoCaseStrcmp( item_str[3], "cnf") == 0))
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment