Improve design of read-only pop up device info dialog
Re design device details dialog Aldo did some folder info related changes at server side php file
This commit is contained in:
@ -111,7 +111,7 @@ class PluginMDMModule extends Module
|
||||
|
||||
|
||||
/**
|
||||
function which calls the wipeDevice soap call
|
||||
* function which calls the wipeDevice soap call
|
||||
* @param int $deviceid of phone which has to be wiped
|
||||
* @return json $response object contains the response of the soap request from Z-Push
|
||||
*/
|
||||
@ -232,7 +232,6 @@ class PluginMDMModule extends Module
|
||||
$contentData = $device['contentdata'];
|
||||
$folders = array_keys($contentData);
|
||||
$synchedFolderTypes = array();
|
||||
$synchronizedData = '';
|
||||
$synchronizedFolders = 0;
|
||||
$hierarchyCache = isset($device['hierarchycache']) ? $device['hierarchycache'] : false;
|
||||
|
||||
@ -253,27 +252,21 @@ class PluginMDMModule extends Module
|
||||
|
||||
$folderType = $this->getSyncFolderType($type, $name);
|
||||
|
||||
if (isset($contentData[$folderid][self::FOLDERUUID])) {
|
||||
$synchedFolderTypes[$folderType]++;
|
||||
}
|
||||
if (isset($contentData[$folderid][self::FOLDERUUID])) {
|
||||
$synchedFolderTypes[$folderType]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($synchedFolderTypes as $key => $value) {
|
||||
$synchronizedData = $synchronizedData . $key;
|
||||
$synchronizedFolders += $value;
|
||||
if ($value > 1) {
|
||||
$synchronizedData = $synchronizedData . "(" . $value . ") ";
|
||||
} else {
|
||||
$synchronizedData = $synchronizedData . " ";
|
||||
}
|
||||
}
|
||||
|
||||
$syncFoldersProps = array();
|
||||
foreach ($synchedFolderTypes as $key => $value) {
|
||||
$synchronizedFolders += $value;
|
||||
$syncFoldersProps[strtolower($key) . 'folder'] = $value;
|
||||
}
|
||||
|
||||
|
||||
$syncFoldersProps["totalfolders"] = count($folders);
|
||||
$syncFoldersProps["shortfolderids"] = $device['hasfolderidmapping'] ? dgettext('plugin_mdm', "Yes") : dgettext('plugin_mdm', "No") ;
|
||||
$syncFoldersProps["shortfolderids"] = $device['hasfolderidmapping'] ? dgettext('plugin_mdm', "Yes") : dgettext('plugin_mdm', "No");
|
||||
$syncFoldersProps['synchronizedfolders'] = $synchronizedFolders;
|
||||
$syncFoldersProps['synchronizeddata'] = $synchronizedData;
|
||||
|
||||
return $syncFoldersProps;
|
||||
}
|
||||
|
Reference in New Issue
Block a user