Skip to content

Commit daf67b7

Browse files
author
Marius Cramer
committed
Merge branch 'stable-3.0.5' of /home/git/repositories/ispconfig/ispconfig3
2 parents 8507b06 + e39e91c commit daf67b7

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

interface/web/admin/lib/lang/en_users.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ $wb['repeat_password_txt'] = 'Repeat Password';
3030
$wb['password_mismatch_txt'] = 'The passwords do not match.';
3131
$wb['password_match_txt'] = 'The passwords do match.';
3232
$wb['username_error_collision'] = 'The username may not be web or web plus a number."';
33+
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
3334
?>

interface/web/admin/users_edit.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ function onBeforeUpdate() {
6666
if(@is_array($this->dataRecord['modules']) && !in_array($this->dataRecord['startmodule'], $this->dataRecord['modules'])) {
6767
$app->tform->errorMessage .= $app->tform->wordbook['startmodule_err'];
6868
}
69+
6970
$this->oldDataRecord = $app->tform->getDataRecord($this->id);
71+
72+
//* A user that belongs to a client record (client or reseller) may not have typ admin
73+
if(isset($this->dataRecord['typ']) && $this->dataRecord['typ'][0] == 'admin' && $this->oldDataRecord['client_id'] > 0) {
74+
$app->tform->errorMessage .= $app->tform->wordbook['client_not_admin_err'];
75+
}
76+
7077
}
7178

7279
/*

server/lib/classes/tpl.inc.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,16 @@ function _getData ($tmplfile, $do_eval=false) {
962962
$regex.= '[^\"\']*|[a-z0-9_\.]*)';
963963
$regex.= '[\"\']?';
964964
$regex.= ')?\s*';
965+
$regex.= '(?:';
966+
$regex.= '(?:';
967+
$regex.= '(name|format|escape|op|value)';
968+
$regex.= '\s*=\s*';
969+
$regex.= ')';
970+
$regex.= '(?:[\"\'])?';
971+
$regex.= '((?<=[\"\'])';
972+
$regex.= '[^\"\']*|[a-z0-9_\.]*)';
973+
$regex.= '[\"\']?';
974+
$regex.= ')?\s*';
965975
$regex.= '(?:>|\/>|}|-->){1}';
966976
$regex.= '/i';
967977
//$regex.= '([\r\n|\n|\r])?/ie';
@@ -1290,7 +1300,7 @@ function _parseTag ($args) {
12901300
$wholetag = $args[0];
12911301
$openclose = $args[1];
12921302
$tag = strtolower($args[2]);
1293-
$newline = $args[9];
1303+
$newline = $args[11];
12941304
//echo "1#$newline#2";
12951305

12961306
if ($tag == 'else') return '<?php } else { ?>'.$newline;
@@ -1307,7 +1317,7 @@ function _parseTag ($args) {
13071317
}
13081318

13091319
// arrange attributes
1310-
for ($i=3; $i < 8; $i=($i+2)) {
1320+
for ($i=3; $i < 10; $i=($i+2)) {
13111321
if (empty($args[$i]) && empty($args[($i+1)])) break;
13121322
$key = (empty($args[$i])) ? 'name' : strtolower($args[$i]);
13131323
if ($key == 'name' && preg_match('/^(php)?include$/', $tag)) $key = 'file';

0 commit comments

Comments
 (0)