Revision 799
Added by doc over 16 years ago
trunk/CHANGELOG | ||
---|---|---|
10 | 10 |
# = Bugfix |
11 | 11 |
! = Update/Change |
12 | 12 |
|
13 |
------------------------------------- 2.7.0 ------------------------------------- |
|
14 |
04-Apr-2008 Thomas Hornik |
|
13 |
------------------------------------- 2.7.0 ------------------------------------- |
|
14 |
05-Apr-2008 Christian Sommer |
|
15 |
! allowed the character "-" to be used in database names |
|
16 |
04-Apr-2008 Thomas Hornik |
|
15 | 17 |
# fixed: Language-redirect removed query-string from URL |
16 | 18 |
04-Apr-2008 Christian Sommer |
17 | 19 |
! set WB version to 2.7 (RC3) for the next upcoming release candidate |
trunk/wb/install/save.php | ||
---|---|---|
226 | 226 |
set_error('Please enter a database name', 'database_name'); |
227 | 227 |
} else { |
228 | 228 |
// make sure only allowed characters are specified |
229 |
if(preg_match('/[^a-z0-9_]+/i', $_POST['database_name'])) { |
|
229 |
if(preg_match('/[^a-z0-9_-]+/i', $_POST['database_name'])) {
|
|
230 | 230 |
// contains invalid characters (only a-z, A-Z, 0-9 and _ allowed to avoid problems with table/field names) |
231 |
set_error('Only characters a-z, A-Z, 0-9 and _ allowed as database name.', 'database_name');
|
|
231 |
set_error('Only characters a-z, A-Z, 0-9, - and _ allowed in database name.', 'database_name');
|
|
232 | 232 |
} |
233 | 233 |
$database_name = $_POST['database_name']; |
234 | 234 |
} |
235 | 235 |
// Get table prefix |
236 | 236 |
if(preg_match('/[^a-z0-9_]+/i', $_POST['table_prefix'])) { |
237 | 237 |
// contains invalid characters (only a-z, A-Z, 0-9 and _ allowed to avoid problems with table/field names) |
238 |
set_error('Only characters a-z, A-Z, 0-9 and _ allowed as table_prefix.', 'table_prefix');
|
|
238 |
set_error('Only characters a-z, A-Z, 0-9 and _ allowed in table_prefix.', 'table_prefix');
|
|
239 | 239 |
} else { |
240 | 240 |
$table_prefix = $_POST['table_prefix']; |
241 | 241 |
} |
... | ... | |
350 | 350 |
} |
351 | 351 |
|
352 | 352 |
// Try to create the database |
353 |
mysql_query('CREATE DATABASE '.$database_name);
|
|
353 |
mysql_query('CREATE DATABASE `'.$database_name.'`');
|
|
354 | 354 |
|
355 | 355 |
// Close the mysql connection |
356 | 356 |
mysql_close(); |
trunk/wb/install/index.php | ||
---|---|---|
336 | 336 |
</td> |
337 | 337 |
</tr> |
338 | 338 |
<tr> |
339 |
<td style="color: #666666;">Database Name:<br />[a-zA-Z0-9_]</td> |
|
339 |
<td style="color: #666666;">Database Name:<br />[a-zA-Z0-9_-]</td>
|
|
340 | 340 |
<td> |
341 | 341 |
<input <?php echo field_error('database_name');?> type="text" tabindex="8" name="database_name" style="width: 98%;" value="<?php if(isset($_SESSION['database_name'])) { echo $_SESSION['database_name']; } else { echo 'wb'; } ?>" /> |
342 | 342 |
</td> |
Also available in: Unified diff
allowed character "-" to be used in database names