adds logging for count of resolved relations
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 3 Jul 2015 12:38:26 +0000 (14:38 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 6 Jul 2015 09:08:10 +0000 (11:08 +0200)
* and fixes some typos

Change-Id: Ia88f65562fc9af54ef5a03c42282674eeb18e8ce
Reviewed-on: http://gerrit.tine20.com/customers/2006
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Relations.php

index 9841ea2..9767552 100644 (file)
@@ -448,7 +448,7 @@ class Tinebase_Relations
     }
     
     /**
-     * resolved app records and filles the related_record property with the corresponding record
+     * resolved app records and fills the related_record property with the corresponding record
      * 
      * NOTE: With this, READ ACL is implicitly checked as non readable records won't get retuned!
      * 
@@ -460,7 +460,7 @@ class Tinebase_Relations
      */
     protected function resolveAppRecords($_relations, $_ignoreACL = FALSE)
     {
-        // seperate relations by model
+        // separate relations by model
         $modelMap = array();
         foreach ($_relations as $relation) {
             if (!(isset($modelMap[$relation->related_model]) || array_key_exists($relation->related_model, $modelMap))) {
@@ -492,12 +492,12 @@ class Tinebase_Relations
                 }
             }
             
-            
             $getMultipleMethod = 'getMultiple';
             
             if ($modelName === 'Tinebase_Model_User') {
                 // @todo add related backend here
                 //$appController = Tinebase_User::factory($relations->related_backend);
+
                 $appController = Tinebase_User::factory(Tinebase_User::getConfiguredBackend());
                 $records = $appController->$getMultipleMethod($relations->related_id);
             } else {
@@ -520,7 +520,10 @@ class Tinebase_Relations
                     continue;
                 }
             }
-            
+
+            if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ .
+                " Resolving " . count($relations) . " relations");
+
             foreach ($relations as $relation) {
                 $recordIndex    = $records->getIndexById($relation->related_id);
                 $relationIndex  = $_relations->getIndexById($relation->getId());