File tree Expand file tree Collapse file tree 4 files changed +14
-6
lines changed
interface/web/dashboard/dashlets Expand file tree Collapse file tree 4 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 22
33class dashlet_databasequota {
44
5- function show ($ limit_to_client_id = 0 ) {
5+ function show ($ limit_to_client_id = null ) {
66 global $ app ;
77
88 //* Loading Template
@@ -23,7 +23,7 @@ function show($limit_to_client_id = 0) {
2323 $ lng_file = 'lib/lang/ ' .$ _SESSION ['s ' ]['language ' ].'_dashlet_databasequota.lng ' ;
2424 if (is_file ($ lng_file )) include $ lng_file ;
2525 $ tpl ->setVar ($ wb );
26- if ($ limit_to_client_id == 0 || $ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
26+ if ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
2727 $ client_id = $ _SESSION ['s ' ]['user ' ]['client_id ' ];
2828 } else {
2929 $ client_id = $ limit_to_client_id ;
Original file line number Diff line number Diff line change @@ -149,8 +149,10 @@ public function show($limit_to_client_id = 0)
149149
150150 if ($ limit_to_client_id == 0 ) {
151151 $ client_id = $ _SESSION ['s ' ]['user ' ]['client_id ' ];
152+ $ user_is_admin = true ;
152153 } else {
153154 $ client_id = $ limit_to_client_id ;
155+ $ user_is_admin = false ;
154156 }
155157
156158 $ client_group_id = $ app ->functions ->intval ($ _SESSION ["s " ]["user " ]["default_group " ]);
@@ -161,6 +163,12 @@ public function show($limit_to_client_id = 0)
161163 foreach ($ limits as $ limit ) {
162164 $ field = $ limit ['field ' ];
163165 $ value = $ client [$ field ];
166+ if ($ user_is_admin ) {
167+ $ value = $ wb ['unlimited_txt ' ];
168+ } else {
169+ $ value = $ client [$ field ];
170+ }
171+
164172 if ($ value != 0 || $ value == $ wb ['unlimited_txt ' ]) {
165173 $ value_formatted = ($ value == '-1 ' )?$ wb ['unlimited_txt ' ]:$ value ;
166174 if (isset ($ limit ['q_type ' ]) && $ limit ['q_type ' ] != '' ) {
Original file line number Diff line number Diff line change 22
33class dashlet_mailquota {
44
5- function show ($ limit_to_client_id = 0 ) {
5+ function show ($ limit_to_client_id = null ) {
66 global $ app ;
77
88 //* Loading Template
@@ -16,7 +16,7 @@ function show($limit_to_client_id = 0) {
1616 if (is_file ($ lng_file )) include $ lng_file ;
1717 $ tpl ->setVar ($ wb );
1818
19- if ($ limit_to_client_id == 0 || $ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
19+ if ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
2020 $ client_id = $ _SESSION ['s ' ]['user ' ]['client_id ' ];
2121 } else {
2222 $ client_id = $ limit_to_client_id ;
Original file line number Diff line number Diff line change 22
33class dashlet_quota {
44
5- function show ($ limit_to_client_id = 0 ) {
5+ function show ($ limit_to_client_id = null ) {
66 global $ app ;
77
88 //* Loading Template
@@ -24,7 +24,7 @@ function show($limit_to_client_id = 0) {
2424 if (is_file ($ lng_file )) include $ lng_file ;
2525 $ tpl ->setVar ($ wb );
2626
27- if ($ limit_to_client_id == 0 || $ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
27+ if ($ _SESSION ["s " ]["user " ]["typ " ] != 'admin ' ) {
2828 $ client_id = $ _SESSION ['s ' ]['user ' ]['client_id ' ];
2929 } else {
3030 $ client_id = $ limit_to_client_id ;
You can’t perform that action at this time.
0 commit comments