1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Issue #1356 - PHP 7 auto-detection in mysql class. PHPInfo formatting.

This commit is contained in:
Cameron 2016-02-16 15:14:56 -08:00
parent 53b6519f55
commit 26c2aa3e4a
3 changed files with 7 additions and 5 deletions

View File

@ -25,7 +25,8 @@ require_once("auth.php");
ob_start();
phpinfo();
$phpinfo .= ob_get_contents();
$phpinfo = ob_get_contents();
$phpinfo = preg_replace("#^.*<body>#is", "", $phpinfo);
$phpinfo = str_replace("font","span",$phpinfo);
$phpinfo = str_replace("</body></html>","",$phpinfo);
@ -36,7 +37,8 @@ $phpinfo = str_replace('class="e"','class="forumheader2 text-left"',$phpinfo);
$phpinfo = str_replace('class="v"','class="forumheader3 text-left"',$phpinfo);
$phpinfo = str_replace('class="v"','class="forumheader3 text-left"',$phpinfo);
$phpinfo = str_replace('class="h"','class="fcaption"',$phpinfo);
$phpinfo = str_replace('<table cellpadding="3" width="600">', '<table class="table table-striped adminlist"><colgroup><col style="width:30%" /><col style="width:auto" /></colgroup>', $phpinfo);
$phpinfo = preg_replace('/<table[^>]*>/i', '<table class="table table-striped adminlist"><colgroup><col style="width:30%" /><col style="width:auto" /></colgroup>', $phpinfo);
$mes = e107::getMessage();

View File

@ -109,7 +109,7 @@ class e_db_mysql
global $pref, $db_defaultPrefix;
if(defined('e_PDO') && e_PDO === true)
if((PHP_MAJOR_VERSION > 6) || (defined('e_PDO') && e_PDO === true))
{
$this->pdo = true;
}

View File

@ -1256,12 +1256,12 @@ class e_install
\$SYSTEM_DIRECTORY = '{$this->e107->e107_dirs['SYSTEM_DIRECTORY']}';
";
/*
if($this->pdo == true)
{
$config_file .= 'define("e_PDO", true);';
$config_file .= "\n\n";
}
}*/
$config_result = $this->write_config($config_file);