Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12403221
D3832.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3832.diff
View Options
diff --git a/workspaces/src/apps/mediawikimirror/MediaWikiMirrorApplication.php b/workspaces/src/apps/mediawikimirror/MediaWikiMirrorApplication.php
--- a/workspaces/src/apps/mediawikimirror/MediaWikiMirrorApplication.php
+++ b/workspaces/src/apps/mediawikimirror/MediaWikiMirrorApplication.php
@@ -52,21 +52,25 @@
public function handleRequest () {
$smarty = $this->context->templateEngine;
- //Gets content
- $url = $this->getRenderUrl();
+ // Header
$title = $this->context->configuration->page;
- $content = file_get_contents($url);
- $content = $this->fixLinks($content);
-
- //Serves header
$smarty->assign('PAGE_TITLE', $title);
HeaderController::run($this->context);
- //Serves body
- $smarty->assign('Content', $content);
- $smarty->display('apps/mediawikimirror/page.tpl');
+ // Body
+ $url = $this->getRenderUrl();
+ try {
+ $content = file_get_contents($url);
+ $content = $this->fixLinks($content);
+ $smarty->assign("Content", $content);
+ $smarty->display("apps/mediawikimirror/page.tpl");
+ } catch (Exception $ex) {
+ $smarty->assign("alert_level", "danger");
+ $smarty->assign("alert_note", $ex->getMessage());
+ $smarty->display("apps/_blocks/alert.tpl");
+ }
- //Serves footer
+ // Footer
FooterController::run($this->context);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 3, 20:34 (1 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3129641
Default Alt Text
D3832.diff (1 KB)
Attached To
Mode
D3832: Don't serve an error 500 when wiki page can't be fetched
Attached
Detach File
Event Timeline
Log In to Comment