Author: david
Date: Tue Aug 23 11:29:01 2011
New Revision: 9570

Log:
Cosmetic change. Format open/close brackets according to coding standard.

Modified:
   trunk/apps/qubit/modules/object/actions/importAction.class.php

Modified: trunk/apps/qubit/modules/object/actions/importAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/object/actions/importAction.class.php      Tue Aug 
23 11:22:57 2011        (r9569)
+++ trunk/apps/qubit/modules/object/actions/importAction.class.php      Tue Aug 
23 11:29:01 2011        (r9570)
@@ -34,14 +34,18 @@
     $file = $request->getFiles('file');
 
     // if we got here without a file upload, go to file selection
-    if (!isset($file)) {
+    if (!isset($file))
+    {
       $this->redirect(array('module' => 'object', 'action' => 'importSelect'));
     }
 
     // set indexing preference
-    if ($request->getParameter('noindex')) {
+    if ($request->getParameter('noindex'))
+    {
         QubitSearch::getInstance()->disabled = true;
-    } else {
+    }
+    else
+    {
         QubitSearch::getInstance()->getEngine()->enableBatchMode();
     }
 
@@ -51,14 +55,17 @@
         if ('csv' == pathinfo($file['name'], PATHINFO_EXTENSION)) {
             $importer = new QubitCsvImport;
             $importer->import($file['tmp_name'], array('schema' => 
$request->getParameter('schema')));
-
-        } elseif ('xml' == pathinfo($file['name'], PATHINFO_EXTENSION)) {
+        }
+        elseif ('xml' == pathinfo($file['name'], PATHINFO_EXTENSION))
+        {
             $importer = new QubitXmlImport;
             $importer->import($file['tmp_name'], array('strictXmlParsing' => 
false));
-
-        } elseif ('zip' == pathinfo($file['name'], PATHINFO_EXTENSION) && 
class_exists('ZipArchive')) {
+        }
+        elseif ('zip' == pathinfo($file['name'], PATHINFO_EXTENSION) && 
class_exists('ZipArchive'))
+        {
             $zipFolder = $file['tmp_name'].'-zip';
-            if (!file_exists($zipFolder)) {
+            if (!file_exists($zipFolder))
+            {
               mkdir($zipFolder, 0755);
             }
 
@@ -90,8 +97,9 @@
                     continue;
                 }
             }
-
-        } else {
+        }
+        else
+        {
           $this->context->user->setFlash('error', 
$this->context->i18n->__('Unable to import selected file'));
 
           $this->redirect(array('module' => 'object', 'action' => 
'importSelect'));
@@ -105,7 +113,8 @@
     }
 
     // optimize index if enabled
-    if (!$request->getParameter('noindex')) {
+    if (!$request->getParameter('noindex'))
+    {
         QubitSearch::getInstance()->getEngine()->optimize();
     }
 
@@ -114,22 +123,29 @@
     $this->objectType = strtr(get_class($this->rootObject), array('Qubit' => 
''));
   }
 
-  protected function dir_tree($dir) {
+  protected function dir_tree($dir)
+  {
      $path = '';
      $stack[] = $dir;
-     while ($stack) {
+     while ($stack) 
+     {
          $thisdir = array_pop($stack);
-         if ($dircont = scandir($thisdir)) {
+         if ($dircont = scandir($thisdir))
+         {
              $i=0;
-             while (isset($dircont[$i])) {
+             while (isset($dircont[$i]))
+             {
                  if ($dircont[$i] !== '.' && $dircont[$i] !== '..'
                      // ignore system/hidden files
-                     && !preg_match('/^\..*/', $dircont[$i])) {
-
+                   && !preg_match('/^\..*/', $dircont[$i]))
+                 {
                      $current_file = "{$thisdir}/{$dircont[$i]}";
-                     if (is_file($current_file)) {
+                     if (is_file($current_file))
+                     {
                          $path[] = "{$thisdir}/{$dircont[$i]}";
-                     } elseif (is_dir($current_file)) {
+                     }
+                     elseif (is_dir($current_file))
+                     {
                          $stack[] = $current_file;
                      }
                  }

-- 
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