Skip to content

Instantly share code, notes, and snippets.

@maranemil
Last active August 29, 2015 14:10
Show Gist options
  • Save maranemil/31fdad589da707f302f5 to your computer and use it in GitHub Desktop.
Save maranemil/31fdad589da707f302f5 to your computer and use it in GitHub Desktop.
SugarCRM get version of installed packages
<?php
/**
* Created by PhpStorm.
* User: emil
* Date: 21.11.14
* Time: 12:05
*/
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
global $moduleList;
global $current_user;
global $beanList, $beanFiles, $modInvisList, $adminOnlyList, $modInvisListActivities;
require_once('modules/Administration/UpgradeHistory.php');
$uh = new UpgradeHistory();
$installedsUnsort = $uh->getAll();
$installedsSorted = $uh->getAllOrderBy("id");
print "<pre>";
echo count ($installedsSorted );
echo "<hr>";
print_r($installedsSorted );
print_r($installedsUnsort );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment