/**
  * put your comment there...
  * 
  */
 protected function enableAction()
 {
     // Initializing!
     $model = $this->model;
     $cjtWebServer = cssJSToolbox::getCJTWebSiteURL();
     $extensions =& CJTPlugin::getInstance()->extensions();
     // Get all CJT-Plugins (Include CJT Plugin itself + all its extensions) that has activate
     // license key!
     $activeLicenses = $model->getStatedLicenses();
     // Activate Automatic upgrade for all activated licenses/components!
     foreach ($activeLicenses as $name => $state) {
         // Get extension def doc.
         // Act only if extension has XMl DOC! This might happened i fthe extension
         // removed while its key still in the database
         if ($extDef = $extensions->getDefDoc(dirname($state['component']['pluginBase']))) {
             // Check CJT Server only if updateSrc points to Wordpress Repository
             $updateSrcServer = (string) $extDef->license->attributes()->updateSrc;
             if (!$updateSrcServer || $updateSrcServer == 'CJT') {
                 // Initializingn vars for a single state/component!
                 $pluginFile = ABSPATH . PLUGINDIR . '/' . $state['component']['pluginBase'];
                 $license =& $state['license'];
                 // Set EDD Automatic Updater!
                 try {
                     CJTStoreUpdate::autoUpgrade($name, $license['key'], $pluginFile);
                 } catch (CJTServicesAPICallException $exception) {
                     die('CJT AUTO-UPGRADE EXCAPTION!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
                 }
             }
         }
     }
 }
 /**
  * put your comment there...
  * 
  * @param mixed $itemName
  * @param mixed $license
  * @param mixed $pluginFile
  */
 public static function &autoUpgrade($itemName, $license, $pluginFile)
 {
     # Get instance
     $instance = new CJTStoreUpdate($itemName, $license, $pluginFile);
     # Start update and return $instance
     return $instance->update();
 }