aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2015-03-31 21:59:22 +0200
committerMaZderMind2015-03-31 21:59:22 +0200
commit81f90290f708f888962b4afd4f5dad26b50a507f (patch)
tree7db715671f7a7cd1711dd0fc88feb677cde09255
parentdbd6cd8c14867fb02efc9b67adea2756cf223e4d (diff)
use require instead of include
Diffstat (limited to '')
-rw-r--r--index.php30
-rw-r--r--lib/PhpTemplate.php2
-rw-r--r--view/relive-player.php2
3 files changed, 17 insertions, 17 deletions
diff --git a/index.php b/index.php
index d7b92c8..5292f82 100644
--- a/index.php
+++ b/index.php
@@ -36,46 +36,46 @@ ob_start();
try {
if($route == '')
{
- include('view/overview.php');
+ require('view/overview.php');
}
else if(preg_match('@^about$@', $route, $m))
{
- include('view/about.php');
+ require('view/about.php');
}
else if(preg_match('@^schedule.json$@', $route, $m))
{
- include('view/schedule-json.php');
+ require('view/schedule-json.php');
}
else if(preg_match('@^feedback$@', $route, $m))
{
- include('view/feedback.php');
+ require('view/feedback.php');
}
else if(preg_match('@^feedback/read$@', $route, $m))
{
- include('view/feedback-read.php');
+ require('view/feedback-read.php');
}
else if(preg_match('@^relive/([0-9]+)$@', $route, $m))
{
if(!has('OVERVIEW.RELIVE_JSON'))
- return include('view/404.php');
+ return require('view/404.php');
$_GET = array(
'id' => $m[1],
);
- include('view/relive-player.php');
+ require('view/relive-player.php');
}
else if(preg_match('@^relive$@', $route, $m))
{
if(!has('OVERVIEW.RELIVE_JSON'))
- return include('view/404.php');
+ return require('view/404.php');
- include('view/relive.php');
+ require('view/relive.php');
}
else if(preg_match('@^([^/]+)$@', $route, $m))
@@ -85,7 +85,7 @@ try {
'selection' => '',
'language' => 'native',
);
- include('view/room.php');
+ require('view/room.php');
}
else if(preg_match('@^([^/]+)/translated$@', $route, $m))
@@ -95,7 +95,7 @@ try {
'selection' => '',
'language' => 'translated',
);
- include('view/room.php');
+ require('view/room.php');
}
else if(preg_match('@^([^/]+)/(sd|audio|slides)$@', $route, $m))
@@ -105,7 +105,7 @@ try {
'selection' => $m[2],
'language' => 'native',
);
- include('view/room.php');
+ require('view/room.php');
}
else if(preg_match('@^([^/]+)/(sd|audio|slides)/translated$@', $route, $m))
@@ -115,7 +115,7 @@ try {
'selection' => $m[2],
'language' => 'translated',
);
- include('view/room.php');
+ require('view/room.php');
}
else
@@ -127,10 +127,10 @@ try {
catch(NotFoundException $e)
{
ob_clean();
- include('view/404.php');
+ require('view/404.php');
}
catch(Exception $e)
{
ob_clean();
- include('view/500.php');
+ require('view/500.php');
}
diff --git a/lib/PhpTemplate.php b/lib/PhpTemplate.php
index 4fc4dfe..3f0a15f 100644
--- a/lib/PhpTemplate.php
+++ b/lib/PhpTemplate.php
@@ -30,7 +30,7 @@ class PhpTemplate
unset($___data);
ob_start();
- include($this->file);
+ require($this->file);
return ob_get_clean();
}
diff --git a/view/relive-player.php b/view/relive-player.php
index 1517b92..bc8bb57 100644
--- a/view/relive-player.php
+++ b/view/relive-player.php
@@ -4,7 +4,7 @@ $talks_by_id = relive_talks();
$talk = @$talks_by_id[intval($_GET['id'])];
if(!$talk)
- return include('page/404.php');
+ return require('page/404.php');
echo $tpl->render(array(
'page' => 'relive-player',