diff --git a/core.php b/core.php
index 72d7a2c..b786029 100644
--- a/core.php
+++ b/core.php
@@ -125,8 +125,8 @@ if(!isset($_GET["action"]) and !isset($_GET["page"]))
//make sure that the action is set
if(!isset($_GET["action"]))
- $_GET["action"] = "view";
-
+ $_GET["action"] = $settings->defaultaction;
+//make sure that the page is set
if(!isset($_GET["page"]) or strlen($_GET["page"]) === 0)
$_GET["page"] = $settings->defaultpage;
@@ -203,7 +203,7 @@ function renderpage($title, $content, $minimal = false)
case "search": //displays a search bar
$html .= "
";
break;
-
+
//it isn't a keyword, so just output it directly
default:
$html .= $item;
@@ -215,7 +215,7 @@ function renderpage($title, $content, $minimal = false)
$html .= "\t\t$item[0]\n";
}
}
-
+
$html .= "
$settings->sitename
$content
@@ -322,14 +322,13 @@ class Slimdown {
$level = strlen ($chars);
return sprintf ('%s', $level + 1, trim($header), $level + 1);
}
-
+
/**
* Add a rule.
*/
public static function add_rule ($regex, $replacement) {
self::$rules[$regex] = $replacement;
}
-
/**
* Render some Markdown into HTML.
*/
diff --git a/index.php b/index.php
index d78c173..f3b8b46 100644
--- a/index.php
+++ b/index.php
@@ -253,8 +253,8 @@ if(!isset($_GET["action"]) and !isset($_GET["page"]))
//make sure that the action is set
if(!isset($_GET["action"]))
- $_GET["action"] = "view";
-
+ $_GET["action"] = $settings->defaultaction;
+//make sure that the page is set
if(!isset($_GET["page"]) or strlen($_GET["page"]) === 0)
$_GET["page"] = $settings->defaultpage;
@@ -331,7 +331,7 @@ function renderpage($title, $content, $minimal = false)
case "search": //displays a search bar
$html .= "";
break;
-
+
//it isn't a keyword, so just output it directly
default:
$html .= $item;
@@ -343,7 +343,7 @@ function renderpage($title, $content, $minimal = false)
$html .= "\t\t$item[0]\n";
}
}
-
+
$html .= "
$settings->sitename
$content
@@ -450,14 +450,13 @@ class Slimdown {
$level = strlen ($chars);
return sprintf ('%s', $level + 1, trim($header), $level + 1);
}
-
+
/**
* Add a rule.
*/
public static function add_rule ($regex, $replacement) {
self::$rules[$regex] = $replacement;
}
-
/**
* Render some Markdown into HTML.
*/