1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Regex fixes and path fix for TinyMce.

This commit is contained in:
Cameron 2020-12-18 13:07:45 -08:00
parent 5988595989
commit 7238743542
9 changed files with 13 additions and 10 deletions

View File

@ -628,7 +628,7 @@ class admin_log_form_ui extends e_admin_form_ui
{
case 'read': // List Page
$text = preg_replace_callback("#\[!(\w+?)(=.+?){0,1}!]#", 'log_process', $curVal);
$text = preg_replace_callback("#\[!(\w+?)(=.+?)?!]#", 'log_process', $curVal);
$text = $tp->toHTML($text,false,'E_BODY');
if(strpos($text,'Array')!==false || strlen($text)>300)
@ -1763,7 +1763,7 @@ if(isset($page_title[$action]))
break;
case 'dblog_remarks':
// Look for pseudo-code for newlines, link insertion
$val = preg_replace_callback("#\[!(\w+?)(=.+?){0,1}!]#", 'log_process', $row['dblog_remarks']);
$val = preg_replace_callback("#\[!(\w+?)(=.+?)?!]#", 'log_process', $row['dblog_remarks']);
break;
case 'dblog_ip':
$val = e107::getIPHandler()->ipDecode($row['dblog_ip']);

View File

@ -1930,7 +1930,7 @@ class lancheck
return TRUE;
}
return (preg_match('/^.{1}/us',$str,$ar) == 1);
return (preg_match('/^./us',$str,$ar) == 1);
}

View File

@ -552,7 +552,7 @@ class e_date
}
else
{
preg_match('#(\d{1,2})(?:\D(\d{1,2}))?(?:\D(\d{1,2})){0,1}#', $timeString, $timeVals);
preg_match('#(\d{1,2})(?:\D(\d{1,2}))?(?:\D(\d{1,2}))?#', $timeString, $timeVals);
}
}
elseif ($endDay)

View File

@ -260,7 +260,7 @@ class e_menuManager {
$FOOTER = ($CUSTOMFOOTER) ? $CUSTOMFOOTER : $FOOTER;
}
}
elseif($this->curLayout && $this->curLayout != "legacyCustom" && (isset($CUSTOMHEADER[$this->curLayout]) || isset($CUSTOMFOOTER[$this->curLayout]))) // 0.7 themes
elseif($this->curLayout && $this->curLayout !== "legacyCustom" && (isset($CUSTOMHEADER[$this->curLayout]) || isset($CUSTOMFOOTER[$this->curLayout]))) // 0.7 themes
{
// echo " MODE 0.7 ".$this->curLayout;
$HEADER = isset($CUSTOMHEADER[$this->curLayout]) ? $CUSTOMHEADER[$this->curLayout] : $HEADER;

View File

@ -3600,7 +3600,7 @@ class e_tree_model extends e_front_model
protected function prepareSimulatedPagination()
{
$db_query = $this->getParam('db_query');
$db_query = preg_replace_callback("/LIMIT ([\d]+)[ ]*(?:,|OFFSET){0,1}[ ]*([\d]*)/i", function($matches)
$db_query = preg_replace_callback("/LIMIT ([\d]+)[ ]*(?:,|OFFSET)?[ ]*([\d]*)/i", function($matches)
{
// Count only
if (empty($matches[2]))

View File

@ -2285,7 +2285,7 @@ class e_db_mysql implements e_db
$row = $this->fetch('num');
$qry = $row[1];
// $qry = str_replace($old, $new, $qry);
$qry = preg_replace("#CREATE\sTABLE\s`{0,1}".$old."`{0,1}\s#", "CREATE TABLE {$new} ", $qry, 1); // More selective search
$qry = preg_replace("#CREATE\sTABLE\s`?".$old."`?\s#", "CREATE TABLE {$new} ", $qry, 1); // More selective search
}
else
{

View File

@ -52,6 +52,6 @@ If you set a start and/or end date your news item will only be displayed between
case 'list' :
default :
$text = 'List of all news items. To edit or delete, click on one of the icons in the \'options\' column. To view the item, click
on the title.';
on the ID.';
}
$ns -> tablerender($caption, $text);

View File

@ -125,7 +125,6 @@ class _blank_dashboard // include plugin-folder in the name.
function status() // Status Panel in the admin area
{
$var[0]['icon'] = "<img src='".e_PLUGIN."_blank/images/blank_16.png' alt='' />";
$var[0]['title'] = "My Title";
$var[0]['url'] = e_PLUGIN_ABS."_blank/_blank.php";

View File

@ -858,6 +858,10 @@ class wysiwyg
$pathAn .= '/';
$pathAn .= e107::getLibrary()->getProperty('animate.css', 'path'); // sub-folder
$pathAn = $tp->replaceConstants($pathAn, 'abs');
$pathFA = $tp->replaceConstants($pathFA, 'abs');
$pathBS = $tp->replaceConstants($pathBS, 'abs');
$editorCSS = array(
0 => $pathBS . '/css/bootstrap.min.css',
1 => $pathFA . '/css/font-awesome.min.css',
@ -868,7 +872,7 @@ class wysiwyg
// file_put_contents(e_LOG."wysiwyg.log", print_r($editorCSS,true));
// $editorCSS = $tp->replaceConstants($editorCSS, 'abs');
// $editorCSS = $tp->replaceConstants($editorCSS, 'abs');
$ret['content_css'] = json_encode($editorCSS);
$ret['content_style'] = "div.clearfix { border-top:1px solid red } ";