File tree Expand file tree Collapse file tree 5 files changed +17
-2
lines changed
Expand file tree Collapse file tree 5 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ include/config.php
33.idea /
44nbproject /
55lang /French
6+ .htaccess
Original file line number Diff line number Diff line change 11RewriteEngine On
22RewriteCond %{REQUEST_FILENAME} !-f
3- RewriteRule ^ index.php [QSA,L]
3+ RewriteRule ^ index.php [QSA,L]
Original file line number Diff line number Diff line change 1+ RewriteEngine On
2+ RewriteCond %{REQUEST_FILENAME} !-f
3+ RewriteRule ^ index.php [QSA,L]
Original file line number Diff line number Diff line change @@ -195,6 +195,11 @@ public function create_db(array $data)
195195 // Store config in DB
196196 $ this ->model ->save_config ($ this ->load_default_config ($ data ));
197197
198+ // Handle .htaccess
199+ if (function_exists ('apache_get_modules ' ) && in_array ('mod_rewrite ' , apache_get_modules ())) {
200+ $ this ->write_htaccess ();
201+ }
202+
198203 // Redirect to homepage
199204 redirect (get_link ('/ ' ));
200205 }
@@ -204,6 +209,12 @@ public function write_config($json)
204209 return file_put_contents ($ this ->feather ->forum_env ['FEATHER_ROOT ' ].$ this ->config_file , $ json );
205210 }
206211
212+ public function write_htaccess ()
213+ {
214+ $ data = file_get_contents ($ this ->feather ->forum_env ['FEATHER_ROOT ' ].'.htaccess.dist ' );
215+ return file_put_contents ($ this ->feather ->forum_env ['FEATHER_ROOT ' ].'.htaccess ' , $ data );
216+ }
217+
207218 public function load_default_config (array $ data )
208219 {
209220 return array (
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ function process_form(the_form)
102102 <a href="<?php echo get_base_url () ?> " title="" class="site-name">
103103 <p><?php echo feather_escape ($ feather_config ['o_board_title ' ]) ?> </p>
104104 </a>
105- <div id="brddesc"><?php echo $ feather_config ['o_board_desc ' ] ?> </div>
105+ <div id="brddesc"><?php echo htmlspecialchars_decode ( $ feather_config ['o_board_desc ' ]) ?> </div>
106106 </h1>
107107 <div class="status-avatar">
108108 <?php echo $ page_info ?>
You can’t perform that action at this time.
0 commit comments