Example #1
0
 /**
  * method to run after an install/update/uninstall method
  *
  * @return void
  */
 function postflight($type, $parent)
 {
     $source = $parent->getParent()->getPath('source');
     require_once $source . DS . 'admin' . DS . 'updatedb.php';
     $updater = new FSSUpdater();
     global $log;
     $log = $updater->Process($source);
     // think this has to be done last
     InstallExtras($source);
     FSS_Done();
 }
Example #2
0
 function SaveAPI()
 {
     $username = JRequest::getVar('username');
     $apikey = JRequest::getVar('apikey');
     $db = JFactory::getDBO();
     $qry = "REPLACE INTO #__fss_settings (setting, value) VALUES ('fsj_username','" . FSSJ3Helper::getEscaped($db, $username) . "')";
     $db->setQuery($qry);
     $db->Query();
     $qry = "REPLACE INTO #__fss_settings (setting, value) VALUES ('fsj_apikey','" . FSSJ3Helper::getEscaped($db, $apikey) . "')";
     $db->setQuery($qry);
     $db->Query();
     // update url links
     $updater = new FSSUpdater();
     $updater->SortAPIKey($username, $apikey);
     $mainframe = JFactory::getApplication();
     $link = FSSRoute::_('index.php?option=com_fss&view=backup', false);
     $mainframe->redirect($link);
 }