Commit 3946dacc authored by Jean-Paul Saman's avatar Jean-Paul Saman

Cleanup tabs and replace them by spaces.

parent ccd99123
<?php
/*
* Copyright (C) 2007, M2X
* Copyright (C) 2007-2008, M2X
*
* Authors: Jean-Paul Saman
*
......@@ -57,8 +57,7 @@ if ($del) {
$AppUI->setMsg( "Timesheet deleted", UI_MSG_ALERT);
$AppUI->redirect( "m=timesheet" );
}
}
else if ($stat) {
} else if ($stat) {
if ($msg = $obj->change_status($obj->timesheet_status)) {
$AppUI->setMsg( $msg, UI_MSG_ERROR );
$AppUI->redirect();
......@@ -66,8 +65,7 @@ else if ($stat) {
$AppUI->setMsg( "Timesheet status updated", UI_MSG_ALERT);
$AppUI->redirect( "m=timesheet&a=addedit&timesheet_id=".$obj->timesheet_id );
}
}
else if ($period) {
} else if ($period) {
if ($msg = $obj->change_period($obj->timesheet_period)) {
$AppUI->setMsg( $msg, UI_MSG_ERROR );
$AppUI->redirect();
......@@ -75,15 +73,15 @@ else if ($period) {
$AppUI->setMsg( "Timesheet period changed", UI_MSG_ALERT);
$AppUI->redirect( "m=timesheet&a=addedit&timesheet_id=".$obj->timesheet_id );
}
}
else {
} else {
// simply store the added/edited quote in database via the store method of the timesheet
// child class of the CDpObject provided ba the dPFramework
if (($msg = $obj->store())) {
$AppUI->setMsg( $msg, UI_MSG_ERROR );
} else {
$isNotNew = @$_POST['timesheet_id'];
$isNotNew = $_POST['timesheet_id'];
$AppUI->setMsg( $isNotNew ? 'Timesheet updated' : 'Timesheet inserted', UI_MSG_OK);
} $AppUI->redirect("m=timesheet" );
}
$AppUI->redirect("m=timesheet" );
}
?>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment