Passed
Branch master (95796a)
by Andreas
38:22
created
src/midcom/datamanager/extension/schemaextension.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             new type\radiocheckselect,
29 29
             new type\subform,
30 30
             new type\select,
31
-        	new type\tinymce,
31
+            new type\tinymce,
32 32
             new type\toolbar,
33 33
         );
34 34
     }
Please login to merge, or discard this patch.
src/midcom/datamanager/controller.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@
 block discarded – undo
48 48
 
49 49
     public function process()
50 50
     {
51
-    	if (!$this->form->isSubmitted())
52
-    	{
53
-        	$this->form->handleRequest();
54
-    	}
51
+        if (!$this->form->isSubmitted())
52
+        {
53
+            $this->form->handleRequest();
54
+        }
55 55
         // we add the stylesheet regardless of processing result, since save does not automatically mean relocate...
56 56
         midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . "/midcom.datamanager/default.css");
57 57
 
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/handler/edit.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -281,10 +281,10 @@
 block discarded – undo
281 281
                 break;
282 282
             case 'delete':
283 283
                  if (empty($_POST['guids']))
284
-                 {
285
-                     throw new midcom_error('Invalid request');
286
-                 }
287
-                 break;
284
+                    {
285
+                        throw new midcom_error('Invalid request');
286
+                    }
287
+                    break;
288 288
             default:
289 289
                 throw new midcom_error('Invalid request');
290 290
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/action.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -438,7 +438,7 @@
 block discarded – undo
438 438
             || !isset($_POST['price'])
439 439
             || !isset($_POST['quantity']))
440 440
         {
441
-             throw new midcom_error('Incomplete POST data');
441
+                throw new midcom_error('Incomplete POST data');
442 442
         }
443 443
     }
444 444
 
Please login to merge, or discard this patch.
lib/org/openpsa/mypage/handler/workingon.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
                         $customer = $customer_id;
108 108
                     }
109 109
                     catch (midcom_error $e){}
110
-               }
110
+                }
111 111
             }
112 112
             $customer_cache[$array['task']] = $customer;
113 113
             if (!isset($this->_request_data['customers'][$customer]))
Please login to merge, or discard this patch.
lib/org/openpsa/documents/elFinderVolumeOpenpsa.php 1 patch
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -21,73 +21,73 @@  discard block
 block discarded – undo
21 21
         register_shutdown_function(function(){midcom::get()->finish();});
22 22
     }
23 23
 
