} $out['OK'] = 1; } } if (!$my_meth['ID']) { $out['CALL_PARENT'] = 1; } else { $out['CODE'] = htmlspecialchars($my_meth['CODE']); $out['SCRIPT_ID'] = $my_meth['SCRIPT_ID']; $out['CALL_PARENT'] = (int) $my_meth['CALL_PARENT']; } $out['OVERWRITE'] = 1; } include_once DIR_MODULES . 'classes/classes.class.php'; $cl = new classes(); $methods = $cl->getParentMethods($rec['CLASS_ID'], '', 1); $total = count($methods); for ($i = 0; $i < $total; $i++) { $my_meth = SQLSelectOne("SELECT ID FROM methods WHERE OBJECT_ID='" . $rec['ID'] . "' AND TITLE LIKE '" . DBSafe($methods[$i]['TITLE']) . "'"); if ($my_meth['ID']) { $methods[$i]['CUSTOMIZED'] = 1; } } $out['METHODS'] = $methods; } // step: history if ($this->tab == 'history') { } if (is_array($rec)) { foreach ($rec as $k => $v) { if (!is_array($v)) {
} $qry="1"; // search filters if (IsSet($this->object_id)) { $object_id=$this->object_id; $qry.=" AND OBJECT_ID='".$this->object_id."'"; } else { global $object_id; } if (IsSet($this->class_id)) { $class_id=$this->class_id; $qry.=" AND CLASS_ID='".$this->class_id."'"; include_once(DIR_MODULES.'classes/classes.class.php'); $cl=new classes(); $out['PARENT_METHODS']=$cl->getParentMethods($this->class_id); if (!$out['PARENT_METHODS'][0]['ID']) { unset($out['PARENT_METHODS']); } } else { global $class_id; } // QUERY READY global $save_qry; if ($save_qry) { $qry=$session->data['methods_qry']; } else { $session->data['methods_qry']=$qry; }
/** * Title * * Description * * @access public */ function getMethodByName($name, $class_id, $id) { if ($id) { $meth=SQLSelectOne("SELECT ID FROM methods WHERE OBJECT_ID='".(int)$id."' AND TITLE LIKE '".DBSafe($name)."'"); if ($meth['ID']) { return $meth['ID']; } } include_once(DIR_MODULES.'classes/classes.class.php'); $cl=new classes(); $meths=$cl->getParentMethods($class_id, '', 1); $total=count($meths); for($i=0;$i<$total;$i++) { if (strtolower($meths[$i]['TITLE'])==strtolower($name)) { return $meths[$i]['ID']; } } return false; }