Redid indentation in CRM/Upgrade/Incremental/php/FourFour.php
authorMargaret Epps <maggie.epps@gmail.com>
Wed, 30 Apr 2014 01:47:36 +0000 (21:47 -0400)
committerMaggie <maggie.epps@gmail.com>
Wed, 30 Apr 2014 01:56:29 +0000 (21:56 -0400)
CRM/Upgrade/Incremental/php/FourFour.php

index b5d8b58ba7ae8b830d08a3f778c9d845db19063e..d909df79c95bbb91f653fd524272e5787487c23c 100644 (file)
@@ -337,26 +337,26 @@ AND id BETWEEN %1 AND %2
       $baseurl = CIVICRM_UF_BASEURL;
       $baselen = strlen($baseurl);
       if (substr($imageURL, 0, $baselen)==$baseurl){
-          $photo = basename($dao->image_url);
-          $config = CRM_Core_Config::singleton();
-          $fullpath = $config->customFileUploadDir.$photo;
+        $photo = basename($dao->image_url);
+        $config = CRM_Core_Config::singleton();
+        $fullpath = $config->customFileUploadDir.$photo;
           if (file_exists($fullpath)){
             $newimageurl =  CRM_Utils_System::url('civicrm/contact/imagefile', 'photo='.$photo, TRUE);
             $sql = 'UPDATE civicrm_contact SET image_url=%1 WHERE id=%2';
             $params = array(
-                1 => array($newimageurl, 'String'),
-                2 => array($dao->id, 'Integer'),
+              1 => array($newimageurl, 'String'),
+              2 => array($dao->id, 'Integer'),
             );
             $updatedao = CRM_Core_DAO::executeQuery($sql, $params);
           }
           else{
             $failures[$dao->id] = $dao->image_url;
+          }
         }
-      }
-      else{     
+        else{     
             $failures[$dao->id] = $dao->image_url;
+        }
       }
-    }
     CRM_Core_Error::debug_var('imageUrlsNotUpgraded', $failures);
     return TRUE;
   }