1 |
1939
|
darkviper
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
4 |
|
|
*
|
5 |
|
|
* This program is free software: you can redistribute it and/or modify
|
6 |
|
|
* it under the terms of the GNU General Public License as published by
|
7 |
|
|
* the Free Software Foundation, either version 3 of the License, or
|
8 |
|
|
* (at your option) any later version.
|
9 |
|
|
*
|
10 |
|
|
* This program is distributed in the hope that it will be useful,
|
11 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13 |
|
|
* GNU General Public License for more details.
|
14 |
|
|
*
|
15 |
|
|
* You should have received a copy of the GNU General Public License
|
16 |
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17 |
|
|
*/
|
18 |
|
|
|
19 |
|
|
/**
|
20 |
|
|
* update_keys.php
|
21 |
|
|
*
|
22 |
|
|
* @category Modules
|
23 |
|
|
* @package Modules_MultiLingual
|
24 |
|
|
* @author Werner v.d.Decken <wkl@isteam.de>
|
25 |
|
|
* @author Dietmar Wöllbrink <dietmar.woellbrink@websiteBaker.org>
|
26 |
|
|
* @copyright Werner v.d.Decken <wkl@isteam.de>
|
27 |
|
|
* @license http://www.gnu.org/licenses/gpl.html GPL License
|
28 |
|
|
* @version 1.6.8
|
29 |
|
|
* @revision $Revision: $
|
30 |
|
|
* @link $HeadURL: $
|
31 |
|
|
* @lastmodified $Date: $
|
32 |
|
|
* @since File available since 09.01.2013
|
33 |
|
|
* @description xyz
|
34 |
|
|
*/
|
35 |
|
|
|
36 |
|
|
// Create new admin object
|
37 |
|
|
if(!defined('WB_URL'))
|
38 |
|
|
{
|
39 |
|
|
$config_file = realpath('../../config.php');
|
40 |
|
|
if(file_exists($config_file) && !defined('WB_URL'))
|
41 |
|
|
{
|
42 |
|
|
require($config_file);
|
43 |
|
|
}
|
44 |
|
|
}
|
45 |
|
|
|
46 |
|
|
$mod_path = dirname(__FILE__);
|
47 |
|
|
//$mod_rel = str_replace($_SERVER['DOCUMENT_ROOT'],'',str_replace('\\', '/', $mod_path ));
|
48 |
|
|
$mod_name = basename($mod_path);
|
49 |
|
|
|
50 |
|
|
// Get page id
|
51 |
|
|
// Include WB admin wrapper script
|
52 |
|
|
// Tells script to update when this page was last updated
|
53 |
|
|
$update_when_modified = false;
|
54 |
|
|
require(WB_PATH.'/modules/admin.php');
|
55 |
|
|
$temp_page_id = intval( htmlentities($page_id ) );
|
56 |
|
|
|
57 |
1953
|
darkviper
|
$oTrans = Translate::getInstance();
|
58 |
1939
|
darkviper
|
// check for page languages
|
59 |
|
|
$oPageLang = new m_MultiLingual_Lib();
|
60 |
|
|
$Result = $oPageLang->updateDefaultPagesCode();
|
61 |
|
|
if($database->is_error())
|
62 |
|
|
{
|
63 |
|
|
$admin->print_error($database->get_error(), ADMIN_URL.'/pages/settings.php?page_id='.$temp_page_id );
|
64 |
|
|
} else {
|
65 |
1953
|
darkviper
|
$admin->print_success($oTrans->MESSAGE_PAGES_UPDATE_SETTINGS, ADMIN_URL.'/pages/settings.php?page_id='.$temp_page_id );
|
66 |
1939
|
darkviper
|
}
|