Commit f42c002d authored by Alexandre Morin's avatar Alexandre Morin
Browse files

Merge branch 'Hotfix/2.4.5' into 'Support/2.4.X'

Hotfix/2.4.5

See merge request !345
parents 9743dbf9 6f2626b5
......@@ -33,7 +33,7 @@ interface authInterface
* @return auth/user/editProfile
*/
public function readMyprofile();
/**
* Prepare a user object for update
*
......@@ -42,15 +42,6 @@ interface authInterface
* @return auth/user/updateUserInformation
*/
public function updateMyprofile($userAccount);
/**
* Allow to modify user information
* @param auth/roleMember[] $roleMembers Array of role member object
*
* @uses auth/userAccount/update_userAccountId_
* @return auth/user/updateUserInformation
*/
public function updateUseraccount_userAccountId_($roleMembers);
/**
* Change a user password
......@@ -61,4 +52,4 @@ interface authInterface
* @return auth/user/setPassword
*/
public function updateUseraccountSetpassword_userAccountId_($newPassword, $oldPassword);
}
\ No newline at end of file
}
<?php
if(isset($_POST['regenerate'])) {
if (isset($_POST['regenerate'])) {
$fileName = $_POST['file'];
require "../dependency/html/plugins/lessphp/lessc.inc.php";
$less = new lessc;
$css = $less->compileFile("public/less/dashboard/style.less");
file_put_contents("public/css/$fileName", $css);
if (preg_match('/^([A-z0-9]+\.css)$/', $fileName)) {
require "../dependency/html/plugins/lessphp/lessc.inc.php";
$less = new lessc;
$css = $less->compileFile("public/less/dashboard/style.less");
file_put_contents("public/css/$fileName", $css);
}
exit;
}
?>
<html>
<body>
<div id="filename_form" style="text-align: center; margin-top:15%">
<h1>File name</h1>
<input id="filename" type="text">
<button onclick="generate()">Send</button>
<span style="color: red; display: none"> You can't create style.css</span>
</div>
<div id="filename_form" style="text-align: center; margin-top:15%">
<h1>File name</h1>
<input id="filename" type="text">
<button onclick="generate()">Send</button>
<span style="color: red; display: none"> You can't create style.css</span>
</div>
<h1 id="title" style="text-align: center; margin-top:15%;display: none">
<span>Css regeneration processing...</span>
<br/>
......@@ -36,8 +37,15 @@ if(isset($_POST['regenerate'])) {
<script>
function generate() {
if(document.getElementById("filename").value){
if (document.getElementById("filename").value) {
var file = document.getElementById('filename').value;
document.getElementById("description").innerHTML = '';
var regex = /^([A-z0-9]+\.css)$/g;
if (!file.match(regex)) {
document.getElementById("description").innerHTML = "The filename must not contain a path and its extension must be 'css'.";
return;
}
if(file != "style.css") {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment