diff --git a/module.xml b/module.xml index bddc3b7..21defc2 100644 --- a/module.xml +++ b/module.xml @@ -15,7 +15,6 @@ *0.0.1* First release Provides feature codes for a simplified call forwarding. Suitable for a 'one touch' set and forget style of CF where the user rarely makes changes to the CF destination - Other asterisk gt1.8 ge2.9 diff --git a/page.simplecf.php b/page.simplecf.php index a39827c..76f4cd0 100644 --- a/page.simplecf.php +++ b/page.simplecf.php @@ -2,13 +2,17 @@ //Check if user is "logged in" if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); } -// check to see if user has automatic updates enabled in FreePBX settings -$cm =& cronmanager::create($db); -$online_updates = $cm->updates_enabled() ? true : false; +if (class_exists('cronmanager')) { + // check to see if user has automatic updates enabled in FreePBX settings + $cm =& cronmanager::create($db); + $online_updates = $cm->updates_enabled() ? true : false; -// check dev site to see if new version of module is available -if ($online_updates && $foo = simplecf_vercheck()) { - print "
A new version of this module is available from the PBX Open Source Software Alliance
"; + // check dev site to see if new version of module is available + if ($online_updates && $foo = simplecf_vercheck()) { + print "
A new version of this module is available from the PBX Open Source Software Alliance
"; + } +} else { + // todo: add version check for ver. 14+ } // get version number for display in page footer