Exemplo n.º 1
0
 /**
  * This is executing the update table commands to adjust tables to the latest layout
  * @author Max Milbers
  */
 function updateDatabase()
 {
     vRequest::vmCheckToken();
     if (!class_exists('com_virtuemartInstallerScript')) {
         require VMPATH_ADMIN . DS . 'install' . DS . 'script.virtuemart.php';
     }
     $updater = new com_virtuemartInstallerScript();
     $updater->update(false);
     $this->setRedirect($this->redirectPath, 'Database updated');
 }
 /**
  * Legacy j1.5 function to use the 1.6 class install/update
  *
  * @return boolean True on success
  * @deprecated
  */
 function com_install()
 {
     $vmInstall = new com_virtuemartInstallerScript();
     $upgrade = $vmInstall->checkIfUpdate();
     // if(version_compare(JVERSION,'1.6.0','ge')) {
     // Joomla! 1.6 code here
     // } else {
     // Joomla! 1.5 code here
     // $method = ($upgrade) ? 'update' : 'install';
     // $vmInstall->$method();
     // $vmInstall->postflight($method);
     // }
     return true;
 }
 /**
  * Legacy j1.5 function to use the 1.6 class uninstall
  *
  * @return boolean True on success
  * @deprecated
  */
 function com_uninstall()
 {
     $vmInstall = new com_virtuemartInstallerScript();
     // 		$vmInstall->preflight('uninstall');
     if (version_compare(JVERSION, '1.6.0', 'ge')) {
         // Joomla! 1.6 code here
     } else {
         $vmInstall->uninstall();
         $vmInstall->postflight('uninstall');
     }
     return true;
 }
 function updateDatabase()
 {
     $data = JRequest::get('get');
     JRequest::setVar($data['token'], '1', 'post');
     JRequest::checkToken() or jexit('Invalid Token, in ' . JRequest::getWord('task'));
     // 		$this->checkPermissionForTools();
     if (!class_exists('com_virtuemartInstallerScript')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'install' . DS . 'script.virtuemart.php';
     }
     $updater = new com_virtuemartInstallerScript();
     $updater->update(false);
     $this->setRedirect($this->redirectPath, 'Database updated');
 }