예제 #1
0
 /**
  * Disable SQL uninstall of existing attachments (when Attachments is uninstalled)
  * (See AttachmentsUpdate::disable_sql_uninstall() in update.php for details )
  */
 public function disable_sql_uninstall()
 {
     // Access check.
     if (!JFactory::getUser()->authorise('core.admin', 'com_attachments')) {
         return JError::raiseError(404, JText::_('JERROR_ALERTNOAUTHOR') . ' (ERR 153)');
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_attachments/update.php';
     $msg = AttachmentsUpdate::disable_sql_uninstall();
     if (JRequest::getBool('close')) {
         $this->enqueueSystemMessage($msg);
         // Close this window and refesh the parent window
         AttachmentsJavascript::closeModal();
     } else {
         $this->setRedirect('index.php?option=com_attachments', $msg);
     }
 }
예제 #2
0
 function disable_sql_uninstall()
 {
     require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_attachments' . DS . 'update.php';
     $close = JRequest::getVar('close', false);
     $msg = AttachmentsUpdate::disable_sql_uninstall();
     if ($close) {
         require_once JPATH_COMPONENT_SITE . DS . 'helper.php';
         AttachmentsHelper::enqueueSystemMessage($msg);
         // Close this window and refesh the parent window
         echo "<script>window.parent.document.getElementById('sbox-window').close();\n                  window.parent.location.reload();</script>";
     } else {
         global $option;
         $this->setRedirect('index.php?option=' . $option, $msg);
     }
 }