Changeset 807 for trunk/includes


Ignore:
Timestamp:
May 25, 2014, 12:33:20 AM (11 years ago)
Author:
chronos
Message:
  • Modified: Do not register all possible redirected pages to main URL route tree in Redirection module. Instead register itself as System->OnPageNotFound handler.
Location:
trunk/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Version.php

    r806 r807  
    66// and system will need database update.
    77
    8 $Revision = 806; // Subversion revision
     8$Revision = 807; // Subversion revision
    99$DatabaseRevision = 803; // Database structure revision
    1010$ReleaseTime = '2014-05-24';
  • trunk/includes/system.php

    r805 r807  
    1212  var $Menu;
    1313  var $DoNotShowPage;
     14  var $OnPageNotFound;
    1415
    1516  function __construct()
     
    1920    $this->RSSChannels = array();
    2021    $this->DoNotShowPage = false;
     22    $this->OnPageNotFound = array();
    2123  }
    2224
     
    245247      if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output);
    246248    } else {
    247         $Output = $this->PageNotFound();
    248         $this->BaseView->Title = T('Page not found');
    249         $Output = $this->BaseView->ShowPage($Output);
    250     }
     249        if((count($this->OnPageNotFound) == 2)
     250  and method_exists($this->OnPageNotFound[0], $this->OnPageNotFound[1]))
     251          $Output = $this->BaseView->ShowPage(call_user_func_array($this->OnPageNotFound, array()));
     252                else
     253                {
     254                        $Output = $this->PageNotFound();
     255            $this->BaseView->Title = T('Page not found');
     256                $Output = $this->BaseView->ShowPage($Output);
     257                }
     258        }
    251259    echo($Output);
    252260  }
     
    443451        {
    444452                $Output = $this->ShowHeader().$Content.$this->ShowFooter();
    445                 //if($this->System->Config['Web']['FormatOutput']) $Output = $this->FormatOutput($Output);
     453                if($this->System->Config['Web']['FormatOutput'])
     454              $Output = $this->FormatOutput($Output);
    446455                return($Output);
    447456        }
Note: See TracChangeset for help on using the changeset viewer.