Changeset 31472 for trunk/www


Ignore:
Timestamp:
Nov 25, 2007, 3:21:18 AM (12 years ago)
Author:
jmpp@…
Message:
  • Rename "check_referer" function to "print_warnings" and move all of its contents into a new trunk/www/includes/warnings.inc file;
  • Remove the warning about not being the official website out of trunk/www/includes/header.inc and put it into the new warnings.inc file. With the 'if' conditional suggested by Ryan on the dev list, this warning should "just work" and disappear when the site is run from the official web server, at which time we'll reword it to something different (from claiming we're a temporary installation to a mirror).
Location:
trunk/www/includes
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/includes/common.inc

    r31470 r31472  
    4848    header("Content-Type: application/xhtml+xml; charset=$encoding");
    4949    include("$MPWEB/includes/header.inc");
    50     check_referer();
     50    print_warnings();
    5151}
    5252
     
    9898######################################################################
    9999
    100 # Warning against darwinports.com leach!
    101 function check_referer() {
    102     global $_SERVER;
     100# Print some useful warnings:
     101function print_warnings() {
     102    global $_SERVER, $MPWEB;
     103   
     104    include("$MPWEB/includes/warnings.inc");
    103105
    104     if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'darwinports.com') !== false) {
    105 ?>
    106         <div class="warning">
    107        
    108             <p>You have arrived at the <b>Official MacPorts Web Site</b> from <i>darwinports.com</i>.</p>
    109            
    110             <p><i>darwinports.com</i> <b>is not the official MacPorts Web Site</b>, nor is it a mirror of the <i>Official MacPorts
    111             Web Site</i>. There is <b>no relationship</b> between <i>The MacPorts Project</i> and <i>darwinports.com</i>.</p>
    112 
    113             <p>The information you may have been presented with on <i>darwinports.com</i> may be incorrect or outdated and is
    114             not endorsed in any way by <i>The MacPorts Project</i>. For the most accurate information about MacPorts, please
    115             bookmark this site, <a href="http://www.macports.org">http://www.macports.org</a>.</p>
    116            
    117         </div>
    118 <?php
    119     }
    120106}
    121 ?>
  • trunk/www/includes/header.inc

    r31471 r31472  
    9898            </dl>
    9999        </div>
    100 
    101 
    102         <p class="warning"> Warning: This is a temporary installation of the new &amp; re-designed website for The MacPorts
    103         Project. Official site is located at <a href="http://www.macports.org">http://www.macports.org</a> as always.</p>
Note: See TracChangeset for help on using the changeset viewer.