Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

user/unhandledbugs.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: unhandledbugs.php 7696 2001-10-08 14:39:09Z fh $
5 //
6 // Created on: <27-Nov-2000 22:18:56 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "ezbug/classes/ezbugcategory.php" );
28 // include_once( "ezbug/classes/ezbugmodule.php" );
29 // include_once( "ezbug/classes/ezbug.php" );
30
31 // include_once( "ezuser/classes/ezuser.php" );
32
33 // include_once( "classes/eztemplate.php" );
34 // include_once( "classes/INIFile.php" );
35 // include_once( "ezuser/classes/ezobjectpermission.php" );
36
37 $ini =& eZINI::instance( 'site.ini' );
38 $Language= $ini->variable("eZBugMain","Language");
39 $t = new eZTemplate( "kernel/ezbug/user/" . $ini->variable( "eZBugMain", "TemplateDir" ),
40 "kernel/ezbug/user/intl", $Language, "unhandledbugs.php" );
41 $errorIni = new eZINI( "kernel/ezbug/user/intl/" . $Language . "/unhandledbugs.php.ini", false );
42
43 $t->set_file( array(
44 "unhandled_bugs_tpl" => "unhandledbugs.tpl"
45 ) );
46
47 $t->setAllStrings();
48
49 $t->set_block( "unhandled_bugs_tpl", "bug_tpl", "bug" );
50
51 $t->set_var( "site_style", $GlobalSiteDesign );
52
53 $bug = new eZBug();
54
55 $unhandleBugs =& $bug->getUnhandled();
56
57 $t->set_var( "bug", "" );
58
59 $i=0;
60 foreach ( $unhandleBugs as $bug )
61 {
62 if( eZObjectPermission::hasPermission( $bug->module( true ), "bug_module", 'w' ) )
63 {
64 if ( ( $i % 2 ) == 0 )
65 {
66 $t->set_var( "td_class", "bglight" );
67 }
68 else
69 {
70 $t->set_var( "td_class", "bgdark" );
71 }
72
73 $t->set_var( "bug_id", $bug->id(), "&nbsp;" );
74 $t->set_var( "bug_name", $bug->name(), "&nbsp;" );
75
76 $module = $bug->module();
77 if ( $module )
78 $t->set_var( "bug_module_name", $module->name(), "&nbsp;" );
79 else
80 $t->set_var( "bug_module_name", "" );
81
82 $owner = $bug->user();
83
84 if( is_a( $owner, "eZUser") )
85 {
86 $t->set_var( "bug_submitter", $owner->name(), "&nbsp;" );
87 }
88 elseif ( $bug->userEmail() != false )
89 {
90 $t->set_var( "bug_submitter", $bug->userEmail() );
91 }
92 else
93 {
94 $errorMsg = $errorIni->variable( "strings", "unknown" );
95 $t->set_var( "bug_submitter", $errorMsg );
96 }
97
98 $t->parse( "bug", "bug_tpl", true );
99 $i++;
100 }
101 }
102
103 $t->pparse( "output", "unhandled_bugs_tpl" );
104
105 ?>
$owner
$owner
Definition: bugedit.php:555
eZBug
Definition: ezbug.php:80
eZINI
Reads and writes .ini style configuration files.
eZObjectPermission\hasPermission
static hasPermission( $objectID, $moduleTable, $permission, $user=false)
Definition: ezobjectpermission.php:76
eZTemplate
Definition: eztemplate.php:107
$module
$module
Definition: classes/admin/linkselect.php:219
$GlobalSiteDesign
global $GlobalSiteDesign
Definition: latestmessages.php:52
$t
$t
Definition: user/unhandledbugs.php:39
$errorIni
$errorIni
Definition: user/unhandledbugs.php:41
$bug
$bug
Definition: user/unhandledbugs.php:53
$unhandleBugs
$unhandleBugs
Definition: user/unhandledbugs.php:55
$i
$i
Definition: user/unhandledbugs.php:59
$Language
$Language
Definition: user/unhandledbugs.php:38
$ini
$ini
Definition: user/unhandledbugs.php:37
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.