24
-	/**
25
-	 * Save uploaded file.
26
-	 * On success return array with new file stat and with removed file hash (if existed file was replaced)
24
+    /**
25
+     * Save uploaded file.
26
+     * On success return array with new file stat and with removed file hash (if existed file was replaced)
27 27
      *
28 28
      * Copied from parent and slightly modified to support attachment versioning
29
-	 *
30
-	 * @param  Resource $fp      file pointer
31
-	 * @param  string   $dst     destination folder hash
32
-	 * @param  string   $src     file name
33
-	 * @param  string   $tmpname file tmp name - required to detect mime type
34
-	 * @return array|false
35
-	 * @author Dmitry (dio) Levashov
36
-	 **/
37
-	public function upload($fp, $dst, $name, $tmpname, $hashes = array()) {
38
-		if ($this->commandDisabled('upload')) {
39
-			return $this->setError(elFinder::ERROR_PERM_DENIED);
40
-		}
41
-
42
-		if (($dir = $this->dir($dst)) == false) {
43
-			return $this->setError(elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
44
-		}
45
-
46
-		if (!$dir['write']) {
47
-			return $this->setError(elFinder::ERROR_PERM_DENIED);
48
-		}
49
-
50
-		if (!$this->nameAccepted($name)) {
51
-			return $this->setError(elFinder::ERROR_INVALID_NAME);
52
-		}
53
-
54
-		$mime = $this->mimetype($this->mimeDetect == 'internal' ? $name : $tmpname, $name);
55
-		$mimeByName = '';
56
-		if ($this->mimeDetect !== 'internal') {
57
-			$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
58
-			if ($mime == 'unknown') {
59
-				$mime = $mimeByName;
60
-			}
61
-		}
62
-
63
-		if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
64
-			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
65
-		}
66
-
67
-		$tmpsize = sprintf('%u', filesize($tmpname));
68
-		if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
69
-			return $this->setError(elFinder::ERROR_UPLOAD_FILE_SIZE);
70
-		}
71
-
72
-		$dstpath = $this->decode($dst);
73
-		if (isset($hashes[$name])) {
74
-			$test = $this->decode($hashes[$name]);
75
-		} else {
76
-			$test = $this->joinPathCE($dstpath, $name);
77
-		}
78
-
79
-		$file = $this->stat($test);
80
-		$this->clearcache();
81
-
82
-		if ($file && $file['name'] === $name) { // file exists and check filename for item ID based filesystem
83
-			// check POST data `overwrite` for 3rd party uploader
84
-			$overwrite = isset($_POST['overwrite'])? (bool)$_POST['overwrite'] : $this->options['uploadOverwrite'];
85
-			if ($overwrite) {
86
-				if (!$file['write']) {
87
-					return $this->setError(elFinder::ERROR_PERM_DENIED);
88
-				} elseif ($file['mime'] == 'directory') {
89
-					return $this->setError(elFinder::ERROR_NOT_REPLACE, $name);
90
-				}
29
+     *
30
+     * @param  Resource $fp      file pointer
31
+     * @param  string   $dst     destination folder hash
32
+     * @param  string   $src     file name
33
+     * @param  string   $tmpname file tmp name - required to detect mime type
34
+     * @return array|false
35
+     * @author Dmitry (dio) Levashov
36
+     **/
37
+    public function upload($fp, $dst, $name, $tmpname, $hashes = array()) {
38
+        if ($this->commandDisabled('upload')) {
39
+            return $this->setError(elFinder::ERROR_PERM_DENIED);
40
+        }
41
+
42
+        if (($dir = $this->dir($dst)) == false) {
43
+            return $this->setError(elFinder::ERROR_TRGDIR_NOT_FOUND, '#'.$dst);
44
+        }
45
+
46
+        if (!$dir['write']) {
47
+            return $this->setError(elFinder::ERROR_PERM_DENIED);
48
+        }
49
+
50
+        if (!$this->nameAccepted($name)) {
51
+            return $this->setError(elFinder::ERROR_INVALID_NAME);
52
+        }
53
+
54
+        $mime = $this->mimetype($this->mimeDetect == 'internal' ? $name : $tmpname, $name);
55
+        $mimeByName = '';
56
+        if ($this->mimeDetect !== 'internal') {
57
+            $mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
58
+            if ($mime == 'unknown') {
59
+                $mime = $mimeByName;
60
+            }
61
+        }
62
+
63
+        if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
64
+            return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
65
+        }
66
+
67
+        $tmpsize = sprintf('%u', filesize($tmpname));
68
+        if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
69
+            return $this->setError(elFinder::ERROR_UPLOAD_FILE_SIZE);
70
+        }
71
+
72
+        $dstpath = $this->decode($dst);
73
+        if (isset($hashes[$name])) {
74
+            $test = $this->decode($hashes[$name]);
75
+        } else {
76
+            $test = $this->joinPathCE($dstpath, $name);
77
+        }
78
+
79
+        $file = $this->stat($test);
80
+        $this->clearcache();
81
+
82
+        if ($file && $file['name'] === $name) { // file exists and check filename for item ID based filesystem
83
+            // check POST data `overwrite` for 3rd party uploader
84
+            $overwrite = isset($_POST['overwrite'])? (bool)$_POST['overwrite'] : $this->options['uploadOverwrite'];
85
+            if ($overwrite) {
86
+                if (!$file['write']) {
87
+                    return $this->setError(elFinder::ERROR_PERM_DENIED);
88
+                } elseif ($file['mime'] == 'directory') {
89
+                    return $this->setError(elFinder::ERROR_NOT_REPLACE, $name);
90
+                }
91 91
                 $document = new org_openpsa_documents_document_dba($test);
92 92
                 $document->backup_version();
93 93
                 $attachments = org_openpsa_helpers::get_dm2_attachments($document, 'document');
@@ -108,28 +108,28 @@  discard block
 block discarded – undo
108 108
 
109 109
                 return $this->stat($document->guid);
110 110
 
111
-			} else {
112
-				$name = $this->uniqueName($dstpath, $name, '-', false);
113
-			}
114
-		}
111
+            } else {
112
+                $name = $this->uniqueName($dstpath, $name, '-', false);
113
+            }
114
+        }
115 115
 
