Alexander Nicolaysen Sørnes <alex@thehandofagony.com>
Use objectManager to create monitors.
This commit is contained in:
@@ -76,6 +76,7 @@ class Monitor {
|
|||||||
{
|
{
|
||||||
/* Check for duplicate entries */
|
/* Check for duplicate entries */
|
||||||
$oMonitor = new monitor();
|
$oMonitor = new monitor();
|
||||||
|
$this->iUserId = $_SESSION['current']->iUserId;
|
||||||
$oMonitor->find($this->iUserId, $this->iVersionId);
|
$oMonitor->find($this->iUserId, $this->iVersionId);
|
||||||
if($oMonitor->iVersionId)
|
if($oMonitor->iVersionId)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -100,6 +101,12 @@ class Monitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update()
|
||||||
|
{
|
||||||
|
/* Stub */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetSubmitterId()
|
function objectGetSubmitterId()
|
||||||
{
|
{
|
||||||
return $this->iUserId;
|
return $this->iUserId;
|
||||||
@@ -235,9 +242,10 @@ class Monitor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Stub */
|
/* Stub */
|
||||||
function getOutputEditorValues()
|
function getOutputEditorValues($aClean)
|
||||||
{
|
{
|
||||||
return FALSE;
|
$this->iVersionId = $aClean['iVersionId'];
|
||||||
|
$this->iAppId = $aClean['iAppId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stub */
|
/* Stub */
|
||||||
|
|||||||
@@ -817,7 +817,7 @@ class ObjectManager
|
|||||||
else
|
else
|
||||||
$sRedirectLink = APPDB_ROOT;
|
$sRedirectLink = APPDB_ROOT;
|
||||||
|
|
||||||
util_redirect_and_exit($sRedirectLink);
|
$this->return_to_url($sRedirectLink);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -848,9 +848,16 @@ class version {
|
|||||||
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
||||||
if(!$oMonitor->iMonitorId)
|
if(!$oMonitor->iMonitorId)
|
||||||
{
|
{
|
||||||
echo '<form method="post" name="sMessage" action='.
|
echo '<form method="post" name="sMessage" action="'.
|
||||||
$this->objectMakeUrl().'&iAppId='.$oApp->iAppId.'>'."\n";
|
APPDB_ROOT."objectManager.php\">\n";
|
||||||
echo "\t".'<input type=hidden name="sSub" value="StartMonitoring" />'."\n";
|
echo "\t<input type=\"hidden\" name=\"iAppId\" value=\"".
|
||||||
|
$this->iAppId."\" />\n";
|
||||||
|
echo "\t<input type=\"hidden\" name=\"iVersionId\" value=\"".
|
||||||
|
$this->iVersionId."\" />\n";
|
||||||
|
echo "\t<input type=\"hidden\" name=\"sSubmit\" value=\"Submit\" />\n";
|
||||||
|
echo "\t<input type=\"hidden\" name=\"sClass\" value=\"monitor\" />\n";
|
||||||
|
echo "\t<input type=\"hidden\" name=\"sReturnTo\" value=\"".
|
||||||
|
$this->objectMakeUrl()."\" />\n";
|
||||||
echo "\t".'<input type=submit value="Monitor Changes" class="button" />'."\n";
|
echo "\t".'<input type=submit value="Monitor Changes" class="button" />'."\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user