Skip to content

Commit

Permalink
"MDL-16539, fix warning when create new foler"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Sep 17, 2008
1 parent fda7529 commit 9e5f5f9
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions lib/boxlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,29 +256,31 @@ function CreateFolder($new_folder_name, $params = array()) {
return false;
}
foreach ($data as $a) {
switch ($a['tag']) {
case 'FOLDER_ID':
$ret_array['folder_id'] = $a['value'];
break;
if (!empty($a['value']) {
switch ($a['tag']) {

case 'FOLDER_NAME':
$ret_array['folder_name'] = $a['value'];
break;
case 'FOLDER_ID':
$ret_array['folder_id'] = $a['value'];
break;

case 'FOLDER_TYPE_ID':
$ret_array['folder_type_id'] = $a['value'];
break;
case 'FOLDER_NAME':
$ret_array['folder_name'] = $a['value'];
break;

case 'SHARED':
if(!empty($a['value'])){
case 'FOLDER_TYPE_ID':
$ret_array['folder_type_id'] = $a['value'];
break;

case 'SHARED':
$ret_array['shared'] = $a['value'];
}else{
$ret_array['shared'] = false;
break;

case 'PASSWORD':
$ret_array['password'] = $a['value'];
break;
}
break;
case 'PASSWORD':
$ret_array['password'] = $a['value'];
break;
} else {
$ret_array[strtolower($a['tag'])] = null;
}
}
return $ret_array;
Expand Down

0 comments on commit 9e5f5f9

Please sign in to comment.