[31489] trunk/www

jmpp at macports.org jmpp at macports.org
Sun Nov 25 10:17:49 PST 2007


Revision: 31489
          http://trac.macosforge.org/projects/macports/changeset/31489
Author:   jmpp at macports.org
Date:     2007-11-25 10:17:48 -0800 (Sun, 25 Nov 2007)

Log Message:
-----------

 * Move obfuscate_email() function into www/includes/common.inc, remove now unnecessary www/includes/email.inc file and references to it from contact.php and ports.php;
 * Move style properties of the obfuscate_email() funtion into the css;
 * Reorder the contents of www/includes/common.inc somewhat relative to the flow of our *.php pages;

Modified Paths:
--------------
    trunk/www/contact.php
    trunk/www/includes/common.inc
    trunk/www/macports.css
    trunk/www/ports.php

Removed Paths:
-------------
    trunk/www/includes/email.inc

Modified: trunk/www/contact.php
===================================================================
--- trunk/www/contact.php	2007-11-25 17:26:58 UTC (rev 31488)
+++ trunk/www/contact.php	2007-11-25 18:17:48 UTC (rev 31489)
@@ -4,7 +4,6 @@
     /* Copyright (c) 2007, The MacPorts Project. */
     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
     include_once("$MPWEB/includes/common.inc");
-    include_once("$MPWEB/includes/email.inc");
     print_header('The MacPorts Project -- Contact Us', 'utf-8');
 ?>
 

Modified: trunk/www/includes/common.inc
===================================================================
--- trunk/www/includes/common.inc	2007-11-25 17:26:58 UTC (rev 31488)
+++ trunk/www/includes/common.inc	2007-11-25 18:17:48 UTC (rev 31489)
@@ -40,7 +40,7 @@
 
 ######################################################################
 
-# Page header
+# Page header:
 function print_header($title, $encoding) {
     global $MPWEB, $mp_version_major, $trac_url, $svn_url, $downloads, $guide_url;
     $PHP_SELF = $_SERVER['PHP_SELF'];
@@ -51,13 +51,14 @@
 }
 
 
-###################################################################### 
+######################################################################
 
-# Page footer
-function print_footer() {
-    global $MPWEB;
+# Print some useful warnings:
+function print_warnings() {
+    global $_SERVER, $MPWEB;
+    
+    include("$MPWEB/includes/warnings.inc");
 
-    include("$MPWEB/includes/footer.inc");
 }
 
 
@@ -95,12 +96,19 @@
 }
 
 
-###################################################################### 
+######################################################################
 
-# Print some useful warnings:
-function print_warnings() {
-    global $_SERVER, $MPWEB;
-    
-    include("$MPWEB/includes/warnings.inc");
+# Obfuscate e-mail addresses:
+function obfuscate_email($email) {
+    return "<span class='email'>" . str_replace('@', "<img src='img/at.gif' alt='at' />", $email)."</span>";
+}
 
+
+######################################################################
+
+# Page footer:
+function print_footer() {
+    global $MPWEB;
+
+    include("$MPWEB/includes/footer.inc");
 }

Deleted: trunk/www/includes/email.inc
===================================================================
--- trunk/www/includes/email.inc	2007-11-25 17:26:58 UTC (rev 31488)
+++ trunk/www/includes/email.inc	2007-11-25 18:17:48 UTC (rev 31489)
@@ -1,12 +0,0 @@
-<?php
-    /* -*- coding: utf-8; mode: php; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=php:et:sw=4:ts=4:sts=4 */
-    /* $Id$ */
-    /* Copyright (c) 2004, OpenDarwin. */
-    /* Copyright (c) 2004-2007, The MacPorts Project. */
-
-
-    function obfuscate_email($email) {
-	    return "<span class='email'>".str_replace('@', "<img src='img/at.gif' alt='at' style='width: 1em; height: 1em;' />", $email)."</span>";
-    }
-
-?>

Modified: trunk/www/macports.css
===================================================================
--- trunk/www/macports.css	2007-11-25 17:26:58 UTC (rev 31488)
+++ trunk/www/macports.css	2007-11-25 18:17:48 UTC (rev 31489)
@@ -179,6 +179,10 @@
     margin-top: 0.7em;
 }
 
+.email {
+    width: 1em;
+    height: 1em;
+}
 
 #footer {
     font-size: 90%;

Modified: trunk/www/ports.php
===================================================================
--- trunk/www/ports.php	2007-11-25 17:26:58 UTC (rev 31488)
+++ trunk/www/ports.php	2007-11-25 18:17:48 UTC (rev 31489)
@@ -6,7 +6,6 @@
     /* Copyright (c) 2004-2007, The MacPorts Project. */
     $MPWEB = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME']);
     include_once("$MPWEB/includes/common.inc");
-    include_once("$MPWEB/includes/email.inc");
     print_header('The MacPorts Project -- Available Ports', 'utf-8');
     $by = isset($_GET['by']) ? $_GET['by'] : '';
     $substr = isset($_GET['substr']) ? $_GET['substr'] : '';

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071125/cdca1cbe/attachment.html


More information about the macports-changes mailing list