diff --git a/include/class.attachment.php b/include/class.attachment.php index a1ecfd97af55ea66d0ea9c684bb07ef96ab0ba03..b602b451c253587ff519c28419063a42ac5b44b8 100644 --- a/include/class.attachment.php +++ b/include/class.attachment.php @@ -78,11 +78,12 @@ class Attachment { static function lookup($var, $objectId=0) { - $id = is_numeric($var) ? $var : self::getIdByFileHash($var, $oid); + $id = is_numeric($var) ? $var : self::getIdByFileHash($var, + $objectId); return ($id && is_numeric($id) - && ($attach = new Attachment($id, $oid)) + && ($attach = new Attachment($id, $objectId)) && $attach->getId()==$id ) ? $attach : null; } diff --git a/include/class.task.php b/include/class.task.php index 29f947a461e858f9a9fcd5f4fe2256fb73627293..57767a41f1d17db7922446c8b056ad1dccdd25a8 100644 --- a/include/class.task.php +++ b/include/class.task.php @@ -278,7 +278,7 @@ class Task extends TaskModel { $vars['staffId'] = $thisstaff->getId(); $vars['poster'] = $thisstaff; if (!$vars['ip_address'] && $_SERVER['REMOTE_ADDR']) - $vars['ip_address'] = $SERVER['REMOTE_ADDR']; + $vars['ip_address'] = $_SERVER['REMOTE_ADDR']; $thread->addDescription($vars); diff --git a/include/class.thread.php b/include/class.thread.php index 1caeab492817e5c33bb2b450e5358650e5b5fe50..e6bf896e016b856959a5d7498df95682b0dbf88e 100644 --- a/include/class.thread.php +++ b/include/class.thread.php @@ -486,7 +486,7 @@ Class ThreadEntry { if(!$error) $error = sprintf(_S('Unable to import attachment - %s'), $attachment['name']); - //FIXME: $this->logComment(); + //FIXME: logComment here $this->getThread()->getObject()->logNote( _S('File Import Error'), $error, _S('SYSTEM'), false); }