Migration to get_settings and away from globals.

git-svn-id: http://svn.automattic.com/wordpress/trunk@957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-03-01 19:55:45 +00:00
parent b6aa1f6807
commit a0867db6ed
27 changed files with 51 additions and 72 deletions

View File

@ -134,7 +134,7 @@ default:
$standalone = 0;
require_once ('admin-header.php');
if ($user_level < 3) {
die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:$admin_email'>blog admin</a>. :)");
die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:" . get_settings('admin_email'). "'>blog admin</a>. :)");
}
?>

View File

@ -101,7 +101,7 @@ textarea,input,select {
$query = "INSERT INTO $tableusers (user_login,user_pass,user_nickname,user_email,user_url,user_ip,user_domain,user_browser,dateYMDhour,user_level,user_idmode) VALUES ('$user_login','$pass1','$user_nickname','$user_email','$user_url','$user_ip','$user_domain','$user_browser','$user_joindate','1','nickname')";
$result = mysql_query($query);
if ($result==false) {
die ("<b>ERROR</b>: couldn't register an user... please contact the <a href=\"mailto:$admin_email\">webmaster</a> !");
die ("<strong>ERROR</strong>: couldn't register an user!");
}
echo "<li>user <i>$user_login</i>... <b>Done</b></li>";
@ -160,7 +160,7 @@ textarea,input,select {
$query = "INSERT INTO $tableusers (user_login,user_pass,user_nickname,user_email,user_url,user_ip,user_domain,user_browser,dateYMDhour,user_level,user_idmode) VALUES ('$user_login','$pass1','$user_nickname','$user_email','$user_url','$user_ip','$user_domain','$user_browser','$user_joindate','0','nickname')";
$result = mysql_query($query);
if ($result==false) {
die ("<b>ERROR</b>: couldn't register an user... please contact the <a href=\"mailto:$admin_email\">webmaster</a> !");
die ("<strong>ERROR</strong>: couldn't register an user!");
}
echo ": registered deleted user <i>$user_login</i> at level 0 ";
}
@ -196,7 +196,7 @@ textarea,input,select {
$result = mysql_query($query) or die(mysql_error());
if (!$result)
die ("Error in posting... contact the <a href=\"mailto:$admin_email\">webmaster</a>");
die ("Error in posting...");
$sql2 = "SELECT * FROM $tableposts WHERE 1=1 ORDER BY ID DESC LIMIT 1";
$result2 = mysql_query($sql2);
@ -244,7 +244,7 @@ textarea,input,select {
$sql3 = "INSERT INTO $tablecomments (comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_author_IP,comment_date,comment_content) VALUES ('$comment_post_ID','$comment_author','$comment_author_email','$comment_author_url','$comment_author_IP','$comment_date','$comment_content')";
$result3 = mysql_query($sql3);
if (!$result3)
die ("There is an error with the database, it can't store your comment...<br>Contact the <a href=\"mailto:$admin_email\">webmaster</a>");
die ("There is an error with the database, it can't store your comment..");
}
$comments=$c-4;
echo ": imported $comments comment";

View File

@ -437,7 +437,6 @@ $option_data = array(
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(42,'default_category', 1, '1', 'by default posts will have this category', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(43,'subjectprefix', 3, 'blog:', 'subject prefix', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(44,'bodyterminator', 3, '___', 'body terminator string (starting from this string, everything will be ignored, including this string)', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(45,'emailtestonly', 2, '0', 'set this to true to run in test mode', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(46,'use_phoneemail', 2, '0', 'some mobile phone email services will send identical subject & content on the same line if you use such a service, set use_phoneemail to true, and indicate a separator string', 8, 20)",
"INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES(47,'phoneemail_separator', 3, ':::', 'when you compose your message, you\'ll type your subject then the separator string then you type your login:password, then the separator, then content', 8, 20)",
// original options from options page

View File

@ -280,7 +280,7 @@ updated</label>
$standalone=0;
include_once ("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the link categories for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the link categories for this blog. :)");
}
?>
<ul id="adminmenu2">

View File

@ -290,7 +290,7 @@ switch ($action) {
$standalone=0;
include_once ('admin-header.php');
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the links for this blog.<br />Ask for a promotion to your <a href='mailto:$admin_email'>blog admin</a>. :)");
die('You have do not have sufficent permissions to edit the links for this blog.');
}
$row = $wpdb->get_row("SELECT *
@ -537,7 +537,7 @@ No</label></td>
$standalone=0;
include_once ("./admin-header.php");
if ($user_level < get_settings('links_minadminlevel')) {
die("You have no right to edit the links for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the links for this blog.");
}
switch ($order_by)

View File

@ -51,7 +51,7 @@ case 'update':
require_once('admin-header.php');
if ($user_level < 3) {
die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
die('<p>Your level is not high enough to moderate comments.</p>');
}
$item_ignored = 0;
@ -92,7 +92,7 @@ default:
require_once('admin-header.php');
if ($user_level <= 3) {
die('<p>Your level is not high enough to moderate comments. Ask for a promotion from your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
die('<p>Your level is not high enough to moderate comments.</p>');
}
?>
<ul id="adminmenu2">

View File

@ -40,7 +40,7 @@ require_once('optionhandler.php');
$standalone = 0;
include_once('admin-header.php');
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br />Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the options for this blog.");
}
?>
<ul id="adminmenu2">

View File

@ -40,7 +40,7 @@ require_once('optionhandler.php');
$standalone = 0;
include_once('admin-header.php');
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br />Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the options for this blog.");
}
?>
<ul id="adminmenu2">

View File

@ -51,7 +51,7 @@ default:
$standalone = 0;
include_once('admin-header.php');
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br>Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the options for this blog.");
}
?>
<ul id="adminmenu2">

View File

@ -40,7 +40,7 @@ require_once('optionhandler.php');
$standalone = 0;
include_once('admin-header.php');
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br />Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the options for this blog.");
}
?>
<ul id="adminmenu2">

View File

@ -110,7 +110,7 @@ default:
$standalone = 0;
include_once("./admin-header.php");
if ($user_level <= 3) {
die("You have no right to edit the options for this blog.<br>Ask for a promotion from your <a href=\"mailto:$admin_email\">blog admin</a> :)");
die("You have do not have sufficient permissions to edit the options for this blog.");
}
?>

View File

@ -242,7 +242,7 @@ switch($action) {
?>
<p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1,
in order to be authorized to post.<br />
You can also <a href="mailto:<?php echo $admin_email ?>?subject=Promotion?">e-mail the admin</a>
You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Promotion?">e-mail the admin</a>
to ask for a promotion.<br />
When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)
</p>
@ -413,7 +413,7 @@ switch($action) {
$result = $wpdb->query("DELETE FROM $tableposts WHERE ID=$post_id");
if (!$result)
die('Error in deleting... contact the <a href="mailto:$admin_email">webmaster</a>.');
die('Error in deleting...');
$result = $wpdb->query("DELETE FROM $tablecomments WHERE comment_post_ID=$post_id");
@ -751,7 +751,7 @@ function oneclickbookmarklet(blah) {
?>
<div class="wrap">
<p>Since you&#8217;re a newcomer, you&#8217;ll have to wait for an admin to raise your level to 1, in order to be authorized to post blog items.<br />
You can also <a href="mailto:<?php echo $admin_email ?>?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />
You can also <a href="mailto:<?php echo get_settings('admin_email'); ?>?subject=Blog posting permission">e-mail the admin</a> to ask for a promotion.<br />
When you&#8217;re promoted, just reload this page and you&#8217;ll be able to blog. :)</p>
</div>
<?php

View File

@ -94,7 +94,7 @@ case 'update':
$query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
$result = $wpdb->query($query);
if (!$result) {
die ("<strong>ERROR</strong>: couldn't update your profile... please contact the <a href=\"mailto:$admin_email\">webmaster</a> !<br /><br />$query<br /><br />");
die ("<strong>ERROR</strong>: couldn't update your profile...");
}
header('Location: profile.php?updated=true');
break;

View File

@ -42,7 +42,7 @@ case 'update':
require_once("admin-header.php");
if ($user_level < 3) {
die('<p>You have no right to edit the template for this blog.<br />Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
}
$newcontent = stripslashes($HTTP_POST_VARS['newcontent']);
@ -62,7 +62,7 @@ default:
require_once('admin-header.php');
if ($user_level <= 3) {
die('<p>You have no right to edit the template for this blog.<br>Ask for a promotion to your <a href="mailto:$admin_email">blog admin</a>. :)</p>');
die('<p>You have do not have sufficient permissions to edit templates for this blog.</p>');
}
if ('' == $file) {

View File

@ -214,7 +214,6 @@ $guessurl = preg_replace('|/wp-admin/.*|i', '', 'http://' . $HTTP_HOST . $REQUES
"42" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (42,'default_category', 1, '1', 'by default posts will have this category', 8, 20)",
"43" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (43,'subjectprefix', 3, 'blog:', 'subject prefix', 8, 20)",
"44" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (44,'bodyterminator', 3, '___', 'body terminator string (starting from this string, everything will be ignored, including this string)', 8, 20)",
"45" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (45,'emailtestonly', 2, '0', 'set this to true to run in test mode', 8, 20)",
"46" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (46,'use_phoneemail', 2, '0', 'some mobile phone email services will send identical subject & content on the same line if you use such a service, set use_phoneemail to true, and indicate a separator string', 8, 20)",
"47" => "INSERT INTO $tableoptions (option_id, option_name, option_type, option_value, option_description, option_admin_level, option_width) VALUES (47,'phoneemail_separator', 3, ':::', 'when you compose your message, you\'ll type your subject then the separator string then you type your login:password, then the separator, then content', 8, 20)",

View File

@ -78,7 +78,7 @@ case 'adduser':
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_firstname', '$user_lastname', '$user_nicename')");
if ($result == false) {
die ('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:'.$admin_email.'">webmaster</a> !');
die ('<strong>ERROR</strong>: Couldn&#8217;t register you!');
}
$stars = '';
@ -89,7 +89,7 @@ case 'adduser':
$message = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
$message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
@mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message);
@mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
header('Location: users.php');
break;

View File

@ -317,10 +317,9 @@ function convert_gmcode($content) { // depreciated
}
function convert_smilies($text) {
global $smilies_directory, $use_smilies;
global $wp_smiliessearch, $wp_smiliesreplace;
$output = '';
if ($use_smilies) {
if (get_settings('use_smilies')) {
// HTML loop taken from texturize function, could possible be consolidated
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
$stop = count($textarr);// loop stuff

View File

@ -932,7 +932,6 @@ function pingback($content, $post_ID) {
}
function doGeoUrlHeader($posts) {
global $use_default_geourl,$default_geourl_lat,$default_geourl_lon;
if (count($posts) == 1) {
// there's only one result see if it has a geo code
$row = $posts[0];
@ -946,11 +945,11 @@ function doGeoUrlHeader($posts) {
return;
}
} else {
if($use_default_geourl) {
if(get_settings('use_default_geourl')) {
// send the default here
echo "<meta name=\"ICBM\" content=\"".$default_geourl_lat.", ".$default_geourl_lon."\" />\n";
echo "<meta name=\"ICBM\" content=\"". get_settings('default_geourl_lat') .", ". get_settings('default_geourl_lon') ."\" />\n";
echo "<meta name=\"DC.title\" content=\"".convert_chars(strip_tags(get_bloginfo("name")),"unicode")."\" />\n";
echo "<meta name=\"geo.position\" content=\"".$default_geourl_lat.";".$default_geourl_lon."\" />\n";
echo "<meta name=\"geo.position\" content=\"". get_settings('default_geourl_lat') .";". get_settings('default_geourl_lon') ."\" />\n";
}
}
}

View File

@ -22,7 +22,6 @@ function bloginfo_unicode($show='') {
}
function get_bloginfo($show='') {
global $admin_email;
$do_perma = 0;
$feed_url = get_settings('siteurl');
@ -75,7 +74,7 @@ function get_bloginfo($show='') {
$output = get_settings('siteurl') .'/xmlrpc.php';
break;
case 'admin_email':
$output = $admin_email;
$output = get_settings('admin_email');
break;
case 'name':
default:

View File

@ -262,7 +262,7 @@ uksort($wpsmiliestrans, 'smiliescmp');
foreach($wpsmiliestrans as $smiley => $img) {
$wp_smiliessearch[] = $smiley;
$smiley_masked = str_replace(' ', '', $smiley);
$wp_smiliesreplace[] = " <img src='$smilies_directory/$img' alt='$smiley_masked' />";
$wp_smiliesreplace[] = " <img src='" . get_settings('smilies_directory') . "/$img' alt='$smiley_masked' />";
}

View File

@ -223,7 +223,7 @@ case 'retrievepassword':
echo "<p>The email was sent successfully to $user_login's email address.<br />
<a href='wp-login.php' title='Check your email first, of course'>Click here to login!</a></p>";
// send a copy of password change notification to the admin
mail($admin_email, '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login");
mail(get_settings('admin_email'), '[' . get_settings('blogname') . "] Password Lost/Change", "Password Lost and Changed for user: $user_login");
die();
}

View File

@ -10,7 +10,7 @@ $use_cache = 1;
$output_debugging_info = 0; # =1 if you want to output debugging info
$time_difference = get_settings('time_difference');
if ($use_phoneemail) {
if (get_settings('use_phoneemail')) {
// if you're using phone email, the email will already be in your timezone
$time_difference = 0;
}
@ -21,12 +21,12 @@ error_reporting(2037);
$pop3 = new POP3();
if(!$pop3->connect($mailserver_url, $mailserver_port)) {
if(!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) {
echo "Ooops $pop3->ERROR <br />\n";
exit;
}
$Count = $pop3->login($mailserver_login, $mailserver_pass);
$Count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass'));
if((!$Count) || ($Count == -1)) {
echo "<h1>Login Failed: $pop3->ERROR</h1>\n";
$pop3->quit();
@ -76,11 +76,11 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
if (!preg_match('#\=\?(.+)\?Q\?(.+)\?\=#i', $subject)) {
$subject = wp_iso_descrambler($subject);
}
if ($use_phoneemail) {
$subject = explode($phoneemail_separator, $subject);
if (get_settings('use_phoneemail')) {
$subject = explode(get_settings('phoneemail_separator'), $subject);
$subject = trim($subject[0]);
}
if (!ereg($subjectprefix, $subject)) {
if (!ereg(get_settings('subjectprefix'), $subject)) {
continue;
}
}
@ -124,14 +124,14 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
continue;
}
if (preg_match('/'.$subjectprefix.'/', $subject)) {
if (preg_match('/'.get_settings('subjectprefix').'/', $subject)) {
$userpassstring = '';
echo '<div style="border: 1px dashed #999; padding: 10px; margin: 10px;">';
echo "<p><b>$iCount</b></p><p><b>Subject: </b>$subject</p>\n";
$subject = trim(str_replace($subjectprefix, '', $subject));
$subject = trim(str_replace(get_settings('subjectprefix'), '', $subject));
if ($content_type == 'multipart/alternative') {
$content = explode('--'.$boundary, $content);
@ -144,7 +144,7 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
echo "<p><b>Content-type:</b> $content_type, <b>boundary:</b> $boundary</p>\n";
echo "<p><b>Raw content:</b><br /><pre>".$content.'</pre></p>';
$btpos = strpos($content, $bodyterminator);
$btpos = strpos($content, get_settings('bodyterminator'));
if ($btpos) {
$content = substr($content, 0, $btpos);
}
@ -154,15 +154,15 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
$firstline = $blah[0];
$secondline = $blah[1];
if ($use_phoneemail) {
$btpos = strpos($firstline, $phoneemail_separator);
if (get_settings('use_phoneemail')) {
$btpos = strpos($firstline, get_settings('phoneemail_separator'));
if ($btpos) {
$userpassstring = trim(substr($firstline, 0, $btpos));
$content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
$btpos = strpos($content, $phoneemail_separator);
$content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
$btpos = strpos($content, get_settings('phoneemail_separator'));
if ($btpos) {
$userpassstring = trim(substr($content, 0, $btpos));
$content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
$content = trim(substr($content, $btpos+strlen(get_settings('phoneemail_separator')), strlen($content)));
}
}
$contentfirstline = $blah[1];
@ -218,7 +218,7 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
$post_title = $subject;
}
if (empty($post_categories)) {
$post_categories[] = $default_category;
$post_categories[] = get_settings('default_category');
}
if (!$thisisforfunonly) {

View File

@ -39,9 +39,9 @@ add_filter('the_content', 'trim');
<description><?php bloginfo_rss('description') ?></description>
<dc:language><?php echo get_settings('rss_language'); ?></dc:language>
<dc:date><?php echo gmdate('Y-m-d\TH:i:s'); ?></dc:date>
<dc:creator><?php echo antispambot($admin_email) ?></dc:creator>
<dc:creator><?php echo antispambot(get_settings('admin_email')) ?></dc:creator>
<admin:generatorAgent rdf:resource="http://wordpress.org/?v=<?php echo $wp_version ?>"/>
<admin:errorReportsTo rdf:resource="mailto:<?php echo antispambot($admin_email) ?>"/>
<admin:errorReportsTo rdf:resource="mailto:<?php echo antispambot(get_settings('admin_email')) ?>"/>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>

View File

@ -96,7 +96,7 @@ case 'register':
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname')");
if ($result == false) {
die ('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:'.$admin_email.'">webmaster</a> !');
die ('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:'.get_settings('admin_email').'">webmaster</a> !');
}
$stars = '';
@ -107,7 +107,7 @@ case 'register':
$message = 'New user registration on your blog ' . get_settings('blogname') . ":\r\n\r\n";
$message .= "Login: $user_login\r\n\r\nE-mail: $user_email";
@mail($admin_email, '[' . get_settings('blogname') . '] New User Registration', $message);
@mail(get_settings('admin_email'), '[' . get_settings('blogname') . '] New User Registration', $message);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

View File

@ -32,7 +32,7 @@ header("Etag: " . $cetag, true);
<description><?php bloginfo_rss("description") ?></description>
<lastBuildDate><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</lastBuildDate>
<docs>http://backend.userland.com/rss092</docs>
<managingEditor><?php echo antispambot($admin_email) ?></managingEditor>
<managingEditor><?php echo antispambot(get_settings('admin_email')) ?></managingEditor>
<webMaster><?php echo antispambot($admin_email) ?></webMaster>
<language><?php echo get_settings('rss_language'); ?></language>

View File

@ -49,22 +49,6 @@ require_once (ABSPATH . WPINC . '/kses.php');
// get_settings() wherever these are needed OR
// accessing a single global $all_settings var
if (!strstr($_SERVER['REQUEST_URI'], 'install.php') && !strstr($_SERVER['REQUEST_URI'], 'wp-admin/import')) {
$admin_email = get_settings('admin_email');
$use_smilies = get_settings('use_smilies');
$smilies_directory = get_settings('smilies_directory');
$mailserver_url = get_settings('mailserver_url');
$mailserver_login = get_settings('mailserver_login');
$mailserver_pass = get_settings('mailserver_pass');
$mailserver_port = get_settings('mailserver_port');
$default_category = get_settings('default_category');
$subjectprefix = get_settings('subjectprefix');
$bodyterminator = get_settings('bodyterminator');
$emailtestonly = get_settings('emailtestonly');
$use_phoneemail = get_settings('use_phoneemail');
$phoneemail_separator = get_settings('phoneemail_separator');
$use_default_geourl = get_settings('use_default_geourl');
$default_geourl_lat = get_settings('default_geourl_lat');
$default_geourl_lon = get_settings('default_geourl_lon');
$querystring_start = '?';
$querystring_equal = '=';

View File

@ -81,7 +81,7 @@ if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_u
");
if (!$result) {
die ("There is an error with the database, it can't store your comment...<br />Please contact the <a href='mailto:$admin_email'>webmaster</a>.");
die ("There is an error with the database, it can't store your comment...<br />Please contact the webmaster.");
} else {
$comment_ID = $wpdb->get_var('SELECT last_insert_id()');
if (get_settings('comments_notify'))