Skip to content

Commit 07c28ac

Browse files
author
bnu
committed
Merge branch 'hotfix/1.7.11'
2 parents 2ddf51f + 6aea065 commit 07c28ac

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

classes/context/Context.class.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@ function init()
367367
$this->allow_rewrite = ($this->db_info->use_rewrite == 'Y' ? TRUE : FALSE);
368368

369369
// set locations for javascript use
370+
$url = array();
371+
$current_url = self::getRequestUri();
370372
if($_SERVER['REQUEST_METHOD'] == 'GET')
371373
{
372374
if($this->get_vars)
@@ -386,17 +388,21 @@ function init()
386388
$url[] = $key . '=' . urlencode($val);
387389
}
388390
}
389-
$this->set('current_url', self::getRequestUri() . '?' . join('&', $url));
391+
392+
$current_url = self::getRequestUri();
393+
if($url) $current_url .= '?' . join('&', $url);
390394
}
391395
else
392396
{
393-
$this->set('current_url', $this->getUrl());
397+
$current_url = $this->getUrl();
394398
}
395399
}
396400
else
397401
{
398-
$this->set('current_url', self::getRequestUri());
402+
$current_url = self::getRequestUri();
399403
}
404+
405+
$this->set('current_url', $current_url);
400406
$this->set('request_uri', self::getRequestUri());
401407
}
402408

@@ -1157,6 +1163,7 @@ function _setRequestArgument()
11571163
{
11581164
continue;
11591165
}
1166+
$key = htmlentities($key);
11601167
$val = $this->_filterRequestVar($key, $val);
11611168

11621169
if($requestMethod == 'GET' && isset($_GET[$key]))

common/tpl/redirect.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
</head>
66
<body>
77
<script>
8-
var idx = location.href.indexOf('?');
9-
var url = parent.location.href;
8+
var url = location.href;
9+
var idx = url.indexOf('?');
10+
1011
if(idx > -1 ) {
1112
var query_string = location.href.substr(idx+1, location.href.length);
1213
var args = {};
@@ -23,4 +24,4 @@
2324
}
2425
</script>
2526
</body>
26-
</html>
27+
</html>

config/config.inc.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* Display XE's full version.
3131
*/
32-
define('__XE_VERSION__', '1.7.10');
32+
define('__XE_VERSION__', '1.7.11');
3333
define('__XE_VERSION_ALPHA__', (stripos(__XE_VERSION__, 'alpha') !== false));
3434
define('__XE_VERSION_BETA__', (stripos(__XE_VERSION__, 'beta') !== false));
3535
define('__XE_VERSION_RC__', (stripos(__XE_VERSION__, 'rc') !== false));

modules/board/board.view.php

+9
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,15 @@ function dispBoardContentView(){
267267
}
268268
}
269269

270+
// if the document is TEMP saved, check Grant
271+
if($oDocument->getStatus() == 'TEMP')
272+
{
273+
if(!$oDocument->isGranted())
274+
{
275+
$oDocument = $oDocumentModel->getDocument(0);
276+
}
277+
}
278+
270279
}
271280
else
272281
{

modules/document/document.controller.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,10 @@ function updateReadedCount(&$oDocument)
876876
}
877877

878878
// Register session
879-
$_SESSION['readed_document'][$document_srl] = true;
879+
if(!$_SESSION['banned_document'][$document_srl])
880+
{
881+
$_SESSION['readed_document'][$document_srl] = true;
882+
}
880883

881884
return TRUE;
882885
}

modules/point/point.controller.php

+2
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,12 @@ function triggerUpdateReadedCount(&$obj)
420420
// Get the defaul configurations of the Point Module
421421
$config = $oModuleModel->getModuleConfig('point');
422422
// When the requested points are negative, compared it with the current point
423+
$_SESSION['banned_document'][$obj->document_srl] = false;
423424
if($config->disable_read_document == 'Y' && $point < 0 && abs($point)>$cur_point)
424425
{
425426
$message = sprintf(Context::getLang('msg_disallow_by_point'), abs($point), $cur_point);
426427
$obj->add('content', $message);
428+
$_SESSION['banned_document'][$obj->document_srl] = true;
427429
return new Object(-1, $message);
428430
}
429431
// If not logged in, pass

0 commit comments

Comments
 (0)