From 03ccb74052ccec209adedfcd9daf4648905b322b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 9 Jul 2009 18:22:46 -0400 Subject: 0.9.0 dev version --- lib/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.php b/lib/common.php index 832667d81..d3f7f1b2b 100644 --- a/lib/common.php +++ b/lib/common.php @@ -19,7 +19,7 @@ if (!defined('LACONICA')) { exit(1); } -define('LACONICA_VERSION', '0.8.0'); +define('LACONICA_VERSION', '0.9.0dev'); define('AVATAR_PROFILE_SIZE', 96); define('AVATAR_STREAM_SIZE', 48); -- cgit v1.2.3-54-g00ecf From ae6a3e258d58c863fb54c1c2b06a426fccb5a689 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 14 Jul 2009 03:45:12 +0800 Subject: Adds HTTP basic authentication for private RSS 1.0 feeds --- index.php | 3 ++- lib/rssaction.php | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 5f9a048f2..69c0bc1b2 100644 --- a/index.php +++ b/index.php @@ -165,7 +165,8 @@ function main() if (!$user && common_config('site', 'private') && !in_array($action, array('login', 'openidlogin', 'finishopenidlogin', - 'recoverpassword', 'api', 'doc', 'register'))) { + 'recoverpassword', 'api', 'doc', 'register')) && + !preg_match('/rss$/', $action)) { common_redirect(common_local_url('login')); return; } diff --git a/lib/rssaction.php b/lib/rssaction.php index fe3fd6f4a..dceabcbec 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -96,6 +96,28 @@ class Rss10Action extends Action { // Parent handling, including cache check parent::handle($args); + + if (common_config('site', 'private')) { + if (!isset($_SERVER['PHP_AUTH_USER'])) { + + # This header makes basic auth go + header('WWW-Authenticate: Basic realm="Laconica RSS"'); + + # If the user hits cancel -- bam! + $this->show_basic_auth_error(); + return; + } else { + $nickname = $_SERVER['PHP_AUTH_USER']; + $password = $_SERVER['PHP_AUTH_PW']; + + if (!common_check_user($nickname, $password)) { + # basic authentication failed + $this->show_basic_auth_error(); + return; + } + } + } + // Get the list of notices if (empty($this->tag)) { $this->notices = $this->getNotices($this->limit); @@ -105,6 +127,18 @@ class Rss10Action extends Action $this->showRss(); } + function show_basic_auth_error() + { + header('HTTP/1.1 401 Unauthorized'); + header('Content-Type: application/xml; charset=utf-8'); + $this->startXML(); + $this->elementStart('hash'); + $this->element('error', null, 'Could not authenticate you.'); + $this->element('request', null, $_SERVER['REQUEST_URI']); + $this->elementEnd('hash'); + $this->endXML(); + } + /** * Get the notices to output in this stream * -- cgit v1.2.3-54-g00ecf From 7cfb2f569dbda8ef84149604cec88b2349d95306 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 9 Jul 2009 18:22:46 -0400 Subject: 0.9.0 dev version --- lib/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.php b/lib/common.php index 9d7954fa9..764c5a077 100644 --- a/lib/common.php +++ b/lib/common.php @@ -19,7 +19,7 @@ if (!defined('LACONICA')) { exit(1); } -define('LACONICA_VERSION', '0.8.1dev'); +define('LACONICA_VERSION', '0.9.0dev'); define('AVATAR_PROFILE_SIZE', 96); define('AVATAR_STREAM_SIZE', 48); -- cgit v1.2.3-54-g00ecf From 5015505f16c9ce412e6f5535f80188f33d24c4ea Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Fri, 17 Jul 2009 16:44:14 +0800 Subject: Added failed auth logging (like in actions/api.php) --- lib/rssaction.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/rssaction.php b/lib/rssaction.php index dceabcbec..15c238bf9 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -112,6 +112,9 @@ class Rss10Action extends Action if (!common_check_user($nickname, $password)) { # basic authentication failed + list($proxy, $ip) = common_client_ip(); + + common_log(LOG_WARNING, "Failed RSS auth attempt, nickname = $nickname, proxy = $proxy, ip = $ip."); $this->show_basic_auth_error(); return; } -- cgit v1.2.3-54-g00ecf From 711ade9835f3523dcf83702834adef313f9cf54d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 20 Jul 2009 14:01:51 +1200 Subject: look for full unicode when saving tags --- classes/Notice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 101fadb67..12b47f360 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -97,11 +97,11 @@ class Notice extends Memcached_DataObject function saveTags() { /* extract all #hastags */ - $count = preg_match_all('/(?:^|\s)#([A-Za-z0-9_\-\.]{1,64})/', strtolower($this->content), $match); + $count = preg_match_all('/(?:^|\s)#([\pL\pN_\-\.]{1,64})/', strtolower($this->content), $match); if (!$count) { return true; } - + /* Add them to the database */ foreach(array_unique($match[1]) as $hashtag) { /* elide characters we don't want in the tag */ -- cgit v1.2.3-54-g00ecf From 590982612206acaa902d7bc87429ec4296bfa17f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 20 Jul 2009 14:02:26 +1200 Subject: show full utf8 in tags --- lib/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index 9e8ec41d2..edc396cc0 100644 --- a/lib/util.php +++ b/lib/util.php @@ -404,7 +404,7 @@ function common_render_text($text) $r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r); $r = common_replace_urls_callback($r, 'common_linkify'); - $r = preg_replace('/(^|\(|\[|\s+)#([A-Za-z0-9_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); + $r = preg_replace('/(^|\(|\[|\s+)#([\pL\pN_\-\.]{1,64})/e', "'\\1#'.common_tag_link('\\2')", $r); // XXX: machine tags return $r; } -- cgit v1.2.3-54-g00ecf From 76dd061a34782010d5650d5513bd4d4873e0045c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 20 Jul 2009 14:02:52 +1200 Subject: allow full unicode into links for tags --- lib/router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/router.php b/lib/router.php index 5e0fcfc94..8e4836497 100644 --- a/lib/router.php +++ b/lib/router.php @@ -211,7 +211,7 @@ class Router array('tag' => '[a-zA-Z0-9]+')); $m->connect('tag/:tag', array('action' => 'tag'), - array('tag' => '[a-zA-Z0-9]+')); + array('tag' => '[\pL\pN_\-\.]{1,64}')); $m->connect('peopletag/:tag', array('action' => 'peopletag'), -- cgit v1.2.3-54-g00ecf From d95f45f0705467cfc7e3650db932e43f0a20e45f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Mon, 20 Jul 2009 14:18:48 +1200 Subject: turn into canonical terms before checking for unique-ness of a tag in a notice --- classes/Notice.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 12b47f360..7f002d838 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -101,9 +101,17 @@ class Notice extends Memcached_DataObject if (!$count) { return true; } + + //turn each into their canonical tag + //this is needed to remove dupes before saving e.g. #hash.tag = #hashtag + $hashtags = array(); + for($i=0; $isaveTag($hashtag); } @@ -112,8 +120,6 @@ class Notice extends Memcached_DataObject function saveTag($hashtag) { - $hashtag = common_canonical_tag($hashtag); - $tag = new Notice_tag(); $tag->notice_id = $this->id; $tag->tag = $hashtag; -- cgit v1.2.3-54-g00ecf From 185d08282b5df141d38a88604b7d8cab00ce0cfd Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 15 Jul 2009 22:13:50 +1200 Subject: Check if mod_rewrite is installed before trying to use it stops those apache 500 errors when it's not installed --- htaccess.sample | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/htaccess.sample b/htaccess.sample index 634900dbf..942e98334 100644 --- a/htaccess.sample +++ b/htaccess.sample @@ -1,12 +1,14 @@ -RewriteEngine On + + RewriteEngine On -# NOTE: change this to your actual Laconica path; may be "/". + # NOTE: change this to your actual Laconica path; may be "/". -RewriteBase /mublog/ + RewriteBase /mublog/ -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule (.*) index.php?p=$1 [L,QSA] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule (.*) index.php?p=$1 [L,QSA] + Order allow,deny -- cgit v1.2.3-54-g00ecf From 0adaaa1b9de61eaa8f7e4c622cda27fb634b53a5 Mon Sep 17 00:00:00 2001 From: Steve Winton Date: Thu, 11 Jun 2009 15:32:16 +0100 Subject: Added hidden input to showRecoverForm() so form can be submitted without error in IE by pressing --- actions/recoverpassword.php | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 actions/recoverpassword.php diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php old mode 100644 new mode 100755 index 2afd052a7..721edea7f --- a/actions/recoverpassword.php +++ b/actions/recoverpassword.php @@ -194,6 +194,9 @@ class RecoverpasswordAction extends Action 'or your registered email address.')); $this->elementEnd('li'); $this->elementEnd('ul'); + $this->element('input', array('name' => 'recover', + 'type' => 'hidden', + 'value' => _('Recover'))); $this->submit('recover', _('Recover')); $this->elementEnd('fieldset'); $this->elementEnd('form'); -- cgit v1.2.3-54-g00ecf From 38d70f13865b197e17773ba24d67ea1148c32ab3 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Tue, 21 Jul 2009 18:01:22 -0400 Subject: Add to RSS 2.0, use the same tag finding method for RSS 1.0 as for Atom and RSS 2.0. http://laconi.ca/trac/ticket/864 --- lib/rssaction.php | 36 ++++++++++-------------------------- lib/twitterapi.php | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/lib/rssaction.php b/lib/rssaction.php index 901558943..9898894ed 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -193,24 +193,6 @@ class Rss10Action extends Action } } - // XXX: Surely there should be a common function to do this? - function extract_tags ($string) - { - $count = preg_match_all('/(?:^|\s)#([A-Za-z0-9_\-\.]{1,64})/', strtolower($string), $match); - if (!count) - { - return array(); - } - - $rv = array(); - foreach ($match[1] as $tag) - { - $rv[] = common_canonical_tag($tag); - } - - return array_unique($rv); - } - function showItem($notice) { $profile = Profile::staticGet($notice->profile_id); @@ -269,26 +251,28 @@ class Rss10Action extends Action $this->element('sioc:links_to', array('rdf:resource'=>$attachment->url)); } } - $tags = $this->extract_tags($notice->content); - if (!empty($tags)) { - foreach ($tags as $tag) - { - $tagpage = common_local_url('tag', array('tag' => $tag)); + + $tag = new Notice_tag(); + $tag->notice_id = $notice->id; + if ($tag->find()) { + $entry['tags']=array(); + while ($tag->fetch()) { + $tagpage = common_local_url('tag', array('tag' => $tag->tag)); if ( in_array($tag, $this->tags_already_output) ) { $this->element('ctag:tagged', array('rdf:resource'=>$tagpage.'#concept')); continue; } - $tagrss = common_local_url('tagrss', array('tag' => $tag)); + $tagrss = common_local_url('tagrss', array('tag' => $tag->tag)); $this->elementStart('ctag:tagged'); - $this->elementStart('ctag:Tag', array('rdf:about'=>$tagpage.'#concept', 'ctag:label'=>$tag)); + $this->elementStart('ctag:Tag', array('rdf:about'=>$tagpage.'#concept', 'ctag:label'=>$tag->tag)); $this->element('foaf:page', array('rdf:resource'=>$tagpage)); $this->element('rdfs:seeAlso', array('rdf:resource'=>$tagrss)); $this->elementEnd('ctag:Tag'); $this->elementEnd('ctag:tagged'); - $this->tags_already_output[] = $tag; + $this->tags_already_output[] = $tag->tag; } } $this->elementEnd('item'); diff --git a/lib/twitterapi.php b/lib/twitterapi.php index 79da82a19..b2602e77c 100644 --- a/lib/twitterapi.php +++ b/lib/twitterapi.php @@ -265,6 +265,18 @@ class TwitterapiAction extends Action } } */ + + // Tags/Categories + $tag = new Notice_tag(); + $tag->notice_id = $notice->id; + if ($tag->find()) { + $entry['tags']=array(); + while ($tag->fetch()) { + $entry['tags'][]=$tag->tag; + } + } + $tag->free(); + // RSS Item specific $entry['description'] = $entry['content']; $entry['pubDate'] = common_date_rfc2822($notice->created); @@ -442,6 +454,12 @@ class TwitterapiAction extends Action $enclosure = $entry['enclosures'][0]; $this->element('enclosure', array('url'=>$enclosure['url'],'type'=>$enclosure['mimetype'],'length'=>$enclosure['size']), null); } + + if($entry['tags']){ + foreach($entry['tags'] as $tag){ + $this->element('category', null,$tag); + } + } $this->elementEnd('item'); } -- cgit v1.2.3-54-g00ecf From 2aa47096b82fd224008d901584f09931c0432c2b Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 13:45:38 +1200 Subject: missing AND in the SQL --- classes/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/File.php b/classes/File.php index 68d385d1e..7ee8f6e08 100644 --- a/classes/File.php +++ b/classes/File.php @@ -136,7 +136,7 @@ class File extends Memcached_DataObject return sprintf(_('A file this large would exceed your user quota of %d bytes.'), common_config('attachments', 'user_quota')); } - $query .= ' month(modified) = month(now()) and year(modified) = year(now())'; + $query .= ' AND month(modified) = month(now()) and year(modified) = year(now())'; $this->query($query); $this->fetch(); $total = $this->total + $fileSize; -- cgit v1.2.3-54-g00ecf From 36754f8323fbd200a97ccdc31e2c148104c7ba66 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 16:46:32 +1200 Subject: added missing columns in file table --- db/laconica_pg.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index f5d35f985..71c99f24f 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -441,7 +441,6 @@ create table group_inbox ( group_id integer not null /* comment 'group receiving the message' references user_group (id) */, notice_id integer not null /* comment 'notice received' references notice (id) */, created timestamp not null default CURRENT_TIMESTAMP /* comment 'date the notice was created' */, - primary key (group_id, notice_id) ); create index group_inbox_created_idx on group_inbox using btree(created); @@ -456,7 +455,9 @@ create table file ( size integer, title varchar(255), date integer, - protected integer + protected integer, + filename text /* comment 'if a local file, name of the file' */, + modified timestamp default CURRENT_TIMESTAMP /* comment 'date this record was modified'*/ ); create sequence file_oembed_seq; -- cgit v1.2.3-54-g00ecf From 28b62f357d80d86e17f9688d65809cb959f4be6c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 17:05:44 +1200 Subject: fixed SQL in checking for monthly quota - works in postgres and mysql --- classes/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/File.php b/classes/File.php index 7ee8f6e08..0c4fbf7e6 100644 --- a/classes/File.php +++ b/classes/File.php @@ -122,6 +122,7 @@ class File extends Memcached_DataObject } function isRespectsQuota($user,$fileSize) { + if ($fileSize > common_config('attachments', 'file_quota')) { return sprintf(_('No file may be larger than %d bytes ' . 'and the file you sent was %d bytes. Try to upload a smaller version.'), @@ -135,8 +136,7 @@ class File extends Memcached_DataObject if ($total > common_config('attachments', 'user_quota')) { return sprintf(_('A file this large would exceed your user quota of %d bytes.'), common_config('attachments', 'user_quota')); } - - $query .= ' AND month(modified) = month(now()) and year(modified) = year(now())'; + $query .= ' AND EXTRACT(month FROM file.modified) = EXTRACT(month FROM now()) and EXTRACT(year FROM file.modified) = EXTRACT(year FROM now())'; $this->query($query); $this->fetch(); $total = $this->total + $fileSize; -- cgit v1.2.3-54-g00ecf From 9ab07b4468048d20b2b826ef6595a862d5a21ffd Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 17:52:43 +1200 Subject: Fixed "User" table - added design_id and viewdesigns --- db/laconica_pg.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index f5d35f985..55a103ee0 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -72,6 +72,8 @@ create table "user" ( autosubscribe integer 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 integer default 0 /* comment 'has an inbox been created for this user?' */, + design_id integer /* comment 'id of a design' */references design(id), + viewdesigns integer default 1 /* comment 'whether to view user-provided designs'*/, created timestamp not null default CURRENT_TIMESTAMP /* comment 'date this record was created' */, modified timestamp /* comment 'date this record was modified' */ -- cgit v1.2.3-54-g00ecf From be5f9ca0e1e4d3a2d1a06c39aa24874821b91cd1 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Wed, 22 Jul 2009 09:25:27 +0100 Subject: Stop daemons using 100% CPU and hammering the DB server when the queue is empty (DBQueueManager-based only) --- lib/dbqueuemanager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dbqueuemanager.php b/lib/dbqueuemanager.php index a37a8ffdf..1df5af6c1 100644 --- a/lib/dbqueuemanager.php +++ b/lib/dbqueuemanager.php @@ -88,7 +88,9 @@ class DBQueueManager extends QueueManager do { $qi = Queue_item::top($queue); - if (!empty($qi)) { + if (empty($qi)) { + sleep(1); + } else { $notice = Notice::staticGet('id', $qi->notice_id); if (!empty($notice)) { $result = $notice; -- cgit v1.2.3-54-g00ecf From c34875421ac97be26533bd494c048256136b8c1f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 16:46:32 +1200 Subject: added missing columns in file table --- db/laconica_pg.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index 55a103ee0..172b64cf4 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -443,7 +443,6 @@ create table group_inbox ( group_id integer not null /* comment 'group receiving the message' references user_group (id) */, notice_id integer not null /* comment 'notice received' references notice (id) */, created timestamp not null default CURRENT_TIMESTAMP /* comment 'date the notice was created' */, - primary key (group_id, notice_id) ); create index group_inbox_created_idx on group_inbox using btree(created); @@ -458,7 +457,9 @@ create table file ( size integer, title varchar(255), date integer, - protected integer + protected integer, + filename text /* comment 'if a local file, name of the file' */, + modified timestamp default CURRENT_TIMESTAMP /* comment 'date this record was modified'*/ ); create sequence file_oembed_seq; -- cgit v1.2.3-54-g00ecf From 6eaa91db1c80afa0811c0f465a18250ee63b490a Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 21:28:47 +1200 Subject: Fixes file_oembed to march mysql schema change that happened in commit 05e51228020fecaa894523b5159bc412d48e5b19 --- db/laconica_pg.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index 172b64cf4..f0a0aef4a 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -464,8 +464,7 @@ create table file ( create sequence file_oembed_seq; create table file_oembed ( - id bigint default nextval('file_oembed_seq') primary key /* comment 'unique identifier' */, - file_id bigint unique, + file_id bigint default nextval('file_oembed_seq') primary key /* comment 'unique identifier' */, version varchar(20), type varchar(20), provider varchar(50), -- cgit v1.2.3-54-g00ecf From 91f3ddca55ae3ea32aeeb75c797e6c81bb9fd1a0 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 21:33:59 +1200 Subject: fixes file_redirection table to match mysql schema change in commit 05e51228020fecaa894523b5159bc412d48e5b19 --- db/laconica_pg.sql | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index f0a0aef4a..de4fab03e 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -480,8 +480,7 @@ create table file_oembed ( create sequence file_redirection_seq; create table file_redirection ( - id bigint default nextval('file_redirection_seq') primary key /* comment 'unique identifier' */, - url varchar(255) unique, + url varchar(255) primary key, file_id bigint, redirections integer, httpcode integer -- cgit v1.2.3-54-g00ecf From 57f53869e20a61cb8adfdbe5e607bb07c9ea685f Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 21:39:53 +1200 Subject: more changes to file_id copied from mysql schema change in 05e51228020fecaa894523b5159bc412d48e5b19 --- db/laconica_pg.sql | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index de4fab03e..1059da3c9 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -488,8 +488,7 @@ create table file_redirection ( create sequence file_thumbnail_seq; create table file_thumbnail ( - id bigint default nextval('file_thumbnail_seq') primary key /* comment 'unique identifier' */, - file_id bigint unique, + file_id bigint primary key, url varchar(255) unique, width integer, height integer @@ -497,11 +496,10 @@ create table file_thumbnail ( create sequence file_to_post_seq; create table file_to_post ( - id bigint default nextval('file_to_post_seq') primary key /* comment 'unique identifier' */, file_id bigint, post_id bigint, - unique(file_id, post_id) + primary key (file_id, post_id) ); create table group_block ( -- cgit v1.2.3-54-g00ecf From 47b2f1e08262341664ed782f5b9ecaa4e504b40c Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 22 Jul 2009 21:46:23 +1200 Subject: moved design table earlier - needs to be before "user" becuase of the foreign key --- db/laconica_pg.sql | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/db/laconica_pg.sql b/db/laconica_pg.sql index 1059da3c9..31210fd1e 100644 --- a/db/laconica_pg.sql +++ b/db/laconica_pg.sql @@ -1,4 +1,3 @@ - /* local and remote users have profiles */ create sequence profile_seq; @@ -41,6 +40,19 @@ create table sms_carrier ( modified timestamp /* comment 'date this record was modified ' */ ); +create sequence design_seq; +create table design ( + id bigint default nextval('design_seq') /* 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'*/, + disposition int default 1 /*comment 'bit 1 = hide background image, bit 2 = display background image, bit 4 = tile background image'*/, + primary key (id) +); + /* local users */ create table "user" ( @@ -378,20 +390,6 @@ create table profile_block ( ); -create sequence design_seq; -create table design ( - id bigint default nextval('design_seq') /* 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'*/, - disposition int default 1 /*comment 'bit 1 = hide background image, bit 2 = display background image, bit 4 = tile background image'*/, - primary key (id) -); - - create sequence user_group_seq; create table user_group ( -- cgit v1.2.3-54-g00ecf From db4ffca5350a11835c2c990f8d77d7cabb365a43 Mon Sep 17 00:00:00 2001 From: CiaranG Date: Wed, 22 Jul 2009 11:21:49 +0100 Subject: Fix help text for getvaliddaemons.php --- scripts/getvaliddaemons.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/getvaliddaemons.php b/scripts/getvaliddaemons.php index 97c230784..1e4546dff 100755 --- a/scripts/getvaliddaemons.php +++ b/scripts/getvaliddaemons.php @@ -28,7 +28,8 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $helptext = << Date: Wed, 22 Jul 2009 10:21:49 -0500 Subject: Changed file back to 0644. Blame: 0adaaa1b9de61eaa8f7e4c622cda27fb634b53a5 --- actions/recoverpassword.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 actions/recoverpassword.php diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php old mode 100755 new mode 100644 -- cgit v1.2.3-54-g00ecf From 27e525dbbc126b4fce91c89f25153dfe2b771ee9 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 23 Jul 2009 15:07:28 +1200 Subject: fixed up a limit offset to be ANSI SQL compliant --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 224b61bd2..32de608cf 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -199,7 +199,7 @@ class Profile extends Memcached_DataObject $query .= ' order by id DESC'; if (!is_null($offset)) { - $query .= " limit $offset, $limit"; + $query .= " LIMIT $limit OFFSET $offset"; } $notice->query($query); -- cgit v1.2.3-54-g00ecf From a33ffe1357c93b4bf1a717c3ed4883170431575d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 23 Jul 2009 21:46:20 +1200 Subject: Call $this->getNotices() always, becuase $this will be the right class. e.g. TagrssAction or PublicrssAction --- lib/rssaction.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/rssaction.php b/lib/rssaction.php index 9898894ed..23653e406 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -98,11 +98,7 @@ class Rss10Action extends Action // Parent handling, including cache check parent::handle($args); // Get the list of notices - if (empty($this->tag)) { - $this->notices = $this->getNotices($this->limit); - } else { - $this->notices = $this->getTaggedNotices($this->tag, $this->limit); - } + $this->notices = $this->getNotices($this->limit); $this->showRss(); } -- cgit v1.2.3-54-g00ecf From 90bc755821ce768104df059d4928f7e131a5eb74 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 23 Jul 2009 15:01:42 +0000 Subject: Updated cloudy theme --- theme/cloudy/css/display.css | 222 +++++++++++++++++++++++++++++++++++++------ theme/cloudy/css/ie.css | 20 ++++ 2 files changed, 212 insertions(+), 30 deletions(-) diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index 12f186a56..af5836e19 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -12,12 +12,12 @@ img { display:block; border:0; } a abbr { cursor: pointer; border-bottom:0; } table { border-collapse:collapse; } ol { list-style-position:inside; } -html { font-size: 100%; background-color:#fff; } +html { font-size: 87.5%; } body { background-color:#fff; color:#000; font-family:sans-serif; -font-size:0.75em; +font-size:1em; line-height:normal; position:relative; height:100%; @@ -471,6 +471,24 @@ margin-bottom:7px; #form_notice #notice_submit label { display:none; } +#form_notice label[for=notice_data-attach], +#form_notice #notice_data-attach { +position:absolute; +top:85px; +cursor:pointer; +} +#form_notice label[for=notice_data-attach] { +text-indent:-9999px; +left:82%; +width:16px; +height:16px; +} +#form_notice #notice_data-attach { +left:34.6%; +padding:0; +height:16px; +} + #form_notice .form_note { position:absolute; top:-10px; @@ -488,6 +506,7 @@ font-weight:bold; line-height:1.15; padding:1px 2px; } + #form_notice #notice_action-submit { width:14%; height:35px; @@ -505,6 +524,26 @@ margin-bottom:7px; margin-left:18px; float:left; } +#form_notice .error, +#form_notice .success { +float:left; +clear:both; +width:81.5%; +margin-bottom:0; +line-height:1.618; +} +#form_notice #notice_data-attach_selected code { +float:left; +width:90%; +display:block; +font-size:1.1em; +line-height:1.8; +overflow:auto; +} +#form_notice #notice_data-attach_selected button { +float:right; +font-size:0.8em; +} /* entity_profile */ @@ -746,17 +785,18 @@ float:left; width:100%; border-top-width:1px; border-top-style:dotted; -font-size:1.2em; } .notices li { list-style-type:none; line-height:1.1; -width:94%; -padding-right:5%; -padding-left:1%; min-height:47px; } - +.notices .notices { +margin-top:7px; +margin-left:2%; +width:98%; +float:left; +} /* NOTICES */ #notices_primary { @@ -805,13 +845,17 @@ text-decoration:underline; .notice .entry-title { float:none; -display:inline; -width:100%; overflow:hidden; +display:inline; } #shownotice .notice .entry-title { font-size:2.2em; } +#conversation .notice .entry-title { +display:block; +width:90%; +} + .notice p.entry-content { display:inline; @@ -887,13 +931,12 @@ outline:none; .notice-options { padding-left:2%; float:left; -width:50%; font-size:0.95em; -width:12.5%; +width:16px; float:right; display:none; } -.notices li.hover div.notice-options { +.notices li:hover div.notice-options { display:block; } @@ -917,7 +960,7 @@ top:30px; right:7px; } .notice-options .notice_delete { -bottom:7px; +top:47px; right:7px; } .notice-options .notice_reply dt { @@ -958,6 +1001,97 @@ border:0; padding:0; } +.notice .attachment { +position:relative; +padding-left:16px; +} +#attachments .attachment { +padding-left:0; +} +.notice .attachment img { +position:absolute; +top:18px; +left:0; +z-index:99; +} +#shownotice .notice .attachment img { +position:static; +} + +#attachments { +clear:both; +float:left; +width:100%; +margin-top:18px; +} +#attachments dt { +font-weight:bold; +font-size:1.3em; +margin-bottom:4px; +} + +#attachments ol li { +margin-bottom:18px; +list-style-type:decimal; +float:left; +clear:both; +} + +#jOverlayContent, +#jOverlayContent #content, +#jOverlayContent #content_inner { +width: auto !important; +margin-bottom:0; +} +#jOverlayContent #content { +padding:11px; +min-height:auto; +} +#jOverlayContent .external span { +display:block; +margin-bottom:11px; +} +#jOverlayContent button { +position:absolute; +top:0; +right:0; +width:29px; +height:29px; +text-align:center; +font-weight:bold; +padding:0; +} +#jOverlayContent h1 { +max-width:425px; +} +#jOverlayContent #content { +border-radius:7px; +-moz-border-radius:7px; +-webkit-border-radius:7px; +} +#jOverlayLoading { +top:5%; +left:40%; +} +#attachment_view img { +max-width:480px; +max-height:480px; +} +#attachment_view #oembed_info { +margin-top:11px; +} +#attachment_view #oembed_info dt, +#attachment_view #oembed_info dd { +float:left; +} +#attachment_view #oembed_info dt { +clear:left; +margin-right:11px; +font-weight:bold; +} +#attachment_view #oembed_info dt:after { +content: ":"; +} #usergroups #new_group { float: left; @@ -1218,7 +1352,8 @@ clear:both; #outbox.user_in #content, #subscriptions.user_in #content, #subscribers.user_in #content, -#showgroup.user_in #content { +#showgroup.user_in #content, +#conversation.user_in #content { padding-top:160px; } @@ -1243,6 +1378,14 @@ padding-top:160px; display:none; } +#jOverlayContent #core #content { +padding-top:11px; +} +#jOverlayContent #core { +background:none; +padding-top:0; +} + html, body, @@ -1311,24 +1454,23 @@ border-top-color:#87B4C8; } -#content .notice p.entry-content a:visited { -background-color:#fcfcfc; -} -#content .notice p.entry-content .vcard a { -background-color:#fcfffc; -} - #aside_primary { background-color:#DDFFCC; } - #notice_text-count { -color:#333; +color:#000000; } #form_notice.warning #notice_text-count { -color:#000; +color:#000000; } +#form_notice label[for=notice_data-attach] { +background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%; +} +#form_notice #notice_data-attach { +opacity:0; +} + #form_notice.processing #notice_action-submit { background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%; cursor:wait; @@ -1426,8 +1568,11 @@ background-image:url(../images/icons/twotone/green/shield.gif); /* NOTICES */ -.notices li.over { -background-color:#fcfcfc; +.notice .attachment { +background:transparent url(../../base/images/icons/twotone/green/clip-02.gif) no-repeat 0 45%; +} +#attachments .attachment { +background:none; } .notice-options .notice_reply a, @@ -1451,10 +1596,24 @@ background:transparent url(../images/icons/icon_trash.gif) no-repeat 0 45%; .notices div.notice-options { opacity:0.4; } -.notices li.hover div.entry-content, -.notices li.hover div.notice-options { +.notices li:hover div.entry-content, +.notices li:hover div.notice-options { opacity:1; } +.notices .notices { +background-color:rgba(200, 200, 200, 0.01); +} +.notices .notices .notices { +background-color:rgba(200, 200, 200, 0.02); +} +.notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.03); +} +.notices .notices .notices .notices .notices { +background-color:rgba(200, 200, 200, 0.04); +} + + div.entry-content { color:#333; } @@ -1462,8 +1621,11 @@ div.notice-options a, div.notice-options input { font-family:sans-serif; } -.notices li.hover { -background-color:#fcfcfc; +#content .notices li:hover { +background-color:rgba(240, 240, 240, 0.2); +} +#conversation .notices li:hover { +background-color:transparent; } /*END: NOTICES */ diff --git a/theme/cloudy/css/ie.css b/theme/cloudy/css/ie.css index 095122100..94c2093b1 100644 --- a/theme/cloudy/css/ie.css +++ b/theme/cloudy/css/ie.css @@ -8,6 +8,16 @@ color:#fff; background-color:#ddffcc; } +#form_notice .form_note + label { +position:absolute; +top:25px; +left:83%; +text-indent:-9999px; +height:16px; +width:16px; +display:block; +} + #aside_primary { width:181px; } @@ -32,3 +42,13 @@ top:158px; #subscribers #content { padding-top:138px; } + +.notice { +z-index:1; +} +.notice:hover { +z-index:9999; +} +.notice .thumbnail img { +z-index:9999; +} -- cgit v1.2.3-54-g00ecf From fa332c8c85a140f9f85b5c094c4266475742d27e Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 23 Jul 2009 15:07:33 +0000 Subject: Minor top value for cloudy theme --- theme/cloudy/css/display.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/cloudy/css/display.css b/theme/cloudy/css/display.css index af5836e19..82a1a1e4e 100644 --- a/theme/cloudy/css/display.css +++ b/theme/cloudy/css/display.css @@ -474,7 +474,7 @@ display:none; #form_notice label[for=notice_data-attach], #form_notice #notice_data-attach { position:absolute; -top:85px; +top:87px; cursor:pointer; } #form_notice label[for=notice_data-attach] { -- cgit v1.2.3-54-g00ecf From 7fff454ff931635dc1aca6a67af194b25567a65b Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Thu, 23 Jul 2009 13:00:34 -0400 Subject: Revert "0.9.0 dev version" This reverts commit 7cfb2f569dbda8ef84149604cec88b2349d95306. This should have never been committed to the 0.8.x branch. --- lib/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common.php b/lib/common.php index 764c5a077..9d7954fa9 100644 --- a/lib/common.php +++ b/lib/common.php @@ -19,7 +19,7 @@ if (!defined('LACONICA')) { exit(1); } -define('LACONICA_VERSION', '0.9.0dev'); +define('LACONICA_VERSION', '0.8.1dev'); define('AVATAR_PROFILE_SIZE', 96); define('AVATAR_STREAM_SIZE', 48); -- cgit v1.2.3-54-g00ecf