* adjust for framework and fix bug for search use today.
This commit is contained in:
@@ -1789,7 +1789,7 @@ class baseRouter
|
||||
{
|
||||
if(isset($passedParams[$i]))
|
||||
{
|
||||
$defaultParams[$key] = strip_tags(urldecode($passedParams[$i]));
|
||||
$defaultParams[$key] = strip_tags($passedParams[$i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -452,7 +452,7 @@ $lang->noticePasteImg = "Paste image to editor.";
|
||||
define('DT_DATETIME1', 'Y-m-d H:i:s');
|
||||
define('DT_DATETIME2', 'y-m-d H:i');
|
||||
define('DT_MONTHTIME1', 'n/d H:i');
|
||||
define('DT_MONTHTIME2', 'n月d日 H:i');
|
||||
define('DT_MONTHTIME2', 'M d H:i');
|
||||
define('DT_DATE1', 'Y-m-d');
|
||||
define('DT_DATE2', 'Ymd');
|
||||
define('DT_DATE3', 'Y年m月d日');
|
||||
|
||||
@@ -62,7 +62,7 @@ function initKindeditor(afterInit)
|
||||
items:editorTool,
|
||||
filterMode: true,
|
||||
bodyClass:'article-content',
|
||||
urlType:'relative',
|
||||
urlType:'absolute',
|
||||
uploadJson: createLink('file', 'ajaxUpload', 'uid=' + kuid),
|
||||
allowFileManager:true,
|
||||
langType:'<?php echo $editorLang?>',
|
||||
|
||||
@@ -627,8 +627,8 @@ class fileModel extends model
|
||||
public function processImgURL($data, $editorList, $uid = '')
|
||||
{
|
||||
if(is_string($editorList)) $editorList = explode(',', str_replace(' ', '', $editorList));
|
||||
$readLinkReg = basename(helper::createLink('file', 'read', 'fileID=(%fileID%)', '(%viewType%)'));
|
||||
$readLinkReg = str_replace(array('%fileID%', '%viewType%', '?'), array('[0-9]+', '\w+', '\?'), $readLinkReg);
|
||||
$readLinkReg = helper::createLink('file', 'read', 'fileID=(%fileID%)', '(%viewType%)');
|
||||
$readLinkReg = str_replace(array('%fileID%', '%viewType%', '?', '/'), array('[0-9]+', '\w+', '\?', '\/'), $readLinkReg);
|
||||
foreach($editorList as $editorID)
|
||||
{
|
||||
if(empty($editorID) or empty($data->$editorID)) continue;
|
||||
|
||||
@@ -425,16 +425,16 @@ class searchModel extends model
|
||||
$lastMonth = date::getLastMonth();
|
||||
$thisMonth = date::getThisMonth();
|
||||
$yesterday = date::yesterday();
|
||||
$today = date::today();
|
||||
$today = date(DT_DATE1);
|
||||
if(strpos($query, '$') !== false)
|
||||
{
|
||||
$query = str_replace('$@me', $this->app->user->account, $query);
|
||||
$query = str_replace("'\$lastMonth'", "'" . $lastMonth['begin'] . "' and '" . $lastMonth['end'] . "'", $query);
|
||||
$query = str_replace("'\$thisMonth'", "'" . $thisMonth['begin'] . "' and '" . $thisMonth['end'] . "'", $query);
|
||||
$query = str_replace("'\$lastWeek'", "'" . $lastWeek['begin'] . "' and '" . $lastWeek['end'] . "'", $query);
|
||||
$query = str_replace("'\$thisWeek'", "'" . $thisWeek['begin'] . "' and '" . $thisWeek['end'] . "'", $query);
|
||||
$query = str_replace("'\$yesterday'", "'" . $yesterday . "' and '" . $yesterday . "'", $query);
|
||||
$query = str_replace("'\$today'", "'" . $today . "' and '" . $today . "'", $query);
|
||||
$query = str_replace("'\$lastMonth'", "'" . $lastMonth['begin'] . "' and '" . $lastMonth['end'] . "'", $query);
|
||||
$query = str_replace("'\$thisMonth'", "'" . $thisMonth['begin'] . "' and '" . $thisMonth['end'] . "'", $query);
|
||||
$query = str_replace("'\$lastWeek'", "'" . $lastWeek['begin'] . "' and '" . $lastWeek['end'] . "'", $query);
|
||||
$query = str_replace("'\$thisWeek'", "'" . $thisWeek['begin'] . "' and '" . $thisWeek['end'] . "'", $query);
|
||||
$query = str_replace("'\$yesterday'", "'" . $yesterday . ' 00:00:00' . "' and '" . $yesterday . ' 23:59:59' . "'", $query);
|
||||
$query = str_replace("'\$today'", "'" . $today . ' 00:00:00' . "' and '" . $today . ' 23:59:59' . "'", $query);
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user