Revision 1894
Added by Dietmar over 11 years ago
install.php | ||
---|---|---|
4 | 4 |
* @category modules |
5 | 5 |
* @package menu_link |
6 | 6 |
* @author Ryan Djurovich, WebsiteBaker Project |
7 |
* @copyright 2009-2012, Website Baker Org. e.V.
|
|
8 |
* @link http://www.websitebaker2.org/
|
|
7 |
* @copyright 2009-2013, WebsiteBaker Org. e.V.
|
|
8 |
* @link http://www.websitebaker2.org/
|
|
9 | 9 |
* @license http://www.gnu.org/licenses/gpl.html |
10 | 10 |
* @platform WebsiteBaker 2.8.x |
11 | 11 |
* @requirements PHP 5.2.2 and higher |
12 |
* @version $Id$
|
|
13 |
* @filesource $HeadURL$
|
|
12 |
* @version $Id$
|
|
13 |
* @filesource $HeadURL$
|
|
14 | 14 |
* @lastmodified $Date$ |
15 | 15 |
* |
16 | 16 |
*/ |
17 | 17 |
|
18 |
// Must include code to stop this file being access directly |
|
19 | 18 |
/* -------------------------------------------------------- */ |
20 |
if(defined('WB_PATH') == false) |
|
21 |
{ |
|
22 |
// Stop this file being access directly |
|
23 |
die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>'); |
|
19 |
// Must include code to stop this file being accessed directly |
|
20 |
if(!defined('WB_PATH')) { |
|
21 |
require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php'); |
|
22 |
throw new IllegalFileException(); |
|
23 |
} else { |
|
24 |
$database = WbDatabase::getInstance(); |
|
25 |
$sError = ''; |
|
26 |
// Create table |
|
27 |
if(!$database->SqlImport(dirname(__FILE__).'/sql/mod_menu_link.sql','',false)){ |
|
28 |
$sError = $database->get_error(); |
|
29 |
} |
|
24 | 30 |
} |
25 |
/* -------------------------------------------------------- */ |
|
26 |
|
|
27 |
$table = TABLE_PREFIX ."mod_menu_link"; |
|
28 |
$database->query("DROP TABLE IF EXISTS `$table`"); |
|
29 |
|
|
30 |
$database->query(" |
|
31 |
CREATE TABLE IF NOT EXISTS `$table` ( |
|
32 |
`section_id` INT(11) NOT NULL DEFAULT '0', |
|
33 |
`page_id` INT(11) NOT NULL DEFAULT '0', |
|
34 |
`target_page_id` INT(11) NOT NULL DEFAULT '0', |
|
35 |
`redirect_type` INT NOT NULL DEFAULT '301', |
|
36 |
`anchor` VARCHAR(255) NOT NULL DEFAULT '0' , |
|
37 |
`extern` VARCHAR(255) NOT NULL DEFAULT '' , |
|
38 |
PRIMARY KEY (`section_id`) |
|
39 |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci |
|
40 |
"); |
Also available in: Unified diff
! update menu_link module and set Version to 2.8.1