Fixing style errors.
This commit is contained in:
parent
f73c0abec1
commit
6aaf1c2962
@ -100,7 +100,7 @@ class ActionsMyModule
|
|||||||
|
|
||||||
/* print_r($parameters); print_r($object); echo "action: " . $action; */
|
/* print_r($parameters); print_r($object); echo "action: " . $action; */
|
||||||
if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2'
|
if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2'
|
||||||
// Do what you want here...
|
// Do what you want here...
|
||||||
// You can for example call global vars like $fieldstosearchall to overwrite them, or update database depending on $action and $_POST values.
|
// You can for example call global vars like $fieldstosearchall to overwrite them, or update database depending on $action and $_POST values.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -88,7 +88,7 @@ if (empty($conf->mrp->enabled)) {
|
|||||||
}
|
}
|
||||||
$socid = 0;
|
$socid = 0;
|
||||||
if ($user->socid > 0) { // Protection if external user
|
if ($user->socid > 0) { // Protection if external user
|
||||||
//$socid = $user->socid;
|
//$socid = $user->socid;
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
//$result = restrictedArea($user, 'mrp', $id, '');
|
//$result = restrictedArea($user, 'mrp', $id, '');
|
||||||
|
|||||||
@ -264,7 +264,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") {
|
|||||||
// Delete line
|
// Delete line
|
||||||
for ($i = 0; $i < $nblines; $i++) {
|
for ($i = 0; $i < $nblines; $i++) {
|
||||||
if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) { // effacelignei for chrome, effacelignei_x for firefox
|
if (GETPOST("effaceligne".$i) || GETPOST("effaceligne".$i."_x") || GETPOST("effaceligne".$i.".x")) { // effacelignei for chrome, effacelignei_x for firefox
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->rights->opensurvey->write) {
|
if (!$user->rights->opensurvey->write) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ for ($i = 0; $i < $nblines; $i++) {
|
|||||||
for ($i = 0; $i < $nbcolonnes; $i++) {
|
for ($i = 0; $i < $nbcolonnes; $i++) {
|
||||||
if ((GETPOST("effacecolonne".$i) || GETPOST("effacecolonne".$i."_x") || GETPOST("effacecolonne".$i.".x"))
|
if ((GETPOST("effacecolonne".$i) || GETPOST("effacecolonne".$i."_x") || GETPOST("effacecolonne".$i.".x"))
|
||||||
&& $nbcolonnes > 1) { // effacecolonnei for chrome, effacecolonnei_x for firefox
|
&& $nbcolonnes > 1) { // effacecolonnei for chrome, effacecolonnei_x for firefox
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->rights->opensurvey->write) {
|
if (!$user->rights->opensurvey->write) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,7 +82,7 @@ if (!empty($creation_sondage_date) || !empty($creation_sondage_autre)) {
|
|||||||
$champdatefin = dol_mktime(0, 0, 0, GETPOST('champdatefinmonth'), GETPOST('champdatefinday'), GETPOST('champdatefinyear'));
|
$champdatefin = dol_mktime(0, 0, 0, GETPOST('champdatefinmonth'), GETPOST('champdatefinday'), GETPOST('champdatefinyear'));
|
||||||
|
|
||||||
if ($champdatefin && ($champdatefin > 0)) { // A date was provided
|
if ($champdatefin && ($champdatefin > 0)) { // A date was provided
|
||||||
// Expire date is not before today
|
// Expire date is not before today
|
||||||
if ($champdatefin >= dol_now()) {
|
if ($champdatefin >= dol_now()) {
|
||||||
$testdate = true;
|
$testdate = true;
|
||||||
$_SESSION['champdatefin'] = dol_print_date($champdatefin, 'dayrfc');
|
$_SESSION['champdatefin'] = dol_print_date($champdatefin, 'dayrfc');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user