[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7922] Merge 7906:7921 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7922] Merge 7906:7921 from trunk |
Date: |
Sun, 23 Oct 2011 13:02:40 +0000 |
Revision: 7922
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7922
Author: sigurdne
Date: 2011-10-23 13:02:39 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Merge 7906:7921 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/booking/inc/class.boapplication.inc.php
branches/Version-1_0-branch/booking/inc/class.uidashboard.inc.php
branches/Version-1_0-branch/booking/setup/phpgw_no.lang
branches/Version-1_0-branch/booking/templates/base/application.xsl
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
branches/Version-1_0-branch/property/inc/import/default/cvs_import_kunstoversikt_bkb
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921
Modified: branches/Version-1_0-branch/booking/inc/class.boapplication.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.boapplication.inc.php
2011-10-23 11:18:35 UTC (rev 7921)
+++ branches/Version-1_0-branch/booking/inc/class.boapplication.inc.php
2011-10-23 13:02:39 UTC (rev 7922)
@@ -88,26 +88,26 @@
return $applications;
}
- public function read_dashboard_data($for_case_officer_id =
null) {
+ public function read_dashboard_data($for_case_officer_id =
array(null,null)) {
$params = $this->build_default_read_params();
-
+
if (!isset($params['filters'])) $params['filters'] =
array();
$where_clauses = !isset($params['filters']['where']) ?
array() : (array)$params['filters']['where'];
- if (!is_null($for_case_officer_id)) {
- $where_clauses[] =
"(%%table%%.display_in_dashboard = 1 AND %%table%%.case_officer_id =
".intval($for_case_officer_id).')';
+ if (!is_null($for_case_officer_id[0])) {
+ $where_clauses[] =
"(%%table%%.display_in_dashboard = 1 AND %%table%%.case_officer_id =
".intval($for_case_officer_id[1]).')';
+ } else {
+ $where_clauses[] = "(%%table%%.case_officer_id
= ".intval($for_case_officer_id[1]).')';
}
+
if ($building_id = phpgw::get_var('filter_building_id',
'int', 'GET', false)) {
$where_clauses[] = "(%%table%%.id IN (SELECT
DISTINCT a.id FROM bb_application a, bb_application_resource ar, bb_resource r
WHERE ar.application_id = a.id AND ar.resource_id = r.id AND r.building_id =
".intval($building_id)."))";
}
-# if ($type = phpgw::get_var('type') != 'not') {
-# $params['filters']['type'] = phpgw::get_var('type');
-# }
-
- if ($status = phpgw::get_var('status') != 'not') {
+
+ if ( $status = phpgw::get_var('status') != '') {
$params['filters']['status'] = phpgw::get_var('status');
- }
+ }
$params['filters']['where'] = $where_clauses;
Modified: branches/Version-1_0-branch/booking/inc/class.uidashboard.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uidashboard.inc.php
2011-10-23 11:18:35 UTC (rev 7921)
+++ branches/Version-1_0-branch/booking/inc/class.uidashboard.inc.php
2011-10-23 13:02:39 UTC (rev 7922)
@@ -73,8 +73,8 @@
'text' => lang('Status').':',
'list' => array(
array(
- 'id' => 'not',
- 'name' => lang('Not selected')
+ 'id' => '',
+ 'name' => lang('All')
),
array(
'id' => 'NEW',
@@ -92,10 +92,6 @@
'id' => 'ACCEPTED',
'name' => lang('ACCEPTED')
),
- array(
- 'id' => 'CLOSED',
- 'name' => lang('CLOSED')
- )
)
),
array('type' =>
'autocomplete',
@@ -132,10 +128,6 @@
'label' =>
lang('Status')
),
array(
- 'key' => 'type',
- 'label' => lang('Type')
- ),
- array(
'key' => 'created',
'label' =>
lang('Created')
),
@@ -172,7 +164,7 @@
public function index_json()
{
$this->db = $GLOBALS['phpgw']->db;
- $applications =
$this->bo->read_dashboard_data($this->show_all_dashboard_applications() ? null
: $this->current_account_id());
+ $applications =
$this->bo->read_dashboard_data($this->show_all_dashboard_applications() ?
array(null,$this->current_account_id()) : array(1,$this->current_account_id()));
foreach($applications['results'] as &$application)
{
$application['status'] =
lang($application['status']);
Modified: branches/Version-1_0-branch/booking/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2011-10-23
11:18:35 UTC (rev 7921)
+++ branches/Version-1_0-branch/booking/setup/phpgw_no.lang 2011-10-23
13:02:39 UTC (rev 7922)
@@ -420,7 +420,7 @@
Information about the event booking no Informasjon om arrangementet
Short description. For public events, activities and training under the
direction of organizations and clubs, this information will be displayed on the
internet booking no Gi en kort beskrivelse av arrangementet. For
åpne arrangement, aktiviteter og trening i regi av organisasjoner og klubber
vises denne informasjonen på internett
To borrow premises you must verify that you have read terms and conditions
booking no For å låne lokaler må du bekrefte at du har lest juridiske
betingelser
-In order to send the invoice we need information about either customer
organization number or norwegian social security number booking no For å
kunne sende faktura trenger vi opplysninger om organisasjonsnr. eller
fødselsnr. Organisasjonsnr. finner du her: www.brreg.no
+In order to send the invoice we need information about either customer
organization number or norwegian social security number booking no For å
kunne sende faktura trenger vi opplysninger om organisasjonsnr. eller
fødselsnr. Interne fra BK oppgir ressursnr. Organisasjonsnr. finner du her:
www.brreg.no
Event type booking no Arrangementstype
Private event booking no Privat arrangement
Public event booking no Offentlig arrangement
@@ -534,3 +534,5 @@
Cancelation of bookings from booking no Avbestilling av bookinger fra
Booking system settings booking no Bookingmodul systeminnstillinger
Frontend users can delete bookings and allocations booking no Brukere
av frontend kan slette bookinger og tildelinger direkte
+All that borrow premises from Bergen Kommune must verify that they have read
the terms and conditions, this is usually fire regulations and house rules.
booking no Alle som leier lokaler hos Bergen kommune må bekrefte at de
har lest betingelsene, dette gjelder som regel brannforskrifter og husreglement.
+
Modified: branches/Version-1_0-branch/booking/templates/base/application.xsl
===================================================================
--- branches/Version-1_0-branch/booking/templates/base/application.xsl
2011-10-23 11:18:35 UTC (rev 7921)
+++ branches/Version-1_0-branch/booking/templates/base/application.xsl
2011-10-23 13:02:39 UTC (rev 7922)
@@ -212,7 +212,7 @@
</dl>
<dl class="form-col">
<div class="heading"><br />8. <xsl:value-of
select="php:function('lang', 'Terms and conditions')" /></div>
- <p>Alle som leier lokaler hos Bergen kommune må
bekrefte at de har lest betingelsene, dette gjelder som regel brannforskrifter
og husreglement.</p>
+ <p><xsl:value-of select="php:function('lang', 'All that
borrow premises from Bergen Kommune must verify that they have read the terms
and conditions, this is usually fire regulations and house rules.')" /></p>
<br />
<div id='regulation_documents'> </div>
<br />
Modified:
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
===================================================================
---
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2011-10-23 11:18:35 UTC (rev 7921)
+++
branches/Version-1_0-branch/property/inc/cron/default/Import_fra_basware_X205.php
2011-10-23 13:02:39 UTC (rev 7922)
@@ -47,23 +47,8 @@
var $attestant = 83; //cat_id for rolle
var $budsjettansvarlig = 146; //cat_id for rolle
var $default_kostra_id = 9999; //dummy
+ var $debug = false;
- var $import = array(
- 'Bilagsnr' => 'bilagsnr',
- 'Fakturanr' => 'fakturanr',
- 'Konto' => 'spbudact_code',
- 'Objekt' => 'dima', //objectclass: organizationalPerson
- 'DimB' => 'dimb',
- 'KID' => 'kidnr',
- 'MVA' => 'mvakode',
- 'Tjeneste'=> 'kostra_id',
- 'Belop [kr]' => 'belop',
- 'Referanse' => 'referanse',
- 'BOEI Gateadresse' => 'boei_gateadresse',
- );
-
- var $header =
array('Bilagsnr','Fakturanr','Konto','Objekt','DimB','KID','MVA','Tjeneste','Belop
[kr]','Referanse');
-
function __construct()
{
$this->soXport =
CreateObject('property.soXport');
@@ -80,9 +65,9 @@
$this->config->read();
}
- function pre_run($data='')
+ function pre_run($data = array())
{
- if($data['enabled']==1)
+ if(isset($data['enabled']) && $data['enabled']==1)
{
$confirm = true;
$cron = true;
@@ -93,6 +78,15 @@
$execute = phpgw::get_var('execute',
'bool', 'GET');
}
+ if( isset($data['debug']) && $data['debug'] )
+ {
+ $this->debug = true;
+ }
+ else
+ {
+ $this->debug = phpgw::get_var('debug',
'bool');
+ }
+
if ($confirm)
{
$this->execute($cron);
@@ -107,9 +101,10 @@
{
$link_data = array
(
- 'menuaction' =>
'property.custom_functions.index',
- 'function' =>$this->function_name,
- 'execute' => $execute,
+ 'menuaction' =>
'property.custom_functions.index',
+ 'function' => $this->function_name,
+ 'execute' => $execute,
+ 'debug' => $this->debug
);
@@ -234,13 +229,11 @@
$directory_local =
rtrim($this->config->config_data['import_path'],'/');
$port = 22;
- $debug = false;
-
if (!function_exists("ssh2_connect"))
{
die("function ssh2_connect doesn't exist");
}
- if(!($connection = ssh2_connect("$server", $port)))
+ if(!($connection = ssh2_connect($server, $port)))
{
echo "fail: unable to establish connection\n";
}
@@ -256,33 +249,40 @@
// allright, we're in!
echo "okay: logged in...<br/>";
- // execute a command
- if (!($stream = ssh2_exec($connection,
"ls -al {$directory_remote}" )))
+ // Enter "sftp" mode
+ $sftp = @ssh2_sftp($connection);
+
+ // Scan directory
+ $arr = array();
+ echo "Scanning
{$directory_remote}<br/>";
+ $dir =
"ssh2.sftp://$sftp$directory_remote";
+ $handle = opendir($dir);
+ while (false !== ($file =
readdir($handle)))
{
- echo "fail: unable to execute
command\n";
- }
- else if ($debug)
- {
- // collect returning data from
command
- stream_set_blocking($stream,
true);
- $data = "";
- while ($buf =
fread($stream,4096))
+ if (is_dir($file))
{
- $data .= $buf;
+// echo "Directory:
$file<br/>";
+ continue;
}
- fclose($stream);
- _debug_array($data);
+
+/* $size =
filesize("ssh2.sftp://$sftp$directory_remote/$file");
+ echo "File $file Size:
$size<br/>";
+
+ $stream =
@fopen("ssh2.sftp://$sftp$directory_remote/$file", 'r');
+ $contents = fread($stream,
filesize("ssh2.sftp://$sftp$directory_remote/$file"));
+ @fclose($stream);
+ echo "CONTENTS:
$contents<br/><br/>";
+*/
+ $arr[] = $file;
}
+
+ if ($this->debug)
+ {
+ _debug_array($arr);
+ }
else
{
- $com ="ls {$directory_remote}";
- $stream =
ssh2_exec($connection, $com);
-
stream_set_blocking($stream,true);
- $cmd = fread($stream,4096);
- $arr=explode("\n",$cmd);
$total_files=count($arr);
- $sftp = ssh2_sftp($connection);
- // _debug_array($arr);
for($i=0;$i<$total_files;$i++)
{
$file_name=trim($arr[$i]);
@@ -300,11 +300,9 @@
}
}
}
- fclose($stream);
}
}
}
-
}
Modified:
branches/Version-1_0-branch/property/inc/import/default/cvs_import_kunstoversikt_bkb
===================================================================
---
branches/Version-1_0-branch/property/inc/import/default/cvs_import_kunstoversikt_bkb
2011-10-23 11:18:35 UTC (rev 7921)
+++
branches/Version-1_0-branch/property/inc/import/default/cvs_import_kunstoversikt_bkb
2011-10-23 13:02:39 UTC (rev 7922)
@@ -16,23 +16,55 @@
public function add($data)
{
+/*
+ [0] => Identifikasjonsnr
+ [1] => Betegnelse
+ [2] => Objekt-id
+ [3] => Fast plassering
+ [4] => Juridisk person
+ [5] => Datering
+ [6] => Tittel
+ [7] => Avbildet person
+ [8] => Avbildet sted
+ [9] => Teknikk
+ [10] => Mål
+ [11] => Historikk
+ [12] => Tilstand
+*/
$error = false;
$table = 'fm_entity_4_1';
- $byggid = $data[0];
+ $plassering = explode('.', $data[3]);
+ $byggid = $plassering[1];
if(!$byggid)
{
- $this->errors[] = "Mangler objekt, hopper over:
{$data[1]}";
+ $this->errors[] = "Mangler objekt, hopper over:
{$data[3]}";
return true;
}
- if(substr($byggid,0,1) == 'B')
+
+ $plassering_descr_arr = array();
+ $count_plassering = count($plassering);
+ for ($i=3;$i<$count_plassering;$i++)
{
- $this->warnings[] = "BBB-objekt, hopper over:
{$byggid}";
+ if($plassering[$i])
+ {
+ $plassering_descr_arr[] =
$plassering[$i];
+ }
+ }
+
+ $plassering_descr = implode('.', $plassering_descr_arr);
+//_debug_array($plassering_descr);
+/*
+ if(substr($plassering[0],0,1) == 'B')
+ {
+ $this->warnings[] = "BBB-objekt, hopper over:
{$data[3]}";
return true;
}
+*/
+
$location_code = substr($byggid,0,4) . '-0' .
substr($byggid,-1);
//_debug_array($location_code);
$location_data =
execMethod('property.solocation.read_single', $location_code );
-_debug_array($data);
+//_debug_array($data);
//_debug_array($location_data);die();
if(!$location_data)
{
@@ -53,6 +85,8 @@
$address =
$this->db->db_addslashes($location_data['loc1_name']);
}
+ $address .= $plassering_descr ? ", $plassering_descr" :
'';
+
$id = (int)$data[2];
@@ -63,7 +97,6 @@
//_debug_array($entry_date);
$value_set = array();
-
$value_set['num']
= sprintf('%04s',$id);
$value_set['loc1'] =
$location_data['loc1'];
$value_set['loc2'] =
$location_data['loc2'];
@@ -71,10 +104,32 @@
$value_set['location_code'] =
$location_code;
$value_set['address'] =
$address;
$value_set['entry_date'] =
$entry_date;
- $value_set['museumsnr'] =
$this->db->db_addslashes($data[1]);
- $value_set['betegnelse'] =
$this->db->db_addslashes($data[3]);
- $value_set['beskrivelse'] =
$this->db->db_addslashes($data[4]);
- $value_set['tilstand'] =
$this->db->db_addslashes($data[5]);
+ $value_set['museumsnr'] =
$this->db->db_addslashes($data[0]);
+ $value_set['betegnelse'] =
$this->db->db_addslashes($data[1]);
+ $value_set['beskrivelse'] =
$this->db->db_addslashes(str_replace('"', '', $data[6])); // tittel
+ $value_set['tilstand'] =
$this->db->db_addslashes($data[12]);
+ $value_set['juridisk_person'] =
$this->db->db_addslashes($data[4]);
+ $value_set['datering'] =
$this->db->db_addslashes($data[5]);
+ $value_set['avbildet_person'] =
$this->db->db_addslashes($data[7]);
+ $value_set['avbildet_sted'] =
$this->db->db_addslashes($data[8]);
+ $value_set['teknikk'] =
$this->db->db_addslashes($data[9]);
+ $value_set['maal'] =
$this->db->db_addslashes($data[10]);
+ $value_set['historikk'] =
$this->db->db_addslashes($data[11]);
+/*
+* [0] => Identifikasjonsnr
+* [1] => Betegnelse
+* [2] => Objekt-id
+* [3] => Fast plassering
+* [4] => Juridisk person
+* [5] => Datering
+* [6] => Tittel
+* [7] => Avbildet person
+* [8] => Avbildet sted
+* [9] => Teknikk
+* [10] => Mål
+* [11] => Historikk
+* [12] => Tilstand
+*/
$this->db->query("SELECT id FROM {$table} WHERE id =
{$id}",__LINE__,__FILE__);
if($this->db->next_record())
@@ -86,6 +141,7 @@
else
{
$value_set['id'] = $id;
+ $this->warnings[] = "Denne er ny: {$id}, legger
til";
$cols = implode(',', array_keys($value_set));
$values =
$this->db->validate_insert(array_values($value_set));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7922] Merge 7906:7921 from trunk,
Sigurd Nes <=