Merge remote-tracking branch 'friendica/master'

This commit is contained in:
Fabio Comuni 2011-12-21 17:37:35 +01:00
commit 7f2070ca91
6 changed files with 33 additions and 7 deletions

View file

@ -9,7 +9,7 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1200' );
define ( 'FRIENDICA_VERSION', '2.3.1201' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
define ( 'DB_UPDATE_VERSION', 1112 );

View file

@ -173,9 +173,9 @@ function bb2diaspora($Text,$preserve_nl = false) {
// html5 video and audio
// $Text = preg_replace("/\[video\](.*?)\[\/video\]/", '<video src="$1" controls="controls" width="425" height="350"><a href="$1">$1</a></video>', $Text);
$Text = preg_replace("/\[video\](.*?)\[\/video\]/", '$1', $Text);
// $Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '$1', $Text);
// $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);

View file

@ -171,6 +171,9 @@ ACL.prototype.update_view = function(){
$('.profile-jot-net input').attr('disabled', 'disabled');
$('#profile-jot-desc').html('&nbsp;');
}
$("#acl-list-content .acl-list-item").each(function(){
$(this).removeClass("groupshow grouphide");
});
$("#acl-list-content .acl-list-item").each(function(){
itemid = $(this).attr('id');
@ -194,8 +197,11 @@ ACL.prototype.update_view = function(){
uclass="grouphide";
}
$(that.group_uids[id]).each(function(i,v){
$("#c"+v).removeClass("groupshow grouphide").addClass(uclass);
$(that.group_uids[id]).each(function(i,v) {
if(uclass == "grouphide")
$("#c"+v).removeClass("groupshow");
if(uclass != "")
$("#c"+v).addClass(uclass);
});
break;

View file

@ -60,8 +60,8 @@ function acl_init(&$a){
intval($count)
);
foreach($r as $g){
// logger('acl: group: ' . $g['name'] . ' members: ' . $g['uids']);
$groups[] = array(
"type" => "g",
"photo" => "images/default-group-mm.png",

View file

@ -301,7 +301,8 @@ function network_content(&$a, $update = 0) {
}
$sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $star_sql AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` REGEXP '<" . intval($group) . ">' )) ";
// $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $star_sql AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` REGEXP '<" . intval($group) . ">' )) ";
$sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $star_sql AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` REGEXP '<" . intval($group) . ">' )) ";
$o = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $o;
}
elseif($cid) {

View file

@ -8,6 +8,15 @@ function register_post(&$a) {
$verified = 0;
$blocked = 1;
$max_dailies = intval(get_config('system','max_daily_registrations'));
if($max_dailes) {
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if($r && $r[0]['total'] >= $max_dailies) {
return;
}
}
switch($a->config['register_policy']) {
@ -462,6 +471,16 @@ function register_content(&$a) {
return;
}
$max_dailies = intval(get_config('system','max_daily_registrations'));
if($max_dailes) {
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if($r && $r[0]['total'] >= $max_dailies) {
logger('max daily registrations exceeded.');
notice( t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
return;
}
}
if(x($_SESSION,'theme'))
unset($_SESSION['theme']);