IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35275


Ignore:
Timestamp:
Mar 8, 2013, 11:01:03 AM (13 years ago)
Author:
eugene
Message:

use full-url links as much as possible

Location:
branches/eam_branches/ipp-20130307/dvodist/www-util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/dvodist/www-util/dvodist.page.mkd

    r34748 r35275  
    1212$fromProxy = $_SERVER['HTTP_X_FORWARDED_FOR'] && ($_SERVER['REMOTE_ADDR'] == $ifaProxy);
    1313if ($fromProxy) {
    14   $rootdir = "";
     14  $rootdir = "@ROOTWWW@";
    1515 } else {
    16   $rootdir = "@ROOTDIR@";
     16  $rootdir = "@ROOTWWW@@ROOTDIR@";
    1717 }
    1818
     
    2020
    2121$script = basename($_SERVER[SCRIPT_NAME]);
    22 do_markdown ($script);
     22do_markdown ($script, $rootdir);
    2323
    2424menu_end();
  • branches/eam_branches/ipp-20130307/dvodist/www-util/ipp.php

    r35272 r35275  
    245245
    246246// lines which start with @ are processed by 'dirlist', all others are processed by Markdown
    247 function do_markdown ($source) {
     247function do_markdown ($source, $root) {
     248
    248249  if (!file_exists($source)) return;
    249250
     
    254255  $to_dirlist = "";
    255256  while ($line = fgets ($file, 1024)) {
     257    // replace @WWWHOST@ with $root
     258    $line = str_replace ("@WWWHOST@", $root, $line);
     259
    256260    // echo "line: $line";
    257261    if (!strncmp($line, "@", 1)) {
  • branches/eam_branches/ipp-20130307/dvodist/www-util/ippdata.page.mkd

    r35273 r35275  
    2020
    2121$script = basename($_SERVER[SCRIPT_NAME]);
    22 do_markdown ($script);
     22do_markdown ($script, $rootdir);
    2323
    2424menu_end();
Note: See TracChangeset for help on using the changeset viewer.