Skip to content

Commit

Permalink
+ FileController::$once option to save file only once, no rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Feb 23, 2016
1 parent 0d87f6f commit 1a8499d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/FileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class FileController extends CollectionController
*/
public $fileType;

public $once;
public $chown;
public $chgrp;
public $chmod;
Expand Down Expand Up @@ -138,6 +139,9 @@ public function actionLoad()

public function actionSave()
{
if ($this->once && $this->exists()) {
return 0;
}
$this->_items = Helper::uniqueConfig($this->_items);
$this->getFile()->save($this);
return 0;
Expand Down

0 comments on commit 1a8499d

Please sign in to comment.