Skip to content

Commit da843bf

Browse files
committed
Fixed: FS#2245 - Unable to move from the state "Installation Failed" of an app
1 parent 4ee9efa commit da843bf

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2012, Till Brehm, projektfarm Gmbh
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
require_once('../../lib/config.inc.php');
32+
require_once('../../lib/app.inc.php');
33+
34+
//* Check permissions for module
35+
$app->auth->check_module_permissions('admin');
36+
if($conf['demo_mode'] == true) $app->error('This function is disabled in demo mode.');
37+
38+
$software_update_inst_id = intval($_GET['software_update_inst_id']);
39+
40+
if($software_update_inst_id > 0) {
41+
$app->db->datalogDelete('software_update_inst', 'software_update_inst_id', $software_update_inst_id);
42+
//header('Location: admin/software_package_list.php');
43+
die('HEADER_REDIRECT: admin/software_package_list.php');
44+
} else {
45+
die('Invalid ID');
46+
}
47+
48+
49+
50+
51+
52+
53+
?>

interface/web/admin/software_package_list.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
}
170170
}
171171
}
172+
$packages[$key]['software_update_inst_id'] = $inst['software_update_inst_id'];
172173
$packages[$key]['installed'] = $installed_txt;
173174
}
174175
}

interface/web/admin/templates/software_package_list.htm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h2><tmpl_var name="list_head_txt"></h2>
2222
<th class="tbl_col_package_title" scope="col"><tmpl_var name="package_title_txt"></th>
2323
<th class="tbl_col_package_description" scope="col"><tmpl_var name="package_description_txt"></th>
2424
<th class="tbl_col_package_description" scope="col"><tmpl_var name="package_id_txt"></th>
25+
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
2526
</tr>
2627
</thead>
2728
<tbody>
@@ -31,12 +32,15 @@ <h2><tmpl_var name="list_head_txt"></h2>
3132
<td class="tbl_col_package_title">{tmpl_var name="package_title"}</td>
3233
<td class="tbl_col_package_description">{tmpl_var name="package_description"}</td>
3334
<td class="tbl_col_package_description">ispapp{tmpl_var name="package_id"}</td>
35+
<td class="tbl_col_buttons">
36+
<a class="button icons16 icoDelete" href="javascript: del_record('admin/software_package_del.php?software_update_inst_id={tmpl_var name="software_update_inst_id"}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
37+
</td>
3438
</tr>
3539
</tmpl_loop>
3640
</tbody>
3741
<tfoot>
3842
<tr>
39-
<td class="tbl_footer tbl_paging" colspan="4"></td>
43+
<td class="tbl_footer tbl_paging" colspan="5"></td>
4044
</tr>
4145
</tfoot>
4246
</table>

0 commit comments

Comments
 (0)