/**
  * Makes sure that the Professional release can be updated using Joomla!'s
  * own update system. THIS IS AN AKEEBA ORIGINAL!
  */
 public function applyJoomlaExtensionUpdateChanges()
 {
     if (!version_compare(JVERSION, '1.7.0', 'ge')) {
         return;
     }
     if (!AKEEBA_PRO) {
         return;
     }
     $update_url = 'https://www.akeebabackup.com/index.php?option=com_ars&view=update&task=stream&format=xml&id=2';
     $option = 'com_akeeba';
     if (!class_exists('LiveUpdateConfig')) {
         return;
     }
     $luc = new LiveUpdateConfig();
     $dlid = $luc->getAuthorization();
     $db = $this->getDbo();
     $query = $db->getQuery(true)->select(array($db->nq('us') . '.*'))->from($db->nq('#__extensions') . ' AS ' . $db->nq('ex'))->innerJoin($db->nq('#__update_sites_extensions') . ' AS ' . $db->nq('map') . ' ON (' . $db->nq('map') . '.' . $db->nq('extension_id') . ' = ' . $db->nq('ex') . '.' . $db->nq('extension_id') . ')')->innerJoin($db->nq('#__update_sites') . ' AS ' . $db->nq('us') . ' ON (' . $db->nq('us') . '.' . $db->nq('update_site_id') . ' = ' . $db->nq('map') . '.' . $db->nq('update_site_id') . ')')->where($db->nq('ex') . '.' . $db->nq('element') . ' = ' . $db->q($option));
     $db->setQuery($query);
     $update_site = $db->loadObject();
     if ($dlid) {
         $dlid = '&' . $dlid;
     }
     $proper_url = $update_url . $dlid . '/extension.xml';
     if ($update_site->location != $proper_url) {
         if (in_array('last_check_timestamp', get_object_vars($update_site))) {
             $update_site->last_check_timestamp = 0;
         }
         $update_site->location = $proper_url;
         $db->updateObject('#__update_sites', $update_site, 'update_site_id');
     }
 }