@@ -49,7 +49,7 @@ class app {
4949 private $ _loaded_classes = array ();
5050 private $ _conf ;
5151 private $ _security_config ;
52-
52+
5353 public $ loaded_plugins = array ();
5454
5555 public function __construct () {
@@ -58,7 +58,7 @@ public function __construct() {
5858 if (isset ($ _REQUEST ['GLOBALS ' ]) || isset ($ _FILES ['GLOBALS ' ]) || isset ($ _REQUEST ['s ' ]) || isset ($ _REQUEST ['s_old ' ]) || isset ($ _REQUEST ['conf ' ])) {
5959 die ('Internal Error: var override attempt detected ' );
6060 }
61-
61+
6262 $ this ->_conf = $ conf ;
6363 if ($ this ->_conf ['start_db ' ] == true ) {
6464 $ this ->load ('db_ ' .$ this ->_conf ['db_type ' ]);
@@ -70,21 +70,21 @@ public function __construct() {
7070 }
7171 $ this ->uses ('functions ' ); // we need this before all others!
7272 $ this ->uses ('auth,plugin,ini_parser,getconf ' );
73-
73+
7474 }
7575
7676 public function __get ($ prop ) {
7777 if (property_exists ($ this , $ prop )) return $ this ->{$ prop };
78-
78+
7979 $ this ->uses ($ prop );
8080 if (property_exists ($ this , $ prop )) return $ this ->{$ prop };
8181 else trigger_error ('Undefined property ' . $ prop . ' of class app ' , E_USER_WARNING );
8282 }
83-
83+
8484 public function __destruct () {
8585 session_write_close ();
8686 }
87-
87+
8888 public function initialize_session () {
8989 //* Start the session
9090 if ($ this ->_conf ['start_session ' ] == true ) {
@@ -118,7 +118,7 @@ public function initialize_session() {
118118 } else {
119119 session_set_cookie_params (0 ,'/ ' ,$ cookie_domain ,$ cookie_secure ,true ); // until browser is closed
120120 }
121-
121+
122122 session_set_save_handler ( array ($ this ->session , 'open ' ),
123123 array ($ this ->session , 'close ' ),
124124 array ($ this ->session , 'read ' ),
@@ -127,15 +127,15 @@ public function initialize_session() {
127127 array ($ this ->session , 'gc ' ));
128128
129129 session_start ();
130-
130+
131131 //* Initialize session variables
132132 if (!isset ($ _SESSION ['s ' ]['id ' ]) ) $ _SESSION ['s ' ]['id ' ] = session_id ();
133133 if (empty ($ _SESSION ['s ' ]['theme ' ])) $ _SESSION ['s ' ]['theme ' ] = $ conf ['theme ' ];
134134 if (empty ($ _SESSION ['s ' ]['language ' ])) $ _SESSION ['s ' ]['language ' ] = $ conf ['language ' ];
135135 }
136136
137137 }
138-
138+
139139 public function uses ($ classes ) {
140140 $ cl = explode (', ' , $ classes );
141141 if (is_array ($ cl )) {
@@ -160,7 +160,7 @@ public function load($files) {
160160 }
161161 }
162162 }
163-
163+
164164 public function conf ($ plugin , $ key , $ value = null ) {
165165 if (is_null ($ value )) {
166166 $ tmpconf = $ this ->db ->queryOneRecord ("SELECT `value` FROM `sys_config` WHERE `group` = ? AND `name` = ? " , $ plugin , $ key );
@@ -284,6 +284,7 @@ public function tpl_defaults() {
284284 $ this ->tpl ->setVar ('datalog_changes_end_txt ' , $ this ->lng ('datalog_changes_end_txt ' ));
285285 $ this ->tpl ->setVar ('datalog_changes_count ' , $ datalog ['count ' ]);
286286 $ this ->tpl ->setLoop ('datalog_changes ' , $ datalog ['entries ' ]);
287+ $ this ->tpl ->setVar ('datalog_changes_close_txt ' , $ this ->lng ('datalog_changes_close_txt ' ));
287288 } else {
288289 $ this ->tpl ->setVar ('app_version ' , '' );
289290 }
@@ -349,7 +350,7 @@ public function is_under_maintenance() {
349350
350351 return 'y ' === $ maintenance_mode && !in_array ($ _SERVER ['REMOTE_ADDR ' ], $ maintenance_mode_exclude_ips );
351352 }
352-
353+
353354 private function get_cookie_domain () {
354355 $ sec_config = $ this ->getconf ->get_security_config ('permissions ' );
355356 $ proxy_panel_allowed = $ sec_config ['reverse_proxy_panel_allowed ' ];
@@ -380,7 +381,7 @@ private function get_cookie_domain() {
380381 unset($ forwarded_host );
381382 }
382383 }
383-
384+
384385 return $ cookie_domain ;
385386 }
386387
@@ -389,7 +390,7 @@ private function get_cookie_domain() {
389390//** Initialize application (app) object
390391//* possible future = new app($conf);
391392$ app = new app ();
392- /*
393+ /*
393394 split session creation out of constructor is IMHO better.
394395 otherwise we have some circular references to global $app like in
395396 getconfig property of App - RA
@@ -398,7 +399,7 @@ private function get_cookie_domain() {
398399
399400// load and enable PHP Intrusion Detection System (PHPIDS)
400401$ ids_security_config = $ app ->getconf ->get_security_config ('ids ' );
401-
402+
402403if (is_dir (ISPC_CLASS_PATH .'/IDS ' ) && !defined ('REMOTE_API_CALL ' ) && ($ ids_security_config ['ids_anon_enabled ' ] == 'yes ' || $ ids_security_config ['ids_user_enabled ' ] == 'yes ' || $ ids_security_config ['ids_admin_enabled ' ] == 'yes ' )) {
403404 $ app ->uses ('ids ' );
404405 $ app ->ids ->start ();
0 commit comments