| | Author: Aleksander Machniak | +-----------------------------------------------------------------------+ */ class rcmail_action_settings_folder_size extends rcmail_action { protected static $mode = self::MODE_AJAX; /** * Request handler. * * @param array $args Arguments from the previous step(s) */ public function run($args = []) { $rcmail = rcmail::get_instance(); $storage = $rcmail->get_storage(); $name = rcube_utils::get_input_string('_mbox', rcube_utils::INPUT_POST, true); $size = $storage->folder_size($name); // @TODO: check quota and show percentage usage of specified mailbox? if ($size !== false) { $rcmail->output->command('folder_size_update', self::show_bytes($size)); } else { self::display_server_error(); } $rcmail->output->send(); } }