X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcommon.php;h=f7308d0b44c357ed7bcaa325dad3c6a60d4cd46c;hb=1636da829c9caa801f95dd9e8e658f938012a5fa;hp=d8471711c4ac616f6826560dd6d3a586e2c1f504;hpb=353aa5a0d8dd1a48cd4f6d921a0b24c5330359c0;p=quix0rs-gnu-social.git diff --git a/lib/common.php b/lib/common.php index d8471711c4..f7308d0b44 100644 --- a/lib/common.php +++ b/lib/common.php @@ -19,7 +19,7 @@ if (!defined('LACONICA')) { exit(1); } -define('LACONICA_VERSION', '0.4.4'); +define('LACONICA_VERSION', '0.6.4.3'); define('AVATAR_PROFILE_SIZE', 96); define('AVATAR_STREAM_SIZE', 48); @@ -27,9 +27,21 @@ define('AVATAR_MINI_SIZE', 24); define('MAX_AVATAR_SIZE', 256 * 1024); define('NOTICES_PER_PAGE', 20); +define('PROFILES_PER_PAGE', 20); + +define('FOREIGN_NOTICE_SEND', 1); +define('FOREIGN_NOTICE_RECV', 2); +define('FOREIGN_NOTICE_SEND_REPLY', 4); + +define('FOREIGN_FRIEND_SEND', 1); +define('FOREIGN_FRIEND_RECV', 2); define_syslog_variables(); +# 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 require_once('PEAR.php'); @@ -56,7 +68,9 @@ $config = 'broughtby' => NULL, 'timezone' => 'UTC', 'broughtbyurl' => NULL, - 'closed' => false), + 'closed' => false, + 'inviteonly' => false, + 'private' => false), 'syslog' => array('appname' => 'laconica', # for syslog 'priority' => 'debug'), # XXX: currently ignored @@ -70,21 +84,52 @@ $config = array('backend' => 'mail', 'params' => NULL), 'nickname' => - array('blacklist' => array()), + array('blacklist' => array(), + 'featured' => array()), + 'profile' => + array('banned' => array()), 'avatar' => array('server' => NULL), + 'public' => + array('localonly' => true, + 'blacklist' => array()), 'theme' => array('server' => NULL), + 'throttle' => + array('enabled' => false, // whether to throttle edits; false by default + 'count' => 20, // number of allowed messages in timespan + 'timespan' => 600), // timespan for throttling 'xmpp' => array('enabled' => false, 'server' => 'INVALID SERVER', 'port' => 5222, 'user' => 'update', + 'encryption' => true, 'resource' => 'uniquename', 'password' => 'blahblahblah', 'host' => NULL, # only set if != server 'debug' => false, # print extra debug info 'public' => array()), # JIDs of users who want to receive the public stream + 'sphinx' => + array('enabled' => false, + 'server' => 'localhost', + 'port' => 3312), + 'tag' => + array('dropoff' => 864000.0), + 'popular' => + array('dropoff' => 864000.0), + 'daemon' => + array('piddir' => '/var/run', + 'user' => false, + 'group' => false), + 'integration' => + array('source' => 'Laconica'), # source attribute for Twitter + 'memcached' => + array('enabled' => false, + 'server' => 'localhost', + 'port' => 11211), + 'inboxes' => + array('enabled' => true), # on by default for new sites ); $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options'); @@ -97,26 +142,31 @@ $config['db'] = 'class_prefix' => '', 'mirror' => NULL, 'db_driver' => 'DB', # XXX: JanRain libs only work with DB - 'quote_identifiers' => false); - -require_once(INSTALLDIR.'/config.php'); - -require_once('Validate.php'); + 'quote_identifiers' => false, + 'type' => 'mysql' ); if (function_exists('date_default_timezone_set')) { /* Work internally in UTC */ date_default_timezone_set('UTC'); } +require_once(INSTALLDIR.'/config.php'); + +require_once('Validate.php'); +require_once('markdown.php'); + require_once(INSTALLDIR.'/lib/util.php'); require_once(INSTALLDIR.'/lib/action.php'); require_once(INSTALLDIR.'/lib/theme.php'); require_once(INSTALLDIR.'/lib/mail.php'); +require_once(INSTALLDIR.'/lib/subs.php'); +require_once(INSTALLDIR.'/lib/Shorturl_api.php'); +require_once(INSTALLDIR.'/lib/twitter.php'); function __autoload($class) { - if (file_exists(INSTALLDIR.'/classes/' . $class . '.php')) { + if ($class == 'OAuthRequest') { + require_once('OAuth.php'); + } else if (file_exists(INSTALLDIR.'/classes/' . $class . '.php')) { require_once(INSTALLDIR.'/classes/' . $class . '.php'); } } - -require_once('markdown.php');