diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 68c7dac15..8ab98c5f6 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -1473,7 +1473,7 @@ class e_parse extends e_parser
// Make sure we have a valid count for word wrapping
- if (!$wrap && $pref['main_wordwrap'])
+ if (!$wrap && !empty($pref['main_wordwrap']))
{
$wrap = $pref['main_wordwrap'];
}
@@ -1785,7 +1785,7 @@ class e_parse extends e_parser
// profanity filter
- if ($pref['profanity_filter'])
+ if (!empty($pref['profanity_filter']))
{
if (!is_object($this->e_pf))
{
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 2b2db9662..d37e5966a 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -1713,10 +1713,10 @@ class e_form
// $text[] = $this->radio($name, $value, (string) $checked === (string) $value)."".$this->label($label, $name, $value).(isset($helpLabel) ? "
".$helpLabel."
" : '');
}
- if($multi_line === false)
- {
+ // if($multi_line === false)
+ // {
// return implode(" ", $text);
- }
+ // }
// support of UI owned 'newline' parameter
if(!varset($options['sep']) && vartrue($options['newline'])) $options['sep'] = '
'; // TODO div class=separator?
diff --git a/e107_languages/English/lan_installer.php b/e107_languages/English/lan_installer.php
index 8c2fd7ac3..dd581bcf9 100644
--- a/e107_languages/English/lan_installer.php
+++ b/e107_languages/English/lan_installer.php
@@ -71,11 +71,11 @@ define("LANINS_046", "5");
define("LANINS_047", "Administrator Details");
define("LANINS_048", "EXIF extension");
define("LANINS_049", "The two passwords you entered are not the same. Please go back and try again.");
-define("LANINS_050", "XML Extension");
+define("LANINS_050", "XML extension");
define("LANINS_051", "Installed");
define("LANINS_052", "Not Installed");
-define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [x] before continuing");
-define("LANINS_054", "e107 v2.x requires the PHP EXIF Extension to be installed. Please contact your host or read the information at [x] before continuing");
+// define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [x] before continuing");
+// define("LANINS_054", "e107 v2.x requires the PHP EXIF Extension to be installed. Please contact your host or read the information at [x] before continuing");
define("LANINS_055", "Install Confirmation");
define("LANINS_056", "6");
define("LANINS_057", " e107 now has all the information it needs to complete the installation.
@@ -176,8 +176,9 @@ define("LANINS_134", "Installation");
define("LANINS_135", "of"); //single time use installer only as in .1 of 8 not replacing by LAN_SEARCH_12
define("LANINS_136", "Deleted existing database");
define("LANINS_137", "Found existing database");
-define("LANINS_138", "Version");
+// define("LANINS_138", "Version");
define("LANINS_141", "Please fill in the form below with your MySQL details. If you do not know this information, please contact your hosting provider. You may hover over each field for additional information.");
define("LANINS_142", "IMPORTANT: Please rename e107.htaccess to .htaccess");
define("LANINS_144", "IMPORTANT: Please copy and paste the contents of the [b]e107.htaccess[/b] into your [b].htaccess[/b] file. Please take care NOT to overwrite any existing data that may be in it.");
+define("LANINS_145", "e107 v2.x requires the PHP [x] to be installed. Please contact your host or read the information at [y] before continuing.");
diff --git a/e107_plugins/newsletter/admin_config.php b/e107_plugins/newsletter/admin_config.php
index bb7d33bd1..bd9af3c6e 100644
--- a/e107_plugins/newsletter/admin_config.php
+++ b/e107_plugins/newsletter/admin_config.php
@@ -105,10 +105,11 @@ class newsletter
$this->createIssue();
}
- if($mes)
+ echo $mes->render();
+ /*if($mes)
{
$ns->tablerender($caption, $mes->render() . $text);
- }
+ }*/
}
diff --git a/install.php b/install.php
index d8e9fc250..4556828a3 100644
--- a/install.php
+++ b/install.php
@@ -13,7 +13,7 @@
// minimal software version
define('MIN_PHP_VERSION', '5.3');
define('MIN_MYSQL_VERSION', '4.1.2');
-define('MAKE_INSTALL_LOG', false);
+define('MAKE_INSTALL_LOG', true);
// ensure CHARSET is UTF-8 if used
//define('CHARSET', 'utf-8');
@@ -224,6 +224,7 @@ class e_install
var $dbLink = NULL; // DB link - needed for PHP5.3 bug
var $session = null;
protected $pdo = false;
+ protected $debug = false;
// public function __construct()
function __construct()
@@ -235,6 +236,11 @@ class e_install
define('e_UC_MAINADMIN', 250);
define('E107_DEBUG_LEVEL',0);
+ if($_SERVER['QUERY_STRING'] == "debug")
+ {
+ $this->debug = true;
+ }
+
if(defined('PDO::ATTR_DRIVER_NAME')) // TODO Uncomment when ready.
{
$this->pdo = true;
@@ -839,15 +845,6 @@ class e_install
}
}
-
- $xml_installed = (!function_exists('utf8_encode')) ? false : true;
- $exif_installed = (!function_exists('exif_imagetype')) ? false : true;
- $gdlib_installed = (extension_loaded('gd') && function_exists('gd_info')) ? true : false;
- $curl_installed = (function_exists('curl_version')) ? true : false;
-
-
-
- $exifExtensionLink = "php.net";
$php_version = phpversion();
if(version_compare($php_version, MIN_PHP_VERSION, ">="))
@@ -861,28 +858,21 @@ class e_install
$e_forms->start_form("versions", $_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING'] == "debug" ? "?debug" : ""));
- if(!$perms_pass)
- {
- $this->add_button("retest_perms", LANINS_009);
- $this->stage = 3; // make the installer jump back a step
- }
- elseif ($perms_pass && !$version_fail && $xml_installed)
- {
- $this->add_button("continue_install", LAN_CONTINUE);
- }
+
$permColor = ($perms_pass == true) ? "text-success" : "text-error";
$PHPColor = ($version_fail == false) ? "text-success" : "text-error";
- $xmlColor = ($xml_installed == true) ? "text-success" : "text-error";
- $exifColor = ($exif_installed == true) ? "text-success" : "text-error";
$mysqlColor = ($mysql_pass == true) ? "text-success" : "text-error";
- $gdLibColor = ($gdlib_installed == true) ? "text-success" : "text-error";
- $curlColor = ($curl_installed == true) ? "text-success" : "text-error"; //TODO Below.
- $xmlExtensionLink = "php.net";
+ $extensionCheck = array(
+ 'xml' => array('label'=> LANINS_050, 'status'=> function_exists('utf8_encode'), 'url'=> 'http://php.net/manual/en/ref.xml.php'),
+ 'exif' => array('label'=> LANINS_048, 'status'=> function_exists('exif_imagetype'), 'url'=> 'http://php.net/manual/en/book.exif.php'),
+ 'gd' => array('label'=> 'GD Library', 'status'=> function_exists('gd_info'), 'url'=> 'http://php.net/manual/en/book.image.php'),
+ 'curl' => array('label'=>'Curl Library', 'status'=> function_exists('curl_version'), 'url'=>'http://php.net/manual/en/book.curl.php')
+ );
+
- // TODO Lots of repetition below - clean it up with an array and loop.
$output = "
@@ -902,26 +892,36 @@ class e_install
MySQL |
{$mysql_note} |
{$mysql_help} |
-
+ ";
-
- GD Extension |
- ".($gdlib_installed ? LANINS_051 : LANINS_052)." |
- ".($gdlib_installed ? " ".LANINS_017 : str_replace("[x]",$xmlExtensionLink, LANINS_053) )." |
-
-
-
- ".LANINS_050." |
- ".($xml_installed ? LANINS_051 : LANINS_052)." |
- ".($xml_installed ? " ".LANINS_017 : str_replace("[x]",$xmlExtensionLink, LANINS_053) )." |
-
-
- ".LANINS_048." |
- ".($exif_installed ? LANINS_051 : LANINS_052)." |
- ".($exif_installed ? " ".LANINS_017 : str_replace("[x]", $exifExtensionLink, LANINS_054) )." |
-
+ foreach($extensionCheck as $ext)
+ {
+ $statusText = ($ext['status'] === true) ? LANINS_051 : LANINS_052;
+ $statusColor = ($ext['status'] === true) ? "text-success" : "text-error";
+ $statusIcon = ($ext['status'] === true) ? " ".LANINS_017 : str_replace(array("[x]",'[y]'), array($ext['label'], "php.net"), LANINS_145);
+
+ $output .= "
+
+ ".$ext['label']." |
+ ".$statusText." |
+ ".$statusIcon." |
+
";
+ }
+
+
+ $output .= "
\n";
+ if(!$perms_pass || (($extensionCheck['xml']['status'] !== true)))
+ {
+ $this->add_button("retest_perms", LANINS_009);
+ $this->stage = 3; // make the installer jump back a step
+ }
+ elseif ($perms_pass && !$version_fail && ($extensionCheck['xml']['status'] == true))
+ {
+ $this->add_button("continue_install", LAN_CONTINUE);
+ }
+
$this->finish_form();
$this->template->SetTag("stage_content", $output.$e_forms->return_form());
$this->logLine('Stage 4 completed');
@@ -1837,6 +1837,16 @@ if($this->pdo == true)
if (!$this->dbqry($sql_table, $link))
{
+ if($this->debug)
+ {
+ echo "filename
";
+ var_dump($filename);
+
+ echo "sql_table
";
+ var_dump($sql_table);
+ echo "result[0]
";
+ var_dump($result[0]);
+ }
return nl2br(LANINS_061."\n\n".LANINS_083."\n".e107::getDb()->getLastErrorText()."");
}
}
@@ -1861,18 +1871,17 @@ if($this->pdo == true)
function dbqry($qry)
{
- // mysql_query($qry);
$sql = e107::getDb();
- $sql->db_Query($qry);
+ return $sql->db_Query($qry);
- if($error = $sql->getLastErrorNumber())
+ /*if($error = $sql->getLastErrorNumber())
{
$errorInfo = 'Query Error [#'.$error.']: '.$sql->getLastErrorText()."\nQuery: {$qry}";
$this->debug_db_info['db_error_log'][] = $errorInfo;
return false;
}
- return true;
+ return true;*/
}
}
@@ -2090,7 +2099,7 @@ function template_data()
{debug_info}