[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6640] merge 6628:6639 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6640] merge 6628:6639 from trunk |
Date: |
Fri, 03 Dec 2010 14:59:43 +0000 |
Revision: 6640
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6640
Author: sigurdne
Date: 2010-12-03 14:59:43 +0000 (Fri, 03 Dec 2010)
Log Message:
-----------
merge 6628:6639 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php
branches/Version-1_0-branch/demo/setup/default_records.inc.php
branches/Version-1_0-branch/email/templates/base/addressbook-js-frameset.tpl
branches/Version-1_0-branch/frontend/inc/class.bofrontend.inc.php
branches/Version-1_0-branch/frontend/inc/class.menu.inc.php
branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
branches/Version-1_0-branch/frontend/inc/class.uifrontend.inc.php
branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
branches/Version-1_0-branch/property/inc/class.boentity.inc.php
branches/Version-1_0-branch/property/inc/class.soentity.inc.php
branches/Version-1_0-branch/property/inc/class.uientity.inc.php
branches/Version-1_0-branch/property/inc/class.uigeneric.inc.php
branches/Version-1_0-branch/property/js/yahoo/property.js
branches/Version-1_0-branch/property/js/yahoo/tts.view.js
branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
branches/Version-1_0-branch/rental/inc/class.uicomposite.inc.php
branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
branches/Version-1_0-branch/rental/inc/model/class.composite.inc.php
branches/Version-1_0-branch/setup/manageheader.php
Added Paths:
-----------
branches/Version-1_0-branch/frontend/inc/class.uidocumentupload.inc.php
branches/Version-1_0-branch/frontend/templates/base/documentupload.xsl
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
+
/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
Modified: branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php
===================================================================
--- branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/demo/inc/class.uidemo.inc.php 2010-12-03
14:59:43 UTC (rev 6640)
@@ -558,6 +558,10 @@
{
$receipt['error'][]=array('msg'=>lang('Please enter a zip code !'));
}
+ else if(!ctype_digit($values['zip']))
+ {
+
$receipt['error'][]=array('msg'=>lang('Please enter a integer as zip code !'));
+ }
if(!$values['town'])
{
$receipt['error'][]=array('msg'=>lang('Please enter a town !'));
Modified: branches/Version-1_0-branch/demo/setup/default_records.inc.php
===================================================================
--- branches/Version-1_0-branch/demo/setup/default_records.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/demo/setup/default_records.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -17,24 +17,4 @@
* @package demo
*/
- $app_id = $GLOBALS['phpgw']->applications->name2id('hrm');
-
- $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM phpgw_locations
where app_id = {$app_id}");
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations
(app_id, name, descr) VALUES ({$app_id}, '.', 'Top')");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations
(app_id, name, descr, allow_grant,allow_c_attrib,c_attrib_table) VALUES
({$app_id}, '.demo_location', 'Demo location',1,1,'phpgw_demo_table')");
-/* $GLOBALS['phpgw_setup']->oProc->query("SELECT max(account_id) as
account_id from phpgw_accounts WHERE account_type = 'u'");
- $GLOBALS['phpgw_setup']->oProc->next_record();
- $account_id = $GLOBALS['phpgw_setup']->oProc->f('account_id');
-
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_demo_table
(name,address,zip,town, remark,entry_date,user_id) VALUES ('demo name', 'demo
address', '12345','Demo Town', 'Remark', " . time() . ", '$account_id')");
- $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM phpgw_acl WHERE
acl_appname = 'demo'");
-
- $GLOBALS['phpgw_setup']->oProc->query("SELECT account_id from
phpgw_accounts WHERE account_lid = 'Default' AND account_type = 'g'");
- $GLOBALS['phpgw_setup']->oProc->next_record();
- $account_id = $GLOBALS['phpgw_setup']->oProc->f('account_id');
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl
(acl_appname,acl_location, acl_account,acl_rights, acl_grantor) VALUES
('demo','run', '$account_id', '1', NULL)");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl
(acl_appname,acl_location, acl_account,acl_rights, acl_grantor) VALUES
('demo','.demo_location', '$account_id', '15', NULL)");
- $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_acl
(acl_appname,acl_location, acl_account,acl_rights, acl_grantor) VALUES
('demo','.demo_location', '$account_id', '15', '$account_id')");
- unset($account_id);
-*/
+ $GLOBALS['phpgw']->locations->add('.demo_location', 'Demo location',
'demo', $allow_grant = true, $custom_tbl = 'phpgw_demo_table', $c_function =
true);
Modified:
branches/Version-1_0-branch/email/templates/base/addressbook-js-frameset.tpl
===================================================================
---
branches/Version-1_0-branch/email/templates/base/addressbook-js-frameset.tpl
2010-12-03 14:43:20 UTC (rev 6639)
+++
branches/Version-1_0-branch/email/templates/base/addressbook-js-frameset.tpl
2010-12-03 14:59:43 UTC (rev 6640)
@@ -116,5 +116,4 @@
<FRAME NAME="mainframe" SRC="{mainframe_link}">
<FRAME NAME="secondaryframe" SRC="{set_destboxes_link}">
</frameset>
-</html
-
+</html>
\ No newline at end of file
Modified: branches/Version-1_0-branch/frontend/inc/class.bofrontend.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.bofrontend.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/frontend/inc/class.bofrontend.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -188,6 +188,7 @@
$preferences->add('common','default_app','frontend');
$preferences->save_repository();
+
$GLOBALS['phpgw']->log->write(array('text'=>'I-Notification, user created
%1','p1'=> $username));
}
return $result;
@@ -276,7 +277,7 @@
if($result && $db->affected_rows() > 0)
{
- //Retrieve the usernames
+/* //Retrieve the usernames
$user_account =
$GLOBALS['phpgw']->accounts->get($account_id);
$owner_account =
$GLOBALS['phpgw']->accounts->get($owner_id);
$user_name =
$user_account->__get('lid');
@@ -301,8 +302,13 @@
}
}
}
+*/
return true;
}
+ else
+ {
+ return false;
+ }
}
return false;
}
Modified: branches/Version-1_0-branch/frontend/inc/class.menu.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.menu.inc.php 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/frontend/inc/class.menu.inc.php 2010-12-03
14:59:43 UTC (rev 6640)
@@ -25,6 +25,11 @@
(
'text' => lang('Configure
Access Permissions'),
'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'preferences.uiadmin_acl.list_acl', 'acl_app' => 'frontend') )
+ ),
+ 'documents' => array
+ (
+ 'text' =>
lang('upload_userdoc'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'frontend.uidocumentupload.index','appname' => 'frontend'))
)
);
}
Modified: branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/frontend/inc/class.uidelegates.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -67,18 +67,66 @@
{
if($org_unit_id == 'all' ||
$org_unit['ORG_UNIT_ID'] == $org_unit_id)
{
+ //$curr_success = true;
$res =
$this->add_delegate($account_id,$org_unit['ORG_UNIT_ID'],$org_unit['ORG_NAME']);
- if(!$res)
+ if($res)
{
+ //$mail_contents[] =
$res;
+ $org_unit_names[] =
$org_unit['ORG_NAME'];
+ }
+ else
+ {
$msglog['error'][] =
array('msg' => lang('error_delegating_unit',$org_unit['ORG_NAME']));
}
- $success = $success && $res;
+
+ $success = $success && $res;
}
}
if($success)
{
- $msglog['message'][] = array('msg' =>
lang('delegation_successful'));
+ //Retrieve the usernames
+ $user_account =
$GLOBALS['phpgw']->accounts->get($account_id);
+ $owner_account =
$GLOBALS['phpgw']->accounts->get($GLOBALS['phpgw_info']['user']['account_id']);
+ $user_name =
$user_account->__get('lid');
+ $owner_name =
$owner_account->__get('lid');
+ $org_name_string = implode(',',
$org_unit_names);
+
+ //If the usernames are set retrieve
account data from Fellesdata
+ if(isset($user_name) && $user_name !=
'' && $owner_name && $owner_name != '')
+ {
+ $fellesdata_user =
frontend_bofellesdata::get_instance()->get_user($user_name);
+ $fellesdata_owner =
frontend_bofellesdata::get_instance()->get_user($owner_name);
+
+ if($fellesdata_user &&
$fellesdata_owner)
+ {
+ //Send email
notification to delegate
+ $email =
$fellesdata_user['email'];
+ if(isset($email) &&
$email != '')
+ {
+
+ $title =
lang('email_add_delegate_title');
+ $message =
lang('email_add_delegate_message',$fellesdata_user['firstname'],$fellesdata_user['lastname'],$fellesdata_owner['firstname'],$fellesdata_owner['lastname'],$org_name_string);
+
frontend_bofrontend::send_system_message($email,$title,$message);
+ }
+ }
+ }
+ $msglog['message'][] = array('msg' =>
lang('delegation_successful'));
+/*
+ //send e-mail to user
+ $user_account =
$GLOBALS['phpgw']->accounts->get($account_id);
+ $user_name =
$user_account->__get('lid');
+ $fellesdata_user =
frontend_bofellesdata::get_instance()->get_user($user_name);
+ if($fellesdata_user)
+ {
+ $email =
$fellesdata_user['email'];
+ if(isset($email) && $email !=
'')
+ {
+ $title =
lang('email_add_delegate_title');
+ $mail_content =
implode(',',$mail_contents);
+
frontend_bofrontend::send_system_message($email,$title,$mail_content);
+ }
+ }*/
}
else
{
Copied: branches/Version-1_0-branch/frontend/inc/class.uidocumentupload.inc.php
(from rev 6639, trunk/frontend/inc/class.uidocumentupload.inc.php)
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uidocumentupload.inc.php
(rev 0)
+++ branches/Version-1_0-branch/frontend/inc/class.uidocumentupload.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -0,0 +1,315 @@
+<?php
+phpgw::import_class('frontend.uifrontend');
+
+class frontend_uidocumentupload extends frontend_uifrontend
+{
+ public static $ROOT_FOR_DOCUMENTS = '/frontend';
+ public static $HELP_DOCUMENTS = '/help';
+ public static $LANG_DIR = '/NO';
+
+ protected static $so;
+ protected $document_types; // Used for caching the values
+
+ public $public_functions = array(
+ 'index' => true,
+ 'read_helpfile_from_vfs' => true
+ );
+
+ public function __construct()
+ {
+ //parent::__construct();
+ // This module uses XSLT templates
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
+ $GLOBALS['phpgw_info']['flags']['menu_selection'] =
"admin::frontend::documents";
+ }
+
+ public function index()
+ {
+ if(isset($_POST['file_upload'])){
+ //$filename = phpgw::get_var('help_filename');
+ $test2 = "testing litt";
+ if ($_FILES["file"]["error"] > 0)
+ {
+ //error
+ }
+ else
+ {
+ $filename = $_FILES["help_filename"]["name"];
+ $stored_in =
$_FILES["help_filename"]["tmp_name"];
+ $success =
$this->store_doc_to_vfs($_FILES["help_filename"]);
+ }
+ }
+
+ $form_action =
$GLOBALS['phpgw']->link('/index.php',array('menuaction' =>
'frontend.uidocumentupload.index'));
+ $data = array (
+ 'msgbox_data' =>
$GLOBALS['phpgw']->common->msgbox($GLOBALS['phpgw']->common->msgbox_data($msgbox)),
+ 'documentupload_data' => array(
+ 'test' => $test2,
+ 'filename' => $filename,
+ 'storage' => $stored_in,
+ 'success' => $success,
+ 'file' => $_FILES["help_filename"],
+ 'form_action' => $form_action)
+ );
+ $GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('app_data' =>
$data));
+
$GLOBALS['phpgw']->xslttpl->add_file(array('frontend','documentupload'));
+ }
+
+ public function store_doc_to_vfs($file)
+ {
+ $root_directory = self::$ROOT_FOR_DOCUMENTS;
+ $type_directory = self::$HELP_DOCUMENTS;
+ $lang_directory = self::$LANG_DIR;
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $path = $root_directory;
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return;
+ }
+ }
+
+ $path .= $type_directory;
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return;
+ }
+ }
+
+ $path .= $lang_directory;
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return;
+ }
+ }
+
+ $file_path = $path."/{$file['name']}";
+ $result = $vfs->write
+ (
+ array
+ (
+ 'string' => $file_path,
+ RELATIVE_NONE,
+ 'content' =>
file_get_contents($file['tmp_name'])
+ )
+ );
+ if($result)
+ {
+ return "Stored in vfs";
+ }
+ return "something failed...";
+
+/*
+ if (file_exists("/u01/filer/bkb_data/frontend/upload/" .
$file['name']))
+ {
+ return $file["name"] . " already exists. ";
+ }
+ else
+ {
+
move_uploaded_file($file["tmp_name"],"/u01/filer/bkb_data/frontend/upload/" .
$file["name"]);
+ return "Stored in: " .
"/u01/filer/bkb_data/frontend/upload/" . $file["name"] . ' (temp: '.
$file['tmp_name']. ')';
+ }
+ //return "file stored";
+*/
+ }
+
+ public function get_id_field_name($extended_info = false)
+ {
+ if(!$extended_info)
+ {
+ $ret = 'document_id';
+ }
+ else
+ {
+ $ret = array
+ (
+ 'table' => 'rental_document',
// alias
+ 'field' => 'id',
+ 'translated' => 'document_id'
+ );
+ }
+ return $ret;
+ }
+
+ private function get_document_path(string $filename)
+ {
+ $root_directory = self::$ROOT_FOR_DOCUMENTS;
+ $type_directory = self::$HELP_DOCUMENTS;
+ $lang_directory = self::$LANG_DIR;
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $path = "{$root_directory}";
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return false;
+ }
+ }
+
+ $path .= "{$type_directory}";
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return false;
+ }
+ }
+
+ $path .= "{$lang_directory}";
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return false;
+ }
+ }
+
+ $path .= "/{$filename}";
+ $dir = array('string' => $path, RELATIVE_NONE);
+ if(!$vfs->file_exists($dir)){
+ if(!$vfs->mkdir($dir))
+ {
+ return false;
+ }
+ }
+
+ return
"{$root_directory}{$type_directory}{$lang_directory}/{$filename}";
+ }
+
+ public function write_document_to_vfs(string $filename)
+ {
+
+ $path = $this->get_document_path($filename);
+
+ if(!$path)
+ {
+ return false;
+ }
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $file = array('string' => $path, RELATIVE_NONE);
+
+ return $vfs->write
+ (
+ array
+ (
+ 'string' => $path,
+ RELATIVE_NONE,
+ 'content' => file_get_contents($filename)
+ )
+ );
+ }
+
+ public function read_document_from_vfs(string $filename)
+ {
+ if(!isset($filename))
+ {
+ $filename = 'helpdesk.index.pdf';
+ }
+ $path = $this->get_document_path($filename);
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $vfs->read
+ (
+ array
+ (
+ 'string' => $path,
+ RELATIVE_NONE
+ )
+ );
+ }
+
+ public function read_helpfile_from_vfs()
+ {
+
+ $GLOBALS['phpgw_info']['flags']['noheader'] = true;
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+ $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
+
+ $directory = "/frontend/help/NO";
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $ls_array = $vfs->ls(array(
+ 'string' => $directory,
+ 'relatives' => array(RELATIVE_NONE)
+ ));
+
+ //$file = isset($ls_array[0]['directory']['name']) ?
"{$ls_array[0]['directory']}/{$ls_array[0]['name']}" : '';
+ $file="{$ls_array[0]['directory']}/helpdesk.index.pdf";
+
+ $document = $vfs->read(array(
+ 'string' => $file,
+ 'relatives' => array(RELATIVE_NONE))
+ );
+
+ $vfs->override_acl = 0;
+
+ $mime_type = 'text/plain';
+ if ($ls_array[0]['mime_type'])
+ {
+ $mime_type = $ls_array[0]['mime_type'];
+ }
+
+ $browser = CreateObject('phpgwapi.browser');
+
$browser->content_header($ls_array[0]['name'],$ls_array[0]['mime_type'],$ls_array[0]['size']);
+ echo $document;
+
+/* $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+ $filename = 'helpdesk.index.pdf';
+
+ $path = $this->get_document_path($filename);
+ //$pdffile = PHPGW_SERVER_ROOT .
"/{$app}/help/{$lang}/{$section}.pdf";
+ //$full_filename = "/opt/portico/pe". $path;
+ $document = $vfs->read
+ (
+ array
+ (
+ 'string' => $path,
+ RELATIVE_NONE
+ )
+ );
+
+
+ $browser = CreateObject('phpgwapi.browser');
+ $browser->content_header($filename, '', filesize($document));
+ ob_clean();
+ flush();
+ readfile($document);
+*/
+ }
+
+ public function delete_document_from_vfs(string $filename)
+ {
+ $path = $this->get_document_path($filename);
+
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ return $vfs->rm
+ (
+ array
+ (
+ 'string' => $path,
+ RELATIVE_NONE
+ )
+ );
+ }
+}
Modified: branches/Version-1_0-branch/frontend/inc/class.uifrontend.inc.php
===================================================================
--- branches/Version-1_0-branch/frontend/inc/class.uifrontend.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/frontend/inc/class.uifrontend.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -281,15 +281,36 @@
function insert_links_on_header_state()
{
+ $help_url = "";
+ //check if help-document exists in VFS. If not, use
manual.
+ $help_in_vfs = true;
+ $fileName = '/frontend/help/NO/helpdesk.index.pdf';
+ $vfs = CreateObject('phpgwapi.vfs');
+ $vfs->override_acl = 1;
+
+ $file = array('string' => $fileName, RELATIVE_NONE);
+ if($vfs->file_exists($file)){
+ $help_in_vfs = true;
+ }
- $help_url = "javascript:openwindow('"
+ if($help_in_vfs)
+ {
+ $help_url = "javascript:openwindow('"
.
$GLOBALS['phpgw']->link('/index.php', array
(
+ 'menuaction'=>
'frontend.uidocumentupload.read_helpfile_from_vfs',
+ 'app' => 'frontend'
+ )) . "','700','600')";
+ }else{
+ $help_url = "javascript:openwindow('"
+ .
$GLOBALS['phpgw']->link('/index.php', array
+ (
'menuaction'=>
'manual.uimanual.help',
'app' =>
$GLOBALS['phpgw_info']['flags']['currentapp'],
'section' =>
isset($GLOBALS['phpgw_info']['apps']['manual']['section']) ?
$GLOBALS['phpgw_info']['apps']['manual']['section'] : '',
'referer' =>
phpgw::get_var('menuaction')
)) . "','700','600')";
+ }
$contact_url = "javascript:openwindow('"
. $GLOBALS['phpgw']->link('/index.php', array
Modified: branches/Version-1_0-branch/frontend/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/frontend/setup/phpgw_no.lang 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/frontend/setup/phpgw_no.lang 2010-12-03
14:59:43 UTC (rev 6640)
@@ -126,4 +126,5 @@
searching_for_self frontend no Vennligst søk etter et annet
brukernavn enn ditt eget
remove_delegate_successful frontend no Delegaten ble fjernet
remove_delegate_error frontend no Fjerning av delegaten var
mislykket
-message_empty frontend no Meldingen kan ikke være tom
\ No newline at end of file
+message_empty frontend no Meldingen kan ikke være tom
+upload_userdoc frontend no Last opp brukerveiledning
\ No newline at end of file
Copied: branches/Version-1_0-branch/frontend/templates/base/documentupload.xsl
(from rev 6639, trunk/frontend/templates/base/documentupload.xsl)
===================================================================
--- branches/Version-1_0-branch/frontend/templates/base/documentupload.xsl
(rev 0)
+++ branches/Version-1_0-branch/frontend/templates/base/documentupload.xsl
2010-12-03 14:59:43 UTC (rev 6640)
@@ -0,0 +1,20 @@
+<xsl:template match="documentupload_data" xmlns:php="http://php.net/xsl">
+ <div class="yui-navset" id="ticket_tabview">
+ <xsl:value-of disable-output-escaping="yes" select="tabs" />
+ <div class="yui-content">
+ <h3>Vi skal laste opp greier!</h3>
+ <img
src="frontend/templates/base/images/32x32/page_white.png"
class="list_image"/><br/>
+ file: <xsl:value-of select="file"/><br/>
+ test: <xsl:value-of select="test"/><br/>
+ fn: <xsl:value-of select="filename"/><br/>
+ stored: <xsl:value-of select="storage"/><br/>
+ success: <xsl:value-of select="success"/><br/>
+ <form ENCTYPE="multipart/form-data" name="uploadform"
method="post" action="{form_action}">
+ <dl>
+ <dt><input type="file" name="help_filename"
id="help_filename"/></dt>
+ <dt><input type="submit" value="Last opp"
name="file_upload"/></dt>
+ </dl>
+ </form>
+ </div>
+ </div>
+</xsl:template>
\ No newline at end of file
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php 2010-12-03
14:59:43 UTC (rev 6640)
@@ -118,6 +118,17 @@
*/
public function get_script_links()
{
+ $combine = true;
+ if(ini_get('suhosin.get.max_value_length') &&
ini_get('suhosin.get.max_value_length') < 2000)
+ {
+ $combine = false;
+
if(isset($GLOBALS['phpgw_info']['user']['apps']['admin']))
+ {
+ $receipt = array();
+ $receipt['error'][]=array('msg'=>
'Speed could be gained from setting suhosin.get.max_value_length = 2000 in
php.ini');
+ phpgwapi_cache::session_set('phpgwapi',
'phpgw_messages', $receipt);
+ }
+ }
$links = "<!--JS Imports from phpGW javascript class
-->\n";
$jsfiles = array();
if (is_array($this->files) && count($this->files))
@@ -132,20 +143,34 @@
{
foreach ($files
as $file => $ignored)
{
- // Add
file path to array and replace path separator with "--" for URL-friendlyness
-
$jsfiles[] = str_replace('/', '--', "{$app}/js/{$pkg}/{$file}.js");
+
if($combine)
+ {
+
// Add file path to array and replace path separator with "--" for
URL-friendlyness
+
$jsfiles[] = str_replace('/', '--', "{$app}/js/{$pkg}/{$file}.js");
+ }
+ else
+ {
+
//echo "file:
{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/js/{$pkg}/{$file}.js
<br>";
+
$links .= '<script type="text/javascript" '
+
.
"src=\"{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/js/{$pkg}/{$file}.js\">"
+
. "</script>\n";
+ }
}
}
}
}
}
}
- $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
- $jsfiles = implode(',', $jsfiles);
- $links .= '<script type="text/javascript" '
+
+ if($combine)
+ {
+ $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
+ $jsfiles = implode(',', $jsfiles);
+ $links .= '<script type="text/javascript" '
.
"src=\"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files={$jsfiles}\">"
. "</script>\n";
- unset($jsfiles);
+ unset($jsfiles);
+ }
return $links;
}
Modified: branches/Version-1_0-branch/property/inc/class.boentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/inc/class.boentity.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -123,8 +123,10 @@
$this->use_session = true;
}
- $this->start = $start ? $start : 0;
-
+ if(isset($_POST['start']) || isset($_GET['start']))
+ {
+ $this->start = $start;
+ }
if(isset($_POST['query']) || isset($_GET['query']))
{
$this->query = $query;
Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -294,10 +294,6 @@
$this->uicols = $uicols;
//_debug_array($cols_return_extra);
- if($dry_run)
- {
- return array();
- }
if ($order)
{
@@ -487,6 +483,11 @@
$this->db->next_record();
$this->total_records = $this->db->f('cnt');
+ if($dry_run)
+ {
+ return array();
+ }
+
if(!$allrows)
{
$this->db->limit_query($sql .
$ordermethod,$start,__LINE__,__FILE__);
Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -376,23 +376,23 @@
'entity_id'
=> $this->entity_id,
'cat_id' =>
$this->cat_id,
'type'
=> $this->type,
-
'district_id' =>
$this->district_id,
-
'status'
=> $this->status,
-
'filter'
=> $this->filter,
+
// 'district_id' =>
$this->district_id,
+
// 'status'
=> $this->status,
+
// 'filter'
=> $this->filter,
//
'location_code'
=> $this->location_code,
-
'criteria_id'
=> $this->criteria_id
+
// 'criteria_id'
=> $this->criteria_id
));
$datatable['config']['allow_allrows'] = true;
$datatable['config']['base_java_url'] =
"menuaction:'property.uientity.index',".
"entity_id:'{$this->entity_id}',".
"cat_id:'{$this->cat_id}',".
-
"type:'{$this->type}',".
-
"district_id:'{$this->district_id}',".
-
"status:'{$this->status}',".
-
"filter:'{$this->filter}',".
-
"criteria_id:'{$this->criteria_id}',".
-
"location_code:'{$this->location_code}'";
+
"type:'{$this->type}'";
+
// "district_id:'{$this->district_id}',".
+
// "status:'{$this->status}',".
+
// "filter:'{$this->filter}',".
+
// "criteria_id:'{$this->criteria_id}',".
+
//
"location_code:'{$this->location_code}'";
// this array "$arr_filter_hide" indicate what
filters are hidden or not
$arr_filter_hide = array();
Modified: branches/Version-1_0-branch/property/inc/class.uigeneric.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uigeneric.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/inc/class.uigeneric.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -315,9 +315,11 @@
{
$code = 'var ' . implode(',',
$button_def) . ";\n";
$code .= 'var selectsButtons = [' .
"\n" . implode(",\n",$code_inner) . "\n];";
- $GLOBALS['phpgw']->js->add_code('',
$code);
}
+ $code = 'var selectsButtons = [];';
+ $GLOBALS['phpgw']->js->add_code('', $code);
+
if($values_combo_box)
{
$i = 0;
Modified: branches/Version-1_0-branch/property/js/yahoo/property.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/property.js 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/js/yahoo/property.js 2010-12-03
14:59:43 UTC (rev 6640)
@@ -839,9 +839,12 @@
}
flag++;
+ myinitialPage = 1 + values_ds.startIndex/myrowsPerPage;
+
myPaginatorConfig = {
containers
: ['paging'],
totalRecords
: mytotalRows,
+ initialPage
: myinitialPage,
pageLinks
: 10,
rowsPerPage
: values_ds.recordsReturned, //MAXIMO el PHPGW me devuelve 15
valor configurado por preferencias
rowsPerPageOptions : [myrowsPerPage, mytotalRows],
Modified: branches/Version-1_0-branch/property/js/yahoo/tts.view.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/tts.view.js 2010-12-03
14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/property/js/yahoo/tts.view.js 2010-12-03
14:59:43 UTC (rev 6640)
@@ -1,9 +1,9 @@
-var myPaginator_0, myDataTable_0
-var myPaginator_1, myDataTable_1;
-var myPaginator_2, myDataTable_2;
-var myPaginator_3, myDataTable_3;
-var d;
-var vendor_id = 0;
+var myPaginator_0, myDataTable_0
+var myPaginator_1, myDataTable_1;
+var myPaginator_2, myDataTable_2;
+var myPaginator_3, myDataTable_3;
+var d;
+var vendor_id = 0;
/********************************************************************************/
this.myParticularRenderEvent = function()
@@ -37,6 +37,7 @@
if(values['sessionExpired'] == true)
{
window.alert('sessionExpired - please log in');
+
lightboxlogin();//defined i phpgwapi/templates/portico/js/base.js
}
else
{
@@ -61,31 +62,31 @@
{
// formObject = document.body.getElementsByTagName('form');
// YAHOO.util.Connect.setForm(formObject[0]);//First form
- if(document.getElementById('vendor_id').value)
- {
- base_java_url['vendor_id'] =
document.getElementById('vendor_id').value;
- }
-
- if(document.getElementById('vendor_id').value !=
vendor_id)
- {
- execute_async(myDataTable_3);
- vendor_id =
document.getElementById('vendor_id').value;
- }
+ if(document.getElementById('vendor_id').value)
+ {
+ base_java_url['vendor_id'] =
document.getElementById('vendor_id').value;
+ }
+
+ if(document.getElementById('vendor_id').value !=
vendor_id)
+ {
+ execute_async(myDataTable_3);
+ vendor_id =
document.getElementById('vendor_id').value;
+ }
}
-
-
- this.onDOMAttrModified = function(e)
- {
- var attr = e.attrName || e.propertyName
- var target = e.target || e.srcElement;
- if (attr.toLowerCase() == 'vendor_id')
- {
- fetch_vendor_email();
- }
- }
-
-
-
+
+
+ this.onDOMAttrModified = function(e)
+ {
+ var attr = e.attrName || e.propertyName
+ var target = e.target || e.srcElement;
+ if (attr.toLowerCase() == 'vendor_id')
+ {
+ fetch_vendor_email();
+ }
+ }
+
+
+
YAHOO.util.Event.addListener(window, "load", function()
{
loader = new YAHOO.util.YUILoader();
@@ -101,17 +102,17 @@
YAHOO.util.Event.addListener(window, "load", function()
{
- d = document.getElementById('vendor_id');
+ d = document.getElementById('vendor_id');
if(d)
{
- if (d.attachEvent)
- {
- d.attachEvent('onpropertychange', onDOMAttrModified, false);
- }
- else
- {
- d.addEventListener('DOMAttrModified', onDOMAttrModified, false);
- }
+ if (d.attachEvent)
+ {
+ d.attachEvent('onpropertychange', onDOMAttrModified, false);
}
-});
+ else
+ {
+ d.addEventListener('DOMAttrModified', onDOMAttrModified, false);
+ }
+ }
+});
Modified: branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/rental/inc/class.bofellesdata.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -189,7 +189,7 @@
$tables = "V_ORG_ENHET";
$joins = "LEFT JOIN V_ORG_PERSON_ENHET ON
(V_ORG_ENHET.ORG_ENHET_ID = V_ORG_PERSON_ENHET.ORG_ENHET_ID AND
V_ORG_PERSON_ENHET.prioritet = 1) ".
"LEFT JOIN V_ORG_PERSON ON
(V_ORG_PERSON.ORG_PERSON_ID = V_ORG_PERSON_ENHET.ORG_PERSON_ID)";
- $sql = "SELECT $columns FROM $tables $joins WHERE
V_ORG_ENHET.ORG_NIVAA = 4";
+ $sql = "SELECT $columns FROM $tables $joins WHERE
V_ORG_ENHET.ORG_NIVAA > 1";
if($search_for){
$selector = "";
switch($search_type){
Modified: branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/rental/inc/class.socomposite.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -68,19 +68,28 @@
}
$special_query = false; //specify if the query should use
distinct on rental_composite.id (used for selecting composites that has an
active or inactive contract)
$ts_query = strtotime(date('Y-m-d')); // timestamp for query
(today)
- if(isset($filters['availability_date']) &&
$filters['availability_date'] != ''){
- $availability_date =
strtotime($filters['availability_date']);
+ if(isset($filters['availability_date_from']) &&
$filters['availability_date_from'] != ''){
+ $availability_date_from =
strtotime($filters['availability_date_from']);
}
else{
- $availability_date = $ts_query;
+ $availability_date_from = $ts_query;
}
+ if(isset($filters['availability_date_to']) &&
$filters['availability_date_to'] != ''){
+ $availability_date_to =
strtotime($filters['availability_date_to']);
+ }
+ else{
+ $availability_date_to = $ts_query;
+ }
switch($filters['has_contract']){
case "has_contract":
- $filter_clauses[] = "(NOT
rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start <
$availability_date AND (rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date))))";
+ $filter_clauses[] = "(NOT
rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start >
$availability_date_from OR rental_contract.date_start < $availability_date_to
AND (rental_contract.date_end IS NULL OR (rental_contract.date_end >
$availability_date_from OR rental_contract.date_end <
$availability_date_to))))";
+ //$filter_clauses[] = "(NOT
rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start <
$availability_date_from AND ((rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date_from)) OR (rental_contract.date_start >
$availability_date_to AND (rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end <
$availability_date_to))))))";
+ //$filter_clauses[] = "(NOT
rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start <
$availability_date_from AND (rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date_from))))";
$special_query=true;
break;
case "has_no_contract":
- $filter_clauses[] =
"(rental_contract_composite.contract_id IS NULL OR NOT rental_composite.id IN
(SELECT rental_composite.id FROM rental_composite LEFT JOIN
rental_contract_composite ON (rental_contract_composite.composite_id =
rental_composite.id) LEFT JOIN rental_contract ON (rental_contract.id =
rental_contract_composite.contract_id) WHERE 1=1 AND rental_composite.is_active
= TRUE AND (NOT rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start <
$availability_date AND (rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date))))))";
+ //$filter_clauses[] =
"(rental_contract_composite.contract_id IS NULL OR NOT rental_composite.id IN
(SELECT rental_composite.id FROM rental_composite LEFT JOIN
rental_contract_composite ON (rental_contract_composite.composite_id =
rental_composite.id) LEFT JOIN rental_contract ON (rental_contract.id =
rental_contract_composite.contract_id) WHERE 1=1 AND rental_composite.is_active
= TRUE AND (NOT rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start <
$availability_date_from AND (rental_contract.date_end IS NULL OR (NOT
rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date_from))))))";
+ $filter_clauses[] =
"(rental_contract_composite.contract_id IS NULL OR NOT rental_composite.id IN
(SELECT rental_composite.id FROM rental_composite LEFT JOIN
rental_contract_composite ON (rental_contract_composite.composite_id =
rental_composite.id) LEFT JOIN rental_contract ON (rental_contract.id =
rental_contract_composite.contract_id) WHERE 1=1 AND rental_composite.is_active
= TRUE AND (NOT rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND ((rental_contract.date_start >
$availability_date_from OR rental_contract.date_start < $availability_date_to
AND (NOT rental_contract.date_end IS NULL AND rental_contract.date_end >
$availability_date_from OR rental_contract.date_end <
$availability_date_to)))))))";
$special_query=true;
break;
case "both":
@@ -116,6 +125,28 @@
$joins = " {$this->left_join} rental_unit ON
(rental_composite.id = rental_unit.composite_id)";
$joins .= " {$this->left_join} rental_contract_composite ON
(rental_contract_composite.composite_id = rental_composite.id)";
$joins .= " {$this->left_join} rental_contract ON
(rental_contract.id = rental_contract_composite.contract_id)";
+
+ if(isset($filters['availability_date_from']) &&
$filters['availability_date_from'] != ''){
+ $availability_date_from =
strtotime($filters['availability_date_from']);
+ }
+ else
+ {
+ $availability_date_from = strtotime(date('Y-m-d'));
+ }
+ if(isset($filters['availability_date_to']) &&
$filters['availability_date_to'] != ''){
+ $availability_date_to =
strtotime($filters['availability_date_to']);
+ }
+ else
+ {
+ if(isset($filters['availability_date_from']) &&
$filters['availability_date_from'] != ''){
+ $availability_date_to =
strtotime($filters['availability_date_from']);
+ }
+ else{
+ $availability_date_to =
strtotime(date('Y-m-d'));
+ }
+ }
+
+
if($return_count) // We should only return a count
{
$cols = 'COUNT(DISTINCT(rental_composite.id)) AS count';
@@ -124,16 +155,17 @@
{
if($special_query)
{
- $cols = 'DISTINCT(rental_composite.id) AS
composite_id, rental_unit.id AS unit_id, rental_unit.location_code,
rental_composite.name, rental_composite.has_custom_address,
rental_composite.address_1, rental_composite.house_number,
rental_composite.address_2, rental_composite.postcode, rental_composite.place,
rental_composite.is_active, rental_composite.area';
+ $cols = "DISTINCT(rental_composite.id) AS
composite_id, rental_unit.id AS unit_id, rental_unit.location_code,
rental_composite.name, rental_composite.has_custom_address,
rental_composite.address_1, rental_composite.house_number,
rental_composite.address_2, rental_composite.postcode, rental_composite.place,
rental_composite.is_active, rental_composite.area, CASE WHEN (NOT
rental_contract_composite.contract_id IS NULL AND (NOT
rental_contract.date_start IS NULL AND rental_contract.date_start >
$availability_date_from OR rental_contract.date_start < $availability_date_to
AND (rental_contract.date_end IS NULL OR (rental_contract.date_end >
$availability_date_from OR rental_contract.date_end < $availability_date_to))))
THEN 'Ikke ledig' ELSE 'Ledig' END as status";
}
else
{
- $cols = 'rental_composite.id AS composite_id,
rental_unit.id AS unit_id, rental_unit.location_code, rental_composite.name,
rental_composite.has_custom_address, rental_composite.address_1,
rental_composite.house_number, rental_composite.address_2,
rental_composite.postcode, rental_composite.place, rental_composite.is_active,
rental_composite.area';
+ $cols = "rental_composite.id AS composite_id,
rental_unit.id AS unit_id, rental_unit.location_code, rental_composite.name,
rental_composite.has_custom_address, rental_composite.address_1,
rental_composite.house_number, rental_composite.address_2,
rental_composite.postcode, rental_composite.place, rental_composite.is_active,
rental_composite.area, CASE WHEN (NOT rental_contract_composite.contract_id IS
NULL AND (NOT rental_contract.date_start IS NULL AND rental_contract.date_start
> $availability_date_from OR rental_contract.date_start < $availability_date_to
AND (rental_contract.date_end IS NULL OR (rental_contract.date_end >
$availability_date_from OR rental_contract.date_end < $availability_date_to))))
THEN 'Ikke ledig' ELSE 'Ledig' END as status";
}
}
$dir = $ascending ? 'ASC' : 'DESC';
$order = $sort_field ? "ORDER BY {$this->marshal($sort_field,
'field')} $dir ": '';
+ //var_dump("SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}");
return "SELECT {$cols} FROM {$tables} {$joins} WHERE
{$condition} {$order}";
}
@@ -157,6 +189,7 @@
$composite->set_custom_postcode($this->unmarshal($this->db->f('postcode',
true), 'string'));
$composite->set_custom_place($this->unmarshal($this->db->f('place', true),
'string'));
$composite->set_area($this->unmarshal($this->db->f('area', true), 'float'));
+
$composite->set_status($this->unmarshal($this->db->f('status', true),
'string'));
}
// Location code
$location_code = $this->unmarshal($this->db->f('location_code',
true), 'string');
Modified: branches/Version-1_0-branch/rental/inc/class.uicomposite.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uicomposite.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/rental/inc/class.uicomposite.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -85,7 +85,7 @@
phpgwapi_cache::session_set('rental',
'composite_search_type', $search_type);
phpgwapi_cache::session_set('rental',
'composite_status', phpgw::get_var('is_active'));
phpgwapi_cache::session_set('rental',
'composite_status_contract', phpgw::get_var('has_contract'));
- $filters = array('is_active' =>
phpgw::get_var('is_active'), 'is_vacant' => phpgw::get_var('occupancy'),
'has_contract' => phpgw::get_var('has_contract'), 'availability_date' =>
phpgw::get_var('availability_date_hidden'));
+ $filters = array('is_active' =>
phpgw::get_var('is_active'), 'is_vacant' => phpgw::get_var('occupancy'),
'has_contract' => phpgw::get_var('has_contract'), 'availability_date_from' =>
phpgw::get_var('availability_date_from_hidden'), 'availability_date_to' =>
phpgw::get_var('availability_date_to_hidden'));
$result_objects =
rental_socomposite::get_instance()->get($start_index, $num_of_objects,
$sort_field, $sort_ascending, $search_for, $search_type, $filters);
$object_count =
rental_socomposite::get_instance()->get_count($search_for, $search_type,
$filters);
break;
Modified: branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/rental/inc/class.uiresultunit.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -187,7 +187,39 @@
return false;
}
}
- return frontend_bofrontend::add_delegate($account_id,
null, $org_unit_id, $org_name);
+
+ $success =
frontend_bofrontend::add_delegate($account_id, null, $org_unit_id, $org_name);
+ if($success)
+ {
+ //Retrieve the usernames
+ $user_account =
$GLOBALS['phpgw']->accounts->get($account_id);
+ $owner_account =
$GLOBALS['phpgw']->accounts->get($GLOBALS['phpgw_info']['user']['account_id']);
+ $user_name = $user_account->__get('lid');
+ $owner_name = $owner_account->__get('lid');
+ $org_name_string = $org_name;
+
+ //If the usernames are set retrieve account
data from Fellesdata
+ if(isset($user_name) && $user_name != '' &&
$owner_name && $owner_name != '')
+ {
+ $fellesdata_user =
frontend_bofellesdata::get_instance()->get_user($user_name);
+ $fellesdata_owner =
frontend_bofellesdata::get_instance()->get_user($owner_name);
+
+ if($fellesdata_user &&
$fellesdata_owner)
+ {
+ //Send email notification to
delegate
+ $email =
$fellesdata_user['email'];
+ if(isset($email) && $email !=
'')
+ {
+
+ $title =
lang('email_add_delegate_title');
+ $message =
lang('email_add_delegate_message',$fellesdata_user['firstname'],$fellesdata_user['lastname'],$fellesdata_owner['firstname'],$fellesdata_owner['lastname'],$org_name_string);
+
frontend_bofrontend::send_system_message($email,$title,$message);
+ return true;
+ }
+ }
+ }
+ }
+ return false;
}
public function remove_delegate()
Modified: branches/Version-1_0-branch/rental/inc/model/class.composite.inc.php
===================================================================
--- branches/Version-1_0-branch/rental/inc/model/class.composite.inc.php
2010-12-03 14:43:20 UTC (rev 6639)
+++ branches/Version-1_0-branch/rental/inc/model/class.composite.inc.php
2010-12-03 14:59:43 UTC (rev 6640)
@@ -21,6 +21,7 @@
protected $custom_place;
protected $object_type_id;
protected $area;
+ protected $status;
protected $units;
@@ -201,6 +202,14 @@
public function get_area() {
return $this->area;
}
+
+ public function set_status($status) {
+ $this->status = $status;
+ }
+
+ public function get_status() {
+ return $this->status;
+ }
/**
* Return a string representation of the composite.
@@ -244,7 +253,8 @@
'address' => $addresses,
'gab_id' => $gab_ids,
'area_gros' => $this->get_area_gros(),
- 'area_net' => $this->get_area_net()
+ 'area_net' => $this->get_area_net(),
+ 'status' => $this->get_status()
);
}
Modified: branches/Version-1_0-branch/setup/manageheader.php
===================================================================
--- branches/Version-1_0-branch/setup/manageheader.php 2010-12-03 14:43:20 UTC
(rev 6639)
+++ branches/Version-1_0-branch/setup/manageheader.php 2010-12-03 14:59:43 UTC
(rev 6640)
@@ -272,6 +272,19 @@
}
+ $get_max_value_length = '';
+ if(ini_get('suhosin.get.max_value_length'))
+ {
+ if (ini_get('suhosin.get.max_value_length') <
2000)
+ {
+ $get_max_value_length = '<li
class="warn">Speed could be gained from setting suhosin.get.max_value_length =
2000 in php.ini'. "</li>\n";
+ }
+ else
+ {
+ $get_max_value_length = '<li>' .
lang('You appear to have suhosin.get.max_value_length > 2000') . "</li>\n";
+ }
+ }
+
$phpver = '<li>' . lang('You appear to be using PHP
%1+', 5.2) . "</li>\n";
$supported_sessions_type = array('php', 'db');
@@ -289,6 +302,7 @@
$detected .= '<tr class="th"><td colspan="2">' .
lang('Analysis') . "</td></tr><tr><td colspan=\"2\">\n<ul
id=\"analysis\">\n$phpver";
$detected .= $request_order;
+ $detected .= $get_max_value_length;
$supported_db = array();
if (extension_loaded('pgsql') ||
function_exists('pg_connect'))
@@ -597,7 +611,7 @@
$setup_tpl->set_var('comment_r',' -->');
$GLOBALS['phpgw_info']['server']['header_admin_password'] = '';
-
$GLOBALS['phpgw_info']['server']['db_persistent'] = false;
+
$GLOBALS['phpgw_info']['server']['db_persistent'] = true;
$GLOBALS['phpgw_info']['server']['sessions_type'] = 'php';
//
$GLOBALS['phpgw_info']['server']['mcrypt_enabled'] = extension_loaded('mcrypt');
$GLOBALS['phpgw_info']['server']['show_domain_selectbox'] = false;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6640] merge 6628:6639 from trunk,
Sigurd Nes <=