Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4050717
D308.id.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
D308.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D308: Autoloader to handle Pages/ content
Attached
Detach File
Event Timeline
Log In to Comment