$original_viewtype = elgg_get_viewtype();
+ // disable error reporting so we don't cache problems
+ $old_debug = elgg_get_config('debug');
+ elgg_set_config('debug', null);
+
foreach ($viewtypes as $viewtype) {
elgg_set_viewtype($viewtype);
foreach ($CONFIG->views->simplecache as $view) {
datalist_set("simplecache_lastcached_$viewtype", $lastcached);
}
+ elgg_set_config('debug', $old_debug);
elgg_set_viewtype($original_viewtype);
// needs to be set for links in html head
$name = trim($name);
- if (strlen($name) > 32) {
- elgg_log("The name length for configuration variables cannot be greater than 32", "ERROR");
+ if (strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}
global $CONFIG, $DATALIST_CACHE;
// 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");
+ if (elgg_strlen($name) > 255) {
+ elgg_log("The name length for configuration variables cannot be greater than 255", "ERROR");
return false;
}
--- /dev/null
+<?php
+/**
+ * Elgg 1.8-svn upgrade 2011031600
+ * datalist_grows_up
+ *
+ * Ups the varchar to 256 for the datalist and config table.
+ *
+ * Keeping it as a varchar because of the trailing whitespace trimming it apparently does:
+ * http://dev.mysql.com/doc/refman/5.0/en/char.html
+ */
+
+$db_prefix = elgg_get_config('dbprefix');
+
+$q = "ALTER TABLE {$db_prefix}datalists CHANGE name name VARCHAR(255)";
+update_data($q);
+
+$q = "ALTER TABLE {$db_prefix}config CHANGE name name VARCHAR(255)";
+update_data($q);
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `prefix_config` (
- `name` varchar(32) NOT NULL,
+ `name` varchar(255) NOT NULL,
`value` text NOT NULL,
`site_guid` int(11) NOT NULL,
PRIMARY KEY (`name`,`site_guid`)
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `prefix_datalists` (
- `name` varchar(32) NOT NULL,
+ `name` varchar(255) NOT NULL,
`value` text NOT NULL,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
// YYYYMMDD = Elgg Date
// XX = Interim incrementer
-$version = 2011031400;
+$version = 2011031600;
// Human-friendly version name
$release = '1.8-svn';