From 0339fa60c2a467e49649e5bbc563eec81e6f9a39 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?=
';
- }
-
- return $shRet;
-}
-
?>
diff --git a/include/note.php b/include/note.php
index 1d8f06d..1558d66 100644
--- a/include/note.php
+++ b/include/note.php
@@ -7,17 +7,12 @@ require_once(BASE."include/version.php");
/************************************/
-define('APPNOTE_SHOW_FOR_ALL', -1);
-define('APPNOTE_SHOW_FOR_VERSIONS', -2);
-define('APPNOTE_SHOW_FOR_APP', -3);
-
/**
* Note class for handling notes
*/
class Note {
var $iNoteId;
var $iVersionId;
- var $iAppId;
var $sTitle;
var $shDescription;
var $iSubmitterId;
@@ -43,7 +38,6 @@ class Note {
{
$this->iNoteId = $oRow->noteId;
$this->iVersionId = $oRow->versionId;
- $this->iAppId = $oRow->appId;
$this->sTitle = $oRow->noteTitle;
$this->shDescription = $oRow->noteDesc;
$this->sSubmitTime = $oRow->submitTime;
@@ -60,11 +54,11 @@ class Note {
function create()
{
$hResult = query_parameters("INSERT INTO appNotes (versionId, ".
- "appId, noteTitle, noteDesc, submitterId, ".
+ "noteTitle, noteDesc, submitterId, ".
"submitTime) ".
- "VALUES('?', '?', '?', '?', '?', ?)",
- $this->iVersionId, $this->iAppId,
- $this->sTitle, $this->shDescription,
+ "VALUES('?', '?', '?', '?', ?)",
+ $this->iVersionId, $this->sTitle,
+ $this->shDescription,
$_SESSION['current']->iUserId,
"NOW()");
@@ -158,18 +152,9 @@ class Note {
function SendNotificationMail($sAction="add",$sMsg=null)
{
- if(!$this->iAppId)
- {
- $oVersion = new version($this->iVersionId);
- $sAppName = version::fullName($this->iVersionId);
- $sMsg .= $oVersion->objectMakeUrl()."\n";
- } else
- {
- $oApp = new application($this->iAppId);
- $sAppName = $oApp->sName;
- $sMsg .= $oApp->objectMakeUrl()."\n";
- }
-
+ $oVersion = new version($this->iVersionId);
+ $sAppName = version::fullName($this->iVersionId);
+ $sMsg .= $oVersion->objectMakeUrl()."\n";
switch($sAction)
{
case "add":
@@ -234,14 +219,7 @@ class Note {
$sClass = 'defaultnote';
}
- if(!$aVars || !getInput('shReturnTo', $aVars))
- {
- $oVersion = new version($this->iVersionId);
- $shReturnTo = $oVersion->objectMakeUrl();
- } else
- {
- $shReturnTo = $aVars['shReturnTo'];
- }
+ $oVersion = new version($this->iVersionId);
$shOutput = html_frame_start("","98%",'',0);
@@ -254,7 +232,7 @@ class Note {
if((!$aVars || $aVars['bEditing'] != "true") && $this->canEdit())
{
$shOutput .= " ';
}
@@ -265,37 +243,6 @@ class Note {
echo $shOutput;
}
- function displayNotesForEntry($iVersionId, $iAppId = null)
- {
- if($iVersionId)
- {
- $oVersion = new version($iVersionId);
- $oApp = $oVersion->objectGetParent();
- $hResult = query_parameters("SELECT noteId FROM appNotes WHERE versionId = '?' OR (appId = '?' AND (versionId = '?' OR versionId = '?'))", $iVersionId, $oApp->objectGetId(), APPNOTE_SHOW_FOR_ALL, APPNOTE_SHOW_FOR_VERSIONS);
- } else if($iAppId)
- {
- $hResult = query_parameters("SELECT noteId FROM appNotes WHERE appId = '?' AND versionId = '?' OR versionId = '?'", $iAppId, APPNOTE_SHOW_FOR_ALL, APPNOTE_SHOW_FOR_APP);
- }
-
- if(!$hResult)
- return;
-
- if($iVersionId)
- $oVersion = new version($iVersionId);
- else
- $oApp = new application($iAppId);
-
- while($oRow = mysql_fetch_object($hResult))
- {
- $oNote = new note($oRow->noteId);
-
- $shReturnTo = $iVersionId ? $oVersion->objectMakeUrl() : $oApp->objectMakeUrl();
-
- $aVars = array('shReturnTo' => $shReturnTo, 'bEditing' => 'false');
- $oNote->display($aVars);
- }
- }
-
function objectGetCustomVars($sAction)
{
switch($sAction)
@@ -304,7 +251,7 @@ class Note {
return array("bEditing");
case "add":
- return array('iVersionId','iAppId','sNoteTitle');
+ return array("iVersionId","sNoteTitle");
default:
return null;
@@ -318,12 +265,6 @@ class Note {
if(!$this->iVersionId)
$this->iVersionId = $aValues['iVersionId'];
- if(!$this->iAppId)
- $this->iAppId = getInput('iAppId', $aValues);
-
- if($this->iAppId && !$this->iVersionId)
- $this->iVersionId = APPNOTE_SHOW_FOR_ALL;
-
if(!$this->sTitle)
$this->sTitle = $aValues['sNoteTitle'];
}
@@ -335,9 +276,7 @@ class Note {
echo '';
echo '';
- if(!$this->iAppId)
- echo '';
- echo '';
+ echo '';
echo '";
- $shOutput .= " ',"\n";
@@ -346,14 +285,6 @@ class Note {
echo '',"\n";
echo 'Title '."\n";
echo '