_flow_ reported on IRC that install.php had stopped working. This was
because default plugins had been put into two separate lists, and the
list with AuthCrypt was never loaded when performing an installation.
Core plugins cannot be disabled.
I also removed the Memcache autodetection thing since it should be
solved in a more elegant manner.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('STATUSNET') && !defined('LACONICA')) {
- exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
/**
* Table Definition for user
*/
/**
* Table Definition for user
*/
-require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
-require_once 'Validate.php';
-
class User extends Managed_DataObject
{
const SUBSCRIBE_POLICY_OPEN = 0;
class User extends Managed_DataObject
{
const SUBSCRIBE_POLICY_OPEN = 0;
try {
$profile->nickname = Nickname::normalize($nickname, true);
} catch (NicknameException $e) {
try {
$profile->nickname = Nickname::normalize($nickname, true);
} catch (NicknameException $e) {
- common_log(LOG_WARNING, sprintf('Bad nickname during User registration for %s: %s', $profile->nickname, $e->getMessage()), __FILE__);
+ common_log(LOG_WARNING, sprintf('Bad nickname during User registration for %s: %s', $nickname, $e->getMessage()), __FILE__);
$profile->query('BEGIN');
$id = $profile->insert();
$profile->query('BEGIN');
$id = $profile->insert();
common_log_db_error($profile, 'INSERT', __FILE__);
return false;
}
common_log_db_error($profile, 'INSERT', __FILE__);
return false;
}
$result = $user->insert();
$result = $user->insert();
+ if ($result === false) {
common_log_db_error($user, 'INSERT', __FILE__);
$profile->query('ROLLBACK');
return false;
common_log_db_error($user, 'INSERT', __FILE__);
$profile->query('ROLLBACK');
return false;
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Config
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Config
* @author Evan Prodromou <evan@status.net>
* @copyright 2008-9 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @author Evan Prodromou <evan@status.net>
* @copyright 2008-9 StatusNet, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
+ * @link http://www.gnu.org/software/social/
*/
$default =
array('site' =>
*/
$default =
array('site' =>
- array('name' => 'Just another StatusNet microblog',
- 'nickname' => 'statusnet',
+ array('name' => 'Just another GNU social node',
+ 'nickname' => 'gnusocial',
'wildcard' => null,
'server' => $_server,
'theme' => 'neo',
'wildcard' => null,
'server' => $_server,
'theme' => 'neo',
'logincommand' =>
array('disabled' => true),
'plugins' =>
'logincommand' =>
array('disabled' => true),
'plugins' =>
- array('default' => array('Geonames' => null,
- 'ClientSideShorten' => null,
- 'StrictTransportSecurity' => null,
- 'Bookmark' => null,
- 'Event' => null,
- 'Poll' => null,
- 'QnA' => null,
- 'SearchSub' => null,
- 'TagSub' => null,
- 'OpenID' => null,
- 'Directory' => null,
- 'ExtendedProfile' => null,
- 'Activity' => null),
+ array('core' => array(
+ 'AuthCrypt' => null,
+ 'LRDD' => null,
+ 'StrictTransportSecurity' => null,
+ ),
+ 'default' => array(
+ 'Activity' => null,
+ 'Bookmark' => null,
+ 'ClientSideShorten' => null,
+ 'Event' => null,
+ 'OpenID' => null,
+ 'Poll' => null,
+ 'QnA' => null,
+ 'SearchSub' => null,
+ 'TagSub' => null,
+ ),
'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
'server' => null,
'sslserver' => null,
'locale_path' => false, // Set to a path to use *instead of* each plugin's own locale subdirectories
'server' => null,
'sslserver' => null,
($this->db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
"\$config['db']['type'] = {$vals['db_type']};\n\n";
($this->db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":'').
"\$config['db']['type'] = {$vals['db_type']};\n\n";
- // Auto memcache support detection
- $cfg .= '
-foreach(array("Memcache", "Memcached") as $plugin) :
- if (class_exists($plugin)) {
- addPlugin($plugin);
- break;
- }
-endforeach;
-';
-
// Normalize line endings for Windows servers
$cfg = str_replace("\n", PHP_EOL, $cfg);
// Normalize line endings for Windows servers
$cfg = str_replace("\n", PHP_EOL, $cfg);
);
} else {
$this->updateStatus(
);
} else {
$this->updateStatus(
- "Could not create initial StatusNet user (administrator).",
+ "Could not create initial GNU social user.",
}
static function defaultPlugins() {
}
static function defaultPlugins() {
- return array(
- 'AuthCrypt' => null,
- 'Bookmark' => null,
- 'Event' => null,
- 'OpenID' => null,
- 'LRDD' => null,
- 'Poll' => null,
- 'QnA' => null,
- 'SearchSub' => null,
- 'StrictTransportSecurity' => null,
- 'TagSub' => null,
- );
+ return array_merge(common_config('plugins', 'core'),
+ common_config('plugins', 'default'));
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
- 'ClientSideShorten' => null,
'Directory' => null,
'ExtendedProfile' => null,
'Geonames' => null,
'Directory' => null,
'ExtendedProfile' => null,
'Geonames' => null,
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
- 'ClientSideShorten' => null,
'Directory' => null,
'ExtendedProfile' => null,
'EmailRegistration' => null,
'Directory' => null,
'ExtendedProfile' => null,
'EmailRegistration' => null,
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
- 'ClientSideShorten' => null,
'Directory' => null,
'Geonames' => null,
'OStatus' => null,
'Directory' => null,
'Geonames' => null,
'OStatus' => null,
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
),
'plugins' => array(
'default' => array_merge(self::defaultPlugins(), array(
- 'ClientSideShorten' => null,
'Geonames' => null,
'NewMenu' => null,
'MobileProfile' => null,
'Geonames' => null,
'NewMenu' => null,
'MobileProfile' => null,
*/
protected static function initPlugins()
{
*/
protected static function initPlugins()
{
+ // Load core plugins
+ foreach (common_config('plugins', 'core') as $name => $params) {
+ call_user_func('addPlugin', $name, $params);
+ }
+
// Load default plugins
foreach (common_config('plugins', 'default') as $name => $params) {
$key = 'disable-' . $name;
// Load default plugins
foreach (common_config('plugins', 'default') as $name => $params) {
$key = 'disable-' . $name;