Completed
Pull Request — master (#88)
by Steve
17s
created
src/sspak-sniffer.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
  */
8 8
 
9 9
 // Argument parsing
10
-if(empty($_SERVER['argv'][1])) {
10
+if (empty($_SERVER['argv'][1])) {
11 11
 	echo "Usage: {$_SERVER['argv'][0]} (site-docroot)\n";
12 12
 	exit(1);
13 13
 }
14 14
 
15 15
 $basePath = $_SERVER['argv'][1];
16
-if($basePath[0] != '/') $basePath = getcwd() . '/' . $basePath;
16
+if ($basePath[0] != '/') $basePath = getcwd().'/'.$basePath;
17 17
 
18 18
 // SilverStripe bootstrap
19 19
 define('BASE_PATH', realpath($basePath));
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
 $_SERVER['HTTP_HOST'] = 'localhost';
24 24
 chdir(BASE_PATH);
25 25
 
26
-if(file_exists(BASE_PATH.'/sapphire/core/Core.php')) {
26
+if (file_exists(BASE_PATH.'/sapphire/core/Core.php')) {
27 27
 	//SS 2.x
28
-	require_once(BASE_PATH . '/sapphire/core/Core.php');
29
-} else if(file_exists(BASE_PATH.'/framework/core/Core.php')) {
28
+	require_once(BASE_PATH.'/sapphire/core/Core.php');
29
+} else if (file_exists(BASE_PATH.'/framework/core/Core.php')) {
30 30
 	//SS 3.x
31
-	require_once(BASE_PATH. '/framework/core/Core.php');
32
-} else if(file_exists(BASE_PATH.'/vendor/silverstripe/framework')) {
31
+	require_once(BASE_PATH.'/framework/core/Core.php');
32
+} else if (file_exists(BASE_PATH.'/vendor/silverstripe/framework')) {
33 33
 	//SS 4.x
34
-	require_once(BASE_PATH. '/vendor/autoload.php');
34
+	require_once(BASE_PATH.'/vendor/autoload.php');
35 35
 	$kernel = new SilverStripe\Core\CoreKernel(BASE_PATH);
36 36
 	//boot the parts of the kernel to populate the DB config
37 37
 	foreach (array('bootDatabaseEnvVars', 'bootDatabaseGlobals') as $bootMethod) {
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 	}
42 42
 	$databaseConfig = SilverStripe\ORM\DB::getConfig();
43 43
 } else {
44
-	echo "Couldn't locate framework's Core.php. Perhaps " . BASE_PATH . " is not a SilverStripe project?\n";
44
+	echo "Couldn't locate framework's Core.php. Perhaps ".BASE_PATH." is not a SilverStripe project?\n";
45 45
 	exit(2);
46 46
 }
47 47
 
48 48
 $output = array();
49
-foreach($databaseConfig as $k => $v) {
50
-	$output['db_' . $k] = $v;
49
+foreach ($databaseConfig as $k => $v) {
50
+	$output['db_'.$k] = $v;
51 51
 }
52 52
 $output['assets_path'] = ASSETS_PATH;
53 53
 
Please login to merge, or discard this patch.
src/Webroot.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	 * Calls sniff once and then caches
17 17
 	 */
18 18
 	public function details() {
19
-		if(!$this->details) $this->details = $this->sniff();
19
+		if (!$this->details) $this->details = $this->sniff();
20 20
 		return $this->details;
21 21
 	}
22 22
 
@@ -26,16 +26,16 @@  discard block
 block discarded – undo
26 26
 	public function sniff() {
27 27
 		global $snifferFileContent;
28 28
 
29
-		if(!$snifferFileContent) $snifferFileContent = file_get_contents(PACKAGE_ROOT . 'src/sspak-sniffer.php');
29
+		if (!$snifferFileContent) $snifferFileContent = file_get_contents(PACKAGE_ROOT.'src/sspak-sniffer.php');
30 30
 
31
-		$remoteSniffer = '/tmp/sspak-sniffer-' . rand(100000,999999) . '.php';
31
+		$remoteSniffer = '/tmp/sspak-sniffer-'.rand(100000, 999999).'.php';
32 32
 		$this->uploadContent($snifferFileContent, $remoteSniffer);
33 33
 
34 34
 		$result = $this->execSudo(array('/usr/bin/env', 'php', $remoteSniffer, $this->path));
35 35
 		$this->unlink($remoteSniffer);
36 36
 
37 37
 		$parsed = @unserialize($result['output']);
38
-		if(!$parsed) throw new Exception("Could not parse sspak-sniffer content:\n{$result['output']}\n");
38
+		if (!$parsed) throw new Exception("Could not parse sspak-sniffer content:\n{$result['output']}\n");
39 39
 		return $parsed;
40 40
 	}
41 41
 
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
 	 * @return array A map containing 'return', 'output', and 'error'
47 47
 	 */
48 48
 	public function execSudo($command, $options = array()) {
49
-		if($this->sudo) {
50
-			if(is_array($command)) $command = $this->executor->commandArrayToString($command);
49
+		if ($this->sudo) {
50
+			if (is_array($command)) $command = $this->executor->commandArrayToString($command);
51 51
 			// Try running sudo without asking for a password
52 52
 			try {
53
-				return $this->exec("sudo -n -u " . escapeshellarg($this->sudo) . " " . $command, $options);
53
+				return $this->exec("sudo -n -u ".escapeshellarg($this->sudo)." ".$command, $options);
54 54
 
55 55
 			// Otherwise capture SUDO password ourselves and pass it in through STDIN
56
-			} catch(Exception $e) {
56
+			} catch (Exception $e) {
57 57
 				echo "[sspak sudo] Enter your password: ";
58
-				$stdin = fopen( 'php://stdin', 'r');
58
+				$stdin = fopen('php://stdin', 'r');
59 59
 				$password = fgets($stdin);
60 60
 
61
-				return $this->exec("sudo -S -p '' -u " . escapeshellarg($this->sudo) . " " . $command, array('inputContent' => $password));
61
+				return $this->exec("sudo -S -p '' -u ".escapeshellarg($this->sudo)." ".$command, array('inputContent' => $password));
62 62
 			}
63 63
 
64 64
 		} else {
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 
78 78
 		// Check the database type
79 79
 		$dbFunction = 'putdb_'.$details['db_type'];
80
-		if(!method_exists($this,$dbFunction)) {
81
-			throw new Exception("Can't process database type '" . $details['db_type'] . "'");
80
+		if (!method_exists($this, $dbFunction)) {
81
+			throw new Exception("Can't process database type '".$details['db_type']."'");
82 82
 		}
83 83
 
84 84
 		// Extract DB direct from sspak file
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$hostArg = '';
98 98
 		$portArg = '';
99 99
 		if (!empty($conf['db_server']) && $conf['db_server'] != 'localhost') {
100
-			if (strpos($conf['db_server'], ':')!==false) {
100
+			if (strpos($conf['db_server'], ':') !== false) {
101 101
 				// Handle "server:port" format.
102 102
 				$server = explode(':', $conf['db_server'], 2);
103 103
 				$hostArg = escapeshellarg("--host=".$server[0]);
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 				$hostArg = escapeshellarg("--host=".$conf['db_server']);
107 107
 			}
108 108
 		}
109
-		$dbCommand = "create database if not exists `" . addslashes($conf['db_database']) . "`";
110
-		if($dropdb) {
111
-			$dbCommand = "drop database if exists `" . addslashes($conf['db_database']) . "`; " . $dbCommand;
109
+		$dbCommand = "create database if not exists `".addslashes($conf['db_database'])."`";
110
+		if ($dropdb) {
111
+			$dbCommand = "drop database if exists `".addslashes($conf['db_database'])."`; ".$dbCommand;
112 112
 		}
113 113
 
114 114
 		$this->exec("echo '$dbCommand' | mysql $usernameArg $passwordArg $hostArg $portArg");
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 		// Create database if needed
130 130
 		$result = $this->exec("echo \"select count(*) from pg_catalog.pg_database where datname = $databaseArg\" | $passwordArg psql $usernameArg $hostArg $databaseArg -qt");
131
-		if(trim($result['output']) == '0') {
131
+		if (trim($result['output']) == '0') {
132 132
 			$this->exec("$passwordArg createdb $usernameArg $hostArg $databaseArg");
133 133
 		}
134 134
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$assetsPathExec = $this->exec("if [ -L {$assetsPath} ]; then readlink -f {$assetsPath}; else echo {$assetsPath}; fi");
151 151
 		$assetsPath = trim($assetsPathExec["output"]);
152 152
 
153
-		$assetsOldPath = $assetsPath . '.old';
153
+		$assetsOldPath = $assetsPath.'.old';
154 154
 		$assetsParentArg = escapeshellarg(dirname($assetsPath));
155 155
 
156 156
 		// Move existing assets to assets.old
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 	 */
178 178
 	public function putgit($details) {
179 179
 		$this->exec(array('git', 'clone', $details['remote'], $this->path));
180
-		$this->exec("cd $this->path && git checkout " . escapeshellarg($details['branch']));
180
+		$this->exec("cd $this->path && git checkout ".escapeshellarg($details['branch']));
181 181
 		return true;
182 182
 	}
183 183
 }
Please login to merge, or discard this patch.
src/SSPak.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -88,16 +88,16 @@  discard block
 block discarded – undo
88 88
 
89 89
 	public function help($args) {
90 90
 		echo "SSPak: manage SilverStripe .sspak archives.\n\nUsage:\n";
91
-		foreach($this->getActions() as $action => $info) {
91
+		foreach ($this->getActions() as $action => $info) {
92 92
 			echo "sspak $action";
93
-			if(!empty($info['unnamedArgs'])) {
94
-				foreach($info['unnamedArgs'] as $arg) echo " ($arg)";
93
+			if (!empty($info['unnamedArgs'])) {
94
+				foreach ($info['unnamedArgs'] as $arg) echo " ($arg)";
95 95
 			}
96
-			if(!empty($info['namedFlags'])) {
97
-				foreach($info['namedFlags'] as $arg) echo " (--$arg)";
96
+			if (!empty($info['namedFlags'])) {
97
+				foreach ($info['namedFlags'] as $arg) echo " (--$arg)";
98 98
 			}
99
-			if(!empty($info['namedArgs'])) {
100
-				foreach($info['namedArgs'] as $arg) echo " --$arg=\"$arg value\"";
99
+			if (!empty($info['namedArgs'])) {
100
+				foreach ($info['namedArgs'] as $arg) echo " --$arg=\"$arg value\"";
101 101
 			}
102 102
 			echo "\n  {$info['description']}\n\n";
103 103
 		}
@@ -121,13 +121,13 @@  discard block
 block discarded – undo
121 121
 
122 122
 		$filesystem = new FilesystemEntity(null, $executor);
123 123
 
124
-		if($pakParts['db']) {
124
+		if ($pakParts['db']) {
125 125
 			$dbPath = escapeshellarg($namedArgs['db']);
126 126
 			$process = $filesystem->createProcess("cat $dbPath | gzip -c");
127 127
 			$sspak->writeFileFromProcess('database.sql.gz', $process);
128 128
 		}
129 129
 
130
-		if($pakParts['assets']) {
130
+		if ($pakParts['assets']) {
131 131
 			$assetsParentArg = escapeshellarg(dirname($namedArgs['assets']));
132 132
 			$assetsBaseArg = escapeshellarg(basename($namedArgs['assets']));
133 133
 			$process = $filesystem->createProcess("cd $assetsParentArg && tar cfh - $assetsBaseArg | gzip -c");
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		// from other formats.
156 156
 		// There is no cross-platform way of checking the assets.tar.gz size without unpacking, so we assume the size
157 157
 		// of database is negligible which lets us approximate the size of assets.
158
-		if (filesize($file) > 8*1024*1024*1024) {
158
+		if (filesize($file) > 8 * 1024 * 1024 * 1024) {
159 159
 			$msg = <<<EOM
160 160
 
161 161
 ERROR: SSPak is unable to extract archives over 8 GB.
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$sspak = new SSPakFile($file, $executor);
177 177
 
178 178
 		// Validation
179
-		if(!$sspak->exists()) throw new Exception("File '$file' doesn't exist.");
179
+		if (!$sspak->exists()) throw new Exception("File '$file' doesn't exist.");
180 180
 
181 181
 		$phar = $sspak->getPhar();
182 182
 		$phar->extractTo($dest);
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 
208 208
 		$db = new DatabaseConnector($webroot);
209 209
 
210
-		foreach($db->getTables() as $table) {
211
-			$filename = $destPath . '/' . $table . '.csv';
212
-			echo $filename . "...\n";
210
+		foreach ($db->getTables() as $table) {
211
+			$filename = $destPath.'/'.$table.'.csv';
212
+			echo $filename."...\n";
213 213
 			touch($filename);
214 214
 			$writer = new CsvTableWriter($filename);
215 215
 			$db->saveTable($table, $writer);
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 
231 231
 		$db = new DatabaseConnector($webroot);
232 232
 
233
-		foreach($db->getTables() as $table) {
234
-			$filename = $srcPath . '/' . $table . '.csv';
235
-			if(file_exists($filename)) {
236
-				echo $filename . "...\n";
233
+		foreach ($db->getTables() as $table) {
234
+			$filename = $srcPath.'/'.$table.'.csv';
235
+			if (file_exists($filename)) {
236
+				echo $filename."...\n";
237 237
 				$reader = new CsvTableReader($filename);
238 238
 				$db->loadTable($table, $reader);
239 239
 			} else {
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$webroot = new Webroot($unnamedArgs[0], $executor);
257 257
 		$file = $unnamedArgs[1];
258
-		if(file_exists($file)) throw new Exception( "File '$file' already exists.");
258
+		if (file_exists($file)) throw new Exception("File '$file' already exists.");
259 259
 
260 260
 		$sspak = new SSPakFile($file, $executor);
261 261
 
262
-		if(!empty($namedArgs['identity'])) {
262
+		if (!empty($namedArgs['identity'])) {
263 263
 			// SSH private key
264 264
 			$webroot->setSSHItentityFile($namedArgs['identity']);
265 265
 		}
266
-		if(!empty($namedArgs['from-sudo'])) $webroot->setSudo($namedArgs['from-sudo']);
267
-		else if(!empty($namedArgs['sudo'])) $webroot->setSudo($namedArgs['sudo']);
266
+		if (!empty($namedArgs['from-sudo'])) $webroot->setSudo($namedArgs['from-sudo']);
267
+		else if (!empty($namedArgs['sudo'])) $webroot->setSudo($namedArgs['sudo']);
268 268
 
269 269
 		// Look up which parts of the sspak are going to be saved
270 270
 		$pakParts = $args->pakParts();
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		$details = $webroot->sniff();
274 274
 
275 275
 		// Create a build folder for the sspak file
276
-		$buildFolder = sprintf("%s/sspak-%d", sys_get_temp_dir(), rand(100000,999999));
276
+		$buildFolder = sprintf("%s/sspak-%d", sys_get_temp_dir(), rand(100000, 999999));
277 277
 		$webroot->exec(array('mkdir', $buildFolder));
278 278
 
279 279
 		$dbFile = "$buildFolder/database.sql.gz";
@@ -284,22 +284,22 @@  discard block
 block discarded – undo
284 284
 		$fileList = array();
285 285
 
286 286
 		// Save DB
287
-		if($pakParts['db']) {
287
+		if ($pakParts['db']) {
288 288
 			// Check the database type
289 289
 			$dbFunction = 'getdb_'.$details['db_type'];
290
-			if(!method_exists($this,$dbFunction)) {
291
-				throw new Exception("Can't process database type '" . $details['db_type'] . "'");
290
+			if (!method_exists($this, $dbFunction)) {
291
+				throw new Exception("Can't process database type '".$details['db_type']."'");
292 292
 			}
293 293
 			$this->$dbFunction($webroot, $details, $sspak, basename($dbFile));
294 294
 		}
295 295
 
296 296
 		// Save Assets
297
-		if($pakParts['assets']) {
297
+		if ($pakParts['assets']) {
298 298
 			$this->getassets($webroot, $details['assets_path'], $sspak, basename($assetsFile));
299 299
 		}
300 300
 
301 301
 		// Save git-remote
302
-		if($pakParts['git-remote']) {
302
+		if ($pakParts['git-remote']) {
303 303
 			$this->getgitremote($webroot, $sspak, basename($gitRemoteFile));
304 304
 		}
305 305
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 		$hostArg = '';
320 320
 		$portArg = '';
321 321
 		if (!empty($conf['db_server']) && $conf['db_server'] != 'localhost') {
322
-			if (strpos($conf['db_server'], ':')!==false) {
322
+			if (strpos($conf['db_server'], ':') !== false) {
323 323
 				// Handle "server:port" format.
324 324
 				$server = explode(':', $conf['db_server'], 2);
325 325
 				$hostArg = escapeshellarg("--host=".$server[0]);
@@ -358,16 +358,16 @@  discard block
 block discarded – undo
358 358
 
359 359
 	public function getgitremote($webroot, $sspak, $gitRemoteFile) {
360 360
 		// Only do anything if we're copying from a git checkout
361
-		$gitRepo = $webroot->getPath() .'/.git';
362
-		if($webroot->exists($gitRepo)) {
361
+		$gitRepo = $webroot->getPath().'/.git';
362
+		if ($webroot->exists($gitRepo)) {
363 363
 			// Identify current branch
364 364
 			$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'branch'));
365
-			if(preg_match("/\* ([^ \n]*)/", $output['output'], $matches) && strpos("(no branch)", $matches[1])===false) {
365
+			if (preg_match("/\* ([^ \n]*)/", $output['output'], $matches) && strpos("(no branch)", $matches[1]) === false) {
366 366
 				// If there is a current branch, use that branch's remove
367 367
 				$currentBranch = trim($matches[1]);
368
-				$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'config','--get',"branch.$currentBranch.remote"));
368
+				$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'config', '--get', "branch.$currentBranch.remote"));
369 369
 				$remoteName = trim($output['output']);
370
-				if(!$remoteName) $remoteName = 'origin';
370
+				if (!$remoteName) $remoteName = 'origin';
371 371
 
372 372
 			// Default to origin
373 373
 			} else {
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
 			}
377 377
 
378 378
 			// Determine the URL of that remote
379
-			$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'config','--get',"remote.$remoteName.url"));
379
+			$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'config', '--get', "remote.$remoteName.url"));
380 380
 			$remoteURL = trim($output['output']);
381 381
 
382 382
 			// Determine the current SHA
383
-			$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'log','-1','--format=%H'));
383
+			$output = $webroot->exec(array('git', '--git-dir='.$gitRepo, 'log', '-1', '--format=%H'));
384 384
 			$sha = trim($output['output']);
385 385
 
386 386
 			$content = "remote = $remoteURL\nbranch = $currentBranch\nsha = $sha\n";
@@ -408,22 +408,22 @@  discard block
 block discarded – undo
408 408
 		$pakParts = $args->pakParts();
409 409
 
410 410
 		$namedArgs = $args->getNamedArgs();
411
-		if(!empty($namedArgs['identity'])) {
411
+		if (!empty($namedArgs['identity'])) {
412 412
 			// SSH private key
413 413
 			$webroot->setSSHItentityFile($namedArgs['identity']);
414 414
 		}
415 415
 
416 416
 		// Validation
417
-		if(!$sspak->exists()) throw new Exception( "File '$file' doesn't exist.");
417
+		if (!$sspak->exists()) throw new Exception("File '$file' doesn't exist.");
418 418
 
419 419
 		// Push database, if necessary
420 420
 		$namedArgs = $args->getNamedArgs();
421
-		if($pakParts['db'] && $sspak->contains('database.sql.gz')) {
421
+		if ($pakParts['db'] && $sspak->contains('database.sql.gz')) {
422 422
 			$webroot->putdb($sspak, isset($namedArgs['drop-db']));
423 423
 		}
424 424
 
425 425
 		// Push assets, if neccessary
426
-		if($pakParts['assets'] && $sspak->contains('assets.tar.gz')) {
426
+		if ($pakParts['assets'] && $sspak->contains('assets.tar.gz')) {
427 427
 			$webroot->putassets($sspak);
428 428
 		}
429 429
 	}
@@ -445,13 +445,13 @@  discard block
 block discarded – undo
445 445
 		$pakParts = $args->pakParts();
446 446
 
447 447
 		// Validation
448
-		if($webroot->exists($webroot->getPath())) throw new Exception( "Webroot '$webrootDir' already exists.");
449
-		if(!$sspak->exists()) throw new Exception( "File '$file' doesn't exist.");
448
+		if ($webroot->exists($webroot->getPath())) throw new Exception("Webroot '$webrootDir' already exists.");
449
+		if (!$sspak->exists()) throw new Exception("File '$file' doesn't exist.");
450 450
 
451 451
 		// Create new dir
452 452
 		$webroot->exec(array('mkdir', $webroot->getPath()));
453 453
 
454
-		if($sspak->contains('git-remote')) {
454
+		if ($sspak->contains('git-remote')) {
455 455
 			$details = $sspak->gitRemoteDetails();
456 456
 			$webroot->putgit($details);
457 457
 		}
@@ -460,12 +460,12 @@  discard block
 block discarded – undo
460 460
 
461 461
 		// Push database, if necessary
462 462
 		$namedArgs = $args->getNamedArgs();
463
-		if($pakParts['db'] && $sspak->contains('database.sql.gz')) {
463
+		if ($pakParts['db'] && $sspak->contains('database.sql.gz')) {
464 464
 			$webroot->putdb($sspak, isset($namedArgs['drop-db']));
465 465
 		}
466 466
 
467 467
 		// Push assets, if neccessary
468
-		if($pakParts['assets'] && $sspak->contains('assets.tar.gz')) {
468
+		if ($pakParts['assets'] && $sspak->contains('assets.tar.gz')) {
469 469
 			$webroot->putassets($sspak);
470 470
 		}
471 471
 	}
@@ -492,10 +492,10 @@  discard block
 block discarded – undo
492 492
 		$sspakScript = str_replace('$isSelfExtracting = false;', '$isSelfExtracting = true;', $sspakScript);
493 493
 
494 494
 		// Load the sniffer file
495
-		$snifferFile = dirname(__FILE__) . '/sspak-sniffer.php';
495
+		$snifferFile = dirname(__FILE__).'/sspak-sniffer.php';
496 496
 		$sspakScript = str_replace("\$snifferFileContent = '';\n",
497 497
 			"\$snifferFileContent = '"
498
-			. str_replace(array("\\","'"),array("\\\\", "\\'"), file_get_contents($snifferFile)) . "';\n", $sspakScript);
498
+			. str_replace(array("\\", "'"), array("\\\\", "\\'"), file_get_contents($snifferFile))."';\n", $sspakScript);
499 499
 
500 500
 		file_put_contents($destFile, $sspakScript);
501 501
 		chmod($destFile, 0775);
Please login to merge, or discard this patch.