116
-		$stat = array(
117
-			'mime'   => $mime,
118
-			'width'  => 0,
119
-			'height' => 0,
120
-			'size'   => $tmpsize);
116
+        $stat = array(
117
+            'mime'   => $mime,
118
+            'width'  => 0,
119
+            'height' => 0,
120
+            'size'   => $tmpsize);
121 121
 
122
-		if (strpos($mime, 'image') === 0 && ($s = getimagesize($tmpname))) {
123
-			$stat['width'] = $s[0];
124
-			$stat['height'] = $s[1];
125
-		}
122
+        if (strpos($mime, 'image') === 0 && ($s = getimagesize($tmpname))) {
123
+            $stat['width'] = $s[0];
124
+            $stat['height'] = $s[1];
125
+        }
126 126
 
127
-		if (($path = $this->saveCE($fp, $dstpath, $name, $stat)) == false) {
128
-			return false;
129
-		}
127
+        if (($path = $this->saveCE($fp, $dstpath, $name, $stat)) == false) {
128
+            return false;
129
+        }
130 130
 
131
-		return $this->stat($path);
132
-	}
131
+        return $this->stat($path);
132
+    }
133 133
 
134 134
     /**
135 135
      * Return parent directory path
@@ -264,11 +264,11 @@  discard block
 block discarded – undo
264 264
         {
265 265
             $object = midcom::get()->dbfactory->get_object_by_guid($path);
266 266
         }
267
-		catch (midcom_error $e)
267
+        catch (midcom_error $e)
268 268
         {
269 269
             $e->log();
270
-			return '';
271
-		}
270
+            return '';
271
+        }
272 272
 
273 273
         $output = array();
274 274
         if ($object instanceof org_openpsa_documents_document_dba)
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/document/view.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@
 block discarded – undo
299 299
                     MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('next version'),
300 300
                     MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/up.png',
301 301
                 )
302
-             );
302
+                );
303 303
         }
304 304
         if ($previous_version)
305 305
         {
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/contact.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -415,7 +415,7 @@
 block discarded – undo
415 415
             $group_label = $group->get_label();
416 416
             if ($link_contacts)
417 417
             {
418
-                 $group_label = "<a href=\"" . self::$_contacts_url . "group/{$group->guid}/\">" . $group_label . '</a>';
418
+                    $group_label = "<a href=\"" . self::$_contacts_url . "group/{$group->guid}/\">" . $group_label . '</a>';
419 419
             }
420 420
 
421 421
             echo "<span class=\"organization-name\">{$group_label}</span>";
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/ui.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,13 +112,13 @@
 block discarded – undo
112 112
             //pass the urls & titles for the tabs
113 113
             $tabdata[] = array
114 114
             (
115
-               'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/html/',
116
-               'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
115
+                'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/html/',
116
+                'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
117 117
             );
118 118
             $tabdata[] = array
119 119
             (
120
-               'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
121
-               'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
120
+                'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
121
+                'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
122 122
             );
123 123
         }
124 124
 
Please login to merge, or discard this patch.