aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-01-29 06:11:36 -0800
committerCash Costello <cash.costello@gmail.com>2013-01-29 06:11:36 -0800
commit684ad918a53307e18248c4e52f9405d3a787051d (patch)
tree03f47c04c4323d8136e94434a14e5d72976dde25
parent8d3a7ab1755829c6e070a038d6b33e326de8fc8f (diff)
parentef19671ba2c154449cef16bae25814e70e8384f3 (diff)
downloadelgg-684ad918a53307e18248c4e52f9405d3a787051d.tar.gz
elgg-684ad918a53307e18248c4e52f9405d3a787051d.tar.bz2
Merge pull request #495 from Srokap/ticket_3123
Fixes #3123 - Correct name length control in datalist_get and set_config
-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;
}