Beispiel #1
0
         # Can we write sqlite_db_directory ?
         if (!is_writable($sqlite_db_directory)) {
             throw new Exception(sprintf(__('Cannot write "%s" directory.'), path::real($sqlite_db_directory, false)));
         }
         $DBNAME = $sqlite_db_directory . $DBNAME;
     }
 }
 # Tries to connect to database
 try {
     $con = dbLayer::init($DBDRIVER, $DBHOST, $DBNAME, $DBUSER, $DBPASSWORD);
 } catch (Exception $e) {
     throw new Exception('<p>' . __($e->getMessage()) . '</p>');
 }
 # Checks system capabilites
 require dirname(__FILE__) . '/check.php';
 if (!dcSystemCheck($con, $_e)) {
     $can_install = false;
     throw new Exception('<p>' . __('Dotclear cannot be installed.') . '</p><ul><li>' . implode('</li><li>', $_e) . '</li></ul>');
 }
 # Check if dotclear is already installed
 $schema = dbSchema::init($con);
 if (in_array($DBPREFIX . 'version', $schema->getTables())) {
     throw new Exception(__('Dotclear is already installed.'));
 }
 # Does config.php.in exist?
 $config_in = dirname(__FILE__) . '/../../inc/config.php.in';
 if (!is_file($config_in)) {
     throw new Exception(sprintf(__('File %s does not exist.'), $config_in));
 }
 # Can we write config.php
 if (!is_writable(dirname(DC_RC_PATH))) {
Beispiel #2
0
    include dirname(__FILE__) . '/../../inc/core_error.php';
    exit;
}
require_once dirname(__FILE__) . '/../../inc/prepend.php';
require_once dirname(__FILE__) . '/check.php';
$can_install = true;
$err = '';
# Check if bilboplanet is already installed
$schema = dbSchema::init($core->con);
if (in_array($core->prefix . 'feed', $schema->getTables())) {
    $can_install = false;
    $err = T_('The Bilboplanet is already installed.');
    $err .= "<br/>" . sprintf(T_('If you are upgrading to a newer version of the Bilboplanet, please upgrade your database by running the %s/inc/upgrade_db.php script'), BP_PLANET_URL);
}
# Check system capabilites
if ($can_install && !dcSystemCheck($core->con, $_e)) {
    $can_install = false;
    $err = T_('The Bilboplanet can not be installed') . '<ul><li>' . implode('</li><li>', $_e) . '</li></ul>';
}
# Get information and perform install
$u_email = $u_fullname = $u_login = $u_pwd = '';
$mail_sent = false;
$subscription_content = htmlentities(stripslashes('<h2>Description</h2>

<p><br/>Le <a href="#"><strong>Nom du Planet</strong></a> est un planet visant à regrouper un ensemble de flux RSS de divers sites/blogs.
<br/><br/></p>

<h2>La charte de fonctionnement</h2>
<ul>
	<li>1. ...</li>
	<li>2. ...</li>