public function database(\Base $f3)
 {
     $this->response->data['SUBPART'] = 'settings_database.html';
     $cfg = \Config::instance();
     if ($f3->get('VERB') == 'POST' && $f3->exists('POST.active_db')) {
         $type = $f3->get('POST.active_db');
         $cfg->{'DB_' . $type} = $f3->get('POST.DB_' . $type);
         $cfg->ACTIVE_DB = $type;
         $cfg->save();
         \Flash::instance()->addMessage('Config saved', 'success');
         $setup = new \Setup();
         $setup->install($type);
         // logout
         $f3->clear('SESSION.user_id');
     }
     $cfg->copyto('POST');
     $f3->set('JIG_format', array('JSON', 'Serialized'));
 }
 /**
  * Shows the installation screen
  *
  * @param  string  $method
  * @param  string  $action
  * @return \Illuminate\Support\Facades\View
  */
 public function getInstall($method = 'web', $action = '')
 {
     // Installation stage
     $stage = Session::has('setup.stage') ? Session::get('setup.stage') : 1;
     // Output based on request method
     switch ($method) {
         case 'web':
             $data = array('error' => Session::get('messages.error'), 'success' => Session::get('messages.success'), 'unstable' => System::updated() > 0);
             return View::make("setup/install/stage{$stage}", $data);
         case 'ajax':
             return Setup::install($action);
         case 'error':
             return View::make('setup/error');
         default:
             App::abort(404);
             // Not found
     }
 }
 /**
  * Shows the install screen
  */
 public static function showInstall()
 {
     $error = Setup::install();
     if ($error == '') {
         $txt = 'ownCloud is now installed';
         Setup::showContent('Success', $txt, 3);
     } else {
         $txt = 'ownCloud is NOT installed<br />' . $error;
         Setup::showContent('Error', $txt);
     }
 }
 /**
  * Shows the install screen
  */
 public static function showInstall()
 {
     $error = Setup::install();
     if ($error == '') {
         $txt = 'ownCloud is now installed.<br /><br />You must restart your Lighttpd-Server!!!<br /><br />You will find your ownCloud website here: http://Your_iOS_Device/owncloud<br />';
         Setup::showContent('Success', $txt, 3);
     } else {
         $txt = 'ownCloud is NOT installed<br />' . $error;
         Setup::showContent('Error', $txt);
     }
 }