Skip to content

Commit

Permalink
Some cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
parvas committed May 23, 2011
1 parent ad75dcf commit bde93f8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions system/classes/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ public static function instance($file = null)
return static::$_instance = new File($file);
}

protected function __construct($file)
{
$this->_file = Module::instance()->files($file);
}
protected function __construct($file)
{
$this->_file = Module::instance()->files($file);
}

public function upload()
{
public function upload()
{
if ($this->_create_folder === true)
{
mkdir($this->_directory);
$this->_create_folder = false;
}

move_uploaded_file($this->_file['tmp_name'], $this->_directory . $this->_file['name']);
}
}

public function set_directory($directory, $create_dir = false)
{
Expand All @@ -152,9 +152,9 @@ public function set_directory($directory, $create_dir = false)
Exceptions::exception("Directory '{$this->_directory}' does not exist");
}
}

// always upload in preconfigured directory
$this->_directory = APP . 'assets/uploads/' . $directory . '/';
$this->_directory = APP . 'assets/uploads/' . $directory . '/';
return $this;
}

Expand Down

0 comments on commit bde93f8

Please sign in to comment.