- aggiornato l'Editor HTML
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.3 KiB |
@@ -14,6 +14,8 @@ span Cellulare:
|
||||
strong #{user.profile.intcode_cell} #{user.profile.cell}<br>
|
||||
span Nazionalità:
|
||||
strong #{user.profile.nationality}<br>
|
||||
span Gruppo:
|
||||
strong #{idMyGroup}<br>
|
||||
p <br>Saluti
|
||||
|
||||
style(type="text/css").
|
||||
|
||||
@@ -6,7 +6,7 @@ span hai dimenticato la Password? :
|
||||
strong <a href=#{forgetpwd} target="_blank">Trovala qui</a><br>
|
||||
span Email:
|
||||
strong #{emailto}<br>
|
||||
p Per confermare la registrazione clicca sul bottone, oppure <a href=#{strlinkreg} target="_blank">CLICCA QUI</a>
|
||||
p Per confermare la registrazione clicca sul bottone, oppure su questo link: #{strlinkreg}
|
||||
div.divbtn <a href=#{strlinkreg} target="_blank">
|
||||
button.btn.btn-lg Verifica Registrazione</a>
|
||||
|
||||
|
||||
@@ -658,11 +658,15 @@ router.post('/setsubrec', authenticate, (req, res) => {
|
||||
|
||||
});
|
||||
|
||||
router.post('/gettable', authenticate, (req, res) => {
|
||||
router.post('/gettable', authenticate_noerror, (req, res) => {
|
||||
let params = req.body;
|
||||
|
||||
params.table = sanitizeHtml(params.table);
|
||||
|
||||
if (!shared_consts.TABLES_ENABLE_GETTABLE_FOR_NOT_LOGGED.includes(params.table) && !req.user) {
|
||||
return res.status(403).send({});
|
||||
}
|
||||
|
||||
let idapp = req.user ? req.user.idapp : sanitizeHtml(params.idapp);
|
||||
const mytable = globalTables.getTableByTableName(params.table);
|
||||
//console.log('mytable', mytable);
|
||||
@@ -1909,15 +1913,19 @@ function uploadFile(req, res, version) {
|
||||
|
||||
|
||||
if (!tools.sulServer()) {
|
||||
// Se faccio eseguire questo in Locale, lui mi fa l'aggiornamento della pagina, quindi poi non posso salvare!
|
||||
// allora mi conviene che lo faccio dopo, manualmente.
|
||||
|
||||
console.log('Dovresti copiare fromfile', fromfile, 'tofile', tofile);
|
||||
await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
|
||||
'sudo cp -R ' + fromfile + ' ' + tofile
|
||||
// await tools.execScriptNoOutput('sudo cp -R ' + fromfile + ' ' + tofile)
|
||||
res.end();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Move in the folder application !
|
||||
tools.move(fromfile, tofile, (err) => {
|
||||
await tools.move(fromfile, tofile, (err) => {
|
||||
if (err) {
|
||||
console.log('err uploadDir:', err);
|
||||
res.status(400).send();
|
||||
|
||||
@@ -117,7 +117,7 @@ router.post('/', async (req, res) => {
|
||||
|
||||
if (!tools.isAlphaNumericAndSpecialCharacter(body.username) ||
|
||||
body.email.length < 6 ||
|
||||
body.username.length < 5 || body.password.length < 5) {
|
||||
body.username.length < 4 || body.password.length < 5) {
|
||||
await tools.snooze(5000);
|
||||
console.log('Username non valido in Registrazione: ' + body.username);
|
||||
res.status(400).
|
||||
|
||||
@@ -741,6 +741,7 @@ module.exports = {
|
||||
mylocalsconf.name = user.name;
|
||||
mylocalsconf.surname = user.surname;
|
||||
mylocalsconf.aportador_solidario = user.aportador_solidario ? user.aportador_solidario : '';
|
||||
mylocalsconf.idMyGroup = user.idMyGroup;
|
||||
mylocalsconf.emailto = user.email;
|
||||
mylocalsconf.hashemail = tools.getHash(user.email);
|
||||
mylocalsconf.user = user;
|
||||
|
||||
@@ -3877,36 +3877,45 @@ module.exports = {
|
||||
this.writelogfile(mystr, FILENAVE);
|
||||
},
|
||||
|
||||
move(oldPath, newPath, callback) {
|
||||
|
||||
fs.rename(oldPath, newPath, function (err) {
|
||||
if (err) {
|
||||
if (err.code === 'EXDEV') {
|
||||
copy();
|
||||
} else {
|
||||
callback(err);
|
||||
}
|
||||
return;
|
||||
async move(oldPath, newPath, callback) {
|
||||
try {
|
||||
const ris = await fs.promises.rename(oldPath, newPath);
|
||||
console.log('... File Rinominato:', oldPath, 'in:', newPath, 'ris', ris);
|
||||
callback(); // Chiamare il callback senza errori
|
||||
} catch (err) {
|
||||
if (err.code === 'EXDEV') {
|
||||
await copy(); // Se EXDEV, utilizza la funzione copy
|
||||
} else {
|
||||
console.log(' ... File Rinominato', oldPath, 'in:', newPath);
|
||||
console.error('Errore durante lo spostamento:', err);
|
||||
callback(err); // Passa l'errore al callback
|
||||
}
|
||||
}
|
||||
|
||||
callback();
|
||||
});
|
||||
|
||||
function copy() {
|
||||
async function copy() {
|
||||
const readStream = fs.createReadStream(oldPath);
|
||||
const writeStream = fs.createWriteStream(newPath);
|
||||
|
||||
readStream.on('error', callback);
|
||||
writeStream.on('error', callback);
|
||||
|
||||
readStream.on('close', function () {
|
||||
console.log('cancella file già copiato', oldPath);
|
||||
fs.unlink(oldPath, callback);
|
||||
readStream.on('error', (err) => {
|
||||
console.error('Errore nella lettura del file:', err);
|
||||
callback(err); // Passa l'errore al callback
|
||||
});
|
||||
writeStream.on('error', (err) => {
|
||||
console.error('Errore nella scrittura del file:', err);
|
||||
callback(err); // Passa l'errore al callback
|
||||
});
|
||||
|
||||
readStream.pipe(writeStream);
|
||||
|
||||
writeStream.on('finish', async () => {
|
||||
console.log('File copiato, ora rimuovo il file di origine:', oldPath);
|
||||
try {
|
||||
await fs.promises.unlink(oldPath); // Rimuovi il file originale
|
||||
callback(); // Chiama il callback al termine
|
||||
} catch (err) {
|
||||
console.error('Errore nella rimozione del file originale:', err);
|
||||
callback(err); // Passa l'errore al callback
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ module.exports = {
|
||||
TABLES_GROUPS_NOTIFICATION: ['mygroups'],
|
||||
TABLES_CIRCUITS_NOTIFICATION: ['circuits'],
|
||||
|
||||
TABLES_ENABLE_GETTABLE_FOR_NOT_LOGGED: ['attivitas'],
|
||||
|
||||
TABLES_NUM_AS_ID_NUMBER: [],
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.58
|
||||
1.0.60
|
||||
Reference in New Issue
Block a user