Page MenuHomeDevCentral

D308.id.diff
No OneTemporary

D308.id.diff

diff --git a/autoload.php b/autoload.php
--- a/autoload.php
+++ b/autoload.php
@@ -12,6 +12,19 @@
case 'ArticleTemplate': require('templates/wikipedia-fr/Article.php'); return;
case 'LienWebTemplate': require('templates/wikipedia-fr/Lien_web.php'); return;
case 'OuvrageTemplate': require('templates/wikipedia-fr/Ouvrage.php'); return;
+
+ case 'DownloadWithWget': require('pages/DownloadWithWget.php'); return;
+ }
+
+ if (substr($class, -4) === "Page") {
+ if (file_exists("pages/$class.php")) {
+ require "pages/$class.php";
+ return;
+ }
+
+ $file = strtolower(substr($class, 0, -4));
+ require "pages/$file.php";
+ return;
}
}
diff --git a/page.php b/page.php
--- a/page.php
+++ b/page.php
@@ -149,7 +149,6 @@
$file = strtolower(trim($page[1])) . '.php';
$class = trim($page[1]) . 'Page';
- require("pages/$file");
return new $class($url);
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 05:23 (17 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2374103
Default Alt Text
D308.id.diff (1 KB)

Event Timeline