- Timestamp:
- May 25, 2014, 12:33:20 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Redirection/Redirection.php
r800 r807 17 17 function Start() 18 18 { 19 $this->System->RegisterPage('team.php', 'PageRedirection'); 20 $this->System->RegisterPage('version.php', 'PageRedirection'); 21 $this->System->RegisterPage('phpBB3', 'PageRedirection'); 22 $this->System->RegisterPage('phpbb3', 'PageRedirection'); 23 $this->System->RegisterPage(array('forum', 'index.php'), 'PageRedirection'); 24 $this->System->RegisterPage('statistic.php', 'PageRedirection'); 25 $this->System->RegisterPage('register.php', 'PageRedirection'); 26 $this->System->RegisterPage('dictionary.php', 'PageRedirection'); 27 $this->System->RegisterPage(array('dictionary', 'user.php'), 'PageRedirection'); 28 $this->System->RegisterPage(array('team', 'userlist.php'), 'PageRedirection'); 29 $this->System->RegisterPage('download-addon.php', 'PageRedirection'); 30 $this->System->RegisterPage('banners.php', 'PageRedirection'); 31 $this->System->RegisterPage('download.php', 'PageRedirection'); 32 $this->System->RegisterPage('serverlist.php', 'PageRedirection'); 19 $this->System->OnPageNotFound = array($this, 'ShowRedirect'); 33 20 } 34 }35 21 36 class PageRedirection extends Page 37 { 38 function Show() 22 function ShowRedirect() 39 23 { 40 24 Header($_SERVER['SERVER_PROTOCOL'].' 301 Moved Permanently'); … … 60 44 if(($this->System->PathItems[0] == 'forum') and ($this->System->PathItems[1] == 'index.php')) 61 45 Header('Location: '.$this->System->Link('/forum/')); 46 if(($this->System->PathItems[0] == 'phpbb3') and ($this->System->PathItems[1] == 'index.php')) 47 Header('Location: '.$this->System->Link('/forum/')); 48 if(($this->System->PathItems[0] == 'phpBB3') and ($this->System->PathItems[1] == 'index.php')) 49 Header('Location: '.$this->System->Link('/forum/')); 62 50 } 63 51 } -
trunk/includes/Version.php
r806 r807 6 6 // and system will need database update. 7 7 8 $Revision = 80 6; // Subversion revision8 $Revision = 807; // Subversion revision 9 9 $DatabaseRevision = 803; // Database structure revision 10 10 $ReleaseTime = '2014-05-24'; -
trunk/includes/system.php
r805 r807 12 12 var $Menu; 13 13 var $DoNotShowPage; 14 var $OnPageNotFound; 14 15 15 16 function __construct() … … 19 20 $this->RSSChannels = array(); 20 21 $this->DoNotShowPage = false; 22 $this->OnPageNotFound = array(); 21 23 } 22 24 … … 245 247 if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output); 246 248 } 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 } 251 259 echo($Output); 252 260 } … … 443 451 { 444 452 $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); 446 455 return($Output); 447 456 }
Note:
See TracChangeset
for help on using the changeset viewer.