fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17221] prepare for custom code outside tree


From: sigurdne
Subject: [Fmsystem-commits] [17221] prepare for custom code outside tree
Date: Wed, 1 Nov 2017 14:46:51 -0400 (EDT)

Revision: 17221
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17221
Author:   sigurdne
Date:     2017-11-01 14:46:51 -0400 (Wed, 01 Nov 2017)
Log Message:
-----------
prepare for custom code outside tree

Added Paths:
-----------
    thirdparty/PE_custom/BK_EBF/property/inc/cron/default/lag_lang_filer.php

Copied: 
thirdparty/PE_custom/BK_EBF/property/inc/cron/default/lag_lang_filer.php (from 
rev 17218, trunk/property/inc/cron/default/lag_lang_filer.php)
===================================================================
--- thirdparty/PE_custom/BK_EBF/property/inc/cron/default/lag_lang_filer.php    
                        (rev 0)
+++ thirdparty/PE_custom/BK_EBF/property/inc/cron/default/lag_lang_filer.php    
2017-11-01 18:46:51 UTC (rev 17221)
@@ -0,0 +1,141 @@
+<?php
+       /**
+        * phpGroupWare - property: a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+        * @package property
+        * @subpackage custom
+        * @version $Id$
+        */
+
+       /**
+        * Description
+        * @package property
+        */
+       class lag_lang_filer
+       {
+
+               var $function_name = 'lag_lang_filer';
+
+               function lag_lang_filer()
+               {
+                       //      $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $this->bocommon = CreateObject('property.bocommon');
+                       $this->db = $this->bocommon->new_db();
+               }
+
+               function pre_run( $data = '' )
+               {
+                       if ($data['enabled'] == 1)
+                       {
+                               $confirm = true;
+                               $cron = true;
+                       }
+                       else
+                       {
+                               $confirm = phpgw::get_var('confirm', 'bool', 
'POST');
+                               $execute = phpgw::get_var('execute', 'bool', 
'GET');
+                       }
+                       if ($confirm)
+                       {
+                               $this->execute($cron);
+                       }
+                       else
+                       {
+                               $this->confirm($execute = false);
+                       }
+               }
+
+               function confirm( $execute = '' )
+               {
+                       $link_data = array
+                               (
+                               'menuaction' => 
'property.custom_functions.index',
+                               'function' => $this->function_name,
+                               'execute' => $execute,
+                       );
+
+                       if (!$execute)
+                       {
+                               $lang_confirm_msg = lang('do you want to 
perform this action');
+                       }
+                       $lang_yes = lang('yes');
+                       
$GLOBALS['phpgw']->xslttpl->add_file(array('confirm_custom'));
+                       $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' => $this->receipt['message'],
+                               'lang_confirm_msg' => $lang_confirm_msg,
+                               'lang_yes' => $lang_yes,
+                               'lang_yes_statustext' => 'lag_lang_filer fra 
database',
+                               'lang_no_statustext' => 'tilbake',
+                               'lang_no' => lang('no'),
+                               'lang_done' => 'Avbryt',
+                               'lang_done_statustext' => 'tilbake'
+                       );
+
+                       $appname = lang('location');
+                       $function_msg = 'lag_lang_filer';
+                       $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
+                       $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('confirm' => $data));
+                       $GLOBALS['phpgw']->xslttpl->pp();
+               }
+
+               function execute( $cron = '' )
+               {
+
+                       $sql = "SELECT * from phpgw_lang WHERE app_name = 
'property' AND lang='no' ORDER BY message_id ASC";
+
+                       $this->db->query($sql, __LINE__, __FILE__);
+
+                       $i = 0;
+                       while ($this->db->next_record())
+                       {
+                               $str.=$this->db->f('message_id') . "\t";
+                               $str.=$this->db->f('app_name') . "\t";
+                               $str.=$this->db->f('lang') . "\t";
+                               $str.=$this->db->f('content') . "\n";
+                               $i++;
+                       }
+
+                       _debug_array($str);
+                       /*                         $filename= 'phpgw_no_lang';
+
+                         $size=strlen($str);
+
+                         $browser = CreateObject('phpgwapi.browser');
+                         
$browser->content_header($filename,'application/txt',$size);
+
+                         echo $str;
+                        */
+
+                       $this->receipt['message'][] = array('msg' => $i . ' 
tekster lagt til');
+
+                       if (!$cron)
+                       {
+                               $this->confirm($execute = false);
+                       }
+               }
+       }
\ No newline at end of file


Property changes on: 
thirdparty/PE_custom/BK_EBF/property/inc/cron/default/lag_lang_filer.php
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Revision Author Id
\ No newline at end of property
Added: svn:mergeinfo
## -0,0 +1,3 ##
+/branches/dev-syncromind/property/inc/cron/default/lag_lang_filer.php:13653
+/branches/dev-syncromind-2/property/inc/cron/default/lag_lang_filer.php:14933-16846
+/branches/stavangerkommune/property/inc/cron/default/lag_lang_filer.php:12743-12875,12986
\ No newline at end of property



reply via email to

[Prev in Thread] Current Thread [Next in Thread]