Author: sevein
Date: Tue Jul 31 14:59:05 2012
New Revision: 12019

Log:
Add some code comments

Modified:
   trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php

Modified: 
trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Jul 31 13:37:54 2012        (r12018)
+++ trunk/apps/qubit/modules/default/actions/updateCheckComponent.class.php     
Tue Jul 31 14:59:05 2012        (r12019)
@@ -34,21 +34,30 @@
       return sfView::NONE;
     }
 
-    $this->currentVersion = qubitConfiguration::VERSION;
-
+    // updateCheck service URL
     $this->updateCheckUrl = 'http://updatecheck.qubit-toolkit.org/check/';
 
+    // Application version
+    $this->currentVersion = qubitConfiguration::VERSION;
+
+    // We are using cookies so we need to identify the application path
     $this->cookiePath = 
sfContext::getInstance()->request->getRelativeUrlRoot();
     if (1 > strlen($this->cookiePath))
     {
       $this->cookiePath = '/';
     }
 
+    // Build array with user data that will be sent to the service
     $this->updateCheckData = array();
+
+    // Absolute URL
     $this->updateCheckData['address'] = $request->getUriPrefix() . 
$request->getScriptName() . $request->getPathInfo();
+
+    // Version (including db version)
     $this->updateCheckData['version'] = qubitConfiguration::VERSION.' - 
'.sfConfig::get('app_version');
 
-    if (null === ($this->updateCheckData['distribution'] = 
$this->context->user->getAttribute('distribution')))
+    // Distribution (icaatom, dcb, qubit)
+    if (null === $this->updateCheckData['distribution'] = 
$this->context->user->getAttribute('distribution'))
     {
       $packageXmlPath = sfConfig::get('sf_config_dir').'/package.xml';
       if (file_exists($packageXmlPath))
@@ -62,9 +71,14 @@
       }
     }
 
+    // Site description
     $this->updateCheckData['site_description'] = 
sfConfig::get('app_siteDescription');
+
+    // Site title
     $this->updateCheckData['site_title'] = sfConfig::get('app_siteTitle');
 
+    // If the client does not support JavaScript we try to access to the 
service
+    // using sfWebBrowser, a wrapper for php_curl/fopen/sockets (in that order)
     if (!$request->getCookie('has_js'))
     {
       if (null === ($this->lastVersion = 
$this->context->user->getAttribute('last_version')))

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to