* fix bug for process image url in windows.

This commit is contained in:
wangyidong
2017-06-29 09:51:09 +08:00
parent 9dbd80045c
commit 6179da02b8
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -751,7 +751,7 @@ class baseValidater
global $filter;
if(strpos($rule, '::') !== false) list($operator, $param) = explode('::', $rule);
if(strpos($rule,'::') === false) list($operator, $param) = array($rule, '');
if(strpos($rule, '::') === false) list($operator, $param) = array($rule, '');
if($operator == 'reg' and isset($filter->rules->$param)) $param = $filter->rules->$param;
return array($operator, $param);
+2 -1
View File
@@ -627,7 +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%)', '(\w+)'));
$readLinkReg = helper::createLink('file', 'read', 'fileID=(%fileID%)', '(\w+)');
$readLinkReg = str_replace($this->config->webRoot, '', $readLinkReg);
$readLinkReg = str_replace(array('%fileID%', '?'), array('[0-9]+', '\?'), $readLinkReg);
foreach($editorList as $editorID)
{
+1 -1
View File
@@ -6,7 +6,7 @@
<table cellpadding='0' cellspacing='0' style='width: 100%; border: none; border-collapse: collapse;'>
<tr>
<td style='padding: 10px; background-color: #F8FAFE; border: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid #e5e5e5;'><?php echo date('Y-m-d') ?></td>
<td style='width: 40px; text-align: right; background-color: #F8FAFE; border: none; vertical-align: top; padding: 10px; border-bottom: 1px solid #e5e5e5;'><?php echo html::a($url, $url, 'target="_blank"');?></td>
<td style='width: 40px; text-align: right; background-color: #F8FAFE; border: none; vertical-align: top; padding: 10px; border-bottom: 1px solid #e5e5e5;'><?php echo html::a($url . $config->webRoot, $url . $config->webRoot, 'target="_blank"');?></td>
</tr>
</table>
</td>