Developers section improved

This commit is contained in:
Diego Najar 2017-10-07 16:58:24 +02:00
parent 66c04835ff
commit 57a9a13152
2 changed files with 32 additions and 29 deletions

View File

@ -4,19 +4,35 @@ HTML::title(array('title'=>$L->g('Developers'), 'icon'=>'support'));
echo '<h2>PHP version: '.phpversion().'</h2>';
// Loaded extensions
printTable('Server information', $_SERVER);
// PHP Ini
$uploadOptions = array(
'upload_max_filesize'=>ini_get('upload_max_filesize'),
'post_max_size'=>ini_get('post_max_size'),
'upload_tmp_dir'=>ini_get('upload_tmp_dir')
);
printTable('File Uploads', $uploadOptions);
// Constanst defined by Bludit
$constants = get_defined_constants(true);
printTable('Constants', $constants['user']);
// Loaded extensions
printTable('Server information ( $_SERVER )', $_SERVER);
// PHP Ini
printTable('PHP Configuration options ( ini_get_all() )', ini_get_all());
// Loaded extensions
printTable('Loaded extensions',get_loaded_extensions());
// Site object
printTable('$Site object database',$Site->db);
// Locales installed
exec('locale -a', $locales);
printTable('Locales installed', $locales);
echo '<hr>';
echo '<h2>BLUDIT</h2>';
echo '<hr>';
// Constanst defined by Bludit
$constants = get_defined_constants(true);
printTable('Bludit Constants', $constants['user']);
// Site object
printTable('$Site object database',$Site->db);

View File

@ -254,11 +254,6 @@ function install($adminPassword, $email, $timezone)
}
// PLUGINS
if (!mkdir(PATH_PLUGINS_DATABASES.'pages', $dirpermissions, true)) {
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'pages';
error_log($errorText, 0);
}
if (!mkdir(PATH_PLUGINS_DATABASES.'simplemde', $dirpermissions, true)) {
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'simplemde';
error_log($errorText, 0);
@ -303,6 +298,7 @@ function install($adminPassword, $email, $timezone)
'username'=>'admin',
'tags'=>array(),
'status'=>'static',
'type'=>'page',
'date'=>$currentDate,
'dateModified'=>'',
'allowComments'=>true,
@ -310,13 +306,16 @@ function install($adminPassword, $email, $timezone)
'coverImage'=>'',
'md5file'=>'',
'category'=>'',
'uuid'=>md5(uniqid())
'uuid'=>md5(uniqid()),
'parent'=>'',
'slug'=>'about'
),
'welcome'=>array(
'description'=>$Language->get('Welcome to Bludit'),
'username'=>'admin',
'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'),
'status'=>'published',
'type'=>'post',
'date'=>$currentDate,
'dateModified'=>'',
'allowComments'=>true,
@ -324,7 +323,9 @@ function install($adminPassword, $email, $timezone)
'coverImage'=>'',
'md5file'=>'',
'category'=>'general',
'uuid'=>md5(uniqid())
'uuid'=>md5(uniqid()),
'parent'=>'',
'slug'=>'welcome'
)
);
@ -429,20 +430,6 @@ function install($adminPassword, $email, $timezone)
);
file_put_contents(PATH_DATABASES.'tags.php', $dataHead.json_encode($data, JSON_PRETTY_PRINT), LOCK_EX);
// File plugins/pages/db.php
file_put_contents(
PATH_PLUGINS_DATABASES.'pages'.DS.'db.php',
$dataHead.json_encode(
array(
'position'=>1,
'homeLink'=>true,
'label'=>$Language->get('Pages'),
'amountOfItems'=>5
),
JSON_PRETTY_PRINT),
LOCK_EX
);
// File plugins/about/db.php
file_put_contents(
PATH_PLUGINS_DATABASES.'about'.DS.'db.php',