summaryrefslogtreecommitdiffstats
path: root/system/post
diff options
context:
space:
mode:
Diffstat (limited to 'system/post')
-rw-r--r--system/post/list.php5
-rw-r--r--system/post/main.php13
2 files changed, 10 insertions, 8 deletions
diff --git a/system/post/list.php b/system/post/list.php
index a7d6ce7..7b0630c 100644
--- a/system/post/list.php
+++ b/system/post/list.php
@@ -1,8 +1,9 @@
<?php
#===============================================================================
-# INCLUDE: Main configuration
+# Get instances
#===============================================================================
-require_once '../../core/application.php';
+$Database = Application::getDatabase();
+$Language = Application::getLanguage();
$site_size = Application::get('POST.LIST_SIZE');
$site_sort = Application::get('POST.LIST_SORT');
diff --git a/system/post/main.php b/system/post/main.php
index b880bb7..8411d9a 100644
--- a/system/post/main.php
+++ b/system/post/main.php
@@ -1,19 +1,20 @@
<?php
#===============================================================================
-# INCLUDE: Main configuration
+# Get instances
#===============================================================================
-require_once '../../core/application.php';
+$Database = Application::getDatabase();
+$Language = Application::getLanguage();
#===============================================================================
# TRY: Post\Exception, User\Exception
#===============================================================================
try {
if(Application::get('POST.SLUG_URLS')) {
- $Post = Post\Factory::buildBySlug(HTTP::GET('param'));
+ $Post = Post\Factory::buildBySlug($param);
}
else {
- $Post = Post\Factory::build(HTTP::GET('param'));
+ $Post = Post\Factory::build($param);
}
$User = User\Factory::build($Post->attr('user'));
@@ -68,9 +69,9 @@ try {
catch(Post\Exception $Exception) {
try {
if(Application::get('POST.SLUG_URLS') === FALSE) {
- $Post = Post\Factory::buildBySlug(HTTP::GET('param'));
+ $Post = Post\Factory::buildBySlug($param);
} else {
- $Post = Post\Factory::build(HTTP::GET('param'));
+ $Post = Post\Factory::build($param);
}
HTTP::redirect($Post->getURL());