Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

admin/buglist.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: buglist.php 8504 2001-11-19 09:46:46Z jhe $
5 //
6 // Created on: <27-Nov-2000 19:06:23 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( "classes/INIFile.php" );
28 // include_once( "classes/eztemplate.php" );
29 // include_once( "classes/ezlocale.php" );
30
31 // include_once( "ezbug/classes/ezbugcategory.php" );
32 // include_once( "ezbug/classes/ezbugmodule.php" );
33 // include_once( "ezbug/classes/ezbug.php" );
34
35 // include_once( "ezuser/classes/ezuser.php" );
36
37 $ini = eZINI::instance( 'site.ini' );
38
39 $Language = $ini->variable( "eZBugMain", "Language" );
40
41 $t = new eZTemplate( "kernel/ezbug/admin/" . $ini->variable( "eZBugMain", "AdminTemplateDir" ),
42 "kernel/ezbug/admin/intl/", $Language, "buglist.php" );
43
44 $t->setAllStrings();
45
46 $t->set_file( array(
47 "bug_list_page_tpl" => "buglist.tpl"
48 ) );
49
50 // path
51 $t->set_block( "bug_list_page_tpl", "path_item_tpl", "path_item" );
52
53 // module
54 $t->set_block( "bug_list_page_tpl", "module_list_tpl", "module_list" );
55 $t->set_block( "module_list_tpl", "module_item_tpl", "module_item" );
56
57 // bug
58 $t->set_block( "bug_list_page_tpl", "bug_list_tpl", "bug_list" );
59 $t->set_block( "bug_list_tpl", "bug_item_tpl", "bug_item" );
60 $t->set_block( "bug_item_tpl", "bug_is_closed_tpl", "bug_is_closed" );
61 $t->set_block( "bug_item_tpl", "bug_is_open_tpl", "bug_is_open" );
62
63 // delete button
64 $t->set_block( "bug_list_page_tpl", "bug_delete_button_tpl", "bug_delete_button" );
65
66 $t->set_var( "site_style", $SiteDesign );
67
68 $module = new eZBugModule( $ModuleID );
69
70 $t->set_var( "current_module_id", $module->id() );
71 $t->set_var( "current_module_name", $module->name() );
72 $t->set_var( "current_module_description", $module->description() );
73
74 // path
75 $pathArray = $module->path();
76
77 $t->set_var( "path_item", "" );
78 foreach ( $pathArray as $path )
79 {
80 $t->set_var( "module_id", $path[0] );
81
82 $t->set_var( "module_name", $path[1] );
83
84 $t->parse( "path_item", "path_item_tpl", true );
85 }
86
87 $moduleList = $module->getByParent( $module, true );
88
89 if( isset( $Delete ) )
90 {
91 if( count( $BugArrayID ) > 0 )
92 {
93 foreach( $BugArrayID as $doomedBugID )
94 {
95 $bug = new eZBug( $doomedBugID );
96 $bug->delete();
97 }
98 }
99 }
100
101
102 // categories
103 $i=0;
104 $t->set_var( "module_list", "" );
105 foreach ( $moduleList as $moduleItem )
106 {
107 $t->set_var( "module_id", $moduleItem->id() );
108
109 $tmp = $moduleItem->name();
110 $t->set_var( "module_name", $moduleItem->name() );
111
112 $parent = $moduleItem->parent();
113
114
115 if ( ( $i % 2 ) == 0 )
116 {
117 $t->set_var( "td_class", "bglight" );
118 }
119 else
120 {
121 $t->set_var( "td_class", "bgdark" );
122 }
123
124 // $t->set_var( "module_description", $moduleItem->description() );
125
126
127 $totalCount = $moduleItem->countBugs( true, false , true );
128 $t->set_var( "bug_count", $totalCount );
129
130 $unhandledCount = $totalCount - $moduleItem->countBugs( false, false, true );
131 $t->set_var( "unhandled_bug_count", $unhandledCount );
132
133 $openCount = $moduleItem->countBugs( true, true , true );
134 $t->set_var( "open_bug_count", $openCount );
135
136 $t->parse( "module_item", "module_item_tpl", true );
137 $i++;
138 }
139
140 if ( count( $moduleList ) > 0 )
141 $t->parse( "module_list", "module_list_tpl" );
142 else
143 $t->set_var( "module_list", "" );
144
145
146 // bugs
147 $bugList = $module->bugs( "time", true, true );
148
149 $locale = new eZLocale( $Language );
150 $i=0;
151 $t->set_var( "bug_list", "" );
152 foreach ( $bugList as $bug )
153 {
154 $t->set_var( "bug_id", $bug->id() );
155 $t->set_var( "bug_name", $bug->name() );
156
157 $pri =& $bug->priority();
158 $status =& $bug->status();
159
160 if ( $pri )
161 {
162 $t->set_var( "bug_priority", $pri->name() );
163 }
164 else
165 {
166 $t->set_var( "bug_priority", "" );
167 }
168
169 if ( $status )
170 {
171 $t->set_var( "bug_status", $status->name() );
172 }
173 else
174 {
175 $t->set_var( "bug_status", "" );
176 }
177
178 if ( $bug->isClosed() == true )
179 {
180 $t->parse( "bug_is_closed", "bug_is_closed_tpl" );
181 $t->set_var( "bug_is_open", "" );
182 }
183 else
184 {
185 $t->set_var( "bug_is_closed", "" );
186 $t->parse( "bug_is_open", "bug_is_open_tpl" );
187 }
188
189 if ( ( $i % 2 ) == 0 )
190 {
191 $t->set_var( "td_class", "bglight" );
192 }
193 else
194 {
195 $t->set_var( "td_class", "bgdark" );
196 }
197
198 $t->parse( "bug_item", "bug_item_tpl", true );
199 $i++;
200 }
201
202 if ( count( $bugList ) > 0 )
203 {
204 $t->parse( "bug_delete_button", "bug_delete_button_tpl" );
205 $t->parse( "bug_list", "bug_list_tpl" );
206 }
207 else
208 {
209 $t->set_var( "bug_delete_button", "" );
210 $t->set_var( "bug_list", "" );
211 }
212
213 $t->pparse( "output", "bug_list_page_tpl" );
214
215 ?>
$locale
$locale
Definition: admin/buglist.php:149
$t
$t
Definition: admin/buglist.php:41
$pathArray
$pathArray
Definition: admin/buglist.php:75
$i
if(isset( $Delete)) $i
Definition: admin/buglist.php:103
$Language
$Language
Definition: admin/buglist.php:39
$ini
$ini
Definition: admin/buglist.php:37
$module
$module
Definition: admin/buglist.php:68
$moduleList
foreach( $pathArray as $path) $moduleList
Definition: admin/buglist.php:87
$bugList
$bugList
Definition: admin/buglist.php:147
$status
$status
Definition: bugedit.php:473
$bug
$bug
Definition: bugpreview.php:59
$pri
$pri
Definition: bugpreview.php:70
$tmp
$tmp
Definition: bugview.php:99
eZBugModule
Definition: ezbugmodule.php:56
eZBug
Definition: ezbug.php:80
eZLocale
Definition: ezlocale.php:119
eZTemplate
Definition: eztemplate.php:107
$totalCount
$totalCount
Definition: ezarticle/admin/formlist.php:73
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.