[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc/custom/oppdater_utgaatt_objekt.php, 1.1.
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/inc/custom/oppdater_utgaatt_objekt.php, 1.1.2.3 |
Date: |
Mon, 8 Nov 2004 10:57:44 +0100 |
Update of /property/inc/custom
Modified Files:
Branch: proposed-0_9_18-branch
oppdater_utgaatt_objekt.php
date: 2004/11/08 09:57:44; author: sigurdne; state: Exp; lines: +46 -14
Log Message:
no message
=====================================================================
Index: property/inc/custom/oppdater_utgaatt_objekt.php
diff -u property/inc/custom/oppdater_utgaatt_objekt.php:1.1.2.2
property/inc/custom/oppdater_utgaatt_objekt.php:1.1.2.3
--- property/inc/custom/oppdater_utgaatt_objekt.php:1.1.2.2 Fri Nov 5
20:42:16 2004
+++ property/inc/custom/oppdater_utgaatt_objekt.php Mon Nov 8 09:57:44 2004
@@ -20,42 +20,57 @@
if($data['enabled']==1)
{
$confirm = True;
+ $cron = True;
}
else
{
$confirm =
get_var('confirm',array('POST'));
+ $execute =
get_var('execute',array('GET'));
}
+ if ($confirm)
+ {
+ $this->execute($cron);
+ }
+ else
+ {
+ $this->confirm($execute=False);
+ }
+ }
+
+
+ function confirm($execute='')
+ {
$link_data = array
(
'menuaction' =>
$this->currentapp.'.custom_functions.index',
- 'function' =>'oppdater_utgaatt_objekt'
+ 'function' =>'oppdater_utgaatt_objekt',
+ 'execute' => $execute,
);
- if ($confirm)
- {
- $receipt= $this->execute();
- }
- else
+
+ if(!$execute)
{
$lang_confirm_msg = 'Vil du virkelig
utføre denne operasjonen';
- $lang_yes = lang('yes');
}
+ $lang_yes = lang('yes');
+
$GLOBALS['phpgw']->xslttpl->add_file(array('confirm_custom'));
- $msgbox_data = $this->bocommon->msgbox_data($receipt);
+
+ $msgbox_data =
$this->bocommon->msgbox_data($this->receipt);
$data = array
(
'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
'done_action' =>
$GLOBALS['phpgw']->link('/admin/index.php'),
'run_action' =>
$GLOBALS['phpgw']->link('/index.php',$link_data),
- 'message' =>
$receipt['message'],
+ 'message' =>
$this->receipt['message'],
'lang_confirm_msg' =>
$lang_confirm_msg,
'lang_yes' =>
$lang_yes,
'lang_yes_statustext' => lang('Update the
category to not active based on if there is only nonactive apartments'),
- 'lang_no_statustext' => lang('Back to
Admin'),
+ 'lang_no_statustext' => 'tilbake',
'lang_no' =>
lang('no'),
'lang_done' =>
'Avbryt',
'lang_done_statustext' => 'tilbake'
@@ -66,10 +81,9 @@
$GLOBALS['phpgw_info']['flags']['app_header'] =
lang($this->currentapp) . ' - ' . $appname . ': ' . $function_msg;
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('confirm' => $data));
$GLOBALS['phpgw']->xslttpl->pp();
-
}
- function execute()
+ function execute($cron='')
{
$location_types =
$this->soadmin_location->select_location_type();
@@ -132,8 +146,9 @@
}
}
- $receipt['message'][]=array('msg'=>lang('%1
location %2 has been updated to not active of %3 already not
active',$j,$location_types[($type_id-2)]['descr'],count($update)));
+
$this->receipt['message'][]=array('msg'=>lang('%1 location %2 has been updated
to not active of %3 already not
active',$j,$location_types[($type_id-2)]['descr'],count($update)));
+ $log_msg .= lang('%1 location %2 has been
updated to not active of %3 already not
active',$j,$location_types[($type_id-2)]['descr'],count($update));
unset($outdated);
unset($update);
unset($joinmethod);
@@ -142,7 +157,24 @@
$this->db->transaction_commit();
- return $receipt;
+ if(!$cron)
+ {
+ $this->confirm($execute=False);
+ }
+
+ $msgbox_data =
$this->bocommon->msgbox_data($this->receipt);
+
+ $insert_values= array(
+ $cron,
+ 'oppdater_utgaatt_objekt',
+ implode(',',(array_keys($msgbox_data)))
+ );
+
+ $insert_values =
$this->bocommon->validate_db_insert($insert_values);
+
+ $sql = "INSERT INTO fm_cron_log (cron,process,message) "
+ . "VALUES ($insert_values)";
+ $this->db->query($sql,__LINE__,__FILE__);
}
}
?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc/custom/oppdater_utgaatt_objekt.php, 1.1.2.3,
nomail <=