Revision 893
Added by aldus almost 17 years ago
| uninstall.php | ||
|---|---|---|
| 53 | 53 |
/** |
| 54 | 54 |
* Check if the module is in use |
| 55 | 55 |
* |
| 56 |
* @version 0.1.1
|
|
| 57 |
* @build 2
|
|
| 58 |
* @date 2008-11-12
|
|
| 56 |
* @version 0.2.0
|
|
| 57 |
* @build 1
|
|
| 58 |
* @date 2008-12-29
|
|
| 59 | 59 |
* @author aldus |
| 60 |
* @package Websitebaker - Admin - modules
|
|
| 61 |
* @state @dev
|
|
| 60 |
* @package Website Baker: Admin - modules
|
|
| 61 |
* @state @beta
|
|
| 62 | 62 |
* |
| 63 | 63 |
*/ |
| 64 | 64 |
|
| ... | ... | |
| 76 | 76 |
/** |
| 77 | 77 |
* Modul is in use, so we have to warn the user |
| 78 | 78 |
*/ |
| 79 |
|
|
| 80 |
$add = $info->numRows() == 1 ? "this page" : "these pages"; |
|
| 81 |
$msg_template_str = "<br /><br />Modul <b>{{modul_name}}</b> could not be uninstalled because it is still in use on ";
|
|
| 82 |
$msg_template_str .= $add.":<br /><i>click for editing.</i><br /><br />"; |
|
| 83 |
|
|
| 79 |
if (!array_key_exists("CANNOT_UNINSTALL_IN_USE_TMPL", $MESSAGE['GENERIC'])) {
|
|
| 80 |
$add = $info->numRows() == 1 ? "this page" : "these pages"; |
|
| 81 |
$msg_template_str = "<br /><br />{{type}} <b>{{type_name}}</b> could not be uninstalled because it is still in use on {{pages}}";
|
|
| 82 |
$msg_template_str .= ":<br /><i>click for editing.</i><br /><br />"; |
|
| 83 |
} else {
|
|
| 84 |
$msg_template_str = $MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL']; |
|
| 85 |
$temp = explode(";",$MESSAGE['GENERIC']['CANNOT_UNINSTALL_IN_USE_TMPL_PAGES']);
|
|
| 86 |
$add = $info->numRows() == 1 ? $temp[0] : $temp[1]; |
|
| 87 |
} |
|
| 84 | 88 |
/** |
| 85 | 89 |
* The template-string for displaying the Page-Titles ... in this case as a link |
| 86 | 90 |
*/ |
| 87 | 91 |
$page_template_str = "- <b><a href='../pages/sections.php?page_id={{id}}'>{{title}}</a></b><br />";
|
| 88 | 92 |
|
| 89 |
$values = array ('modul_name' => $file);
|
|
| 93 |
$values = array ('type' => 'Modul', 'type_name' => $file, 'pages' => $add );
|
|
| 90 | 94 |
$msg = replace_all ( $msg_template_str, $values ); |
| 91 | 95 |
|
| 92 | 96 |
$page_names = ""; |
| ... | ... | |
| 94 | 98 |
while ($data = $info->fetchRow() ) {
|
| 95 | 99 |
|
| 96 | 100 |
$temp = $database->query("SELECT page_title from ".TABLE_PREFIX."pages where page_id=".$data['page_id']);
|
| 97 |
$temp_title = $temp->fetchRow(); |
|
| 101 |
$temp_title = $temp->fetchRow( DB_FETCHMODE_ASSOC );
|
|
| 98 | 102 |
|
| 99 | 103 |
$page_info = array( |
| 100 | 104 |
'id' => $data['page_id'], |
Also available in: Unified diff
added language-support for the error-messages
for the uninstall files for modules and templates.
update german languagefile with the new textes.