Skip to content

Commit 05e02b5

Browse files
committed
Merge pull request #1 from sheershoff/sheershoff-patch-1
Do not update file if content is the same
2 parents 25b7ee1 + 497f289 commit 05e02b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

StubsController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public function actionIndex($app)
7878
$content = str_replace('{stubs}', $stubs, $this->getTemplate());
7979
$content = str_replace('{time}', date(DATE_ISO8601), $content);
8080

81-
file_put_contents($path, $content);
81+
if($content!=@file_get_contents($path)) {
82+
file_put_contents($path, $content);
83+
}
8284
}
8385
}

0 commit comments

Comments
 (0)