Skip to content

Commit

Permalink
2.1.27
Browse files Browse the repository at this point in the history
Fixes after tests
  • Loading branch information
nilsteampassnet committed Aug 7, 2017
1 parent b358742 commit 922455c
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 5 deletions.
2 changes: 1 addition & 1 deletion includes/libraries/protect/SuperGlobal/SuperGlobal.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

//start session in case its not
// Start session in case its not
if (session_id() === '') {
require_once __DIR__."/../../../../sources/SecureHandler.php";
session_start();
Expand Down
2 changes: 1 addition & 1 deletion install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<input type="hidden" id="hid_db_pwd" value="" />
<input type="hidden" id="hid_db_port" value="" />
<input type="hidden" id="hid_db_bdd" value="" />
<input type="text" id="hid_db_pre" value="" />
<input type="hidden" id="hid_db_pre" value="" />
<input type="hidden" id="hid_abspath" value="" />
<input type="hidden" id="hid_url_path" value="" />';
// # LOADER
Expand Down
39 changes: 39 additions & 0 deletions install/upgrade_run_final.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,43 @@
// alter ITEMS table by adding default value to encryption_type field
mysqli_query($dbTmp, "ALTER TABLE `".$pre."items` CHANGE encryption_type encryption_type varchar(20) NOT NULL DEFAULT 'defuse'");



/*
* UPDATE CONFIG file
*/
$tp_config_file = "../includes/config/tp.config.php";
if (file_exists($tp_config_file)) {
if (!copy($tp_config_file, $tp_config_file.'.'.date("Y_m_d", mktime(0, 0, 0, date('m'), date('d'), date('y'))))) {
echo '[{"error" : "includes/config/tp.config.php file already exists and cannot be renamed. Please do it by yourself and click on button Launch.", "result":"", "index" : "'.$post_index.'", "multiple" : "'.$post_multiple.'"}]';
return false;
} else {
unlink($tp_config_file);
}
}
$file_handler = fopen($tp_config_file, 'w');
$config_text = "<?php
global \$SETTINGS;
\$SETTINGS = array (";

$result = mysqli_query($db_link, "SELECT * FROM `".$pre."misc` WHERE type = 'admin'");
while ($row = mysqli_fetch_assoc($result)) {
// append new setting in config file
$config_text .= "
'".$row['intitule']."' => '".$row['valeur']."',";
}
mysqli_free_result($result);

// write to config file
$result = fwrite(
$file_handler,
utf8_encode(
substr_replace($config_text, "", -1)."
);"
)
);
fclose($file_handler);


// FINISHED
echo '[{"finish":"'.$finish.'" , "next":"'.$next.'", "error":""}]';
4 changes: 2 additions & 2 deletions items.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@
<input type="hidden" name="open_id" id="open_id" value="'.$get_id.'" />
<input type="hidden" name="recherche_group_pf" id="recherche_group_pf" value="', in_array($get_group, $_SESSION['personal_visible_groups']) ? '1' : '0', '" />
<input type="hidden" name="open_item_by_get" id="open_item_by_get" value="true" />';
} elseif ($get_group !== null && $get_id === null)) {
} elseif ($get_group !== null && $get_id === null) {
echo '<input type="hidden" name="open_folder" id="open_folder" value="'.$get_group.'" />';
echo '<input type="hidden" name="open_id" id="open_id" value="" />';
echo '<input type="hidden" name="recherche_group_pf" id="recherche_group_pf" value="', in_array($get_group), $_SESSION['personal_visible_groups']) ? '1' : '0', '" />';
echo '<input type="hidden" name="recherche_group_pf" id="recherche_group_pf" value="', in_array($get_group, $_SESSION['personal_visible_groups']) ? '1' : '0', '" />';
echo '<input type="hidden" name="open_item_by_get" id="open_item_by_get" value="" />';
} else {
echo '<input type="hidden" name="open_folder" id="open_folder" value="" />';
Expand Down
3 changes: 3 additions & 0 deletions sources/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ function delTree($dir)
if (isset($_SESSION['user_settings']['usertimezone']) === true && $_SESSION['user_settings']['usertimezone'] !== "not_defined") {
// use user timezone
date_default_timezone_set($_SESSION['user_settings']['usertimezone']);
} elseif ($SETTINGS['timezone'] === null) {
// use server timezone
date_default_timezone_set('UTC');
} else {
// use server timezone
date_default_timezone_set($SETTINGS['timezone']);
Expand Down
5 changes: 4 additions & 1 deletion sources/folders.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,18 @@
"id=%i",
$id[1]
);

//Get the title to display it
$data = DB::queryfirstrow(
"SELECT title
FROM ".prefix_table("nested_tree")."
WHERE id = %i",
$post_newparent_id
);

//show value
echo $antiXss->xss_clean($data['title']);
echo $data['title'];

//rebuild the tree grid
$tree = new Tree\NestedTree\NestedTree(prefix_table("nested_tree"), 'id', 'parent_id', 'title');
$tree->rebuild();
Expand Down

0 comments on commit 922455c

Please sign in to comment.