summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/pages/builds/log.php')
-rw-r--r--frontend/pages/builds/log.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/frontend/pages/builds/log.php b/frontend/pages/builds/log.php
index 699887f..078b816 100644
--- a/frontend/pages/builds/log.php
+++ b/frontend/pages/builds/log.php
@@ -1,23 +1,21 @@
<?php
-function init_builds_log() {
- global $S, $request;
+function init_builds_log(&$S) {
$S['title']='Log Viewer';
if (!isset($S['user'])) return 'login';
- if (!(isset($request['build']) && strlen($request['build']) == 6 && ctype_alnum($request['build']))) return '404';
- $r=$S['pdo']->query('SELECT * FROM `builds` WHERE `id`="'.$request['build'].'"');
+ if (!(isset($_REQUEST['build']) && strlen($_REQUEST['build']) == 6 && ctype_alnum($_REQUEST['build']))) return '404';
+ $r=query('SELECT * FROM `builds` WHERE `id`="'.$_REQUEST['build'].'"');
if ($r->rowCount()) {
$S['builds_log']=new sql_build($r->fetch(PDO::FETCH_ASSOC));
if ($S['builds_log']->visibility == 'private' && !owner_or_admin($S['builds_log']->owner)) return '404';
} else
return '404';
- if (isset($request['task']) && is_numeric($request['task']))
+ if (isset($_REQUEST['task']) && is_numeric($_REQUEST['task']))
return 'builds/task';
}
-function body_builds_log() {
- global $S;
+function body_builds_log(&$S) {
$build=&$S['builds_log'];
echo $build->display();
- $r=$S['pdo']->query('SELECT * FROM `tasks` WHERE `build`="'.$build->id.'" ORDER BY `order` ASC');
+ $r=query('SELECT * FROM `tasks` WHERE `build`="'.$build->id.'" ORDER BY `order` ASC');
if ($r->rowCount() == 0) {
echo '<b>No tasks found.</b>';
}