Merge branch 'master' of git.oschina.net:ComsenzDiscuz/DiscuzX
This commit is contained in:
commit
7a46827ef3
|
@ -18,6 +18,10 @@ $discuz->init_mobile = false;
|
|||
|
||||
$discuz->init();
|
||||
|
||||
if(!file_exists(DISCUZ_ROOT . $_G['style']['tpldir'] . '/m')) {
|
||||
$_G['style']['tpldir'] = './template/default';
|
||||
}
|
||||
|
||||
if ($_GET['c'] == 'static') {
|
||||
$path = DISCUZ_ROOT . $_G['style']['tpldir'] . '/m/js/';
|
||||
$bpath = DISCUZ_ROOT . 'template/default/m/js/';
|
||||
|
|
|
@ -36,13 +36,7 @@ class extend_thread_image extends extend_thread_base {
|
|||
$values = array('fid' => $fid, 'tid' => $tid, 'pid' => $pid, 'coverimg' => '');
|
||||
$param = array();
|
||||
if($this->forum['picstyle']) {
|
||||
if(!setthreadcover($pid, 0, $threadimageaid) && !defined('IN_MOBILE')) {
|
||||
$imglist = array();
|
||||
preg_match_all("/(\[img\]|\[img=\d{1,4}[x|\,]\d{1,4}\])\s*([^\[\<\r\n]+?)\s*\[\/img\]/is", $this->param['message'], $imglist, PREG_SET_ORDER);
|
||||
$values['coverimg'] = "<p id=\"showsetcover\">".lang('message', 'post_newthread_set_cover')."<span id=\"setcoverwait\"></span></p><script>if($('forward_a')){\$('forward_a').style.display='none';setTimeout(\"$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid=$tid&pid=$pid&fid=$fid&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
|
||||
$param['clean_msgforward'] = 1;
|
||||
$param['timeout'] = $param['refreshtime'] = 15;
|
||||
}
|
||||
setthreadcover($pid, 0, $threadimageaid);
|
||||
}
|
||||
|
||||
if($threadimageaid) {
|
||||
|
|
|
@ -209,9 +209,6 @@ function dhtmlspecialchars($string, $flags = null) {
|
|||
} else {
|
||||
if($flags === null) {
|
||||
$string = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $string);
|
||||
if(strpos($string, '&#') !== false) {
|
||||
$string = preg_replace('/&((#(\d{3,5}|x[a-fA-F0-9]{4}));)/', '&\\1', $string);
|
||||
}
|
||||
} else {
|
||||
if(PHP_VERSION < '5.4.0') {
|
||||
$string = htmlspecialchars($string, $flags);
|
||||
|
|
|
@ -631,8 +631,7 @@ function setthreadcover($pid, $tid = 0, $aid = 0, $countimg = 0, $imgurl = '') {
|
|||
$tid = empty($tid) ? $attach['tid'] : $tid;
|
||||
$picsource = ($attach['remote'] ? $_G['setting']['ftp']['attachurl'] : $_G['setting']['attachurl']).'forum/'.$attach['attachment'];
|
||||
} else {
|
||||
$attachtable = 'pid:'.$pid;
|
||||
$picsource = $imgurl;
|
||||
return true;
|
||||
}
|
||||
|
||||
$basedir = !$_G['setting']['attachdir'] ? (DISCUZ_ROOT.'./data/attachment/') : $_G['setting']['attachdir'];
|
||||
|
|
|
@ -356,6 +356,9 @@ if($_GET['action'] == 'checkusername') {
|
|||
|
||||
}
|
||||
} elseif($_GET['action'] == 'downremoteimg') {
|
||||
if(!$_G['group']['allowdownremoteimg']) {
|
||||
dexit();
|
||||
}
|
||||
$_GET['message'] = str_replace(array("\r", "\n"), array($_GET['wysiwyg'] ? '<br />' : '', "\\n"), $_GET['message']);
|
||||
preg_match_all("/\[img\]\s*([^\[\<\r\n]+?)\s*\[\/img\]|\[img=\d{1,4}[x|\,]\d{1,4}\]\s*([^\[\<\r\n]+?)\s*\[\/img\]/is", $_GET['message'], $image1, PREG_SET_ORDER);
|
||||
preg_match_all("/\<img.+src=('|\"|)?(.*)(\\1)([\s].*)?\>/ismUe", $_GET['message'], $image2, PREG_SET_ORDER);
|
||||
|
|
|
@ -875,7 +875,7 @@ if($_G['forum_cachepid']) {
|
|||
foreach(C::t('forum_postcache')->fetch_all($_G['forum_cachepid']) as $postcache) {
|
||||
if($postcache['rate']) {
|
||||
$postcache['rate'] = dunserialize($postcache['rate']);
|
||||
$postlist[$postcache['pid']]['ratelog'] = $postcache['rate']['ratelogs'];
|
||||
$postlist[$postcache['pid']]['ratelog'] = dhtmlspecialchars($postcache['rate']['ratelogs']);
|
||||
$postlist[$postcache['pid']]['ratelogextcredits'] = $postcache['rate']['extcredits'];
|
||||
$postlist[$postcache['pid']]['totalrate'] = $postcache['rate']['totalrate'];
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<ul class="biduser cl">
|
||||
<li class="bidtop">
|
||||
<!--{if $memberlist}-->
|
||||
<a href="home.php?mod=space&uid=$memberlist[0][uid]&do=profile" target="_blank" id="bid_$memberlist[0][uid]" class="hm" {if $memberlist[0][note]} onmouseover="showTip(this)" tip="$memberlist[0][username]: {echo htmlspecialchars($memberlist[0][note])}"{/if}><!--{avatar($memberlist[0][uid],middle)}--></a>
|
||||
<a href="home.php?mod=space&uid=$memberlist[0][uid]&do=profile" target="_blank" id="bid_$memberlist[0][uid]" class="hm" {if $memberlist[0][note]} onmouseover="showTip(this)" tip="$memberlist[0][username]: $memberlist[0][note]"{/if}><!--{avatar($memberlist[0][uid],middle)}--></a>
|
||||
<!--{/if}-->
|
||||
</li>
|
||||
<!--{eval unset($memberlist[0]);}-->
|
||||
|
|
Loading…
Reference in New Issue