Skip to content

Commit

Permalink
Bug-fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejey committed Jul 18, 2016
1 parent c379aad commit b872280
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/common.class.php
Expand Up @@ -104,7 +104,7 @@ function say($ph, $level = 0, $member_id = 0)
$pt = new patterns();
$res=$pt->checkAllPatterns($member_id);
if (!$res) {
processCommand($msg);
processCommand($ph);
}
processSubscriptions('COMMAND', array('level' => $level, 'message' => $ph, 'member_id' => $member_id));
return;
Expand Down Expand Up @@ -437,7 +437,7 @@ function runScheduledJobs()

$result = preg_replace('/<!--.+-->/is', '', $result);

if ($result != 'OK')
if (!preg_match('/OK$/', $result))
{
getLogger(__FILE__)->error(sprintf('Error executing job %s (%s): %s', $jobs[$i]['TITLE'], $jobs[$i]['ID'], $result));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/hooks.inc.php
Expand Up @@ -137,7 +137,7 @@ function removeMissingSubscribers()
foreach ($data as $k => $v)
{
$module_name = $k;
if (!file_exists(DIR_MODULES . 'modules/' . $module_name . '/' . $module_name . '.class.php'))
if (!file_exists(DIR_MODULES . $module_name . '/' . $module_name . '.class.php'))
{
unset($data[$module_name]);
$changed = 1;
Expand Down
14 changes: 14 additions & 0 deletions modules/properties/properties_edit.inc.php
Expand Up @@ -31,6 +31,20 @@
$ok=0;
}

if ($ok && $rec['CLASS_ID']) {
include_once(DIR_MODULES.'classes/classes.class.php');
$cl=new classes();
$parent_properties=$cl->getParentProperties($rec['CLASS_ID']);
$seen=array();
foreach($parent_properties as $k=>$v) {
$seen[strtoupper($v['TITLE'])]=1;
}
if (IsSet($seen[strtoupper($rec['TITLE'])])) {
$ok=0;
$out['ERR_TITLE']=1;
}
}

global $keep_history;
$rec['KEEP_HISTORY']=(int)$keep_history;

Expand Down
2 changes: 1 addition & 1 deletion templates/commands/menu.tpl
Expand Up @@ -290,7 +290,7 @@
{if $item.SUB_PRELOAD=='1'}
<div data-role="collapsible" data-iconpos="right">
<h2><span id="label_{$ID}">{if $item.ICON!=''}<img src="{$smarty.const.ROOTHTML}cms/icons/{$item.ICON}" alt="" style="margin-right:10px;top:0.4em;max-height:32px;max-width:32px;height:32px;width:32px;vertical-align:middle;">{/if}{$item.TITLE}</span></h2>
<h2><span id="label_{$item.ID}">{if $item.ICON!=''}<img src="{$smarty.const.ROOTHTML}cms/icons/{$item.ICON}" alt="" style="margin-right:10px;top:0.4em;max-height:32px;max-width:32px;height:32px;width:32px;vertical-align:middle;">{/if}{$item.TITLE}</span></h2>
<ul data-role="listview" data-inset="true">
{if $item.RESULT}
{menu items=$item.RESULT}
Expand Down

0 comments on commit b872280

Please sign in to comment.