/** * Update file sizes for all attachments * (See AttachmentsUpdate::update_file_sizes() in update.php for details ) */ public function update_file_sizes() { // Access check. if (!JFactory::getUser()->authorise('core.admin', 'com_attachments')) { return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 156)'); } require_once JPATH_ADMINISTRATOR . '/components/com_attachments/update.php'; $msg = AttachmentsUpdate::update_file_sizes(); if (JRequest::getBool('close')) { $this->enqueueSystemMessage($msg); // Close this window and refesh the parent window AttachmentsJavascript::closeModal(); } else { $this->setRedirect('index.php?option=' . $this->option, $msg); } }