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>'; echo '<h2>PHP version: '.phpversion().'</h2>';
// Loaded extensions // PHP Ini
printTable('Server information', $_SERVER); $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 // Loaded extensions
$constants = get_defined_constants(true); printTable('Server information ( $_SERVER )', $_SERVER);
printTable('Constants', $constants['user']);
// PHP Ini
printTable('PHP Configuration options ( ini_get_all() )', ini_get_all());
// Loaded extensions // Loaded extensions
printTable('Loaded extensions',get_loaded_extensions()); printTable('Loaded extensions',get_loaded_extensions());
// Site object
printTable('$Site object database',$Site->db);
// Locales installed // Locales installed
exec('locale -a', $locales); exec('locale -a', $locales);
printTable('Locales installed', $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 // 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)) { if (!mkdir(PATH_PLUGINS_DATABASES.'simplemde', $dirpermissions, true)) {
$errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'simplemde'; $errorText = 'Error when trying to created the directory=>'.PATH_PLUGINS_DATABASES.'simplemde';
error_log($errorText, 0); error_log($errorText, 0);
@ -303,6 +298,7 @@ function install($adminPassword, $email, $timezone)
'username'=>'admin', 'username'=>'admin',
'tags'=>array(), 'tags'=>array(),
'status'=>'static', 'status'=>'static',
'type'=>'page',
'date'=>$currentDate, 'date'=>$currentDate,
'dateModified'=>'', 'dateModified'=>'',
'allowComments'=>true, 'allowComments'=>true,
@ -310,13 +306,16 @@ function install($adminPassword, $email, $timezone)
'coverImage'=>'', 'coverImage'=>'',
'md5file'=>'', 'md5file'=>'',
'category'=>'', 'category'=>'',
'uuid'=>md5(uniqid()) 'uuid'=>md5(uniqid()),
'parent'=>'',
'slug'=>'about'
), ),
'welcome'=>array( 'welcome'=>array(
'description'=>$Language->get('Welcome to Bludit'), 'description'=>$Language->get('Welcome to Bludit'),
'username'=>'admin', 'username'=>'admin',
'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'), 'tags'=>array('bludit'=>'Bludit','cms'=>'CMS','flat-files'=>'Flat files'),
'status'=>'published', 'status'=>'published',
'type'=>'post',
'date'=>$currentDate, 'date'=>$currentDate,
'dateModified'=>'', 'dateModified'=>'',
'allowComments'=>true, 'allowComments'=>true,
@ -324,7 +323,9 @@ function install($adminPassword, $email, $timezone)
'coverImage'=>'', 'coverImage'=>'',
'md5file'=>'', 'md5file'=>'',
'category'=>'general', '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_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 plugins/about/db.php
file_put_contents( file_put_contents(
PATH_PLUGINS_DATABASES.'about'.DS.'db.php', PATH_PLUGINS_DATABASES.'about'.DS.'db.php',