| 1 |
1475
|
Luisehahne
|
<?php
|
| 2 |
|
|
/**
|
| 3 |
|
|
*
|
| 4 |
|
|
* @category modules
|
| 5 |
|
|
* @package output_filter
|
| 6 |
1520
|
darkviper
|
* @author Christian Sommer, WB-Project, Werner v.d. Decken
|
| 7 |
1475
|
Luisehahne
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
| 8 |
|
|
* @link http://www.websitebaker2.org/
|
| 9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
| 10 |
1520
|
darkviper
|
* @platform WebsiteBaker 2.8.2
|
| 11 |
1475
|
Luisehahne
|
* @requirements PHP 5.2.2 and higher
|
| 12 |
|
|
* @version $Id$
|
| 13 |
|
|
* @filesource $HeadURL$
|
| 14 |
|
|
* @lastmodified $Date$
|
| 15 |
|
|
*
|
| 16 |
|
|
*/
|
| 17 |
1520
|
darkviper
|
/* -------------------------------------------------------- */
|
| 18 |
|
|
// Must include code to stop this file being accessed directly
|
| 19 |
|
|
require_once( dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
|
| 20 |
|
|
if(!defined('WB_PATH')) { throw new IllegalFileException(); }
|
| 21 |
|
|
/* -------------------------------------------------------- */
|
| 22 |
1477
|
Luisehahne
|
global $i;
|
| 23 |
1475
|
Luisehahne
|
$table_name = TABLE_PREFIX .'mod_output_filter';
|
| 24 |
|
|
$field_name = 'sys_rel';
|
| 25 |
1477
|
Luisehahne
|
$i = (!isset($i) ? 1 : $i);
|
| 26 |
|
|
print "<div style=\"margin:1em auto;font-size:1.1em;\">";
|
| 27 |
|
|
print "<h4>Step $i: Updating Output Filter</h4>\n";
|
| 28 |
|
|
$i++;
|
| 29 |
|
|
$OK = "<span class=\"ok\">OK</span>";
|
| 30 |
|
|
$FAIL = "<span class=\"error\">FAILED</span>";
|
| 31 |
|
|
if ( ($database->field_exists($table_name,$field_name) )) {
|
| 32 |
|
|
print "<br /><strong>'Output Filter already updated'</strong> $OK<br />\n";
|
| 33 |
|
|
} else {
|
| 34 |
1520
|
darkviper
|
$description = 'INT NOT NULL DEFAULT \'0\' FIRST';
|
| 35 |
1477
|
Luisehahne
|
if( ($database->field_add($table_name,$field_name,$description )) ) {
|
| 36 |
|
|
print "<br /><strong>Updating Output Filter</strong> $OK<br />\n";
|
| 37 |
|
|
} else {
|
| 38 |
|
|
print "<br /><strong>Updating Output Filter</strong> $FAIL<br />\n";
|
| 39 |
|
|
}
|
| 40 |
1475
|
Luisehahne
|
}
|
| 41 |
1477
|
Luisehahne
|
print "</div>";
|