summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-05-10 08:55:39 -0600
committerAaron Ball <nullspoon@oper.io>2017-05-10 08:55:39 -0600
commit2291ede9915d21f94563b7835dcddb56a078ce3a (patch)
treee8e20a40417d88c83ad50d8cfa6c82fc773c5fd0
parent4e3a7026d2747be50353105bee7321e975540cfc (diff)
downloadoper.io-2291ede9915d21f94563b7835dcddb56a078ce3a.tar.gz
oper.io-2291ede9915d21f94563b7835dcddb56a078ce3a.tar.xz
index.php:Added additional query string support
Was only supporting the query string 'p=...' for page titles. Now we support 'q=...' and 'title=...'.
-rwxr-xr-xindex.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/index.php b/index.php
index 6fab2d2..e75d485 100755
--- a/index.php
+++ b/index.php
@@ -1,7 +1,16 @@
<?php
//print(file_get_contents('res/header.html'));
include('res/header.php');
-$post = $_GET['p'];
+
+// Support multiple page query styles (this implements partial support for
+// links used by other sofwares)
+if($_GET['p'] != '') {
+ $post = $_GET['p'];
+} else if($_GET['title'] != '') {
+ $post = $_GET['title'];
+} else if($_GET['q'] != '') {
+ $post = $_GET['q'];
+}
if($post == "" && file_exists('html/index.html')) {
// if a post isn't specified

Generated by cgit