[28701] trunk/www/includes
source_changes at macosforge.org
source_changes at macosforge.org
Fri Sep 7 10:56:14 PDT 2007
Revision: 28701
http://trac.macosforge.org/projects/macports/changeset/28701
Author: sfiera at macports.org
Date: 2007-09-07 10:56:14 -0700 (Fri, 07 Sep 2007)
Log Message:
-----------
Fix some pedantic PHP warnings
Modified Paths:
--------------
trunk/www/includes/common.inc
trunk/www/includes/news.inc
Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc 2007-09-07 17:25:08 UTC (rev 28700)
+++ trunk/www/includes/common.inc 2007-09-07 17:56:14 UTC (rev 28701)
@@ -82,7 +82,7 @@
# Warn against darwinports.com leach!
function check_referer() {
global $_SERVER;
- if (preg_match("/darwinports.com/", $_SERVER['HTTP_REFERER'])) {
+ if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'darwinports.com') !== false) {
?>
<div class="warning">
<p>You have arrived at the <b>Official MacPorts Web Site</b> from <i>darwinports.com</i>.</p>
Modified: trunk/www/includes/news.inc
===================================================================
--- trunk/www/includes/news.inc 2007-09-07 17:25:08 UTC (rev 28700)
+++ trunk/www/includes/news.inc 2007-09-07 17:56:14 UTC (rev 28701)
@@ -13,7 +13,7 @@
$newsdb_host = 'localhost';
$newsdb_user = 'www';
$newsdb_passwd = '';
-$newsdb_connect = mysql_pconnect($newsdb_host, $newsdb_user, $newsdb_pass) or die("Can't connect to the MacPorts news database!");
+$newsdb_connect = mysql_pconnect($newsdb_host, $newsdb_user, $newsdb_passwd) or die("Can't connect to the MacPorts news database!");
######################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070907/916edef8/attachment.html
More information about the macports-changes
mailing list