Allow more characters for room names
This commit is contained in:
parent
a03472ebc1
commit
d7c148fa89
|
@ -75,8 +75,8 @@ function admin_rooms()
|
||||||
if ($request->hasPostData('submit')) {
|
if ($request->hasPostData('submit')) {
|
||||||
$valid = true;
|
$valid = true;
|
||||||
|
|
||||||
if ($request->has('name') && strlen(strip_request_item('name')) > 0) {
|
if ($request->has('name') && strlen(strip_request_tags('name')) > 0) {
|
||||||
$result = Room_validate_name(strip_request_item('name'), $room_id);
|
$result = Room_validate_name(strip_request_tags('name'), $room_id);
|
||||||
if (!$result->isValid()) {
|
if (!$result->isValid()) {
|
||||||
$valid = false;
|
$valid = false;
|
||||||
$msg .= error(__('This name is already in use.'), true);
|
$msg .= error(__('This name is already in use.'), true);
|
||||||
|
|
|
@ -185,6 +185,23 @@ function strip_request_item($name, $default_value = null)
|
||||||
return $default_value;
|
return $default_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns REQUEST value or default value (null) if not set.
|
||||||
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param string|null $default_value
|
||||||
|
* @return mixed|null
|
||||||
|
*/
|
||||||
|
function strip_request_tags($name, $default_value = null)
|
||||||
|
{
|
||||||
|
$request = request();
|
||||||
|
if ($request->has($name)) {
|
||||||
|
return strip_tags($request->input($name));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $default_value;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Testet, ob der angegebene REQUEST Wert ein Integer ist, bzw.
|
* Testet, ob der angegebene REQUEST Wert ein Integer ist, bzw.
|
||||||
* eine ID sein könnte.
|
* eine ID sein könnte.
|
||||||
|
|
Loading…
Reference in New Issue