Skip to content

Commit 8ccb2e4

Browse files
authoredJan 17, 2017
Replace dirname(__FILE__) with __DIR__
1 parent ee18ab3 commit 8ccb2e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

Diff for: ‎deploy.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66
*/
77

88
// Check if lock file exists
9-
if (file_exists(dirname(__FILE__) . '/deploy.lock')) {
9+
if (file_exists(__DIR__ . '/deploy.lock')) {
1010
die('File deploy.lock detected, another process already running');
1111
}
1212

1313
// Create lock file
14-
$fh = fopen(dirname(__FILE__) . '/deploy.lock', 'w');
14+
$fh = fopen(__DIR__ . '/deploy.lock', 'w');
1515
fclose($fh);
1616

1717
// Remove lock file
1818
function removeLockFile() {
19-
unlink(dirname(__FILE__) . '/deploy.lock');
19+
unlink(__DIR__ . '/deploy.lock');
2020
}
2121

2222
// Check if there is a configuration file
23-
if (file_exists(dirname(__FILE__) . '/deploy-config.php')) {
24-
require_once dirname(__FILE__) . '/deploy-config.php';
23+
if (file_exists(__DIR__ . '/deploy-config.php')) {
24+
require_once __DIR__ . '/deploy-config.php';
2525
} else {
2626
removeLockFile();
2727
die('File deploy-config.php does not exist');

0 commit comments

Comments
 (0)
Please sign in to comment.