aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorPaweł Sroka <srokap@gmail.com>2013-01-17 22:07:06 +0100
committerPaweł Sroka <srokap@gmail.com>2013-01-17 22:11:24 +0100
commitef19671ba2c154449cef16bae25814e70e8384f3 (patch)
treefe993515a62b54df756527c6deb33301c5ce8297 /engine
parent3bbd27a2ed8281983e7af10fc9c5b326723c59a3 (diff)
downloadelgg-ef19671ba2c154449cef16bae25814e70e8384f3.tar.gz
elgg-ef19671ba2c154449cef16bae25814e70e8384f3.tar.bz2
Fixes #3123 - Correct name length control in datalist_get and set_config
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/configuration.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/engine/lib/configuration.php b/engine/lib/configuration.php
index b10e51130..385021581 100644
--- a/engine/lib/configuration.php
+++ b/engine/lib/configuration.php
@@ -138,7 +138,7 @@ function elgg_set_config($name, $value) {
/**
* Save a configuration setting
*
- * @param string $name Configuration name (cannot be greater than 32 characters)
+ * @param string $name Configuration name (cannot be greater than 255 characters)
* @param mixed $value Configuration value. Should be string for installation setting
* @param int $site_guid NULL for installation setting, 0 for default site
*
@@ -227,9 +227,9 @@ function datalist_get($name) {
$name = trim($name);
- // cannot store anything longer than 32 characters in db, so catch here
- if (elgg_strlen($name) > 32) {
- elgg_log("The name length for configuration variables cannot be greater than 32", "ERROR");
+ // cannot store anything longer than 255 characters in db, so catch here
+ if (elgg_strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}
@@ -286,7 +286,7 @@ function datalist_get($name) {
function datalist_set($name, $value) {
global $CONFIG, $DATALIST_CACHE;
- // cannot store anything longer than 32 characters in db, so catch before we set
+ // cannot store anything longer than 255 characters in db, so catch before we set
if (elgg_strlen($name) > 255) {
elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
@@ -332,7 +332,7 @@ function datalist_set($name, $value) {
* This will cause the run once function to be run on all installations. To perform
* additional upgrades, create new functions for each release.
*
- * @warning The function name cannot be longer than 32 characters long due to
+ * @warning The function name cannot be longer than 255 characters long due to
* the current schema for the datalist table.
*
* @internal A datalist entry $functioname is created with the value of time().
@@ -419,9 +419,9 @@ function set_config($name, $value, $site_guid = 0) {
$name = trim($name);
- // cannot store anything longer than 32 characters in db, so catch before we set
- if (elgg_strlen($name) > 32) {
- elgg_log("The name length for configuration variables cannot be greater than 32", "ERROR");
+ // cannot store anything longer than 255 characters in db, so catch before we set
+ if (elgg_strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}