Completed
Pull Request — develop (#740)
by Maxim
08:32
created
manager/media/browser/mcpuk/lib/class_image_imagick.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
   *      @link http://kcfinder.sunhater.com
13 13
   */
14 14
 
15
-class image_imagick extends image {
15
+class image_imagick extends image{
16 16
 
17 17
     static $MIMES = array(
18 18
         //'tif' => "image/tiff"
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     // ABSTRACT PUBLIC METHODS
23 23
 
24
-    public function resize($width, $height) {//
24
+    public function resize($width, $height){//
25 25
         if (!$width) $width = 1;
26 26
         if (!$height) $height = 1;
27 27
         try {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         return true;
35 35
     }
36 36
 
37
-    public function resizeFit($width, $height, $background=false) {//
37
+    public function resizeFit($width, $height, $background = false){//
38 38
         if (!$width) $width = 1;
39 39
         if (!$height) $height = 1;
40 40
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
     }
67 67
 
68
-    public function resizeCrop($width, $height, $offset=false) {
68
+    public function resizeCrop($width, $height, $offset = false){
69 69
         if (!$width) $width = 1;
70 70
         if (!$height) $height = 1;
71 71
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         return true;
116 116
     }
117 117
 
118
-    public function rotate($angle, $background="#000000") {
118
+    public function rotate($angle, $background = "#000000"){
119 119
         try {
120 120
             $this->image->rotateImage(new ImagickPixel($background), $angle);
121 121
             $size = $this->image->getImageGeometry();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         return true;
128 128
     }
129 129
 
130
-    public function flipHorizontal() {
130
+    public function flipHorizontal(){
131 131
         try {
132 132
             $this->image->flopImage();
133 133
         } catch (Exception $e) {
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         return true;
137 137
     }
138 138
 
139
-    public function flipVertical() {
139
+    public function flipVertical(){
140 140
         try {
141 141
             $this->image->flipImage();
142 142
         } catch (Exception $e) {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         return true;
146 146
     }
147 147
 
148
-    public function watermark($file, $left=false, $top=false) {
148
+    public function watermark($file, $left = false, $top = false){
149 149
         try {
150 150
             $wm = new Imagick($file);
151 151
             $size = $wm->getImageGeometry();
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     // ABSTRACT PROTECTED METHODS
183 183
 
184
-    protected function getBlankImage($width, $height) {
184
+    protected function getBlankImage($width, $height){
185 185
         try {
186 186
             $img = new Imagick();
187 187
             $img->newImage($width, $height, "none");
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         return $img;
193 193
     }
194 194
 
195
-    protected function getImage($image, &$width, &$height) {
195
+    protected function getImage($image, &$width, &$height){
196 196
 
197 197
         if (is_object($image) && ($image instanceof image_imagick)) {
198 198
             try {
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
 
235 235
     // PSEUDO-ABSTRACT STATIC METHODS
236 236
 
237
-    static function available() {
237
+    static function available(){
238 238
         return class_exists("Imagick");
239 239
     }
240 240
 
241
-    static function checkImage($file) {
241
+    static function checkImage($file){
242 242
         try {
243 243
             new Imagick($file);
244 244
         } catch (Exception $e) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
     // INHERIT METHODS
252 252
 
253
-    public function output($type="jpeg", array $options=array()) {
253
+    public function output($type = "jpeg", array $options = array()){
254 254
         $type = strtolower($type);
255 255
         try {
256 256
             $this->image->setImageFormat($type);
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             echo $this->image;
270 270
 
271 271
         } else {
272
-            $file = $options['file'] . ".$type";
272
+            $file = $options['file'].".$type";
273 273
             try {
274 274
                 $this->image->writeImage($file);
275 275
             } catch (Exception $e) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 
290 290
     // OWN METHODS
291 291
 
292
-    protected function optimize_jpeg(array $options=array()) {
292
+    protected function optimize_jpeg(array $options = array()){
293 293
         $quality = isset($options['quality']) ? $options['quality'] : self::DEFAULT_JPEG_QUALITY;
294 294
         try {
295 295
             $this->image->setImageCompression(Imagick::COMPRESSION_JPEG);
Please login to merge, or discard this patch.
manager/media/browser/mcpuk/lib/class_image_gmagick.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
   *      @link http://kcfinder.sunhater.com
13 13
   */
14 14
 
15
-class image_gmagick extends image {
15
+class image_gmagick extends image{
16 16
 
17 17
     static $MIMES = array(
18 18
         //'tif' => "image/tiff"
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
     // ABSTRACT PUBLIC METHODS
23 23
 
24
-    public function resize($width, $height) {//
24
+    public function resize($width, $height){//
25 25
         if (!$width) $width = 1;
26 26
         if (!$height) $height = 1;
27 27
         try {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         return true;
35 35
     }
36 36
 
37
-    public function resizeFit($width, $height, $background=false) {//
37
+    public function resizeFit($width, $height, $background = false){//
38 38
         if (!$width) $width = 1;
39 39
         if (!$height) $height = 1;
40 40
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         }
70 70
     }
71 71
 
72
-    public function resizeCrop($width, $height, $offset=false) {
72
+    public function resizeCrop($width, $height, $offset = false){
73 73
         if (!$width) $width = 1;
74 74
         if (!$height) $height = 1;
75 75
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         return true;
120 120
     }
121 121
 
122
-    public function rotate($angle, $background="#000000") {
122
+    public function rotate($angle, $background = "#000000"){
123 123
         try {
124 124
             $this->image->rotateImage($background, $angle);
125 125
             $w = $this->image->getImageWidth();
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         return true;
133 133
     }
134 134
 
135
-    public function flipHorizontal() {
135
+    public function flipHorizontal(){
136 136
         try {
137 137
             $this->image->flopImage();
138 138
         } catch (Exception $e) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         return true;
142 142
     }
143 143
 
144
-    public function flipVertical() {
144
+    public function flipVertical(){
145 145
         try {
146 146
             $this->image->flipImage();
147 147
         } catch (Exception $e) {
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         return true;
151 151
     }
152 152
 
153
-    public function watermark($file, $left=false, $top=false) {
153
+    public function watermark($file, $left = false, $top = false){
154 154
         try {
155 155
             $wm = new Gmagick($file);
156 156
             $w = $wm->getImageWidth();
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
     // ABSTRACT PROTECTED METHODS
187 187
 
188
-    protected function getBlankImage($width, $height) {
188
+    protected function getBlankImage($width, $height){
189 189
         try {
190 190
             $img = new Gmagick();
191 191
             $img->newImage($width, $height, "none");
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         return $img;
196 196
     }
197 197
 
198
-    protected function getImage($image, &$width, &$height) {
198
+    protected function getImage($image, &$width, &$height){
199 199
 
200 200
         if (is_object($image) && ($image instanceof image_gmagick)) {
201 201
             $width = $image->width;
@@ -232,11 +232,11 @@  discard block
 block discarded – undo
232 232
 
233 233
     // PSEUDO-ABSTRACT STATIC METHODS
234 234
 
235
-    static function available() {
235
+    static function available(){
236 236
         return class_exists("Gmagick");
237 237
     }
238 238
 
239
-    static function checkImage($file) {
239
+    static function checkImage($file){
240 240
         try {
241 241
             new Gmagick($file);
242 242
         } catch (Exception $e) {
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
     // INHERIT METHODS
250 250
 
251
-    public function output($type="jpeg", array $options=array()) {
251
+    public function output($type = "jpeg", array $options = array()){
252 252
         $type = strtolower($type);
253 253
         try {
254 254
             $this->image->setImageFormat($type);
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             echo $this->image;
268 268
 
269 269
         } else {
270
-            $file = $options['file'] . ".$type";
270
+            $file = $options['file'].".$type";
271 271
             try {
272 272
                 $this->image->writeImage($file);
273 273
             } catch (Exception $e) {
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
     // OWN METHODS
289 289
 
290
-    protected function optimize_jpeg(array $options=array()) {
290
+    protected function optimize_jpeg(array $options = array()){
291 291
         $quality = isset($options['quality']) ? $options['quality'] : self::DEFAULT_JPEG_QUALITY;
292 292
         try {
293 293
             $this->image->setCompressionQuality($quality);
Please login to merge, or discard this patch.
manager/actions/refresh_site.dynamic.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 
30 30
 <div class="tab-page">
31 31
 	<div class="container container-body">
32
-		<?php if($num_rows_pub)   printf('<p>' . $_lang["refresh_published"]   . '</p>', $num_rows_pub) ?>
33
-		<?php if($num_rows_unpub) printf('<p>' . $_lang["refresh_unpublished"] . '</p>', $num_rows_unpub) ?>
32
+		<?php if ($num_rows_pub)   printf('<p>'.$_lang["refresh_published"].'</p>', $num_rows_pub) ?>
33
+		<?php if ($num_rows_unpub) printf('<p>'.$_lang["refresh_unpublished"].'</p>', $num_rows_unpub) ?>
34 34
 		<?php
35 35
 		$modx->clearCache('full', true);
36 36
 		// invoke OnSiteRefresh event
Please login to merge, or discard this patch.
manager/actions/help.static.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 $helpBasePath = "actions/help/";
6 6
 ?>
7 7
 
8 8
 <h1>
9
-	<?php echo $_style['page_help'];  echo $_lang['help']; ?>
9
+	<?php echo $_style['page_help']; echo $_lang['help']; ?>
10 10
 </h1>
11 11
 
12 12
 <div class="sectionBody">
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 		</script>
17 17
 
18 18
 		<?php
19
-		if($handle = opendir('actions/help')) {
20
-			while(false !== ($file = readdir($handle))) {
21
-				if($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath . $file)) {
19
+		if ($handle = opendir('actions/help')) {
20
+			while (false !== ($file = readdir($handle))) {
21
+				if ($file != "." && $file != ".." && $file != ".svn" && $file != 'index.html' && !is_dir($helpBasePath.$file)) {
22 22
 					$help[] = $file;
23 23
 				}
24 24
 			}
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
 
28 28
 		natcasesort($help);
29 29
 
30
-		foreach($help as $k => $v) {
30
+		foreach ($help as $k => $v) {
31 31
 
32 32
 			$helpname = substr($v, 0, strrpos($v, '.'));
33 33
 
34 34
 			$prefix = substr($helpname, 0, 2);
35
-			if(is_numeric($prefix)) {
35
+			if (is_numeric($prefix)) {
36 36
 				$helpname = substr($helpname, 2, strlen($helpname) - 1);
37 37
 			}
38 38
 
39 39
 			$hnLower = strtolower($helpname);
40 40
 			$helpname = isset($_lang[$hnLower]) ? $_lang[$hnLower] : str_replace('_', ' ', $helpname);
41 41
 
42
-			echo '<div class="tab-page" id="tab' . $k . 'Help">';
43
-			echo '<h2 class="tab">' . $helpname . '</h2>';
44
-			echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab' . $k . 'Help" ) );</script>';
45
-			include_once($helpBasePath . "{$v}");
42
+			echo '<div class="tab-page" id="tab'.$k.'Help">';
43
+			echo '<h2 class="tab">'.$helpname.'</h2>';
44
+			echo '<script type="text/javascript">tp.addTabPage( document.getElementById( "tab'.$k.'Help" ) );</script>';
45
+			include_once($helpBasePath."{$v}");
46 46
 			echo '</div>';
47 47
 		}
48 48
 		?>
Please login to merge, or discard this patch.
manager/actions/phpinfo.static.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
Please login to merge, or discard this patch.
manager/actions/export_site.static.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
 	die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5
-if(!$modx->hasPermission('export_static')) {
5
+if (!$modx->hasPermission('export_static')) {
6 6
 	$modx->webAlertAndQuit($_lang["error_no_privileges"]);
7 7
 }
8 8
 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 
36 36
 		<div class="container container-body">
37 37
 			<?php
38
-			if(isset($_POST['export'])) {
39
-				$rs = include_once(MODX_MANAGER_PATH . 'processors/export_site.processor.php');
38
+			if (isset($_POST['export'])) {
39
+				$rs = include_once(MODX_MANAGER_PATH.'processors/export_site.processor.php');
40 40
 				echo $rs;
41 41
 			} else {
42 42
 				?>
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 					<a href="javascript:;" class="btn btn-primary" onclick="document.exportFrm.submit();jQuery(this).hide();"><i class="<?= $_style["actions_save"] ?>"></i> <?= $_lang["export_site_start"] ?></a>
77 77
 					<script>
78 78
 						jQuery('#exportButton a').click(function() {
79
-							jQuery(this).parent().html('<?= $_style['ajax_loader'];?>');
79
+							jQuery(this).parent().html('<?= $_style['ajax_loader']; ?>');
80 80
 						});
81 81
 					</script>
82 82
 				</form>
Please login to merge, or discard this patch.
manager/actions/help/03Version_Notices.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     usort($notices, 'version_compare');
16 16
     $notices = array_reverse($notices);
17 17
 
18
-    foreach($notices as $v) {
18
+    foreach ($notices as $v) {
19 19
         if ($v >= '1.3.0') {
20 20
             $cms = 'EVO';
21 21
         }
Please login to merge, or discard this patch.
manager/actions/help/04Changelog.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
2
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3 3
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
4 4
 }
5 5
 ?>
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 <div class="sectionHeader">Changelog</div>
8 8
 <div class="sectionBody">
9 9
 <?php
10
-	$changeLog = MODX_BASE_PATH . 'assets/docs/changelog.txt';
11
-	if(is_readable($changeLog))
12
-		echo str_replace("\n",'<br>',file_get_contents($changeLog));
10
+	$changeLog = MODX_BASE_PATH.'assets/docs/changelog.txt';
11
+	if (is_readable($changeLog))
12
+		echo str_replace("\n", '<br>', file_get_contents($changeLog));
13 13
 ?>
14 14
 </div>
Please login to merge, or discard this patch.
manager/actions/resources/tab2_templatevars.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <!-- Template variables -->
2 2
 <?php
3
-if( ! defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
3
+if (!defined('IN_MANAGER_MODE') || IN_MANAGER_MODE !== true) {
4 4
     die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the EVO Content Manager instead of accessing this file directly.");
5 5
 }
6 6
 
Please login to merge, or discard this patch.