page: maintain all placeholder includes in widget/
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 26 Jun 2019 20:55:21 +0000 (22:55 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Fri, 12 Jul 2019 02:18:16 +0000 (04:18 +0200)
Move code. For great overview.

page.php
widget/contact.php [moved from contact.php with 100% similarity]
widget/login/commits.php [moved from login/commits.php with 100% similarity]
widget/login/edit.php [moved from login/edit.php with 100% similarity]
widget/login/list.php [moved from login/list.php with 100% similarity]
widget/login/name.php [moved from login/name.php with 100% similarity]
widget/nieuws.php [moved from nieuws.php with 100% similarity]
widget/nieuws/replies.php [moved from nieuws/replies.php with 100% similarity]
widget/search.php [moved from search.php with 100% similarity]

index cdec9a802b1d55c8bbd46dcb78283e647a65125d..5e529850e3bca3f51e1e1d59ca3fc173de845a94 100644 (file)
--- a/page.php
+++ b/page.php
@@ -10,7 +10,7 @@ function abort($body, $status = NULL) {
 
 function placeholder_include($name, $params = [])
 {
-       $path = stream_resolve_include_path("$name.php");
+       $path = stream_resolve_include_path("widget/$name.php");
        if (!file_exists($path)) {
                return '<strong class="warn"><em>'.$name.'</em> ontbreekt</strong>';
        }
@@ -28,7 +28,7 @@ function placeholder_include($name, $params = [])
                }
        }
        try {
-               include "$name.php";
+               include "widget/$name.php";
                return ob_get_clean();
        }
        catch (Exception $e) {
similarity index 100%
rename from contact.php
rename to widget/contact.php
similarity index 100%
rename from login/commits.php
rename to widget/login/commits.php
similarity index 100%
rename from login/edit.php
rename to widget/login/edit.php
similarity index 100%
rename from login/list.php
rename to widget/login/list.php
similarity index 100%
rename from login/name.php
rename to widget/login/name.php
similarity index 100%
rename from nieuws.php
rename to widget/nieuws.php
similarity index 100%
rename from nieuws/replies.php
rename to widget/nieuws/replies.php
similarity index 100%
rename from search.php
rename to widget/search.php