diff --git a/CONFIGURE b/CONFIGURE index 0a3579885c..3f0ae668ab 100644 --- a/CONFIGURE +++ b/CONFIGURE @@ -646,7 +646,7 @@ search Some stuff for search. type: type of search. Ignored if PostgreSQL or Sphinx are enabled. Can either - be 'fulltext' (default) or 'like'. The former is faster and more efficient + be 'fulltext' or 'like' (default). The former is faster and more efficient but requires the lame old MyISAM engine for MySQL. The latter will work with InnoDB but could be miserably slow on large systems. We'll probably add another type sometime in the future, diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index 136d41bb99..5a0ea60c7e 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -106,10 +106,8 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction $self = $this->getSelfUri(); - $link = common_local_url( - 'ApiTimelineGroup', - array('nickname' => $this->group->nickname) - ); + $link = common_local_url('showgroup', + array('nickname' => $this->group->nickname)); switch($this->format) { case 'xml': diff --git a/actions/showstream.php b/actions/showstream.php index ee8bc18e72..ccd976a0e3 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -55,6 +55,25 @@ require_once INSTALLDIR.'/lib/feedlist.php'; */ class ShowstreamAction extends ProfileAction { + var $notice; + + function prepare($args) + { + parent::prepare($args); + + $p = Profile::current(); + + if (empty($this->tag)) { + $stream = new ProfileNoticeStream($this->profile, $p); + } else { + $stream = new TaggedProfileNoticeStream($this->profile, $this->tag, $p); + } + + $this->notice = $stream->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1); + + return true; + } + function isReadOnly($args) { return true; @@ -224,13 +243,9 @@ class ShowstreamAction extends ProfileAction function showNotices() { - $notice = empty($this->tag) - ? $this->user->getNotices(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1) - : $this->user->getTaggedNotices($this->tag, ($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null); - $pnl = null; - if (Event::handle('ShowStreamNoticeList', array($notice, $this, &$pnl))) { - $pnl = new ProfileNoticeList($notice, $this); + if (Event::handle('ShowStreamNoticeList', array($this->notice, $this, &$pnl))) { + $pnl = new ProfileNoticeList($this->notice, $this); } $cnt = $pnl->show(); if (0 == $cnt) { diff --git a/actions/tag.php b/actions/tag.php index 33339cb8bf..e0cb9783d1 100644 --- a/actions/tag.php +++ b/actions/tag.php @@ -23,6 +23,8 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } class TagAction extends Action { var $notice; + var $tag; + var $page; function prepare($args) { diff --git a/classes/Notice.php b/classes/Notice.php index e34dab549f..ce6464c157 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -87,7 +87,7 @@ class Notice extends Managed_DataObject public static function schemaDef() { - return array( + $def = array( 'fields' => array( 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'who made the update'), @@ -127,11 +127,14 @@ class Notice extends Managed_DataObject 'notice_created_idx' => array('created'), 'notice_replyto_idx' => array('reply_to'), 'notice_repeatof_idx' => array('repeat_of'), - ), - 'fulltext indexes' => array( - 'content' => array('content'), ) ); + + if (common_config('search', 'type') == 'fulltext') { + $def['fulltext indexes'] = array('content' => array('content')); + } + + return $def; } function multiGet($kc, $kvs, $skipNulls=true) diff --git a/classes/Profile.php b/classes/Profile.php index 5ace57004c..b8178e9b66 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -51,7 +51,7 @@ class Profile extends Managed_DataObject public static function schemaDef() { - return array( + $def = array( 'description' => 'local and remote users have profiles', 'fields' => array( 'id' => array('type' => 'serial', 'not null' => true, 'description' => 'unique identifier'), @@ -72,11 +72,16 @@ class Profile extends Managed_DataObject 'primary key' => array('id'), 'indexes' => array( 'profile_nickname_idx' => array('nickname'), - ), - 'fulltext indexes' => array( - 'nickname' => array('nickname', 'fullname', 'location', 'bio', 'homepage') - ), + ) ); + + // Add a fulltext index + + if (common_config('search', 'type') == 'fulltext') { + $def['fulltext indexes'] = array('nickname' => array('nickname', 'fullname', 'location', 'bio', 'homepage')); + } + + return $def; } function multiGet($keyCol, $keyVals, $skipNulls=true) diff --git a/lib/popularnoticesection.php b/lib/popularnoticesection.php index f6f27c6878..e66df8f423 100644 --- a/lib/popularnoticesection.php +++ b/lib/popularnoticesection.php @@ -69,6 +69,12 @@ class PopularNoticeSection extends NoticeSection function moreUrl() { - return common_local_url('favorited'); + if (common_config('singleuser', 'enabled')) { + $user = User::singleUser(); + common_local_url('showfavorites', array('nickname' => + $user->nickname)); + } else { + return common_local_url('favorited'); + } } } diff --git a/lib/schema.php b/lib/schema.php index aad705a533..92555499ba 100644 --- a/lib/schema.php +++ b/lib/schema.php @@ -107,9 +107,11 @@ class Schema { $td = $this->getTableDef($table); - foreach ($td->columns as $cd) { - if ($cd->name == $column) { - return $cd; + if (!empty($td) && !empty($td->columns)) { + foreach ($td->columns as $cd) { + if ($cd->name == $column) { + return $cd; + } } } @@ -560,12 +562,18 @@ class Schema $uniques = $this->diffArrays($old, $def, 'unique keys'); $indexes = $this->diffArrays($old, $def, 'indexes'); $foreign = $this->diffArrays($old, $def, 'foreign keys'); + $fulltext = $this->diffArrays($old, $def, 'fulltext indexes'); // Drop any obsolete or modified indexes ahead... foreach ($indexes['del'] + $indexes['mod'] as $indexName) { $this->appendDropIndex($statements, $tableName, $indexName); } + // Drop any obsolete or modified fulltext indexes ahead... + foreach ($fulltext['del'] + $fulltext['mod'] as $indexName) { + $this->appendDropIndex($statements, $tableName, $indexName); + } + // For efficiency, we want this all in one // query, instead of using our methods. @@ -622,6 +630,11 @@ class Schema $this->appendCreateIndex($statements, $tableName, $indexName, $def['indexes'][$indexName]); } + foreach ($fulltext['mod'] + $fulltext['add'] as $indexName) { + $colDef = $def['fulltext indexes'][$indexName]; + $this->appendCreateFulltextIndex($statements, $tableName, $indexName, $colDef); + } + return $statements; } diff --git a/lib/taggedprofilenoticestream.php b/lib/taggedprofilenoticestream.php index 9998b7d769..eec20cd8c6 100644 --- a/lib/taggedprofilenoticestream.php +++ b/lib/taggedprofilenoticestream.php @@ -47,7 +47,7 @@ if (!defined('STATUSNET')) { class TaggedProfileNoticeStream extends ScopingNoticeStream { - function __construct($profile, $tag, $userProfile) + function __construct($profile, $tag, $userProfile=-1) { if (is_int($userProfile) && $userProfile == -1) { $userProfile = Profile::current(); diff --git a/plugins/Activity/ActivityPlugin.php b/plugins/Activity/ActivityPlugin.php index 5801c194a6..0c7700d787 100644 --- a/plugins/Activity/ActivityPlugin.php +++ b/plugins/Activity/ActivityPlugin.php @@ -47,7 +47,7 @@ if (!defined('STATUSNET')) { class ActivityPlugin extends Plugin { const VERSION = '0.1'; - const SOURCE = 'system'; + const SOURCE = 'activity'; // Flags to switch off certain activity notices public $StartFollowUser = true; diff --git a/plugins/Directory/DirectoryPlugin.php b/plugins/Directory/DirectoryPlugin.php index 06cfca02ef..5979bb0e80 100644 --- a/plugins/Directory/DirectoryPlugin.php +++ b/plugins/Directory/DirectoryPlugin.php @@ -115,21 +115,20 @@ class DirectoryPlugin extends Plugin { $m->connect( - 'directory/users', + 'directory/users/:filter', array('action' => 'userdirectory'), - array('filter' => 'all') + array('filter' => '[0-9a-zA-Z]|(0-9)') ); $m->connect( - 'directory/users/:filter', - array('action' => 'userdirectory'), - array('filter' => '([0-9a-zA-Z_]{1,64}|0-9)') + 'directory/users', + array('action' => 'userdirectory') ); $m->connect( 'groups/:filter', array('action' => 'groupdirectory'), - array('filter' => '([0-9a-zA-Z_]{1,64}|0-9)') + array('filter' => '[0-9a-zA-Z]|(0-9)') ); $m->connect( diff --git a/plugins/Event/newevent.php b/plugins/Event/newevent.php index 34e83cd7e0..4c2157e01e 100644 --- a/plugins/Event/newevent.php +++ b/plugins/Event/newevent.php @@ -206,7 +206,7 @@ class NeweventAction extends Action throw new ClientException(_m('Event must have an end time.')); } - if (isset($this->url) && Validate::uri($this->url) === false) { + if (!empty($this->url) && Validate::uri($this->url) === false) { // TRANS: Client exception thrown when trying to post an event with an invalid URL. throw new ClientException(_m('URL must be valid.')); } diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index bc25b340e9..e6bc444ea4 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -293,8 +293,16 @@ class MobileProfilePlugin extends WAP20Plugin function _showLogo($action) { $action->elementStart('address', 'vcard'); + if (common_config('singleuser', 'enabled')) { + $user = User::singleUser(); + $url = common_local_url('showstream', array('nickname' => $user->nickname)); + } else { + $url = common_local_url('public'); + } + $action->elementStart('a', array('class' => 'url home bookmark', - 'href' => common_local_url('public'))); + 'href' => $url)); + if (common_config('site', 'mobilelogo') || file_exists(Theme::file('logo.png')) || file_exists(Theme::file('mobilelogo.png'))) { diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 360aaa0c0a..dfdec36899 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -54,19 +54,19 @@ class OStatusPlugin extends Plugin // Discovery actions $m->connect('main/ownerxrd', array('action' => 'ownerxrd')); - $m->connect('main/ostatus', - array('action' => 'ostatusinit')); $m->connect('main/ostatustag', array('action' => 'ostatustag')); $m->connect('main/ostatustag?nickname=:nickname', array('action' => 'ostatustag'), array('nickname' => '[A-Za-z0-9_-]+')); - $m->connect('main/ostatus?nickname=:nickname', + $m->connect('main/ostatus/nickname/:nickname', array('action' => 'ostatusinit'), array('nickname' => '[A-Za-z0-9_-]+')); - $m->connect('main/ostatus?group=:group', + $m->connect('main/ostatus/group/:group', array('action' => 'ostatusinit'), array('group' => '[A-Za-z0-9_-]+')); - $m->connect('main/ostatus?peopletag=:peopletag&tagger=:tagger', + $m->connect('main/ostatus/peopletag/:peopletag/tagger/:tagger', array('action' => 'ostatusinit'), array('tagger' => '[A-Za-z0-9_-]+', 'peopletag' => '[A-Za-z0-9_-]+')); + $m->connect('main/ostatus', + array('action' => 'ostatusinit')); // Remote subscription actions $m->connect('main/ostatussub', @@ -246,16 +246,16 @@ class OStatusPlugin extends Plugin $cur = common_current_user(); if (empty($cur)) { - $output->elementStart('li', 'entity_subscribe'); - $profile = $peopletag->getTagger(); + $widget->out->elementStart('li', 'entity_subscribe'); + $url = common_local_url('ostatusinit', array('group' => $group->nickname)); $widget->out->element('a', array('href' => $url, - 'class' => 'entity_remote_subscribe'), + 'class' => 'entity_remote_subscribe'), // TRANS: Link to subscribe to a remote entity. _m('Subscribe')); - $output->elementEnd('li'); + $widget->out->elementEnd('li'); return false; } @@ -752,11 +752,11 @@ class OStatusPlugin extends Plugin * deny the join. * * @param User_group $group - * @param User $user + * @param Profile $profile * * @return mixed hook return value */ - function onStartJoinGroup($group, $user) + function onStartJoinGroup($group, $profile) { $oprofile = Ostatus_profile::staticGet('group_id', $group->id); if ($oprofile) { @@ -768,15 +768,13 @@ class OStatusPlugin extends Plugin // NOTE: we don't use Group_member::asActivity() since that record // has not yet been created. - $member = Profile::staticGet($user->id); - $act = new Activity(); $act->id = TagURI::mint('join:%d:%d:%s', - $member->id, + $profile->id, $group->id, common_date_iso8601(time())); - $act->actor = ActivityObject::fromProfile($member); + $act->actor = ActivityObject::fromProfile($profile); $act->verb = ActivityVerb::JOIN; $act->object = $oprofile->asActivityObject(); @@ -786,10 +784,10 @@ class OStatusPlugin extends Plugin // TRANS: Success message for subscribe to group attempt through OStatus. // TRANS: %1$s is the member name, %2$s is the subscribed group's name. $act->content = sprintf(_m('%1$s has joined group %2$s.'), - $member->getBestName(), + $profile->getBestName(), $oprofile->getBestName()); - if ($oprofile->notifyActivity($act, $member)) { + if ($oprofile->notifyActivity($act, $profile)) { return true; } else { $oprofile->garbageCollect(); @@ -809,7 +807,7 @@ class OStatusPlugin extends Plugin * it'll be left with a stray membership record. * * @param User_group $group - * @param Profile $user + * @param Profile $profile * * @return mixed hook return value */ diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index 568e8fe391..f5284057e3 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -53,6 +53,13 @@ class OStatusQueueHandler extends QueueHandler $this->notice = $notice; $this->user = User::staticGet('id', $notice->profile_id); + try { + $profile = $this->notice->getProfile(); + } catch (Exception $e) { + common_log(LOG_ERR, "Can't get profile for notice; skipping: " . $e->getMessage()); + return true; + } + $this->pushUser(); foreach ($notice->getGroups() as $group) { diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index d2172dcf8d..287e48e484 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -188,7 +188,7 @@ class RealtimePlugin extends Plugin // Add to the public timeline if ($notice->is_local == Notice::LOCAL_PUBLIC || - ($notice->is_local == Notice::REMOTE_OMB && !common_config('public', 'localonly'))) { + ($notice->is_local == Notice::REMOTE && !common_config('public', 'localonly'))) { $paths[] = array('public', null, null); } @@ -294,9 +294,18 @@ class RealtimePlugin extends Plugin // root url from page output $action->elementStart('address'); + + if (common_config('singleuser', 'enabled')) { + $user = User::singleUser(); + $url = common_local_url('showstream', array('nickname' => $user->nickname)); + } else { + $url = common_local_url('public'); + } + $action->element('a', array('class' => 'url', - 'href' => common_local_url('public')), + 'href' => $url), ''); + $action->elementEnd('address'); $action->showContentBlock(); @@ -475,7 +484,7 @@ class RealtimePlugin extends Plugin break; case 'tag': $tag = $action->trimmed('tag'); - if (empty($tag)) { + if (!empty($tag)) { $arg1 = $tag; } else { $this->log(LOG_NOTICE, "Unexpected 'tag' action without tag argument"); diff --git a/plugins/SearchSub/SearchSubPlugin.php b/plugins/SearchSub/SearchSubPlugin.php index 600dae6c16..858474240e 100644 --- a/plugins/SearchSub/SearchSubPlugin.php +++ b/plugins/SearchSub/SearchSubPlugin.php @@ -108,7 +108,6 @@ class SearchSubPlugin extends Plugin $m->connect('search/:search/unsubscribe', array('action' => 'searchunsub'), array('search' => Router::REGEX_TAG)); - $m->connect(':nickname/search-subscriptions', array('action' => 'searchsubs'), array('nickname' => Nickname::DISPLAY_FMT)); diff --git a/plugins/SearchSub/searchsubmenu.php b/plugins/SearchSub/searchsubmenu.php index 5973eb8b93..2aabb7a5a6 100644 --- a/plugins/SearchSub/searchsubmenu.php +++ b/plugins/SearchSub/searchsubmenu.php @@ -92,9 +92,12 @@ class SearchSubMenu extends MoreMenu $id = $this->menuItemID($actionName, $args); } - // Add 'q' as a search param, not part of the url path - - $url = common_local_url($actionName, array(), $args); + if ($actionname == 'searchsub') { + // Add 'q' as a search param, not part of the url path + $url = common_local_url($actionName, array(), $args); + } else { + $url = common_local_url($actionName, $args); + } $this->out->menuItem($url, $label, diff --git a/plugins/Sitemap/SitemapPlugin.php b/plugins/Sitemap/SitemapPlugin.php index 36041cfc9a..29b822acd5 100644 --- a/plugins/Sitemap/SitemapPlugin.php +++ b/plugins/Sitemap/SitemapPlugin.php @@ -108,14 +108,14 @@ class SitemapPlugin extends Plugin $m->connect('sitemapindex.xml', array('action' => 'sitemapindex')); - $m->connect('/notice-sitemap-:year-:month-:day-:index.xml', + $m->connect('notice-sitemap-:year-:month-:day-:index.xml', array('action' => 'noticesitemap'), array('year' => '[0-9]{4}', 'month' => '[01][0-9]', 'day' => '[0123][0-9]', 'index' => '[1-9][0-9]*')); - $m->connect('/user-sitemap-:year-:month-:day-:index.xml', + $m->connect('user-sitemap-:year-:month-:day-:index.xml', array('action' => 'usersitemap'), array('year' => '[0-9]{4}', 'month' => '[01][0-9]', @@ -196,12 +196,6 @@ class SitemapPlugin extends Plugin null, false), new ColumnDef('modified', 'timestamp'))); - $userCreated = $schema->getColumnDef('user', 'created'); - - if (empty($userCreated) || $userCreated->key != 'MUL') { - $schema->createIndex('user', 'created'); - } - return true; } diff --git a/plugins/SubscriptionThrottle/SubscriptionThrottlePlugin.php b/plugins/SubscriptionThrottle/SubscriptionThrottlePlugin.php index 829219af20..9e6fc9cab7 100644 --- a/plugins/SubscriptionThrottle/SubscriptionThrottlePlugin.php +++ b/plugins/SubscriptionThrottle/SubscriptionThrottlePlugin.php @@ -81,15 +81,15 @@ class SubscriptionThrottlePlugin extends Plugin /** * Filter group joins to see if they're coming too fast. * - * @param Group $group The group being joined - * @param User $user The user joining + * @param Group $group The group being joined + * @param Profile $profile The profile joining * * @return boolean hook value */ - function onStartJoinGroup($group, $user) + function onStartJoinGroup($group, $profile) { foreach ($this->groupLimits as $seconds => $limit) { - $mem = $this->_getNthMem($user, $limit); + $mem = $this->_getNthMem($profile, $limit); if (!empty($mem)) { $jointime = strtotime($mem->created); @@ -130,16 +130,16 @@ class SubscriptionThrottlePlugin extends Plugin /** * Get the Nth most recent group membership for this user * - * @param User $user The user to get memberships for - * @param integer $n How far to count back + * @param Profile $profile The user to get memberships for + * @param integer $n How far to count back * * @return Group_member a membership or null */ - private function _getNthMem($user, $n) + private function _getNthMem($profile, $n) { $mem = new Group_member(); - $mem->profile_id = $user->id; + $mem->profile_id = $profile->id; $mem->orderBy('created DESC'); $mem->limit($n - 1, 1); diff --git a/plugins/TwitterBridge/twitterauthorization.php b/plugins/TwitterBridge/twitterauthorization.php index 22d7a7fbdc..1a7234214e 100644 --- a/plugins/TwitterBridge/twitterauthorization.php +++ b/plugins/TwitterBridge/twitterauthorization.php @@ -357,6 +357,75 @@ class TwitterauthorizationAction extends Action $this->elementStart('fieldset', array('id' => 'settings_twitter_connect_options')); // TRANS: Fieldset legend. $this->element('legend', null, _m('Connection options')); + + $this->hidden('access_token_key', $this->access_token->key); + $this->hidden('access_token_secret', $this->access_token->secret); + $this->hidden('twuid', $this->twuid); + $this->hidden('tw_fields_screen_name', $this->tw_fields['screen_name']); + $this->hidden('tw_fields_name', $this->tw_fields['fullname']); + $this->hidden('token', common_session_token()); + + // Don't allow new account creation if site is flagged as invite only + if (common_config('site', 'inviteonly') == false) { + $this->elementStart('fieldset'); + $this->element('legend', null, + // TRANS: Fieldset legend. + _m('Create new account')); + $this->element('p', null, + // TRANS: Sub form introduction text. + _m('Create a new user with this nickname.')); + $this->elementStart('ul', 'form_data'); + + // Hook point for captcha etc + Event::handle('StartRegistrationFormData', array($this)); + + $this->elementStart('li'); + // TRANS: Field label. + $this->input('newname', _m('New nickname'), + ($this->username) ? $this->username : '', + // TRANS: Field title for nickname field. + _m('1-64 lowercase letters or numbers, no punctuation or spaces.')); + $this->elementEnd('li'); + $this->elementStart('li'); + // TRANS: Field label. + $this->input('email', _m('LABEL','Email'), $this->getEmail(), + // TRANS: Field title for e-mail address field. + _m('Used only for updates, announcements, '. + 'and password recovery')); + $this->elementEnd('li'); + + // Hook point for captcha etc + Event::handle('EndRegistrationFormData', array($this)); + + $this->elementEnd('ul'); + // TRANS: Button text for creating a new StatusNet account in the Twitter connect page. + $this->submit('create', _m('BUTTON','Create')); + $this->elementEnd('fieldset'); + } + + $this->elementStart('fieldset'); + $this->element('legend', null, + // TRANS: Fieldset legend. + _m('Connect existing account')); + $this->element('p', null, + // TRANS: Sub form introduction text. + _m('If you already have an account, login with your username and password to connect it to your Twitter account.')); + $this->elementStart('ul', 'form_data'); + $this->elementStart('li'); + // TRANS: Field label. + $this->input('nickname', _m('Existing nickname')); + $this->elementEnd('li'); + $this->elementStart('li'); + // TRANS: Field label. + $this->password('password', _m('Password')); + $this->elementEnd('li'); + $this->elementEnd('ul'); + $this->elementEnd('fieldset'); + + $this->elementStart('fieldset'); + $this->element('legend', null, + // TRANS: Fieldset legend. + _m('License')); $this->elementStart('ul', 'form_data'); $this->elementStart('li'); $this->element('input', array('type' => 'checkbox', @@ -379,69 +448,9 @@ class TwitterauthorizationAction extends Action $this->elementEnd('label'); $this->elementEnd('li'); $this->elementEnd('ul'); - $this->hidden('access_token_key', $this->access_token->key); - $this->hidden('access_token_secret', $this->access_token->secret); - $this->hidden('twuid', $this->twuid); - $this->hidden('tw_fields_screen_name', $this->tw_fields['screen_name']); - $this->hidden('tw_fields_name', $this->tw_fields['fullname']); - - $this->elementStart('fieldset'); - $this->hidden('token', common_session_token()); - $this->element('legend', null, - // TRANS: Fieldset legend. - _m('Create new account')); - $this->element('p', null, - // TRANS: Sub form introduction text. - _m('Create a new user with this nickname.')); - $this->elementStart('ul', 'form_data'); - - // Hook point for captcha etc - Event::handle('StartRegistrationFormData', array($this)); - - $this->elementStart('li'); - // TRANS: Field label. - $this->input('newname', _m('New nickname'), - ($this->username) ? $this->username : '', - // TRANS: Field title for nickname field. - _m('1-64 lowercase letters or numbers, no punctuation or spaces.')); - $this->elementEnd('li'); - $this->elementStart('li'); - // TRANS: Field label. - $this->input('email', _m('LABEL','Email'), $this->getEmail(), - // TRANS: Field title for e-mail address field. - _m('Used only for updates, announcements, '. - 'and password recovery')); - $this->elementEnd('li'); - - // Hook point for captcha etc - Event::handle('EndRegistrationFormData', array($this)); - - $this->elementEnd('ul'); - // TRANS: Button text for creating a new StatusNet account in the Twitter connect page. - $this->submit('create', _m('BUTTON','Create')); $this->elementEnd('fieldset'); - - $this->elementStart('fieldset'); - $this->element('legend', null, - // TRANS: Fieldset legend. - _m('Connect existing account')); - $this->element('p', null, - // TRANS: Sub form introduction text. - _m('If you already have an account, login with your username and password to connect it to your Twitter account.')); - $this->elementStart('ul', 'form_data'); - $this->elementStart('li'); - // TRANS: Field label. - $this->input('nickname', _m('Existing nickname')); - $this->elementEnd('li'); - $this->elementStart('li'); - // TRANS: Field label. - $this->password('password', _m('Password')); - $this->elementEnd('li'); - $this->elementEnd('ul'); // TRANS: Button text for connecting an existing StatusNet account in the Twitter connect page.. $this->submit('connect', _m('BUTTON','Connect')); - $this->elementEnd('fieldset'); - $this->elementEnd('fieldset'); $this->elementEnd('form'); } diff --git a/scripts/createsim.php b/scripts/createsim.php index 64ad907cb0..21ed38fd56 100644 --- a/scripts/createsim.php +++ b/scripts/createsim.php @@ -149,7 +149,7 @@ function newNotice($i, $tagmax) $options['scope'] |= Notice::SITE_SCOPE; } - $notice = Notice::saveNew($user->id, $content, 'system', $options); + $notice = Notice::saveNew($user->id, $content, 'createsim', $options); } function newSub($i) diff --git a/theme/base/css/display.css b/theme/base/css/display.css index f5638e58ab..75e48c0958 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1502,16 +1502,16 @@ content:'☠'; font-size:150%; } -#content .notice-source-system div.entry-title, .notice-source-system div.entry-content { +#content .notice-source-activity div.entry-title, .notice-source-activity div.entry-content { margin-left: 0; } -#content .notice-source-system div.entry-title { +#content .notice-source-activity div.entry-title { font-style: italic; min-height: 0; } -#content .notice-source-system .notice div.entry-title { +#content .notice-source-activity .notice div.entry-title { font-style: normal; }