if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
-define('STATUSNET_VERSION', '0.9.6');
+define('STATUSNET_BASE_VERSION', '1.1.0');
+define('STATUSNET_LIFECYCLE', 'alpha1'); // 'dev', 'alpha[0-9]+', 'beta[0-9]+', 'rc[0-9]+', 'release'
+define('STATUSNET_VERSION', STATUSNET_BASE_VERSION . '-' . STATUSNET_LIFECYCLE);
+
define('LACONICA_VERSION', STATUSNET_VERSION); // compatibility
-define('STATUSNET_CODENAME', 'Man on the Moon');
+define('STATUSNET_CODENAME', 'Fight for Your Right');
define('AVATAR_PROFILE_SIZE', 96);
define('AVATAR_STREAM_SIZE', 48);
define('NOTICES_PER_PAGE', 20);
define('PROFILES_PER_PAGE', 20);
+define('MESSAGES_PER_PAGE', 20);
+define('GROUPS_PER_PAGE', 20);
define('FOREIGN_NOTICE_SEND', 1);
define('FOREIGN_NOTICE_RECV', 2);
define('NOTICE_INBOX_SOURCE_GROUP', 2);
define('NOTICE_INBOX_SOURCE_REPLY', 3);
define('NOTICE_INBOX_SOURCE_FORWARD', 4);
+define('NOTICE_INBOX_SOURCE_PROFILE_TAG', 5);
define('NOTICE_INBOX_SOURCE_GATEWAY', -1);
-# append our extlib dir as the last-resort place to find libs
+// append our extlib dir as the last-resort place to find libs
set_include_path(get_include_path() . PATH_SEPARATOR . INSTALLDIR . '/extlib/');
}
}
-# global configuration object
+// global configuration object
require_once('PEAR.php');
require_once('PEAR/Exception.php');
if ($err->getCode() == DB_DATAOBJECT_ERROR_NODATA) {
return;
}
+
+ $msg = $err->getMessage();
+ $userInfo = $err->getUserInfo();
+
+ // Log this; push the message up as an exception
+
+ common_log(LOG_ERR, "PEAR Error: $msg ($userInfo)");
+
+ // HACK: queue handlers get kicked by the long-query killer, and
+ // keep the same broken connection. We die here to get a new
+ // process started.
+
+ if (php_sapi_name() == 'cli' && preg_match('/nativecode=2006/', $userInfo)) {
+ common_log(LOG_ERR, "Lost DB connection; dying.");
+ exit(100);
+ }
+
if ($err->getCode()) {
throw new PEAR_Exception($err->getMessage(), $err->getCode());
}
throw new PEAR_Exception($err->getMessage());
}
+
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');