Passed
Push — master ( 1778f3...9e4eed )
by John
01:26
created

uninstall-optional.php (1 issue)

Severity
1
<?php
2
3
/**
4
 * @package Ultimate Menu mod
5
 * @version 1.0.4
6
 * @author John Rayes <[email protected]>
7
 * @copyright Copyright (c) 2014, John Rayes
8
 * @license http://opensource.org/licenses/MIT MIT
9
 */
10
11
// If SSI.php is in the same place as this file, and SMF isn't defined...
12
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
13
	require_once(dirname(__FILE__) . '/SSI.php');
14
15
// Hmm... no SSI.php and no SMF?
16
elseif (!defined('SMF'))
17
	die('<b>Error:</b> Cannot uninstall - please verify you put this in the same place as SMF\'s index.php.');
18
19
if (isset($modSettings['um_menu']))
20
	unset($modSettings['um_menu']);
21
22
$smcFunc['db_query']('', '
23
	DELETE FROM {db_prefix}settings
24
	WHERE variable = {string:setting}',
25
	array(
26
		'setting' => 'um_menu',
27
	)
28
);
29
30
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...