Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 2b4e5ac

Browse files
committed
Try to skip HTACCESS step : if AJXP_PACKAGING is not zip ( = linux packages ), or if content of the htaccess is already correct.
1 parent a850de3 commit 2b4e5ac

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

core/src/plugins/boot.conf/class.BootConfLoader.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,11 @@ public function applyInstallerForm($action, $httpVars, $fileVars)
217217
}
218218
if(is_writeable(AJXP_INSTALL_PATH."/.htaccess")){
219219
file_put_contents(AJXP_INSTALL_PATH."/.htaccess", $htContent);
220-
}else{
221-
$htAccessToUpdate = AJXP_INSTALL_PATH."/.htaccess";
220+
}else if(AJXP_PACKAGING == "zip"){
221+
$testContent = @file_get_contents(AJXP_INSTALL_PATH."/.htaccess");
222+
if($testContent === false || $testContent != $htContent){
223+
$htAccessToUpdate = AJXP_INSTALL_PATH."/.htaccess";
224+
}
222225
}
223226

224227
$sqlPlugs = array(
@@ -281,7 +284,10 @@ public function applyInstallerForm($action, $httpVars, $fileVars)
281284
$uObj = $newConfigPlugin->createUserObject($adminLogin);
282285
if(isSet($data["MAILER_ADMIN"])) $uObj->personalRole->setParameterValue("core.conf", "email", $data["MAILER_ADMIN"]);
283286
$uObj->personalRole->setParameterValue("core.conf", "USER_DISPLAY_NAME", $adminName);
284-
$uObj->personalRole->setAcl('ajxp_conf', 'rw');
287+
$repos = ConfService::getRepositoriesList("all", false);
288+
foreach($repos as $repo){
289+
$uObj->personalRole->setAcl($repo->getId(), "rw");
290+
}
285291
AuthService::updateRole($uObj->personalRole);
286292

287293
$loginP = "USER_LOGIN";

0 commit comments

Comments
 (0)