summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README2
-rw-r--r--actions/featured.php5
-rw-r--r--actions/subscriptions.php2
-rw-r--r--classes/Notice.php2
-rw-r--r--doc-src/bookmarklet3
-rw-r--r--lib/featureduserssection.php9
-rw-r--r--lib/util.php13
-rw-r--r--theme/base/css/display.css9
-rw-r--r--theme/base/css/print.css2
9 files changed, 34 insertions, 13 deletions
diff --git a/README b/README
index f18d9c7c1..09d9d301c 100644
--- a/README
+++ b/README
@@ -1125,7 +1125,7 @@ default: nickname of a user account to automatically subscribe new
service updates or announcements. Users are able to unsub
if they want. Default is null; no auto subscribe.
welcome: nickname of a user account that sends welcome messages to new
- users. Can be the same as 'subscribe' account, although on
+ users. Can be the same as 'default' account, although on
busy servers it may be a good idea to keep that one just for
'urgent' messages. Default is null; no message.
diff --git a/actions/featured.php b/actions/featured.php
index f3bade6a5..86fd3f374 100644
--- a/actions/featured.php
+++ b/actions/featured.php
@@ -107,6 +107,7 @@ class FeaturedAction extends Action
$featured_nicks = common_config('nickname', 'featured');
+
if (count($featured_nicks) > 0) {
$quoted = array();
@@ -118,7 +119,7 @@ class FeaturedAction extends Action
$user = new User;
$user->whereAdd(sprintf('nickname IN (%s)', implode(',', $quoted)));
$user->limit(($this->page - 1) * PROFILES_PER_PAGE, PROFILES_PER_PAGE + 1);
- $user->orderBy('user.nickname ASC');
+ $user->orderBy(common_database_tablename('user') .'.nickname ASC');
$user->find();
@@ -145,4 +146,4 @@ class FeaturedAction extends Action
$this->page, 'featured');
}
}
-} \ No newline at end of file
+}
diff --git a/actions/subscriptions.php b/actions/subscriptions.php
index b0c0a9b8d..e6f3c54db 100644
--- a/actions/subscriptions.php
+++ b/actions/subscriptions.php
@@ -139,7 +139,7 @@ class SubscriptionsList extends ProfileList
$this->out->elementStart('form', array('id' => 'subedit-' . $profile->id,
'method' => 'post',
- 'class' => 'form_subcription_edit',
+ 'class' => 'form_subscription_edit',
'action' => common_local_url('subedit')));
$this->out->hidden('token', common_session_token());
$this->out->hidden('profile', $profile->id);
diff --git a/classes/Notice.php b/classes/Notice.php
index 44a6aeb98..5fa0d79a1 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -67,6 +67,8 @@ class Notice extends Memcached_DataObject
$this->blowSubsCache(true);
$this->query('BEGIN');
+ //Null any notices that are replies to this notice
+ $this->query(sprintf("UPDATE notice set reply_to = null WHERE reply_to = %d", $this->id));
$related = array('Reply',
'Fave',
'Notice_tag',
diff --git a/doc-src/bookmarklet b/doc-src/bookmarklet
index a7f459eec..6cd2c08f9 100644
--- a/doc-src/bookmarklet
+++ b/doc-src/bookmarklet
@@ -3,6 +3,5 @@ A bookmarklet is a small piece of javascript code used as a bookmark. This one w
Drag-and-drop the following link to your bookmarks bar or right-click it and add it to your browser favorites to keep it handy.
<MTMarkdownOptions output='raw'>
-<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%22'+e(s)+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=720,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
+<a href="javascript:var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://%%site.server%%/%%site.path%%/index.php?action=newnotice',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%22'+((e(s))?e(s):e(document.title))+'%22 from '+l.href;function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=800,height=570')){l.href=g;}}a();void(0);">Post to %%site.name%%</a>
</MTMarkdownOptions>
-
diff --git a/lib/featureduserssection.php b/lib/featureduserssection.php
index aed94b1a5..4b9238d47 100644
--- a/lib/featureduserssection.php
+++ b/lib/featureduserssection.php
@@ -57,9 +57,14 @@ class FeaturedUsersSection extends ProfileSection
$quoted[] = "'$nick'";
}
+ $table = "user";
+ if(common_config('db','quote_identifiers')) {
+ $table = '"' . $table . '"';
+ }
+
$qry = 'SELECT profile.* ' .
- 'FROM profile JOIN user on profile.id = user.id ' .
- 'WHERE user.nickname in (' . implode(',', $quoted) . ') ' .
+ 'FROM profile JOIN '. $table .' on profile.id = '. $table .'.id ' .
+ 'WHERE '. $table .'.nickname in (' . implode(',', $quoted) . ') ' .
'ORDER BY profile.created DESC ';
$limit = PROFILES_PER_SECTION + 1;
diff --git a/lib/util.php b/lib/util.php
index b17a44bd8..675ff51f0 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1321,3 +1321,16 @@ function common_compatible_license($from, $to)
// XXX: better compatibility check needed here!
return ($from == $to);
}
+
+/**
+ * returns a quoted table name, if required according to config
+ */
+function common_database_tablename($tablename)
+{
+
+ if(common_config('db','quote_identifiers')) {
+ $tablename = '"'. $tablename .'"';
+ }
+ //table prefixes could be added here later
+ return $tablename;
+} \ No newline at end of file
diff --git a/theme/base/css/display.css b/theme/base/css/display.css
index 5d0ed9915..3b4a2a4b3 100644
--- a/theme/base/css/display.css
+++ b/theme/base/css/display.css
@@ -443,6 +443,7 @@ padding:7px 7px 16px 7px;
display:block;
float:left;
font-size:1.3em;
+margin-bottom:7px;
}
#form_notice #notice_submit label {
display:none;
@@ -471,7 +472,7 @@ bottom:0;
right:0;
}
#form_notice label[for=to] {
-margin-top:11px;
+margin-top:7px;
}
#form_notice select[id=to] {
margin-bottom:7px;
@@ -688,7 +689,7 @@ float:none;
.profile .entity_profile .entity_note,
.profile .entity_profile .entity_url,
.profile .entity_profile .entity_tags,
-.profile .entity_profile .form_subcription_edit {
+.profile .entity_profile .form_subscription_edit {
margin-left:59px;
clear:none;
display:block;
@@ -700,7 +701,7 @@ margin-right:11px;
}
-.profile .entity_profile .form_subcription_edit label {
+.profile .entity_profile .form_subscription_edit label {
font-weight:normal;
margin-right:11px;
}
@@ -1157,4 +1158,4 @@ display:none;
}
.guide {
clear:both;
-}
+} \ No newline at end of file
diff --git a/theme/base/css/print.css b/theme/base/css/print.css
index 2da3e5e44..d76dd608c 100644
--- a/theme/base/css/print.css
+++ b/theme/base/css/print.css
@@ -21,7 +21,7 @@ p { orphans: 2; widows: 1; }
.entity_actions,
.notice-options,
#aside_primary,
-.form_subcription_edit .submit {
+.form_subscription_edit .submit {
display:none;
}