function retrievemanifest() { $registry =& JFactory::getConfig(); $client = $this->getClient(); /* refresh installed extensions at the same time */ $ext = installedExtensions::getInstance(); $ext->load(); $channels = $this->getChannels(); $version = $registry->getValue('com_updater.manifest_version', 0); try { $result = $client->retrievemanifest($channels, $version); } catch (Exception $e) { return false; } $success = false; $registry->setValue('com_updater.manifesttime', time()); $registry->setValue('com_updater.joomla_updater', UPDATER_VERSION); if ($result['code'] == 403) { $success = false; } if ($result['code'] == 200) { $payload = $result['payload']; $registry->setValue('com_updater.validated', 1); $registry->setValue('com_updater.manifest_version', $result['fileversion']); $success = JFile::write(SOFTWAREMANIFESTLOCATION, $payload); } if ($result['code'] == 304) { $registry->setValue('com_updater.validated', 1); $success = true; } $this->_storeRegistry(); return $success; }
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * @category ISN * @package Joomla Client * @author Nick Temple <*****@*****.**> * @license GNU/GPL 2.0 http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * @copyright 2008 Intellispire/Nick Temple * @version SVN: $Id: action.partial.html.php 162 2010-04-07 04:22:50Z ntemple $ * */ defined('_JEXEC') or die('Restricted access'); // Assumes isnid1 (username) is available global $isnid1, $machineid; // Assumes $pkg instance of softwarePackage // Assumes $ext available for version $ext = installedExtensions::getInstance(); // Assumes $isPro is true if this is "pro" $jname = $pkg->jname; $myversion = $pkg->version; $currentversion = $ext->getVersion($jname); $action = PKG_INSTALLABLE; // $this->_is_updateable($package); if ($currentversion && version_compare($myversion, $currentversion, '>')) { $action = PKG_UPDATEAVAILABLE; } if ($currentversion && $myversion == $currentversion) { $action = PKG_NOACTION; } if (!defined('_JLEGACY') && $pkg->requires('j15legacy')) { $action = PKG_NOCOMPAT; }
function updaterDisplay($items) { $ext = installedExtensions::getInstance(); ?> <table class="adminlist"> <thead> <tr> <th width="10"> # </th> <th width="10"> </th> <th width="*"> <?php echo JText::_('Program'); ?> </th> <th width = "90"> <?php echo JText::_('Release Date'); ?> </th> <th width = "90"> <?php echo JText::_('Latest Version'); ?> </th> <th width = "90"> <?php echo JText::_('Your Version'); ?> </th> <th width = "90"> <?php echo JText::_('Compatibility'); ?> </th> <th width = "90"> <?php echo JText::_('Stability'); ?> </th> <th width = "100"> <?php echo JText::_('Action'); ?> </th> <!-- <th width = "50"> <?php echo JText::_(''); ?> --> </th> </tr> </thead> <tfoot> <tr width="100%"> <td colspan="10"> <?php /* <del class="container"><div class="pagination"> <?php print $pager->getListFooter(); ?> </div></del> */ ?> </td> </tr> </tfoot> <tbody> <?php $i = 0; foreach ($items as $row) { $package = $row->sku; $pkg = $row; $i++; $k = $i % 2; // TODO: class could be based on status ?> <tr class="<?php echo "row{$k}"; ?> "> <td><?php echo $i; ?> </td> <td><input type="checkbox" name="packages[]" value="<?php echo $package; ?> "></td> <td> <a href="index.php?option=com_updater&task=details&package=<?php echo $package; ?> "><?php echo $row->title; ?> </a> <!-- ( <?php echo $row->jname; ?> ) --> </td> <td align="center"> <?php echo $row->releasedate; ?> </td> <td align="center"> <?php echo $row->version; ?> </td> <td align="center"> <?php echo $ext->getVersion($row->jname); ?> </td> <td align="center"> <?php $compat = explode(',', $row->compatibility); // new for 1.2 foreach ($compat as $c) { switch ($c) { case 'j15native': echo "<img src='components/com_updater/images/compat_15_native.png'><br>"; break; case 'j15legacy': echo "<img src='components/com_updater/images/compat_15_legacy.png'><br>"; break; } } ?> </td> <td align="center"> <?php echo $row->getStabilityHTML(); ?> </td> <td align="center"> <?php include 'action.partial.html.php'; ?> </td> <!-- <td align="center"><a href="http://www.intellispire.com/web/index.php?option=com_chronocontact&chronoformname=newswversion&packageid=<?php echo $package; ?> " target=_blank><img src='components/com_updater/images/16px-Crystal_Clear_action_find.png' title="Click here if you've spotted a newer version!" height="16" width="16"></a> </td> --> </tr> <?php } ?> </tbody> </table> <?php }