summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/designsettings.php227
-rw-r--r--actions/invite.php2
-rw-r--r--actions/replies.php3
-rw-r--r--actions/usergroups.php3
-rw-r--r--classes/Design.php57
-rw-r--r--classes/User.php12
-rwxr-xr-x[-rw-r--r--]classes/laconica.ini14
-rw-r--r--db/laconica.sql14
-rw-r--r--lib/attachmentlist.php1
-rw-r--r--lib/common.php8
-rw-r--r--lib/currentuserdesignaction.php (renamed from lib/personal.php)41
-rw-r--r--lib/galleryaction.php3
-rw-r--r--lib/mailbox.php8
-rw-r--r--lib/noticelist.php1
-rw-r--r--lib/ownerdesignaction.php72
-rw-r--r--lib/profileaction.php3
-rw-r--r--lib/settingsaction.php2
-rw-r--r--lib/stream.php32
18 files changed, 336 insertions, 167 deletions
diff --git a/actions/designsettings.php b/actions/designsettings.php
index 5774b8537..8595cbc4c 100644
--- a/actions/designsettings.php
+++ b/actions/designsettings.php
@@ -22,6 +22,7 @@
* @category Settings
* @package Laconica
* @author Sarven Capadisli <csarven@controlyourself.ca>
+ * @author Zach Copley <zach@controlyourself.ca>
* @copyright 2008-2009 Control Yourself, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
@@ -33,8 +34,6 @@ if (!defined('LACONICA')) {
require_once INSTALLDIR.'/lib/accountsettingsaction.php';
-
-
class DesignsettingsAction extends AccountSettingsAction
{
/**
@@ -100,61 +99,82 @@ class DesignsettingsAction extends AccountSettingsAction
$this->element('legend', null, _('Change colours'));
$this->elementStart('ul', 'form_data');
- //This is a JSON object in the DB field. Here for testing. Remove later.
- $userSwatch = '{"body":{"background-color":"#F0F2F5"},
- "#content":{"background-color":"#FFFFFF"},
- "#aside_primary":{"background-color":"#CEE1E9"},
- "html body":{"color":"#000000"},
- "a":{"color":"#002E6E"}}';
-
- //Default theme swatch -- Where should this be stored?
- $defaultSwatch = array('body' => array('background-color' => '#F0F2F5'),
- '#content' => array('background-color' => '#FFFFFF'),
- '#aside_primary' => array('background-color' => '#CEE1E9'),
- 'html body' => array('color' => '#000000'),
- 'a' => array('color' => '#002E6E'));
-
- $userSwatch = ($userSwatch) ? json_decode($userSwatch, true) : $defaultSwatch;
-
- $s = 0;
- $labelSwatch = array('Background',
- 'Content',
- 'Sidebar',
- 'Text',
- 'Links');
- foreach($userSwatch as $propertyvalue => $value) {
- $foo = array_values($value);
- $this->elementStart('li');
- $this->element('label', array('for' => 'swatch-'.$s), _($labelSwatch[$s]));
- $this->element('input', array('name' => 'swatch-'.$s, //prefer swatch[$s] ?
- 'type' => 'text',
- 'id' => 'swatch-'.$s,
- 'class' => 'swatch',
- 'maxlength' => '7',
- 'size' => '7',
- 'value' => $foo[0]));
- $this->elementEnd('li');
- $s++;
+ $design = $user->getDesign();
+
+ if (empty($design)) {
+ $design = $this->defaultDesign();
}
- $this->elementEnd('ul');
- $this->elementEnd('fieldset');
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'swatch-5'), _('Background'));
+ $this->element('input', array('name' => 'design_background',
+ 'type' => 'text',
+ 'id' => 'swatch-5',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => $design->backgroundcolor));
+ $this->elementEnd('li');
+
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'swatch-1'), _('Content'));
+ $this->element('input', array('name' => 'design_content',
+ 'type' => 'text',
+ 'id' => 'swatch-1',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => $design->contentcolor));
+ $this->elementEnd('li');
+
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'swatch-2'), _('Sidebar'));
+ $this->element('input', array('name' => 'design_sidebar',
+ 'type' => 'text',
+ 'id' => 'swatch-2',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => $design->sidebarcolor));
+ $this->elementEnd('li');
+
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'swatch-3'), _('Text'));
+ $this->element('input', array('name' => 'design_text',
+ 'type' => 'text',
+ 'id' => 'swatch-3',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => $design->textcolor));
+ $this->elementEnd('li');
+
+ $this->elementStart('li');
+ $this->element('label', array('for' => 'swatch-4'), _('Links'));
+ $this->element('input', array('name' => 'design_links',
+ 'type' => 'text',
+ 'id' => 'swatch-4',
+ 'class' => 'swatch',
+ 'maxlength' => '7',
+ 'size' => '7',
+ 'value' => $design->linkcolor));
+
+ $this->elementEnd('li');
+
+ $this->elementEnd('ul');
+ $this->elementEnd('fieldset');
+
+ $this->element('input', array('id' => 'settings_design_reset',
+ 'type' => 'reset',
+ 'value' => 'Reset',
+ 'class' => 'submit form_action-primary',
+ 'title' => _('Reset back to default')));
+
+ $this->submit('save', _('Save'), 'submit form_action-secondary',
+ 'save', _('Save design'));
- $this->element('input', array('id' => 'settings_design_reset',
- 'type' => 'reset',
- 'value' => 'Reset',
- 'class' => 'submit form_action-primary',
- 'title' => _('Reset back to default')));
- $this->submit('save', _('Save'), 'submit form_action-secondary', 'save', _('Save design'));
-
-/*TODO: Check submitted form values:
-json_encode(form values)
-if submitted Swatch == DefaultSwatch, don't store in DB.
-else store in BD
-*/
$this->elementEnd('fieldset');
$this->elementEnd('form');
-
}
/**
@@ -168,63 +188,23 @@ else store in BD
function handlePost()
{
- /*
// CSRF protection
-
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
$this->showForm(_('There was a problem with your session token. '.
- 'Try again, please.'));
- return;
- }
-
- $user = common_current_user();
- assert(!is_null($user)); // should already be checked
-
- // FIXME: scrub input
-
- $newpassword = $this->arg('newpassword');
- $confirm = $this->arg('confirm');
-
- # Some validation
-
- if (strlen($newpassword) < 6) {
- $this->showForm(_('Password must be 6 or more characters.'));
- return;
- } else if (0 != strcmp($newpassword, $confirm)) {
- $this->showForm(_('Passwords don\'t match.'));
- return;
- }
-
- if ($user->password) {
- $oldpassword = $this->arg('oldpassword');
-
- if (!common_check_user($user->nickname, $oldpassword)) {
- $this->showForm(_('Incorrect old password'));
- return;
- }
- }
-
- $original = clone($user);
-
- $user->password = common_munge_password($newpassword, $user->id);
-
- $val = $user->validate();
- if ($val !== true) {
- $this->showForm(_('Error saving user; invalid.'));
+ 'Try again, please.'));
return;
}
- if (!$user->update($original)) {
- $this->serverError(_('Can\'t save new password.'));
- return;
+ if ($this->arg('save')) {
+ $this->saveDesign();
+ } else if ($this->arg('reset')) {
+ $this->resetDesign();
+ } else {
+ $this->showForm(_('Unexpected form submission.'));
}
-
- $this->showForm(_('Password saved.'), true);
- */
}
-
/**
* Add the Farbtastic stylesheet
*
@@ -261,4 +241,53 @@ else store in BD
$this->element('script', array('type' => 'text/javascript',
'src' => $farbtasticGo));
}
+
+ /**
+ * Get a default user design
+ *
+ * @return Design design
+ */
+
+ function defaultDesign()
+ {
+ $defaults = common_config('site', 'design');
+
+ $design = new Design();
+ $design->backgroundcolor = $defaults['backgroundcolor'];
+ $design->contentcolor = $defaults['contentcolor'];
+ $design->sidebarcolor = $defaults['sidebarcolor'];
+ $design->textcolor = $defaults['textcolor'];
+ $design->linkcolor = $defaults['linkcolor'];
+ $design->backgroundimage = $defaults['backgroundimage'];
+
+ return $design;
+ }
+
+ /**
+ * Save the user's design settings
+ *
+ * @return void
+ */
+
+ function saveDesign()
+ {
+ $user = common_current_user();
+
+
+
+ $this->showForm(_('Design preferences saved.'), true);
+ }
+
+ /**
+ * Reset design settings to previous saved value if any, or
+ * the defaults
+ *
+ * @return void
+ */
+
+ function resetDesign()
+ {
+ $this->showForm(_('Design preferences reset.'), true);
+ }
+
}
diff --git a/actions/invite.php b/actions/invite.php
index 7e52cdbcc..c793f5824 100644
--- a/actions/invite.php
+++ b/actions/invite.php
@@ -19,7 +19,7 @@
if (!defined('LACONICA')) { exit(1); }
-class InviteAction extends Action
+class InviteAction extends CurrentUserDesignAction
{
var $mode = null;
var $error = null;
diff --git a/actions/replies.php b/actions/replies.php
index eac4d0a3a..d7ed440e9 100644
--- a/actions/replies.php
+++ b/actions/replies.php
@@ -45,9 +45,8 @@ require_once INSTALLDIR.'/lib/feedlist.php';
* @link http://laconi.ca/
*/
-class RepliesAction extends Action
+class RepliesAction extends OwnerDesignAction
{
- var $user = null;
var $page = null;
/**
diff --git a/actions/usergroups.php b/actions/usergroups.php
index e3088dcbd..7ead6e6e4 100644
--- a/actions/usergroups.php
+++ b/actions/usergroups.php
@@ -46,9 +46,8 @@ require_once INSTALLDIR.'/lib/grouplist.php';
* @link http://laconi.ca/
*/
-class UsergroupsAction extends Action
+class UsergroupsAction extends OwnerDesignAction
{
- var $user = null;
var $page = null;
var $profile = null;
diff --git a/classes/Design.php b/classes/Design.php
new file mode 100644
index 000000000..bb1e917e3
--- /dev/null
+++ b/classes/Design.php
@@ -0,0 +1,57 @@
+<?php
+/*
+ * Laconica - the distributed open-source microblogging tool
+ * Copyright (C) 2009, Control Yourself, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+if (!defined('LACONICA')) { exit(1); }
+
+/**
+ * Table Definition for design
+ */
+
+require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
+
+class Design extends Memcached_DataObject
+{
+ ###START_AUTOCODE
+ /* the code below is auto generated do not remove the above tag */
+
+ public $__table = 'design'; // table name
+ public $id; // int(4) primary_key not_null
+ public $backgroundcolor; // int(4)
+ public $contentcolor; // int(4)
+ public $sidebarcolor; // int(4)
+ public $textcolor; // int(4)
+ public $linkcolor; // int(4)
+ public $backgroundimage; // varchar(255)
+
+ /* Static get */
+ function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Design',$k,$v); }
+
+ /* the code above is auto generated do not remove the tag below */
+ ###END_AUTOCODE
+
+ function showCSS($out)
+ {
+ $out->element('stylesheet', array('type' => 'text/css'),
+ 'body { background-color: #' . dechex($this->backgroundcolor) . '} '."\n".
+ '#content { background-color #' . dechex($this->contentcolor) . '} '."\n".
+ '#aside_primary { background-color #'. dechex($this->sidebarcolor) .'} '."\n".
+ 'html body { color: #'. dechex($this->textcolor) .'} '."\n".
+ 'a { color: #' . dechex($this->linkcolor) . '} '."\n");
+ }
+}
diff --git a/classes/User.php b/classes/User.php
index 08a166d5a..c7eede94e 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -62,14 +62,13 @@ class User extends Memcached_DataObject
public $autosubscribe; // tinyint(1)
public $urlshorteningservice; // varchar(50) default_ur1.ca
public $inboxed; // tinyint(1)
+ public $design_id; // int(4)
+ public $viewdesigns; // tinyint(1) default_1
public $created; // datetime() not_null
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
- function staticGet($k,$v=NULL)
- {
- return Memcached_DataObject::staticGet('User',$k,$v);
- }
+ function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('User',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -684,4 +683,9 @@ class User extends Memcached_DataObject
return ($cnt > 0);
}
+
+ function getDesign()
+ {
+ return Design::staticGet('id', $this->design_id);
+ }
}
diff --git a/classes/laconica.ini b/classes/laconica.ini
index df292bbff..c04ae758f 100644..100755
--- a/classes/laconica.ini
+++ b/classes/laconica.ini
@@ -38,6 +38,18 @@ modified = 384
[consumer__keys]
consumer_key = K
+[design]
+id = 129
+backgroundcolor = 1
+contentcolor = 1
+sidebarcolor = 1
+textcolor = 1
+linkcolor = 1
+backgroundimage = 2
+
+[design__keys]
+id = N
+
[fave]
notice_id = 129
user_id = 129
@@ -430,6 +442,8 @@ uri = 2
autosubscribe = 17
urlshorteningservice = 2
inboxed = 17
+design_id = 1
+viewdesigns = 17
created = 142
modified = 384
diff --git a/db/laconica.sql b/db/laconica.sql
index b8c0824f5..bd95d1ade 100644
--- a/db/laconica.sql
+++ b/db/laconica.sql
@@ -41,6 +41,7 @@ create table sms_carrier (
/* local users */
create table user (
+
id integer primary key comment 'foreign key to profile table' references profile (id),
nickname varchar(64) unique key comment 'nickname or username, duped in profile',
password varchar(255) comment 'salted password, can be null for OpenID users',
@@ -69,6 +70,9 @@ create table user (
autosubscribe tinyint default 0 comment 'automatically subscribe to users who subscribe to us',
urlshorteningservice varchar(50) default 'ur1.ca' comment 'service to use for auto-shortening URLs',
inboxed tinyint default 0 comment 'has an inbox been created for this user?',
+ design_id integer comment 'id of a design' references design(id),
+ viewdesigns tinyint default 1 comment 'whether to view user-provided designs',
+
created datetime not null comment 'date this record was created',
modified timestamp comment 'date this record was modified',
@@ -484,6 +488,16 @@ create table file_to_post (
unique(file_id, post_id)
) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+create table design (
+ id integer primary key auto_increment comment 'design ID',
+ backgroundcolor integer comment 'main background color',
+ contentcolor integer comment 'content area background color',
+ sidebarcolor integer comment 'sidebar background color',
+ textcolor integer comment 'text color',
+ linkcolor integer comment 'link color',
+ backgroundimage varchar(255) comment 'background image, if any'
+) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin;
+
create table group_block (
group_id integer not null comment 'group profile is blocked from' references user_group (id),
blocked integer not null comment 'profile that is blocked' references profile (id),
diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php
index 45e4fa319..e1726df28 100644
--- a/lib/attachmentlist.php
+++ b/lib/attachmentlist.php
@@ -46,7 +46,6 @@ if (!defined('LACONICA')) {
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
* @see Notice
- * @see StreamAction
* @see NoticeListItem
* @see ProfileNoticeList
*/
diff --git a/lib/common.php b/lib/common.php
index b4e87445e..eb3bf4e4d 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -71,6 +71,14 @@ $config =
array('name' => 'Just another Laconica microblog',
'server' => $_server,
'theme' => 'default',
+ 'skin' => 'default',
+ 'design' =>
+ array('backgroundcolor' => '#F0F2F5',
+ 'contentcolor' => '#FFFFFF',
+ 'sidebarcolor' => '#CEE1E9',
+ 'textcolor' => '#000000',
+ 'linkcolor' => '#002E6E',
+ 'backgroundimage' => null),
'path' => $_path,
'logfile' => null,
'logo' => null,
diff --git a/lib/personal.php b/lib/currentuserdesignaction.php
index f92732375..297525655 100644
--- a/lib/personal.php
+++ b/lib/currentuserdesignaction.php
@@ -2,7 +2,7 @@
/**
* Laconica, the distributed open-source microblogging tool
*
- * User profile page
+ * Base class for actions that use the current user's design
*
* PHP version 5
*
@@ -19,11 +19,10 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
- * @category Personal
+ * @category Action
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
- * @author Sarven Capadisli <csarven@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @copyright 2009 Control Yourself, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
*/
@@ -33,28 +32,38 @@ if (!defined('LACONICA')) {
}
/**
- * Base class for user profile page
+ * Base class for actions that use the current user's design
*
- * @category Personal
+ * Some pages (settings in particular) use the current user's chosen
+ * design. This superclass returns that design.
+ *
+ * @category Action
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
+ *
*/
-class PersonalAction extends Action
+class CurrentUserDesignAction extends Action
{
+ /**
+ * A design for this action
+ *
+ * if the user attribute has been set, returns that user's
+ * design.
+ *
+ * @return Design a design object to use
+ */
- var $user = null;
-
- function isReadOnly($args)
+ function getDesign()
{
- return true;
- }
+ $cur = common_current_user();
- function handle($args)
- {
- parent::handle($args);
- }
+ if (empty($cur)) {
+ return null;
+ }
+ return $cur->getDesign();
+ }
}
diff --git a/lib/galleryaction.php b/lib/galleryaction.php
index 8fa11a756..498c82851 100644
--- a/lib/galleryaction.php
+++ b/lib/galleryaction.php
@@ -27,10 +27,9 @@ require_once INSTALLDIR.'/lib/profilelist.php';
define('AVATARS_PER_PAGE', 80);
-class GalleryAction extends Action
+class GalleryAction extends OwnerDesignAction
{
var $profile = null;
- var $user = null;
var $page = null;
var $tag = null;
diff --git a/lib/mailbox.php b/lib/mailbox.php
index 01bbf5721..766510a47 100644
--- a/lib/mailbox.php
+++ b/lib/mailbox.php
@@ -47,11 +47,11 @@ define('MESSAGES_PER_PAGE', 20);
* @see OutboxAction
*/
-class MailboxAction extends PersonalAction
+class MailboxAction extends CurrentUserDesignAction
{
var $page = null;
- function prepare($args)
+ function prepare($args)
{
parent::prepare($args);
@@ -265,12 +265,12 @@ class MailboxAction extends PersonalAction
* Returns either the name (and link) of the API client that posted the notice,
* or one of other other channels.
*
- * @param string $source the source of the message
+ * @param string $source the source of the message
*
* @return void
*/
- function showSource($source)
+ function showSource($source)
{
$source_name = _($source);
switch ($source) {
diff --git a/lib/noticelist.php b/lib/noticelist.php
index c312292ab..ad792441a 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -50,7 +50,6 @@ require_once INSTALLDIR.'/lib/attachmentlist.php';
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
* @see Notice
- * @see StreamAction
* @see NoticeListItem
* @see ProfileNoticeList
*/
diff --git a/lib/ownerdesignaction.php b/lib/ownerdesignaction.php
new file mode 100644
index 000000000..c47633bdb
--- /dev/null
+++ b/lib/ownerdesignaction.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Laconica, the distributed open-source microblogging tool
+ *
+ * Base class for actions that use the page owner's design
+ *
+ * PHP version 5
+ *
+ * LICENCE: This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @category Action
+ * @package Laconica
+ * @author Evan Prodromou <evan@controlyourself.ca>
+ * @copyright 2009 Control Yourself, Inc.
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://laconi.ca/
+ */
+
+if (!defined('LACONICA')) {
+ exit(1);
+}
+
+/**
+ * Base class for actions that use the page owner's design
+ *
+ * Some pages have a clear "owner" -- like the profile page, subscriptions
+ * pages, etc. This superclass uses that owner's chosen design for the page
+ * design.
+ *
+ * @category Action
+ * @package Laconica
+ * @author Evan Prodromou <evan@controlyourself.ca>
+ * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
+ * @link http://laconi.ca/
+ *
+ */
+
+class OwnerDesignAction extends Action {
+
+ /** The user for this page. */
+
+ var $user = null;
+
+ /**
+ * A design for this action
+ *
+ * if the user attribute has been set, returns that user's
+ * design.
+ *
+ * @return Design a design object to use
+ */
+
+ function getDesign()
+ {
+ if (empty($this->user)) {
+ return null;
+ }
+
+ return $this->user->getDesign();
+ }
+}
diff --git a/lib/profileaction.php b/lib/profileaction.php
index 298f34b22..2519922b2 100644
--- a/lib/profileaction.php
+++ b/lib/profileaction.php
@@ -47,9 +47,8 @@ require_once INSTALLDIR.'/lib/groupminilist.php';
* @link http://laconi.ca/
*/
-class ProfileAction extends Action
+class ProfileAction extends OwnerDesignAction
{
- var $user = null;
var $page = null;
var $profile = null;
var $tag = null;
diff --git a/lib/settingsaction.php b/lib/settingsaction.php
index db20c5804..17d3a2f64 100644
--- a/lib/settingsaction.php
+++ b/lib/settingsaction.php
@@ -43,7 +43,7 @@ if (!defined('LACONICA')) {
* @see Widget
*/
-class SettingsAction extends Action
+class SettingsAction extends CurrentUserDesignAction
{
/**
* A message for the user.
diff --git a/lib/stream.php b/lib/stream.php
deleted file mode 100644
index 0cb9e0bf4..000000000
--- a/lib/stream.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-if (!defined('LACONICA')) { exit(1); }
-
-require_once(INSTALLDIR.'/lib/personal.php');
-require_once(INSTALLDIR.'/lib/noticelist.php');
-
-class StreamAction extends PersonalAction
-{
- function show_notice_list($notice)
- {
- $nl = new NoticeList($notice);
- return $nl->show();
- }
-}