public function action_init() { $user_path = HABARI_PATH . '/' . Site::get_path('user', true); $this->root = $user_path . 'files'; //Options::get('simple_file_root'); $this->url = Site::get_url('user', true) . 'files'; //Options::get('simple_file_url'); if (! $this->check_files()) { Session::error( _t( "Habari Silo activation failed. The web server does not have permission to create the 'files' directory for the Habari Media Silo." ) ); // echo Session::messages_get( true, array( 'Format', 'json_messages' ) ); Plugins::deactivate_plugin( __FILE__ ); //Deactivate plugin Utils::redirect(); //Refresh page � unfortunately, if not done so then results don't appear } if ( !function_exists('imagecreatefromjpeg') ) { Session::error( _t( "Habari Silo activation failed. PHP has not loaded the gd imaging library." ) ); // echo Session::messages_get( true, array( 'Format', 'json_messages' ) ); Plugins::deactivate_plugin( __FILE__ ); Utils::redirect( '', TRUE ); } }