Permalink
Browse files

Some cleanup.

  • Loading branch information...
1 parent ad75dcf commit bde93f8a7b987bdd3de323ddd38666b45df3beba @parvas committed May 23, 2011
Showing with 10 additions and 10 deletions.
  1. +10 −10 system/classes/File.php
View
@@ -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)
{
@@ -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;
}

0 comments on commit bde93f8

Please sign in to comment.