Merge branch 'wall_to_wall' of github.com:CyberDomovoy/friendica into threaded_items

This commit is contained in:
Domovoy 2012-08-24 04:47:29 +02:00
commit 71d9c95faf
3 changed files with 322 additions and 190 deletions

View File

@ -11,7 +11,7 @@ require_once('include/cache.php');
require_once('library/Mobile_Detect/Mobile_Detect.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1443' );
define ( 'FRIENDICA_VERSION', '3.0.1444' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1154 );
@ -1476,7 +1476,10 @@ if(! function_exists('proc_run')) {
$args[$x] = escapeshellarg($args[$x]);
$cmdline = implode($args," ");
proc_close(proc_open($cmdline." &",array(),$foo));
if(get_config('system','proc_windows'))
proc_close(proc_open('start /b ' . $cmdline,array(),$foo));
else
proc_close(proc_open($cmdline." &",array(),$foo));
}
}

View File

@ -490,6 +490,41 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
$owner_url = zrl($owner_url);
}
}
if($commentww != 'ww') {
// Fallback, check if can find a @ tag
$tags = $item['tag'];
if(strpos($tags, '@[url') !== FALSE) {
// We have at least one @ tag
$template = $wallwall_template;
$commentww = 'ww';
$matches = array();
preg_match_all('/\@\[url=([^\]]+)\]([^\[]+)\[\/url\]/', $tags, $matches, PREG_SET_ORDER);
$r = null;
foreach($matches as $wall) {
$uri = $wall[1];
$r = q("SELECT `url`,`name`,`photo` FROM `contact` WHERE `url`='%s' LIMIT 1",
dbesc($uri)
);
if(count($r)) {
$owner_url = zrl($r[0]['url']);
$owner_name = $r[0]['name'];
$owner_photo = $r[0]['photo'];
break;
}
}
if($commentww != 'ww') {
// We found no matching contact in the database, just do the best we can (we'll only miss the photo)
$owner_url = zrl($matches[0][1]);
$owner_name = $matches[0][2];
// Use the nosign
$owner_photo = $a->get_baseurl .'/images/nosign.jpg';
}
}
}
}
if($profile_owner == local_user()) {
$isstarred = (($item['starred']) ? "starred" : "unstarred");

File diff suppressed because it is too large Load Diff