Revision 803
Added by thorn over 16 years ago
trunk/CHANGELOG | ||
---|---|---|
10 | 10 |
# = Bugfix |
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 |
------------------------------------- 2.7.0 ------------------------------------- |
|
13 |
------------------------------------- 2.7.0 ------------------------------------- |
|
14 |
05-Apr-2008 Thomas Hornik |
|
15 |
! some small fixes: group_id/groups_id-handling, safe_mode-query in install, better work-around for issue with phplib and code-module (removed {}) |
|
14 | 16 |
05-Apr-2008 Christian Sommer |
15 | 17 |
! added workaround for template parser class |
16 | 18 |
! moved functions to edit module CSS files into the WB core to avoid duplication of code |
trunk/wb/include/phplib/template.inc | ||
---|---|---|
657 | 657 |
if ($this->debug & 4) { |
658 | 658 |
echo "<p><b>pparse:</b> passing parameters to parse...</p>\n"; |
659 | 659 |
} |
660 |
if($clear) |
|
660 |
if(!$clear) { |
|
661 |
$unknowns = $this->unknowns; |
|
662 |
$this->set_unknowns('keep'); |
|
661 | 663 |
print $this->finish($this->parse($target, $varname, $append)); |
662 |
else |
|
663 |
print $this->parse($target, $varname, $append); |
|
664 |
return false; |
|
664 |
$this->set_unknowns($unknowns); |
|
665 |
} else { |
|
666 |
print $this->finish($this->parse($target, $varname, $append)); |
|
667 |
} |
|
668 |
return false; |
|
665 | 669 |
} |
666 | 670 |
|
667 | 671 |
|
trunk/wb/admin/users/add.php | ||
---|---|---|
33 | 33 |
|
34 | 34 |
// Get details entered |
35 | 35 |
$groups_id = implode(",", $admin->add_slashes($_POST['groups'])); //should check permissions |
36 |
$groups_id = trim($groups_id, ','); // there will be an additional ',' when "Please Choose" was selected, too |
|
36 | 37 |
$active = $admin->add_slashes($_POST['active'][0]); |
37 | 38 |
$username_fieldname = $admin->get_post_escaped('username_fieldname'); |
38 | 39 |
$username = strtolower($admin->get_post_escaped($username_fieldname)); |
... | ... | |
44 | 45 |
$default_language = DEFAULT_LANGUAGE; |
45 | 46 |
|
46 | 47 |
// Create a javascript back link |
47 |
$js_back = "javascript: history.go(-1);";
|
|
48 |
$js_back = 'javascript: history.go(-1);';
|
|
48 | 49 |
|
49 | 50 |
// Check values |
50 |
if($groups_id == "") {
|
|
51 |
if($groups_id == '') {
|
|
51 | 52 |
$admin->print_error($MESSAGE['USERS']['NO_GROUP'], $js_back); |
52 | 53 |
} |
53 | 54 |
if(strlen($username) < 2) { |
... | ... | |
59 | 60 |
if($password != $password2) { |
60 | 61 |
$admin->print_error($MESSAGE['USERS']['PASSWORD_MISMATCH'], $js_back); |
61 | 62 |
} |
62 |
if($email != "") {
|
|
63 |
if($email != '') {
|
|
63 | 64 |
if($admin->validate_email($email) == false) { |
64 | 65 |
$admin->print_error($MESSAGE['USERS']['INVALID_EMAIL'], $js_back); |
65 | 66 |
} |
66 | 67 |
} |
67 | 68 |
|
69 |
// choose group_id from groups_id - workaround for still remaining calls to group_id (to be cleaned-up) |
|
70 |
$gid_tmp = explode(',', $groups_id); |
|
71 |
if(in_array('1', $gid_tmp)) $group_id = '1'; // if user is in administrator-group, get this group |
|
72 |
else $group_id = $gid_tmp[0]; // else just get the first one |
|
73 |
unset($gid_tmp); |
|
74 |
|
|
68 | 75 |
// Check if username already exists |
69 | 76 |
$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE username = '$username'"); |
70 | 77 |
if($results->numRows() > 0) { |
trunk/wb/account/signup2.php | ||
---|---|---|
107 | 107 |
$md5_password = md5($new_pass); |
108 | 108 |
|
109 | 109 |
// Inser the user into the database |
110 |
$query = "INSERT INTO ".TABLE_PREFIX."users (groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
|
|
110 |
$query = "INSERT INTO ".TABLE_PREFIX."users (group_id,groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
|
|
111 | 111 |
$database->query($query); |
112 | 112 |
|
113 | 113 |
if($database->is_error()) { |
trunk/wb/install/index.php | ||
---|---|---|
153 | 153 |
<td width="115" style="color: #666666;">PHP Safe Mode</td> |
154 | 154 |
<td> |
155 | 155 |
<?php |
156 |
if(ini_get('safe_mode')) { |
|
156 |
if(ini_get('safe_mode')=='' || stripos(ini_get('safe_mode'), 'off')!==FALSE || ini_get('safe_mode')==0) { |
|
157 |
?><font class="good">Disabled</font><?php |
|
158 |
} else { |
|
157 | 159 |
?><font class="bad">Enabled</font><?php |
158 |
} else { |
|
159 |
?><font class="good">Disabled</font><?php |
|
160 | 160 |
} |
161 | 161 |
?> |
162 | 162 |
</td> |
Also available in: Unified diff
some small fixes: group_id/groups_id-handling, safe_mode-query in install, better work-around for issue with phplib and code-module (removed {})