Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
This commit is contained in:
commit
a0a6a627e7
2
README
2
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.
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
13
lib/util.php
13
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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user