Avatar

the user setting code is done (Development)

by Auge ⌂, Tuesday, September 21, 2021, 09:30 (941 days ago) @ Micha

Hello,

Please compare the JS code, generated by my PHP code with your code in #546 a last time.


I noticed that the arrays have different names, i.e., settings vs. user_settings. I used this new name to avoid conflicts to the existent one but we can still use the settings array in the final version. What do you think? I didn't notice it during the review because it is basically valid and in accordance with my JS code. However, I recommend to change the name.

From js_defaults.inc.php:

 
var user_settings = new Array();
<?php if (isset ($usersettings['browser_window_target']) and $usersettings['browser_window_target'] == 1): ?>
user_settings["open_links_in_new_window"] = "NONE";
<?php elseif (isset ($usersettings['browser_window_target']) and $usersettings['browser_window_target'] == 2): ?>
user_settings["open_links_in_new_window"] = "EXTERNAL";
<?php elseif (isset ($usersettings['browser_window_target']) and $usersettings['browser_window_target'] == 3): ?>
user_settings["open_links_in_new_window"] = "ALL";
<?php else: ?>
user_settings["open_links_in_new_window"] = "DEFAULT";
<?php endif; ?>
 

I used the name user_settings for the JS-array!? Or do we talk at cross purposes?

PS and edit: it was a nightmare to rebase the branch


Yes, it seems to so easy as it could be - in my opinion. We should close branches as soon as possible to avoid conflicts. ;-)

The branches one by one are valid. It was the combination of a changed and a new file (chinese_traditional.lang) in another pull request, which was meanwhile already part of the master branch and my own changes in the same file(s) in multiple commits in my development branch that had to get unified (in three passes).

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread