Skip to content

Commit

Permalink
Merge pull request #1 from sheershoff/sheershoff-patch-1
Browse files Browse the repository at this point in the history
Do not update file if content is the same
  • Loading branch information
bazilio91 committed Jul 24, 2015
2 parents 25b7ee1 + 497f289 commit 05e02b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion StubsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public function actionIndex($app)
$content = str_replace('{stubs}', $stubs, $this->getTemplate());
$content = str_replace('{time}', date(DATE_ISO8601), $content);

file_put_contents($path, $content);
if($content!=@file_get_contents($path)) {
file_put_contents($path, $content);
}
}
}

0 comments on commit 05e02b5

Please sign in to comment.