Changeset 2185
- Timestamp:
- 07/15/08 20:31:00 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/system/plugins/simplefilesilo/simplefilesilo.plugin.php
r2137 r2185 41 41 $this->root= $user_path . 'files'; //Options::get('simple_file_root'); 42 42 $this->url= Site::get_url('user', true) . 'files'; //Options::get('simple_file_url'); 43 /* Check for the existence of the files directory */ 43 44 if (! $this->check_files()) { 45 Session::error( "Web server does not have permission to create 'files' directory for SimpleFile Media Silo." ); 46 Plugins::deactivate_plugin(__FILE__); //Deactivate plugin 47 Utils::redirect(); //Refresh page � unfortunately, if not done so then results don't appear 48 } 49 } 50 51 /** 52 * Checks if files directory is usable 53 */ 54 private function check_files() { 55 $user_path= HABARI_PATH . '/' . Site::get_path('user', true); 56 $this->root= $user_path . 'files'; //Options::get('simple_file_root'); 57 $this->url= Site::get_url('user', true) . 'files'; //Options::get('simple_file_url'); 58 44 59 if ( ! is_dir( $this->root ) ) { 45 60 if ( is_writable( $user_path ) ) { 46 61 mkdir( $this->root, 0766 ); 47 62 } else { 48 Session::error( "Web server does not have permission to create 'files' directory for SimpleFile Media Silo." ); 49 } 50 } 51 52 } 53 63 return false; 64 } 65 } 66 67 return true; 68 } 69 54 70 /** 55 71 * Return basic information about this silo
