diff --git a/timesheet/inc/class.timesheet_bo.inc.php b/timesheet/inc/class.timesheet_bo.inc.php
index 7af43135d8..be7a3b6ab8 100644
--- a/timesheet/inc/class.timesheet_bo.inc.php
+++ b/timesheet/inc/class.timesheet_bo.inc.php
@@ -5,11 +5,15 @@
* @link http://www.egroupware.org
* @author Ralf Becker
* @package timesheet
- * @copyright (c) 2005-14 by Ralf Becker
+ * @copyright (c) 2005-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Link;
+use EGroupware\Api\Acl;
+
if (!defined('TIMESHEET_APP'))
{
define('TIMESHEET_APP','timesheet');
@@ -19,9 +23,9 @@ if (!defined('TIMESHEET_APP'))
/**
* Business object of the TimeSheet
*
- * Uses eTemplate's so_sql as storage object (Table: egw_timesheet).
+ * Uses eTemplate's Api\Storage as storage object (Table: egw_timesheet).
*/
-class timesheet_bo extends so_sql_cf
+class timesheet_bo extends Api\Storage
{
/**
* Flag for timesheets deleted, but preserved
@@ -29,7 +33,7 @@ class timesheet_bo extends so_sql_cf
const DELETED_STATUS = -1;
/**
- * Timesheets config data
+ * Timesheets Api\Config data
*
* @var array
*/
@@ -164,7 +168,7 @@ class timesheet_bo extends so_sql_cf
parent::__construct(TIMESHEET_APP,'egw_timesheet',self::EXTRA_TABLE,'','ts_extra_name','ts_extra_value','ts_id');
if ($this->customfields) $this->columns_to_search[] = self::EXTRA_TABLE.'.ts_extra_value';
- $this->config_data = config::read(TIMESHEET_APP);
+ $this->config_data = Api\Config::read(TIMESHEET_APP);
$this->quantity_sum = $this->config_data['quantity_sum'] == 'true';
// Load & process statuses
@@ -220,7 +224,7 @@ class timesheet_bo extends so_sql_cf
$this->status_labels = array();
$this->make_status_labels($tree, $this->status_labels);
- // Sort config based on tree
+ // Sort Api\Config based on tree
$sorted = array();
foreach($this->status_labels as $status_id => $label)
{
@@ -286,7 +290,7 @@ class timesheet_bo extends so_sql_cf
{
if ($grant & $required)
{
- $result[$uid] = common::grab_owner_name($uid);
+ $result[$uid] = Api\Accounts::username($uid);
}
}
natcasesort($result);
@@ -297,7 +301,7 @@ class timesheet_bo extends so_sql_cf
/**
* checks if the user has enough rights for a certain operation
*
- * Rights are given via status config admin/noadmin
+ * Rights are given via status Api\Config admin/noadmin
*
* @param array|int $data =null use $this->data or $this->data['ts_id'] (to fetch the data)
* @param int $user =null for which user to check, default current user
@@ -331,9 +335,9 @@ class timesheet_bo extends so_sql_cf
/**
* checks if the user has enough rights for a certain operation
*
- * Rights are given via owner grants or role based acl
+ * Rights are given via owner grants or role based Acl
*
- * @param int $required EGW_ACL_READ, EGW_ACL_WRITE, EGW_ACL_ADD, EGW_ACL_DELETE, EGW_ACL_BUDGET, EGW_ACL_EDIT_BUDGET
+ * @param int $required Acl::READ, EGW_ACL_WRITE, Acl::ADD, Acl::DELETE, EGW_ACL_BUDGET, EGW_ACL_EDIT_BUDGET
* @param array|int $data =null project or project-id to use, default the project in $this->data
* @param int $user =null for which user to check, default current user
* @return boolean true if the rights are ok, null if not found, false if no rights
@@ -363,7 +367,7 @@ class timesheet_bo extends so_sql_cf
}
$ret = $data && !!($grants[$data['ts_owner']] & $required);
- if(($required & EGW_ACL_DELETE) && $this->config_data['history'] == 'history' &&
+ if(($required & Acl::DELETE) && $this->config_data['history'] == 'history' &&
$data['ts_status'] == self::DELETED_STATUS)
{
$ret = !!($GLOBALS['egw_info']['user']['apps']['admin']);
@@ -382,7 +386,7 @@ class timesheet_bo extends so_sql_cf
*/
function date_filter($name,&$start,&$end)
{
- return egw_time::sql_filter($name, $start, $end, 'ts_start', $this->date_filters);
+ return Api\DateTime::sql_filter($name, $start, $end, 'ts_start', $this->date_filters);
}
/**
@@ -479,7 +483,7 @@ class timesheet_bo extends so_sql_cf
$only_summary && is_array($criteria) ? ($filter ? array_merge($criteria, (array)$filter) : $criteria) : $filter,
$only_summary ? '' : $join);
$this->summary = $this->summary[0];
- $this->summary['max_modified'] = egw_time::server2user($this->summary['max_modified']);
+ $this->summary['max_modified'] = Api\DateTime::server2user($this->summary['max_modified']);
if ($only_summary) return $this->summary;
@@ -528,7 +532,7 @@ class timesheet_bo extends so_sql_cf
* read a timesheet entry
*
* @param int $ts_id
- * @param boolean $ignore_acl =false should the acl be checked
+ * @param boolean $ignore_acl =false should the Acl be checked
* @return array|boolean array with timesheet entry, null if timesheet not found or false if no rights
*/
function read($ts_id,$ignore_acl=false)
@@ -538,7 +542,7 @@ class timesheet_bo extends so_sql_cf
{
return null; // entry not found
}
- if (!$ignore_acl && !($ret = $this->check_acl(EGW_ACL_READ)))
+ if (!$ignore_acl && !($ret = $this->check_acl(Acl::READ)))
{
return false; // no read rights
}
@@ -552,14 +556,14 @@ class timesheet_bo extends so_sql_cf
*
* @param array $keys if given $keys are copied to data before saveing => allows a save as
* @param boolean $touch_modified =true should modification date+user be set, default yes
- * @param boolean $ignore_acl =false should the acl be checked, returns true if no edit-rigts
+ * @param boolean $ignore_acl =false should the Acl be checked, returns true if no edit-rigts
* @return int 0 on success and errno != 0 else
*/
function save($keys=null,$touch_modified=true,$ignore_acl=false)
{
if ($keys) $this->data_merge($keys);
- if (!$ignore_acl && $this->data['ts_id'] && !$this->check_acl(EGW_ACL_EDIT))
+ if (!$ignore_acl && $this->data['ts_id'] && !$this->check_acl(Acl::EDIT))
{
return true;
}
@@ -592,7 +596,7 @@ class timesheet_bo extends so_sql_cf
// Check for restore of deleted contact, restore held links
if($old && $old['ts_status'] == self::DELETED_STATUS && $new['ts_status'] != self::DELETED_STATUS)
{
- egw_link::restore(TIMESHEET_APP, $new['ts_id']);
+ Link::restore(TIMESHEET_APP, $new['ts_id']);
}
if (!is_object($this->tracking))
@@ -608,7 +612,7 @@ class timesheet_bo extends so_sql_cf
if (!($err = parent::save()))
{
// notify the link-class about the update, as other apps may be subscribt to it
- egw_link::notify_update(TIMESHEET_APP,$this->data['ts_id'],$this->data);
+ Link::notify_update(TIMESHEET_APP,$this->data['ts_id'],$this->data);
}
return $err;
@@ -618,7 +622,7 @@ class timesheet_bo extends so_sql_cf
* deletes a timesheet entry identified by $keys or the loaded one, reimplemented to notify the link class (unlink)
*
* @param array $keys if given array with col => value pairs to characterise the rows to delete
- * @param boolean $ignore_acl =false should the acl be checked, returns false if no delete-rigts
+ * @param boolean $ignore_acl =false should the Acl be checked, returns false if no delete-rigts
* @return int affected rows, should be 1 if ok, 0 if an error
*/
function delete($keys=null,$ignore_acl=false)
@@ -629,7 +633,7 @@ class timesheet_bo extends so_sql_cf
}
$ts_id = is_null($keys) ? $this->data['ts_id'] : $keys['ts_id'];
- if (!$ignore_acl && !$this->check_acl(EGW_ACL_DELETE,$ts_id) || !($old = $this->read($ts_id)))
+ if (!$ignore_acl && !$this->check_acl(Acl::DELETE,$ts_id) || !($old = $this->read($ts_id)))
{
return false;
}
@@ -640,12 +644,12 @@ class timesheet_bo extends so_sql_cf
$delete = $old;
$delete['ts_status'] = self::DELETED_STATUS;
$ret = !($this->save($delete));
- egw_link::unlink(0,TIMESHEET_APP,$ts_id,'','','',true);
+ Link::unlink(0,TIMESHEET_APP,$ts_id,'','','',true);
}
elseif (($ret = parent::delete($keys)) && $ts_id)
{
// delete all links to timesheet entry $ts_id
- egw_link::unlink(0,TIMESHEET_APP,$ts_id);
+ Link::unlink(0,TIMESHEET_APP,$ts_id);
}
return $ret;
}
@@ -664,7 +668,7 @@ class timesheet_bo extends so_sql_cf
if (!$new_owner)
{
- egw_link::unlink(0, TIMESHEET_APP, '', $account_id);
+ Link::unlink(0, TIMESHEET_APP, '', $account_id);
parent::delete(array('ts_owner' => $account_id));
}
else
@@ -693,7 +697,7 @@ class timesheet_bo extends so_sql_cf
}
$ts_id = is_null($keys) ? $this->data['ts_id'] : $keys['ts_id'];
- if (!$this->check_acl(EGW_ACL_EDIT,$ts_id) || !$this->read($ts_id,true))
+ if (!$this->check_acl(Acl::EDIT,$ts_id) || !$this->read($ts_id,true))
{
return false;
}
@@ -768,7 +772,7 @@ class timesheet_bo extends so_sql_cf
$titles[$entry['ts_id']] = $this->link_title($entry);
}
}
- // we assume all not returned entries are not readable by the user, as we notify egw_link about all deletes
+ // we assume all not returned entries are not readable by the user, as we notify Link about all deletes
foreach($ids as $id)
{
if (!isset($titles[$id]))
@@ -809,7 +813,7 @@ class timesheet_bo extends so_sql_cf
* Check access to the file store
*
* @param int|array $id id of entry or entry array
- * @param int $check EGW_ACL_READ for read and EGW_ACL_EDIT for write or delete access
+ * @param int $check Acl::READ for read and Acl::EDIT for write or delete access
* @param string $rel_path =null currently not used in InfoLog
* @param int $user =null for which user to check, default current user
* @return boolean true if access is granted or false otherwise
@@ -858,7 +862,7 @@ class timesheet_bo extends so_sql_cf
{
$pm_ids = ExecMethod('projectmanager.projectmanager_bo.children',$pm_id);
$pm_ids[] = $pm_id;
- $links = solink::get_links('projectmanager',$pm_ids,'timesheet'); // solink::get_links not egw_links::get_links!
+ $links = Link\Storage::get_links('projectmanager',$pm_ids,'timesheet'); // Link\Storage::get_links not egw_links::get_links!
if ($links)
{
$links = array_unique(call_user_func_array('array_merge',$links));
@@ -884,7 +888,7 @@ class timesheet_bo extends so_sql_cf
if ($data['target_app'] == 'projectmanager' && $this->read($data['id']))
{
- $old_title = isset($data['data']) ? $data['data'][egw_link::OLD_LINK_TITLE] : null;
+ $old_title = isset($data['data']) ? $data['data'][Link::OLD_LINK_TITLE] : null;
switch($data['type'])
{
case 'link':
@@ -893,7 +897,7 @@ class timesheet_bo extends so_sql_cf
isset($old_title) && $this->data['ts_project'] === $old_title)
{
$pm_id = $data['target_id'];
- $update['ts_project'] = egw_link::title('projectmanager', $pm_id);
+ $update['ts_project'] = Link::title('projectmanager', $pm_id);
if (isset($old_title) && $this->data['ts_title'] === $old_title)
{
$update['ts_title'] = $update['ts_project'];
@@ -914,7 +918,7 @@ class timesheet_bo extends so_sql_cf
{
$this->update($update);
// do NOT notify about title-change, as this will lead to an infinit loop!
- // egw_link::notify_update(TIMESHEET_APP, $this->data['ts_id'],$this->data);
+ // Link::notify_update(TIMESHEET_APP, $this->data['ts_id'],$this->data);
//error_log(__METHOD__."() setting pm_id=$pm_id --> ".array2string($update));
}
}
@@ -941,10 +945,10 @@ class timesheet_bo extends so_sql_cf
if (!isset($data['pm_id']) && $data['ts_id'])
{
$first_pm_id = null;
- foreach(egw_link::get_links('timesheet', $data['ts_id'], 'projectmanager') as $pm_id)
+ foreach(Link::get_links('timesheet', $data['ts_id'], 'projectmanager') as $pm_id)
{
if (!isset($first_pm_id)) $first_pm_id = $pm_id;
- if ($data['ts_project'] == egw_link::title('projectmanager', $pm_id))
+ if ($data['ts_project'] == Link::title('projectmanager', $pm_id))
{
$data['pm_id'] = $pm_id;
$data['ts_project_blur'] = $data['ts_project'];
@@ -954,7 +958,7 @@ class timesheet_bo extends so_sql_cf
}
if (!isset($data['pm_id']) && isset($first_pm_id)) $data['pm_id'] = $first_pm_id;
}
- elseif ($data['ts_id'] && $data['pm_id'] && egw_link::title('projectmanager', $data['pm_id']) == $data['ts_project'])
+ elseif ($data['ts_id'] && $data['pm_id'] && Link::title('projectmanager', $data['pm_id']) == $data['ts_project'])
{
$data['ts_project_blur'] = $data['ts_project'];
$data['ts_project'] = '';
@@ -980,7 +984,7 @@ class timesheet_bo extends so_sql_cf
// allways store ts_project to be able to search for it, even if no custom project is set
if (empty($data['ts_project']) && !is_null($data['ts_project']))
{
- $data['ts_project'] = $data['pm_id'] ? egw_link::title('projectmanager', $data['pm_id']) : '';
+ $data['ts_project'] = $data['pm_id'] ? Link::title('projectmanager', $data['pm_id']) : '';
}
return parent::data2db($intern ? null : $data); // important to use null, if $intern!
}
diff --git a/timesheet/inc/class.timesheet_datasource.inc.php b/timesheet/inc/class.timesheet_datasource.inc.php
index afecf82a52..36e90852dd 100644
--- a/timesheet/inc/class.timesheet_datasource.inc.php
+++ b/timesheet/inc/class.timesheet_datasource.inc.php
@@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @author Ralf Becker
* @package timesheet
- * @copyright (c) 2005-8 by Ralf Becker
+ * @copyright (c) 2005-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
@@ -82,11 +82,13 @@ class timesheet_datasource extends datasource
*
* @param array $element source project element representing an InfoLog entry, $element['pe_app_id'] = info_id
* @param int $target target project id
- * @param array $target_data=null data of target-project, atm not used by the infolog datasource
- * @return array/boolean array(info_id,link_id) on success, false otherwise
+ * @param array $extra =null data of target-project, atm not used by the infolog datasource
+ * @return array|boolean array(info_id,link_id) on success, false otherwise
*/
function copy($element,$target,$extra=null)
{
+ unset($element,$target,$extra); // not used, but required by function signature
+
return false;
}
diff --git a/timesheet/inc/class.timesheet_egw_record.inc.php b/timesheet/inc/class.timesheet_egw_record.inc.php
index 20b1e66c62..4def600c22 100644
--- a/timesheet/inc/class.timesheet_egw_record.inc.php
+++ b/timesheet/inc/class.timesheet_egw_record.inc.php
@@ -11,6 +11,8 @@
* @version $Id: class.egw_addressbook_record.inc.php 22827 2006-11-10 15:35:35Z nelius_weiss $
*/
+use EGroupware\Api\Link;
+
/**
* class egw_addressbook_record
* compability layer for iface_egw_record needet for importexport
@@ -84,7 +86,8 @@ class timesheet_egw_record implements importexport_iface_egw_record
*
*@return string title
*/
- public function get_title() {
+ public function get_title()
+ {
// TODO get_record gibts nicht ?
// if (empty($this->timesheetentry)) {
// $this->get_record();
@@ -102,8 +105,8 @@ class timesheet_egw_record implements importexport_iface_egw_record
$this->timesheetentry = $_record;
// Check for linked project ID
if($this->timesheetentry['ts_project']) {
- $links = egw_link::get_links('timesheet', $_record['ts_id'], 'projectmanager');
- foreach($links as $link_id => $app_id) {
+ $links = Link::get_links('timesheet', $_record['ts_id'], 'projectmanager');
+ foreach($links as $app_id) {
$this->timesheetentry['pm_id'] = $app_id;
break;
}
@@ -135,7 +138,7 @@ class timesheet_egw_record implements importexport_iface_egw_record
* @return string identifier
*/
public function save ( $_dst_identifier ) {
-
+ unset($_dst_identifier);
}
/**
@@ -145,7 +148,7 @@ class timesheet_egw_record implements importexport_iface_egw_record
* @return string dst_identifier
*/
public function copy ( $_dst_identifier ) {
-
+ unset($_dst_identifier);
}
/**
@@ -156,7 +159,7 @@ class timesheet_egw_record implements importexport_iface_egw_record
* @return string dst_identifier
*/
public function move ( $_dst_identifier ) {
-
+ unset($_dst_identifier);
}
/**
diff --git a/timesheet/inc/class.timesheet_favorite_portlet.inc.php b/timesheet/inc/class.timesheet_favorite_portlet.inc.php
index 9d3a2eaae6..d5b0c22c63 100644
--- a/timesheet/inc/class.timesheet_favorite_portlet.inc.php
+++ b/timesheet/inc/class.timesheet_favorite_portlet.inc.php
@@ -9,13 +9,16 @@
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Acl;
+use EGroupware\Api\Etemplate;
+
/**
* The timesheet_list_portlet uses a nextmatch / favorite
* to display a list of entries.
*/
class timesheet_favorite_portlet extends home_favorite_portlet
{
-
/**
* Construct the portlet
*
@@ -39,7 +42,7 @@ class timesheet_favorite_portlet extends home_favorite_portlet
);
}
- public function exec($id = null, etemplate_new &$etemplate = null)
+ public function exec($id = null, Etemplate &$etemplate = null)
{
$ui = new timesheet_ui();
@@ -51,7 +54,7 @@ class timesheet_favorite_portlet extends home_favorite_portlet
$date_filters['custom'] = 'custom';
$this->context['sel_options']['filter'] = $date_filters;
$this->context['sel_options']['filter2'] = array('No details','Details');
- $read_grants = $ui->grant_list(EGW_ACL_READ);
+ $read_grants = $ui->grant_list(Acl::READ);
$this->context['sel_options'] += array(
'ts_owner' => $read_grants,
'pm_id' => array(lang('No project')),
@@ -84,7 +87,7 @@ class timesheet_favorite_portlet extends home_favorite_portlet
* output is handled by parent.
*
* @param type $id
- * @param etemplate_new $etemplate
+ * @param Etemplate $etemplate
*/
public static function process($content = array())
{
@@ -109,7 +112,7 @@ class timesheet_favorite_portlet extends home_favorite_portlet
if (!count($content['nm']['selected']) && !$content['nm']['select_all'])
{
$msg = lang('You need to select some entries first!');
- egw_json_response::get()->apply('egw.message',array($msg,'error'));
+ Api\Json\Response::get()->apply('egw.message',array($msg,'error'));
}
else
{
@@ -119,21 +122,20 @@ class timesheet_favorite_portlet extends home_favorite_portlet
{
$msg .= lang('%1 timesheets(s) %2',$success,$action_msg);
- egw_json_response::get()->apply('egw.message',array($msg,'success'));
+ Api\Json\Response::get()->apply('egw.message',array($msg,'success'));
foreach($content['nm']['selected'] as &$id)
{
$id = 'timesheet::'.$id;
}
// Directly request an update - this will get timesheet tab too
- egw_json_response::get()->apply('egw.dataRefreshUIDs',array($content['nm']['selected']));
+ Api\Json\Response::get()->apply('egw.dataRefreshUIDs',array($content['nm']['selected']));
}
elseif(empty($msg))
{
$msg .= lang('%1 timesheets(s) %2, %3 failed because of insufficent rights !!!',$success,$action_msg,$failed);
}
- egw_json_response::get()->apply('egw.message',array($msg,'error'));
+ Api\Json\Response::get()->apply('egw.message',array($msg,'error'));
}
}
-
}
}
\ No newline at end of file
diff --git a/timesheet/inc/class.timesheet_hooks.inc.php b/timesheet/inc/class.timesheet_hooks.inc.php
index b0a8f6a3a2..67930eb7c3 100644
--- a/timesheet/inc/class.timesheet_hooks.inc.php
+++ b/timesheet/inc/class.timesheet_hooks.inc.php
@@ -10,6 +10,12 @@
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Link;
+use EGroupware\Api\Framework;
+use EGroupware\Api\Egw;
+use EGroupware\Api\Acl;
+
if (!defined('TIMESHEET_APP'))
{
define('TIMESHEET_APP','timesheet');
@@ -74,7 +80,7 @@ class timesheet_hooks
*/
static function cumulate($param)
{
- $links = egw_link::get_3links(TIMESHEET_APP,'projectmanager',$param['pm_id']);
+ $links = Link::get_3links(TIMESHEET_APP,'projectmanager',$param['pm_id']);
$rows = array();
foreach($links as $link)
@@ -93,7 +99,7 @@ class timesheet_hooks
}
/**
- * hooks to build projectmanager's sidebox-menu plus the admin and preferences sections
+ * hooks to build projectmanager's sidebox-menu plus the admin and Api\Preferences sections
*
* @param string/array $args hook args
*/
@@ -106,32 +112,32 @@ class timesheet_hooks
if ($location == 'sidebox_menu')
{
// Magic etemplate2 favorites menu (from nextmatch widget)
- display_sidebox($appname, lang('Favorites'), egw_framework::favorite_list($appname));
+ display_sidebox($appname, lang('Favorites'), Framework\Favorites::list_favorites($appname));
$file = array(
- 'Timesheet list' => egw::link('/index.php',array(
+ 'Timesheet list' => Egw::link('/index.php',array(
'menuaction' => 'timesheet.timesheet_ui.index',
'ajax' => 'true')),
array(
- 'text' => lang('Add %1',lang(egw_link::get_registry($appname, 'entry'))),
+ 'text' => lang('Add %1',lang(Link::get_registry($appname, 'entry'))),
'no_lang' => true,
'link' => "javascript:egw.open('','$appname','add')"
),
);
- $file['Placeholders'] = egw::link('/index.php','menuaction=timesheet.timesheet_merge.show_replacements');
+ $file['Placeholders'] = Egw::link('/index.php','menuaction=timesheet.timesheet_merge.show_replacements');
display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file);
}
if ($GLOBALS['egw_info']['user']['apps']['admin'])
{
$file = Array(
- 'Site Configuration' => egw::link('/index.php','menuaction=admin.admin_config.index&appname=' . $appname,'&ajax=true'),
- 'Custom fields' => egw::link('/index.php','menuaction=admin.customfields.index&appname='.$appname.'&use_private=1'),
- 'Global Categories' => egw::link('/index.php',array(
+ 'Site Configuration' => Egw::link('/index.php','menuaction=admin.admin_config.index&appname=' . $appname,'&ajax=true'),
+ 'Custom fields' => Egw::link('/index.php','menuaction=admin.customfields.index&appname='.$appname.'&use_private=1'),
+ 'Global Categories' => Egw::link('/index.php',array(
'menuaction' => 'admin.admin_categories.index',
'appname' => $appname,
'global_cats'=> True)),
- 'Edit Status' => egw::link('/index.php','menuaction=timesheet.timesheet_ui.editstatus'),
+ 'Edit Status' => Egw::link('/index.php','menuaction=timesheet.timesheet_ui.editstatus'),
);
if ($location == 'admin')
{
@@ -145,7 +151,7 @@ class timesheet_hooks
}
/**
- * populates $GLOBALS['settings'] for the preferences
+ * populates $GLOBALS['settings'] for the Api\Preferences
*/
static function settings()
{
@@ -174,7 +180,7 @@ class timesheet_hooks
'name' => 'default_document',
'help' => lang('If you specify a document (full vfs path) here, %1 displays an extra document icon for each entry. That icon allows to download the specified document with the data inserted.',lang('timesheet')).' '.
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.', 'ts_title').' '.
- lang('The following document-types are supported:'). implode(',',bo_merge::get_file_extensions()),
+ lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
'run_lang' => false,
'xmlrpc' => True,
'admin' => False,
@@ -186,7 +192,7 @@ class timesheet_hooks
'name' => 'document_dir',
'help' => lang('If you specify a directory (full vfs path) here, %1 displays an action for each document. That action allows to download the specified document with the %1 data inserted.', lang('timesheet')).' '.
lang('The document can contain placeholder like {{%1}}, to be replaced with the data.','ts_title').' '.
- lang('The following document-types are supported:'). implode(',',bo_merge::get_file_extensions()),
+ lang('The following document-types are supported:'). implode(',',Api\Storage\Merge::get_file_extensions()),
'run_lang' => false,
'xmlrpc' => True,
'admin' => False,
@@ -248,9 +254,9 @@ class timesheet_hooks
unset($params); // not used, but required by function signature
return array(
- acl::READ => 'read',
- acl::EDIT => 'edit',
- acl::DELETE => 'delete',
+ Acl::READ => 'read',
+ Acl::EDIT => 'edit',
+ Acl::DELETE => 'delete',
);
}
diff --git a/timesheet/inc/class.timesheet_import_csv.inc.php b/timesheet/inc/class.timesheet_import_csv.inc.php
index 63c674d5d1..d019cd5ab7 100644
--- a/timesheet/inc/class.timesheet_import_csv.inc.php
+++ b/timesheet/inc/class.timesheet_import_csv.inc.php
@@ -11,12 +11,14 @@
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Link;
/**
* class import_csv for timesheet
*/
-class timesheet_import_csv implements importexport_iface_import_plugin {
-
+class timesheet_import_csv implements importexport_iface_import_plugin
+{
private static $plugin_options = array(
'fieldsep', // char
'charset', // string
@@ -146,10 +148,10 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
$_definition->plugin_options['record_owner'] : $this->user;
// Used to try to automatically match names to account IDs
- $addressbook = new addressbook_so();
+ $addressbook = new Api\Contacts\Storage();
// For converting human-friendly lookups
- $categories = new categories('timesheet');
+ $categories = new Api\Categories('timesheet');
$lookups = array(
'ts_status' => $this->bo->status_labels,
// 'cat_id' => $categories->return_sorted_array(0,False,'','','',true)
@@ -177,11 +179,11 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
$result = importexport_import_csv::convert($record, timesheet_egw_record::$types, 'timesheet', $lookups, $_definition->plugin_options['convert']);
if($result) $this->warnings[$import_csv->get_current_position()] = $result;
- // Automatically handle text categories without explicit translation
+ // Automatically handle text Api\Categories without explicit Api\Translation
foreach(array('ts_status','cat_id') as $field) {
if(!is_numeric($record[$field])) {
$translate_key = 'translate'.(substr($field,0,2) == 'ts' ? substr($field,2) : '_cat_id');
- if($key = array_search($record[$field], $lookups[$field])) {
+ if(($key = array_search($record[$field], $lookups[$field]))) {
$record[$field] = $key;
} elseif(array_key_exists($translate_key, $_definition->plugin_options)) {
$t_field = $_definition->plugin_options[$translate_key];
@@ -212,11 +214,11 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
'parent' => $parent,
'admin' => false
);
- config::save_value('status_labels',$this->bo->status_labels_config,TIMESHEET_APP);
+ Api\Config::save_value('status_labels',$this->bo->status_labels_config,TIMESHEET_APP);
$lookups[$field][$id] = $name;
$record[$field] = $id;
}
- } elseif($key = array_search($t_field, $lookups[$field])) {
+ } elseif(($key = array_search($t_field, $lookups[$field]))) {
$record[$field] = $key;
} else {
$record[$field] = $t_field;
@@ -230,13 +232,13 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
// Set creator, unless it's supposed to come from CSV file
if($_definition->plugin_options['owner_from_csv'] && $record['ts_owner']) {
if(!is_numeric($record['ts_owner'])) {
- // Automatically handle text owner without explicit translation
+ // Automatically handle text owner without explicit Api\Translation
$new_owner = importexport_helper_functions::account_name2id($record['ts_owner']);
if($new_owner == '') {
$this->errors[$import_csv->get_current_position()] = lang(
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
$record['ts_owner'],
- common::grab_owner_name($_definition->plugin_options['record_owner']),
+ Api\Accounts::username($_definition->plugin_options['record_owner']),
lang($this->bo->field2label['ts_owner'])
);
$record['ts_owner'] = $_definition->plugin_options['record_owner'];
@@ -253,13 +255,13 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
if($record[$field] && !is_numeric($record[$field])) {
// Try an automatic conversion
$account_id = importexport_helper_functions::account_name2id($record[$field]);
- if($account_id && strtoupper(common::grab_owner_name($account_id)) == strtoupper($record[$field])) {
+ if($account_id && strtoupper(Api\Accounts::username($account_id)) == strtoupper($record[$field])) {
$record[$field] = $account_id;
} else {
$this->errors[$import_csv->get_current_position()] = lang(
'Unable to convert "%1" to account ID. Using plugin setting (%2) for %3.',
$record[$field],
- common::grab_owner_name($_definition->plugin_options['record_owner']),
+ Api\Accounts::username($_definition->plugin_options['record_owner']),
$this->bo->field2label[$field] ? lang($this->bo->field2label[$field]) : $field
);
}
@@ -348,9 +350,9 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
// Clear old link, if different
if ($_data['ts_id'] && array_key_exists('pm_id', $_data) && $_data['pm_id'] != $old['pm_id']) {
- egw_link::unlink2(0,TIMESHEET_APP,$_data['ts_id'],0,'projectmanager',$old['pm_id']);
+ Link::unlink2(0,TIMESHEET_APP,$_data['ts_id'],0,'projectmanager',$old['pm_id']);
}
-
+
// Fall through
case 'insert' :
if ( $this->dry_run ) {
@@ -363,7 +365,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
// Set projectmanager link
if ($_data['pm_id']) {
- egw_link::link(TIMESHEET_APP,$_data['ts_id'],'projectmanager',$_data['pm_id']);
+ Link::link(TIMESHEET_APP,$_data['ts_id'],'projectmanager',$_data['pm_id']);
}
if($result) {
@@ -378,7 +380,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
break;
}
default:
- throw new egw_exception('Unsupported action');
+ throw new Api\Exception('Unsupported action');
}
// Process some additional fields
@@ -397,7 +399,7 @@ class timesheet_import_csv implements importexport_iface_import_plugin {
$id = $_data[$field];
}
if ($app && $app_id) {
- $link_id = egw_link::link('timesheet',$id,$app,$app_id);
+ $link_id = Link::link('timesheet',$id,$app,$app_id);
}
}
return $result;
diff --git a/timesheet/inc/class.timesheet_merge.inc.php b/timesheet/inc/class.timesheet_merge.inc.php
index e5219a13f3..04a8ebfae1 100644
--- a/timesheet/inc/class.timesheet_merge.inc.php
+++ b/timesheet/inc/class.timesheet_merge.inc.php
@@ -6,16 +6,19 @@
* @author Ralf Becker
* @author Nathan Gray
* @package timesheet
- * @copyright (c) 2007-14 by Ralf Becker
+ * @copyright (c) 2007-16 by Ralf Becker
* @copyright 2011 Nathan Gray
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Link;
+
/**
* Timesheet - document merge object
*/
-class timesheet_merge extends bo_merge
+class timesheet_merge extends Api\Storage\Merge
{
/**
* Functions that can be called via menuaction
@@ -50,8 +53,8 @@ class timesheet_merge extends bo_merge
{
parent::__construct();
- // switch of handling of html formated content, if html is not used
- $this->parse_html_styles = egw_customfields::use_html('timesheet');
+ // switch of handling of Api\Html formated content, if Api\Html is not used
+ $this->parse_html_styles = Api\Storage\Customfields::use_html('timesheet');
$this->bo = new timesheet_bo();
$this->date_fields += array(
@@ -102,7 +105,7 @@ class timesheet_merge extends bo_merge
$info = array();
// Get project manager ID
- $links = solink::get_links('timesheet',$id,'projectmanager');
+ $links = Link\Storage::get_links('timesheet',$id,'projectmanager');
if($links)
{
$record->pm_id = current($links);
@@ -152,14 +155,14 @@ class timesheet_merge extends bo_merge
}
/**
- * Generate table with replacements for the preferences
+ * Generate table with replacements for the Api\Preferences
*
*/
public function show_replacements()
{
$GLOBALS['egw_info']['flags']['app_header'] = lang('timesheet').' - '.lang('Replacements for inserting entries into documents');
$GLOBALS['egw_info']['flags']['nonavbar'] = false;
- common::egw_header();
+ $GLOBALS['egw']->framework->header();
echo "\n";
echo ''.lang('Timesheet fields:')." ";
@@ -223,6 +226,6 @@ class timesheet_merge extends bo_merge
echo "
\n";
- common::egw_footer();
+ $GLOBALS['egw']->framework->footer();
}
}
diff --git a/timesheet/inc/class.timesheet_tracking.inc.php b/timesheet/inc/class.timesheet_tracking.inc.php
index 7b9565e51d..a6ad8457ac 100644
--- a/timesheet/inc/class.timesheet_tracking.inc.php
+++ b/timesheet/inc/class.timesheet_tracking.inc.php
@@ -5,15 +5,17 @@
* @link http://www.egroupware.org
* @author Ralf Becker
* @package tracker
- * @copyright (c) 2006-8 by Ralf Becker
+ * @copyright (c) 2006-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.timesheet_tracking.inc.php 26515 2009-03-24 11:50:16Z leithoff $
*/
+use EGroupware\Api;
+
/**
* Timesheet - tracking object for the tracker
*/
-class timesheet_tracking extends bo_tracking
+class timesheet_tracking extends Api\Storage\Tracking
{
/**
* Application we are tracking (required!)
@@ -62,7 +64,7 @@ class timesheet_tracking extends bo_tracking
/**
* Constructor
*
- * @param timesheet_bo $botimesheet
+ * @param timesheet_bo $bo
* @return timesheet_tracking
*/
function __construct(timesheet_bo $bo)
@@ -81,12 +83,12 @@ class timesheet_tracking extends bo_tracking
/**
* Get a notification-config value
*
- * @param string $what
+ * @param string $name
* - 'copy' array of email addresses notifications should be copied too, can depend on $data
* - 'lang' string lang code for copy mail
* - 'sender' string send email address
* @param array $data current entry
- * @param array $old=null old/last state of the entry or null for a new entry
+ * @param array $old =null old/last state of the entry or null for a new entry
* @return mixed
*/
function get_config($name,$data,$old=null)
@@ -99,7 +101,7 @@ class timesheet_tracking extends bo_tracking
}
/**
- * Get the subject for a given entry, reimplementation for get_subject in bo_tracking
+ * Get the subject for a given entry, reimplementation for get_subject in Api\Storage\Tracking
*
* Default implementation uses the link-title
*
@@ -124,11 +126,11 @@ class timesheet_tracking extends bo_tracking
if (!$data['ts_modified'] || !$old)
{
return lang('New timesheet submitted by %1 at %2',
- common::grab_owner_name($data['ts_creator']),
+ Api\Accounts::username($data['ts_creator']),
$this->datetime($data['ts_created']));
}
return lang('Timesheet modified by %1 at %2',
- $data['ts_modifier'] ? common::grab_owner_name($data['ts_modifier']) : lang('Timesheet'),
+ $data['ts_modifier'] ? Api\Accounts::username($data['ts_modifier']) : lang('Timesheet'),
$this->datetime($data['ts_modified']));
}
}
diff --git a/timesheet/inc/class.timesheet_ui.inc.php b/timesheet/inc/class.timesheet_ui.inc.php
index 1817277bdf..7723c4c25a 100644
--- a/timesheet/inc/class.timesheet_ui.inc.php
+++ b/timesheet/inc/class.timesheet_ui.inc.php
@@ -10,6 +10,12 @@
* @version $Id$
*/
+use EGroupware\Api;
+use EGroupware\Api\Link;
+use EGroupware\Api\Framework;
+use EGroupware\Api\Acl;
+use EGroupware\Api\Etemplate;
+
/**
* User interface object of the TimeSheet
*/
@@ -54,7 +60,7 @@ class timesheet_ui extends timesheet_bo
function edit($content = null,$view = false)
{
- $etpl = new etemplate_new('timesheet.edit');
+ $etpl = new Etemplate('timesheet.edit');
if (!is_array($content))
{
if ($_GET['msg']) $msg = strip_tags($_GET['msg']);
@@ -63,9 +69,9 @@ class timesheet_ui extends timesheet_bo
{
if (!$this->read((int)$_GET['ts_id']))
{
- egw_framework::window_close(lang('Permission denied!!!'));
+ Framework::window_close(lang('Permission denied!!!'));
}
- if (!$view && !$this->check_acl(EGW_ACL_EDIT))
+ if (!$view && !$this->check_acl(Acl::EDIT))
{
$view = true;
}
@@ -75,7 +81,7 @@ class timesheet_ui extends timesheet_bo
$this->data = array(
'ts_start' => $this->today,
'start_time' => '', // force empty start-time
- 'end_time' => egw_time::to($this->now,'H:i'),
+ 'end_time' => Api\DateTime::to($this->now,'H:i'),
'ts_owner' => $GLOBALS['egw_info']['user']['account_id'],
'cat_id' => (int) $_REQUEST['cat_id'],
'ts_status'=> $GLOBALS['egw_info']['user']['preferences']['timesheet']['predefined_status'],
@@ -91,7 +97,7 @@ class timesheet_ui extends timesheet_bo
$only_admin_edit = true;
$msg = lang('only Admin can edit this status');
}
- $this->data['ts_project_blur'] = $this->data['pm_id'] ? egw_link::title('projectmanager', $this->data['pm_id']) : '';
+ $this->data['ts_project_blur'] = $this->data['pm_id'] ? Link::title('projectmanager', $this->data['pm_id']) : '';
}
else
{
@@ -113,14 +119,14 @@ class timesheet_ui extends timesheet_bo
if (isset($content['start_time'])) // start-time specified
{
//$content['ts_start'] += $content['start_time'];
- $start = new egw_time($content['ts_start']);
+ $start = new Api\DateTime($content['ts_start']);
$start_time = explode(':',$content['start_time']);
$start->setTime($start_time[0],$start_time[1]);
$content['ts_start'] = $start->format('ts');
}
if (isset($content['end_time'])) // end-time specified
{
- $end = new egw_time($content['ts_start']);
+ $end = new Api\DateTime($content['ts_start']);
$end_time = explode(':',$content['end_time']);
$end->setTime($end_time[0],$end_time[1]);
}
@@ -137,14 +143,14 @@ class timesheet_ui extends timesheet_bo
elseif ($content['ts_duration'] && $end) // no start, calculate from end and duration
{
$content['ts_start'] = $end->format('ts') - 60*$content['ts_duration'];
- //echo "end_time=$content[end_time], duration=$content[ts_duration] --> ts_start=$content[ts_start]=".egw_time::to($content['ts_start'])."
\n";
+ //echo "end_time=$content[end_time], duration=$content[ts_duration] --> ts_start=$content[ts_start]=".Api\DateTime::to($content['ts_start'])."
\n";
}
if ($content['ts_duration'] > 0) unset($content['end_time']);
// now we only deal with start (date+time) and duration
list($button) = @each($content['button']);
$view = $content['view'];
$referer = $content['referer'];
- $content['ts_project_blur'] = $content['pm_id'] ? egw_link::title('projectmanager', $content['pm_id']) : '';
+ $content['ts_project_blur'] = $content['pm_id'] ? Link::title('projectmanager', $content['pm_id']) : '';
$this->data = $content;
foreach(array('button','view','referer','tabs','start_time') as $key)
{
@@ -153,7 +159,7 @@ class timesheet_ui extends timesheet_bo
switch($button)
{
case 'edit':
- if ($this->check_acl(EGW_ACL_EDIT) && !$only_admin_edit) $view = false;
+ if ($this->check_acl(Acl::EDIT) && !$only_admin_edit) $view = false;
break;
case 'undelete':
@@ -212,11 +218,11 @@ class timesheet_ui extends timesheet_bo
// update links accordingly
if ($this->data['pm_id'])
{
- egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],'projectmanager',$this->data['pm_id']);
+ Link::link(TIMESHEET_APP,$content['link_to']['to_id'],'projectmanager',$this->data['pm_id']);
}
if ($this->data['old_pm_id'])
{
- egw_link::unlink2(0,TIMESHEET_APP,$content['link_to']['to_id'],0,'projectmanager',$this->data['old_pm_id']);
+ Link::unlink2(0,TIMESHEET_APP,$content['link_to']['to_id'],0,'projectmanager',$this->data['old_pm_id']);
unset($this->data['old_pm_id']);
}
}
@@ -228,7 +234,7 @@ class timesheet_ui extends timesheet_bo
if ($data['app'] == 'projectmanager')
{
$this->data['pm_id'] = $data['id'];
- $this->data['ts_project_blur'] = egw_link::title('projectmanager', $data['id']);
+ $this->data['ts_project_blur'] = Link::title('projectmanager', $data['id']);
break;
}
}
@@ -244,10 +250,10 @@ class timesheet_ui extends timesheet_bo
$msg = lang('Entry saved');
if (is_array($content['link_to']['to_id']) && count($content['link_to']['to_id']))
{
- egw_link::link(TIMESHEET_APP,$this->data['ts_id'],$content['link_to']['to_id']);
+ Link::link(TIMESHEET_APP,$this->data['ts_id'],$content['link_to']['to_id']);
}
}
- egw_framework::refresh_opener($msg, 'timesheet', $this->data['ts_id'], $content['ts_id'] ? 'edit' : 'add');
+ Framework::refresh_opener($msg, 'timesheet', $this->data['ts_id'], $content['ts_id'] ? 'edit' : 'add');
if ($button == 'apply') break;
if ($button == 'save_new')
{
@@ -256,9 +262,9 @@ class timesheet_ui extends timesheet_bo
if (!is_array($content['link_to']['to_id'])) // set links again, so new entry gets the same links as the existing one
{
$content['link_to']['to_id'] = 0;
- foreach(egw_link::get_links(TIMESHEET_APP,$this->data['ts_id'],'!'.egw_link::VFS_APPNAME) as $link)
+ foreach(Link::get_links(TIMESHEET_APP,$this->data['ts_id'],'!'.Link::VFS_APPNAME) as $link)
{
- egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link['app'],$link['id'],$link['remark']);
+ Link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link['app'],$link['id'],$link['remark']);
}
}
// create a new entry
@@ -278,7 +284,7 @@ class timesheet_ui extends timesheet_bo
if ($this->delete())
{
$msg = lang('Entry deleted');
- egw_framework::refresh_opener($msg, 'timesheet', $this->data['ts_id'], 'delete');
+ Framework::refresh_opener($msg, 'timesheet', $this->data['ts_id'], 'delete');
}
else
{
@@ -288,7 +294,7 @@ class timesheet_ui extends timesheet_bo
}
// fall-through for save
case 'cancel':
- egw_framework::window_close();
+ Framework::window_close();
}
}
$preserv = $this->data + array(
@@ -329,13 +335,13 @@ class timesheet_ui extends timesheet_bo
if(!$n)
{
// get title from first linked app
- $preserv['ts_title_blur'] = egw_link::title($link_app,$link_id);
+ $preserv['ts_title_blur'] = Link::title($link_app,$link_id);
// ask first linked app via "timesheet_set" hook, for further data to set, incl. links
- if (($set = $GLOBALS['egw']->hooks->single(array('location'=>'timesheet_set','id'=>$link_id),$link_app)))
+ if (($set = Api\Hooks::single(array('location'=>'timesheet_set','id'=>$link_id),$link_app)))
{
foreach((array)$set['link_app'] as $i => $l_app)
{
- if (($l_id=$set['link_id'][$i])) egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$l_app,$l_id);
+ if (($l_id=$set['link_id'][$i])) Link::link(TIMESHEET_APP,$content['link_to']['to_id'],$l_app,$l_id);
if ($l_app == 'projectmanager') $links[] = $l_id;
}
unset($set['link_app']);
@@ -346,13 +352,13 @@ class timesheet_ui extends timesheet_bo
}
break;
}
- egw_link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id);
+ Link::link(TIMESHEET_APP,$content['link_to']['to_id'],$link_app,$link_id);
}
}
}
elseif ($this->data['ts_id'])
{
- $links = egw_link::get_links(TIMESHEET_APP,$this->data['ts_id'],'projectmanager');
+ $links = Link::get_links(TIMESHEET_APP,$this->data['ts_id'],'projectmanager');
}
// make all linked projects availible for the pm-pricelist widget, to be able to choose prices from all
$content['all_pm_ids'] = array_values($links);
@@ -385,9 +391,9 @@ class timesheet_ui extends timesheet_bo
// or the preserved project-blur comming from the current selected project
$content['ts_title_blur'] = $preserv['ts_title_blur'] ? $preserv['ts_title_blur'] : $content['ts_project_blur'];
$readonlys = array(
- 'button[delete]' => !$this->data['ts_id'] || !$this->check_acl(EGW_ACL_DELETE) || $this->data['ts_status'] == self::DELETED_STATUS,
+ 'button[delete]' => !$this->data['ts_id'] || !$this->check_acl(Acl::DELETE) || $this->data['ts_status'] == self::DELETED_STATUS,
'button[undelete]' => $this->data['ts_status'] != self::DELETED_STATUS,
- 'button[edit]' => !$view || !$this->check_acl(EGW_ACL_EDIT),
+ 'button[edit]' => !$view || !$this->check_acl(Acl::EDIT),
'button[save]' => $view,
'button[save_new]' => $view,
'button[apply]' => $view,
@@ -401,7 +407,7 @@ class timesheet_ui extends timesheet_bo
}
$readonlys['start_time'] = $readonlys['end_time'] = true;
}
- $edit_grants = $this->grant_list(EGW_ACL_EDIT);
+ $edit_grants = $this->grant_list(Acl::EDIT);
if (count($edit_grants) == 1)
{
$readonlys['ts_owner'] = true;
@@ -409,7 +415,7 @@ class timesheet_ui extends timesheet_bo
// in view mode, we need to add the owner, if it does not exist, otherwise it's displayed empty
if ($view && $content['ts_owner'] && !isset($edit_grants[$content['ts_owner']]))
{
- $edit_grants[$content['ts_owner']] = common::grab_owner_name($content['ts_owner']);
+ $edit_grants[$content['ts_owner']] = Api\Accounts::username($content['ts_owner']);
}
$sel_options['ts_owner'] = $edit_grants;
$sel_options['ts_status'] = $this->status_labels;
@@ -454,11 +460,11 @@ class timesheet_ui extends timesheet_bo
/**
* query projects for nextmatch in the projects-list
*
- * reimplemented from so_sql to disable action-buttons based on the acl and make some modification on the data
+ * reimplemented from Api\Storage\Base to disable action-buttons based on the Acl and make some modification on the data
*
* @param array &$query
* @param array &$rows returned rows/cups
- * @param array &$readonlys eg. to disable buttons based on acl
+ * @param array &$readonlys eg. to disable buttons based on Acl
* @param boolean $id_only if true only return (via $rows) an array of contact-ids, dont save state to session
* @return int total number of contacts matching the selection
*/
@@ -528,7 +534,7 @@ class timesheet_ui extends timesheet_bo
}
if ((string)$query['col_filter']['pm_id'] != '' && (string)$query['col_filter']['pm_id'] != '0')
{
- //$query['col_filter']['ts_id'] = egw_link::get_links('projectmanager',$query['col_filter']['pm_id'],'timesheet');
+ //$query['col_filter']['ts_id'] = Link::get_links('projectmanager',$query['col_filter']['pm_id'],'timesheet');
$query['col_filter']['ts_id'] = $this->get_ts_links($query['col_filter']['pm_id']);
if (empty($query['col_filter']['ts_id'])) $query['col_filter']['ts_id'] = -1;
if (!$query['col_filter']['ts_id']) $query['col_filter']['ts_id'] = 0;
@@ -544,7 +550,7 @@ class timesheet_ui extends timesheet_bo
if ($query['col_filter']['linked'])
{
list($app,$id) = explode(':',$query['col_filter']['linked']);
- if (!($links = egw_link::get_links($app,$id,'timesheet')))
+ if (!($links = Link::get_links($app,$id,'timesheet')))
{
$rows = array(); // no infologs linked to project --> no rows to return
return 0;
@@ -606,7 +612,7 @@ class timesheet_ui extends timesheet_bo
$GLOBALS['egw_info']['flags']['app_header'] = lang('timesheet');
if ($query['col_filter']['ts_owner'])
{
- $GLOBALS['egw_info']['flags']['app_header'] .= ': '.common::grab_owner_name($query['col_filter']['ts_owner']);
+ $GLOBALS['egw_info']['flags']['app_header'] .= ': '.Api\Accounts::username($query['col_filter']['ts_owner']);
#if ($GLOBALS['egw']->accounts->get_type($query['col_filter']['ts_owner']) == 'g') $GLOBALS['egw_info']['flags']['app_header'] .= ' '. lang("and its members");
#_debug_array($GLOBALS['egw']->accounts->members($query['col_filter']['ts_owner'],true));
if ($query['col_filter']['ts_owner']<0) $query['col_filter']['ts_owner'] = array_merge(array($query['col_filter']['ts_owner']),$GLOBALS['egw']->accounts->members($query['col_filter']['ts_owner'],true));
@@ -646,20 +652,20 @@ class timesheet_ui extends timesheet_bo
elseif ($query['startdate'])
{
$df = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
- $GLOBALS['egw_info']['flags']['app_header'] .= ': ' . common::show_date($query['startdate']+12*60*60,$df,false);
+ $GLOBALS['egw_info']['flags']['app_header'] .= ': ' . Api\DateTime::to($query['startdate']+12*60*60, $df);
if ($start != $end)
{
- $GLOBALS['egw_info']['flags']['app_header'] .= ' - '.common::show_date($query['enddate']+12*60*60,$df,false);
+ $GLOBALS['egw_info']['flags']['app_header'] .= ' - '.Api\DateTime::to($query['enddate']+12*60*60, $df);
}
}
}
// Update start / end dates for custom
if($query_in['filter'] != 'custom')
{
- egw_json_response::get()->call(
+ Api\Json\Response::get()->call(
'app.timesheet.update_timespan',
- egw_time::to($query['startdate'] ? $query['startdate'] : 'now' , egw_time::ET2),
- $query['filter'] ? egw_time::to($query['enddate'], egw_time::ET2) : null
+ Api\DateTime::to($query['startdate'] ? $query['startdate'] : 'now' , Api\DateTime::ET2),
+ $query['filter'] ? Api\DateTime::to($query['enddate'], Api\DateTime::ET2) : null
);
}
$total = parent::get_rows($query,$rows,$readonlys);
@@ -675,7 +681,7 @@ class timesheet_ui extends timesheet_bo
return $this->total; // no need to set other fields or $readonlys
}
$links = array();
- $links3 = egw_link::get_links_multiple(TIMESHEET_APP,$ids,true,'projectmanager'); // only check for pm links!
+ $links3 = Link::get_links_multiple(TIMESHEET_APP,$ids,true,'projectmanager'); // only check for pm links!
//as the full array is expected, we must supply the missing but needed (since expected further down) information
if (is_array($links3))
{
@@ -713,8 +719,7 @@ class timesheet_ui extends timesheet_bo
switch($row['ts_id'])
{
case 0: // day-sum
- $row['ts_title'] = lang('Sum %1:',lang(date('l',$row['ts_start'])).' '.common::show_date($row['ts_start'],
- $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'],false));
+ $row['ts_title'] = lang('Sum %1:',lang(date('l',$row['ts_start'])).' '.Api\DateTime::to($row['ts_start'], $GLOBALS['egw_info']['user']['preferences']['common']['dateformat']));
$row['ts_id'] = 'sum-day-'.$row['ts_start'];
break;
case -1: // week-sum
@@ -740,7 +745,7 @@ class timesheet_ui extends timesheet_bo
{
$row['ts_quantity'] = round($row['ts_quantity'], 2);
}
- if (!$this->check_acl(EGW_ACL_EDIT,$row))
+ if (!$this->check_acl(Acl::EDIT,$row))
{
$row['class'] .= ' rowNoEdit ';
}
@@ -748,7 +753,7 @@ class timesheet_ui extends timesheet_bo
{
$row['class'] .= ' rowNoEdit ';
}
- if (!$this->check_acl(EGW_ACL_DELETE,$row))
+ if (!$this->check_acl(Acl::DELETE,$row))
{
$row['class'] .= ' rowNoDelete ';
}
@@ -821,7 +826,7 @@ class timesheet_ui extends timesheet_bo
*/
function index($content = null,$msg='')
{
- $etpl = new etemplate_new('timesheet.index');
+ $etpl = new Etemplate('timesheet.index');
if ($_GET['msg']) $msg = $_GET['msg'];
if ($content['nm']['rows']['delete'])
@@ -903,7 +908,7 @@ class timesheet_ui extends timesheet_bo
{
$content['nm']['search'] = $_GET['search'];
}
- $read_grants = $this->grant_list(EGW_ACL_READ);
+ $read_grants = $this->grant_list(Acl::READ);
$content['nm']['no_owner_col'] = count($read_grants) == 1;
if ($GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows']) $content['nm']['selectcols'] = $GLOBALS['egw_info']['user']['preferences']['timesheet']['nextmatch-timesheet.index.rows'];
$sel_options = array(
@@ -946,10 +951,10 @@ class timesheet_ui extends timesheet_bo
'default' => true,
'allowOnMultiple' => false,
'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=$id',
- 'popup' => egw_link::get_registry('timesheet', 'add_popup'),
+ 'popup' => Link::get_registry('timesheet', 'add_popup'),
'group' => $group=1,
'disableClass' => 'th',
- 'onExecute' => html::$ua_mobile?'javaScript:app.timesheet.viewEntry':''
+ 'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.timesheet.viewEntry':''
),
/*
'view' => array(
@@ -957,14 +962,14 @@ class timesheet_ui extends timesheet_bo
'default' => true,
'allowOnMultiple' => false,
'url' => 'menuaction=timesheet.timesheet_ui.view&ts_id=$id',
- 'popup' => egw_link::get_registry('timesheet', 'view_popup'),
+ 'popup' => Link::get_registry('timesheet', 'view_popup'),
'group' => $group=1,
),
'edit' => array(
'caption' => 'Edit',
'allowOnMultiple' => false,
'url' => 'menuaction=timesheet.timesheet_ui.edit&ts_id=$id',
- 'popup' => egw_link::get_registry('timesheet', 'add_popup'),
+ 'popup' => Link::get_registry('timesheet', 'add_popup'),
'group' => $group,
'disableClass' => 'rowNoEdit',
),
@@ -972,10 +977,10 @@ class timesheet_ui extends timesheet_bo
'add' => array(
'caption' => 'Add',
'url' => 'menuaction=timesheet.timesheet_ui.edit',
- 'popup' => egw_link::get_registry('timesheet', 'add_popup'),
+ 'popup' => Link::get_registry('timesheet', 'add_popup'),
'group' => $group,
),
- 'cat' => etemplate_widget_nextmatch::category_action(
+ 'cat' => Etemplate\Widget\Nextmatch::category_action(
'timesheet',++$group,'Change category','cat_'
),
'status' => array(
@@ -988,7 +993,7 @@ class timesheet_ui extends timesheet_bo
),
);
- // Other applications
+ // Other Api\Applications
$group++;
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
{
@@ -1057,7 +1062,7 @@ class timesheet_ui extends timesheet_bo
if ($use_all)
{
// get the whole selection
- $query = is_array($session_name) ? $session_name : $GLOBALS['egw']->session->appsession($session_name,'timesheet');
+ $query = is_array($session_name) ? $session_name : Api\Cache::getSession('timesheet', $session_name);
if ($use_all)
{
@@ -1125,7 +1130,7 @@ class timesheet_ui extends timesheet_bo
}
break;
case 'cat':
- $cat_name = categories::id2name($settings);
+ $cat_name = Api\Categories::id2name($settings);
$action_msg = lang('changed category to %1', $cat_name);
foreach((array)$checked as $n => $id) {
$entry = $this->read($id);
@@ -1189,8 +1194,8 @@ class timesheet_ui extends timesheet_bo
}
if ($need_update)
{
- config::save_value('status_labels',$this->status_labels_config,TIMESHEET_APP);
- $this->config_data = config::read(TIMESHEET_APP);
+ Api\Config::save_value('status_labels',$this->status_labels_config,TIMESHEET_APP);
+ $this->config_data = Api\Config::read(TIMESHEET_APP);
$this->load_statuses();
$msg .= lang('Status updated.');
}
@@ -1206,7 +1211,7 @@ class timesheet_ui extends timesheet_bo
if (isset($this->status_labels_config[$id]))
{
unset($this->status_labels_config[$id]);
- config::save_value('status_labels',$this->status_labels_config,TIMESHEET_APP);
+ Api\Config::save_value('status_labels',$this->status_labels_config,TIMESHEET_APP);
unset($this->status_labels[$id]);
$msg .= lang('Status deleted.');
}
@@ -1231,7 +1236,7 @@ class timesheet_ui extends timesheet_bo
$content['msg'] = $msg;
$preserv = $content;
$sel_options['parent'] = $this->status_labels;
- $etpl = new etemplate_new('timesheet.editstatus');
+ $etpl = new Etemplate('timesheet.editstatus');
$etpl->exec('timesheet.timesheet_ui.editstatus',$content,$sel_options,array(),$preserv);
}
}
diff --git a/timesheet/inc/class.timesheet_wizard_export_csv.inc.php b/timesheet/inc/class.timesheet_wizard_export_csv.inc.php
index d712e69786..b17dd9a7ec 100644
--- a/timesheet/inc/class.timesheet_wizard_export_csv.inc.php
+++ b/timesheet/inc/class.timesheet_wizard_export_csv.inc.php
@@ -10,6 +10,8 @@
* @version $Id$
*/
+use EGroupware\Api;
+
class timesheet_wizard_export_csv extends importexport_wizard_basic_export_csv
{
public function __construct() {
@@ -21,7 +23,7 @@ class timesheet_wizard_export_csv extends importexport_wizard_basic_export_csv
// Custom fields
unset($this->export_fields['customfields']);
- $custom = config::get_customfields('timesheet', true);
+ $custom = Api\Storage\Customfields::get('timesheet', true);
foreach($custom as $name => $data) {
$this->export_fields['#'.$name] = $data['label'];
}
diff --git a/timesheet/inc/class.timesheet_wizard_import_csv.inc.php b/timesheet/inc/class.timesheet_wizard_import_csv.inc.php
index 3cd3400c1b..28e04d2615 100644
--- a/timesheet/inc/class.timesheet_wizard_import_csv.inc.php
+++ b/timesheet/inc/class.timesheet_wizard_import_csv.inc.php
@@ -10,6 +10,8 @@
* @version $Id$
*/
+use EGroupware\Api;
+
class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
{
@@ -39,7 +41,7 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
// List each custom field
unset($this->mapping_fields['customfields']);
- $custom = config::get_customfields('timesheet');
+ $custom = Api\Storage\Customfields::get('timesheet');
foreach($custom as $name => $data) {
$this->mapping_fields['#'.$name] = $data['label'];
}
@@ -100,7 +102,7 @@ class timesheet_wizard_import_csv extends importexport_wizard_basic_import_csv
'add' => lang('Add'),
);
$set_to = lang('Set to') . ':';
- $categories = new categories('','timesheet');
+ $categories = new Api\Categories('','timesheet');
$cat_list = array();
foreach((array)$categories->return_sorted_array(0,False,'','','',true) as $cat) {
$s = str_repeat(' ',$cat['level']) . stripslashes($cat['name']);
diff --git a/timesheet/index.php b/timesheet/index.php
index 7dd445ceea..19c663494a 100644
--- a/timesheet/index.php
+++ b/timesheet/index.php
@@ -5,11 +5,13 @@
* @link http://www.egroupware.org
* @author Ralf Becker
* @package timesheet
- * @copyright (c) 2005-8 by Ralf Becker
+ * @copyright (c) 2005-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
+use EGroupware\Api\Framework;
+
include_once('./setup/setup.inc.php');
$ts_version = $setup_info[TIMESHEET_APP]['version'];
unset($setup_info);
@@ -24,14 +26,11 @@ include('../header.inc.php');
if ($ts_version != $GLOBALS['egw_info']['apps'][TIMESHEET_APP]['version'])
{
- $GLOBALS['egw']->common->egw_header();
- parse_navbar();
- echo ''.lang('Your database is NOT up to date (%1 vs. %2), please run %3setup%4 to update your database.',
+ Framework::render('
'.
+ lang('Your database is NOT up to date (%1 vs. %2), please run %3setup%4 to update your database.',
$ts_version,$GLOBALS['egw_info']['apps'][TIMESHEET_APP]['version'],
- '',' ')."
\n";
- $GLOBALS['egw']->common->egw_exit();
+ '',' ')."
\n", null, true);
+ exit();
}
-//ExecMethod(TIMESHEET_APP.'.pm_admin_prefs_sidebox_hooks.check_set_default_prefs');
-
-$GLOBALS['egw']->redirect_link('/index.php',array('menuaction'=>TIMESHEET_APP.'.timesheet_ui.index'));
+Framework::redirect_link('/index.php',array('menuaction'=>TIMESHEET_APP.'.timesheet_ui.index'));
diff --git a/timesheet/setup/etemplates.inc.php b/timesheet/setup/etemplates.inc.php
deleted file mode 100644
index 304e86a82f..0000000000
--- a/timesheet/setup/etemplates.inc.php
+++ /dev/null
@@ -1,51 +0,0 @@
- 'timesheet.customfields','template' => '','lang' => '','group' => '0','version' => '1.2.002','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:2:{s:1:"F";s:3:"80%";s:2:"c2";s:6:"header";}i:1;a:6:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"status";s:4:"span";s:3:"all";s:4:"name";s:6:"status";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:2;a:6:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:13:"Custom fields";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:3;a:6:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:6:"fields";s:4:"span";s:3:"all";s:4:"name";s:6:"fields";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:4;a:6:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:3:"all";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:33:"saves the changes made and leaves";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:4:"help";s:19:"applies the changes";}i:3;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";s:4:"help";s:22:"leaves without saveing";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:1:{s:4:"type";s:5:"label";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:6;}}','size' => '','style' => '.header { font-weight: bold; font-size: 120%; }
-.error_msg { color: red; font-style: italics; }','modified' => '1163162665',);
-
-$templ_data[] = array('name' => 'timesheet.customfields.fields','template' => '','lang' => '','group' => '0','version' => '1.2.004','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:7:"row,top";}i:1;a:7:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Label";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"type";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:20:"Values for selectbox";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:14:"Length Rows";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Order";}s:1:"G";a:4:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";s:5:"align";s:6:"center";s:4:"help";s:18:"deletes this field";}}i:2;a:7:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:5:"20,32";s:4:"name";s:12:"${row}[name]";s:4:"help";s:83:"the name used internaly (<= 20 chars), changeing it makes existing data unavailible";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:4:",255";s:4:"name";s:13:"${row}[label]";s:4:"help";s:30:"the text displayed to the user";}i:2;a:2:{s:4:"type";s:5:"label";s:4:"name";s:13:"${row}[label]";}}s:1:"C";a:2:{s:4:"type";s:6:"select";s:4:"name";s:12:"${row}[type]";}s:1:"D";a:4:{s:4:"type";s:8:"textarea";s:4:"size";s:4:"2,30";s:4:"name";s:14:"${row}[values]";s:4:"help";s:40:"each value is a line like [=]";}s:1:"E";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"3";i:1;a:4:{s:4:"type";s:4:"text";s:4:"size";s:1:"5";s:4:"name";s:11:"${row}[len]";s:4:"help";s:63:"max length of the input [, length of the inputfield (optional)]";}i:2;a:4:{s:4:"type";s:3:"int";s:4:"name";s:12:"${row}[rows]";s:4:"size";s:6:"0,10,2";s:4:"blur";s:1:"1";}i:3;a:6:{s:4:"type";s:3:"int";s:4:"size";s:6:"0,10,2";s:4:"name";s:12:"${row}[rows]";s:4:"help";s:70:"number of row for a multiline inputfield or line of a multi-select-box";s:4:"blur";s:1:"1";s:8:"disabled";s:1:"1";}}s:1:"F";a:4:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:13:"${row}[order]";s:4:"help";s:45:"determines the order the fields are displayed";}s:1:"G";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:23:"delete[$row_cont[name]]";s:4:"help";s:18:"deletes this field";}i:2;a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Create";s:4:"name";s:21:"create$row_cont[name]";s:4:"help";s:19:"creates a new field";}}}}s:4:"rows";i:2;s:4:"cols";i:7;}}','size' => '','style' => '','modified' => '1164631589',);
-
-$templ_data[] = array('name' => 'timesheet.customstatus','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:1:"D";s:3:"30%";s:1:"A";s:4:"100%";s:2:"h1";s:6:",!@msg";}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"1";i:1;a:3:{s:4:"type";s:8:"template";s:7:"no_lang";s:1:"1";s:4:"name";s:27:"timesheet.customstatus.cats";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:3;a:4:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:3;s:4:"cols";i:4;s:4:"size";s:17:"100%,450,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"450";i:6;s:4:"auto";}}}','size' => '100%,450,,,,,auto','style' => '','modified' => '1237891752',);
-
-$templ_data[] = array('name' => 'timesheet.customstatus.cats','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:3:{s:1:"D";s:3:"30%";s:2:"c1";s:7:"row,top";s:1:"A";s:3:"100";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"B";a:8:{s:4:"type";s:4:"grid";s:4:"size";s:17:"100%,280,,,,,auto";s:4:"span";s:3:"all";s:4:"name";s:6:"statis";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:1:"B";s:2:"5%";s:2:"c2";s:3:"row";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}}i:2;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,150";s:4:"blur";s:18:"--> enter new name";s:4:"name";s:12:"${row}[name]";}s:1:"B";a:7:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:18:"Delete this status";s:7:"onclick";s:37:"return confirm(\'Delete this status\');";}}}s:4:"rows";i:2;s:4:"cols";i:2;s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"280";i:6;s:4:"auto";}}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:17:"100%,300,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"300";i:6;s:4:"auto";}}}','size' => '100%,300,,,,,auto','style' => '','modified' => '1236867741',);
-
-$templ_data[] = array('name' => 'timesheet.edit','template' => '','lang' => '','group' => '0','version' => '1.9.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:8:{s:1:"A";s:3:"100";s:2:"h1";s:6:",!@msg";s:2:"c2";s:2:"th";s:2:"h2";s:2:"28";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"h4";s:13:",@ts_viewtype";s:2:"h6";s:14:",!@ts_modified";}i:1;a:2:{s:1:"A";a:5:{s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";s:4:"name";s:3:"msg";s:4:"type";s:5:"label";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"size";s:11:",,,ts_owner";s:4:"type";s:5:"label";s:5:"label";s:4:"User";}s:1:"B";a:4:{s:4:"span";s:3:"all";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"ts_owner";s:4:"type";s:6:"select";}}i:3;a:2:{s:1:"A";a:3:{s:4:"size";s:13:",,,ts_project";s:4:"type";s:5:"label";s:5:"label";s:7:"Project";}s:1:"B";a:5:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=none";s:2:"h2";s:21:",@pm_integration=full";}i:1;a:1:{s:1:"A";a:6:{s:4:"span";s:13:"all,fullWidth";s:8:"onchange";s:1:"1";s:4:"name";s:5:"pm_id";s:4:"size";s:4:"None";s:4:"type";s:21:"projectmanager-select";s:4:"help";s:16:"Select a project";}}i:2;a:1:{s:1:"A";a:5:{s:4:"blur";s:16:"@ts_project_blur";s:4:"size";s:5:"65,80";s:4:"name";s:10:"ts_project";s:4:"type";s:4:"text";s:4:"span";s:10:",fullWidth";}}}s:4:"cols";i:1;s:4:"rows";i:2;s:4:"size";s:7:",,,,1,1";}}i:4;a:2:{s:1:"A";a:3:{s:4:"size";s:15:",,,ts_unitprice";s:4:"type";s:5:"label";s:5:"label";s:9:"Unitprice";}s:1:"B";a:4:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:1:"A";s:21:",@pm_integration=none";}i:1;a:2:{s:1:"A";a:4:{s:8:"onchange";s:209:"this.form[\'exec[ts_unitprice]\'].value=this.options[this.selectedIndex].text.lastIndexOf(\'(\') < 0 ? \'\' : this.options[this.selectedIndex].text.slice(this.options[this.selectedIndex].text.lastIndexOf(\'(\')+1,-1);";s:4:"name";s:5:"pl_id";s:4:"size";s:4:"None";s:4:"type";s:24:"projectmanager-pricelist";}s:1:"B";a:4:{s:4:"type";s:5:"float";s:4:"span";s:3:"all";s:4:"name";s:12:"ts_unitprice";s:4:"size";s:1:",";}}}s:4:"cols";i:2;s:4:"rows";i:1;}}i:5;a:2:{s:1:"A";a:5:{s:4:"span";s:3:"all";s:4:"name";s:45:"tabs=general|notes|links|customfields|history";s:4:"type";s:3:"tab";s:5:"label";s:41:"General|Notes|Links|Custom Fields|History";s:4:"help";s:4:"||||";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:6;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:13:"Last modified";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:3:{s:8:"readonly";s:4:"true";s:4:"name";s:11:"ts_modified";s:4:"type";s:9:"date-time";}i:2;a:4:{s:4:"type";s:14:"select-account";s:5:"label";s:2:"by";s:8:"readonly";s:4:"true";s:4:"name";s:11:"ts_modifier";}}}i:7;a:2:{s:1:"A";a:7:{s:4:"span";s:1:"2";s:6:"orient";s:1:"0";s:4:"size";s:1:"3";s:4:"type";s:4:"hbox";i:1;a:8:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"6";i:1;a:4:{s:5:"label";s:4:"Edit";s:4:"name";s:12:"button[edit]";s:4:"type";s:6:"button";s:4:"help";s:15:"Edit this entry";}i:2;a:4:{s:5:"label";s:10:"Save & New";s:4:"name";s:16:"button[save_new]";s:4:"type";s:6:"button";s:4:"help";s:34:"Saves this entry and add a new one";}i:3;a:4:{s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"type";s:6:"button";s:4:"help";s:22:"Saves the changes made";}i:4;a:4:{s:5:"label";s:5:"Apply";s:4:"name";s:13:"button[apply]";s:4:"type";s:6:"button";s:4:"help";s:24:"Applies the changes made";}i:5;a:5:{s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";s:4:"name";s:14:"button[cancel]";s:4:"type";s:6:"button";s:4:"help";s:44:"closes the window without saving the changes";}i:6;a:2:{s:4:"name";s:2:"js";s:4:"type";s:4:"html";}}i:2;a:6:{s:5:"label";s:6:"Delete";s:5:"align";s:5:"right";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";s:4:"name";s:14:"button[delete]";s:4:"type";s:6:"button";s:4:"help";s:17:"Delete this entry";}i:3;a:5:{s:5:"label";s:8:"Undelete";s:5:"align";s:5:"right";s:4:"name";s:16:"button[undelete]";s:4:"type";s:6:"button";s:4:"help";s:18:"Restore this entry";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"cols";i:2;s:4:"rows";i:7;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.fullWidth select { widht: 100%; }
-.fullWidth input { widht: 100%; }
-.fullWidth textarea { widht: 100%; }','modified' => '1350928309',);
-
-$templ_data[] = array('name' => 'timesheet.edit.customfields','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:12:"customfields";}}}s:4:"cols";i:1;s:4:"rows";i:1;s:4:"size";s:17:"100%,165,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"165";i:6;s:4:"auto";}}}','size' => '100%,165,,,,,auto','style' => '','modified' => '1303228015',);
-
-$templ_data[] = array('name' => 'timesheet.edit.general','template' => '','lang' => '','group' => '0','version' => '1.7.002','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:8:{i:0;a:15:{s:1:"A";s:2:"95";s:1:"B";s:3:"120";s:1:"C";s:15:"80,@ts_viewtype";s:1:"D";s:13:",@ts_viewtype";s:2:"c1";s:3:"row";s:2:"h1";s:13:",@ts_viewtype";s:2:"c2";s:3:"row";s:2:"h2";s:14:",!@ts_viewtype";s:2:"c3";s:3:"row";s:2:"c4";s:3:"row";s:2:"c5";s:3:"row";s:2:"c6";s:3:"row";s:2:"h6";s:13:",@ts_viewtype";s:2:"c7";s:3:"row";s:2:"h7";s:14:",@no_ts_status";}i:1;a:4:{s:1:"A";a:3:{s:4:"size";s:11:",,,ts_title";s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:6:{s:4:"size";s:5:"65,80";s:4:"blur";s:14:"@ts_title_blur";s:4:"span";s:13:"all,fullWidth";s:4:"name";s:8:"ts_title";s:4:"type";s:4:"text";s:8:"tabindex";i:1;}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"comment";}s:1:"B";a:4:{s:4:"span";s:13:"all,fullWidth";s:4:"name";s:14:"ts_description";s:4:"type";s:8:"textarea";s:4:"size";s:4:"5,50";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:3;a:4:{s:1:"A";a:3:{s:4:"size";s:9:",,,cat_id";s:4:"type";s:5:"label";s:5:"label";s:8:"Category";}s:1:"B";a:4:{s:4:"span";s:3:"all";s:4:"type";s:10:"select-cat";s:4:"name";s:6:"cat_id";s:4:"size";s:16:"None,,,timesheet";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:4;a:4:{s:1:"A";a:3:{s:4:"size";s:11:",,,ts_start";s:4:"type";s:5:"label";s:5:"label";s:4:"Date";}s:1:"B";a:4:{s:6:"needed";s:1:"1";s:4:"name";s:8:"ts_start";s:4:"size";s:2:",8";s:4:"type";s:4:"date";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Starttime";}s:1:"D";a:3:{s:4:"name";s:10:"start_time";s:4:"size";s:3:"H:i";s:4:"type";s:13:"date-timeonly";}}i:5;a:4:{s:1:"A";a:3:{s:4:"size";s:14:",,,ts_duration";s:4:"type";s:5:"label";s:5:"label";s:8:"Duration";}s:1:"B";a:3:{s:4:"name";s:11:"ts_duration";s:4:"size";s:3:",hm";s:4:"type";s:13:"date-duration";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:10:"or endtime";s:4:"span";s:7:",noWrap";}s:1:"D";a:3:{s:4:"name";s:8:"end_time";s:4:"size";s:3:"H:i";s:4:"type";s:13:"date-timeonly";}}i:6;a:4:{s:1:"A";a:3:{s:4:"size";s:14:",,,ts_quantity";s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"B";a:7:{s:4:"type";s:5:"float";s:4:"blur";s:17:"@ts_quantity_blur";s:9:"precision";s:1:"3";s:4:"span";s:3:"all";s:4:"name";s:11:"ts_quantity";s:4:"size";s:1:",";s:4:"help";s:30:"empty if identical to duration";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:7;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"B";a:5:{s:4:"name";s:9:"ts_status";s:4:"size";s:13:"please select";s:4:"type";s:6:"select";s:4:"help";s:32:"select a status of the timesheet";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"cols";i:4;s:4:"rows";i:7;s:4:"size";s:8:"100%,165";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"165";}}}','size' => '100%,165','style' => '','modified' => '1303227457',);
-
-$templ_data[] = array('name' => 'timesheet.edit.history','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:2:{s:4:"name";s:7:"history";s:4:"type";s:10:"historylog";}}}s:4:"cols";i:1;s:4:"rows";i:1;s:4:"size";s:17:"100%,165,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"165";i:6;s:4:"auto";}}}','size' => '100%,165,,,,,auto','style' => '','modified' => '1303228026',);
-
-$templ_data[] = array('name' => 'timesheet.edit.links','template' => '','lang' => '','group' => '0','version' => '0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:7:{s:1:"A";s:3:"100";s:2:"c1";s:2:"th";s:2:"h1";s:6:",@view";s:2:"c2";s:3:"row";s:2:"h2";s:13:",@status_only";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:3:{s:4:"span";s:3:"all";s:4:"type";s:5:"label";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";s:4:"type";s:7:"link-to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"span";s:3:"all";s:4:"type";s:5:"label";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";s:4:"type";s:9:"link-list";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"cols";i:2;s:4:"rows";i:4;s:4:"size";s:17:"100%,165,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"165";i:6;s:4:"auto";}}}','size' => '100%,165,,,,,auto','style' => '','modified' => '1303228005',);
-
-$templ_data[] = array('name' => 'timesheet.edit.notes','template' => '','lang' => '','group' => '0','version' => '1.5.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:7:"row,top";}i:1;a:1:{s:1:"A";a:4:{s:4:"name";s:14:"ts_description";s:4:"type";s:8:"textarea";s:4:"size";s:5:"11,70";s:4:"span";s:10:",fullWidth";}}}s:4:"cols";i:1;s:4:"rows";i:1;s:4:"size";s:8:"100%,165";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"165";}}}','size' => '100%,165','style' => '','modified' => '1303226920',);
-
-$templ_data[] = array('name' => 'timesheet.editstatus','template' => '','lang' => '','group' => '0','version' => '1.7.004','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:3:{s:1:"D";s:3:"30%";s:1:"A";s:3:"100";s:2:"h1";s:6:",!@msg";}i:1;a:4:{s:1:"A";a:4:{s:4:"type";s:5:"label";s:4:"name";s:3:"msg";s:4:"span";s:13:"all,redItalic";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:2;a:4:{s:1:"A";a:6:{s:4:"type";s:8:"groupbox";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:6:",!@msg";}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"1";i:1;a:5:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:3:{s:1:"D";s:3:"30%";s:2:"c1";s:7:"row,top";s:1:"A";s:3:"100";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"B";a:8:{s:4:"type";s:4:"grid";s:4:"size";s:17:"100%,280,,,,,auto";s:4:"span";s:3:"all";s:4:"name";s:6:"statis";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"E";s:2:"5%";}i:1;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:2:"ID";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Name";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Parent";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:10:"Only Admin";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}}i:2;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:10:"${row}[id]";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,150";s:4:"blur";s:18:"--> enter new name";s:4:"name";s:12:"${row}[name]";}s:1:"C";a:3:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[parent]";s:4:"size";s:13:"please select";}s:1:"D";a:3:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"${row}[admin]";s:4:"help";s:33:"Only Admin can change this Status";}s:1:"E";a:7:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:21:"delete[$row_cont[id]]";s:4:"help";s:18:"Delete this status";s:7:"onclick";s:37:"return confirm(\'Delete this status\');";}}}s:4:"rows";i:2;s:4:"cols";i:5;s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"280";i:6;s:4:"auto";}}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:17:"100%,300,,,,,auto";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}i:3;a:4:{s:1:"A";a:6:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"3";s:4:"span";s:1:"2";i:1;a:3:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";}i:2;a:3:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";}i:3;a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Cancel";s:4:"name";s:14:"button[cancel]";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:3;s:4:"cols";i:4;s:4:"size";s:17:"100%,450,,,,,auto";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"450";i:6;s:4:"auto";}}}','size' => '100%,450,,,,,auto','style' => '','modified' => '1252352154',);
-
-$templ_data[] = array('name' => 'timesheet.export_csv_selectors','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"radio";s:5:"label";s:7:"Use all";s:4:"size";s:3:"all";s:4:"name";s:9:"selection";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:5:"radio";s:5:"label";s:18:"Use search results";s:4:"name";s:9:"selection";s:4:"size";s:8:"selected";}}}s:4:"rows";i:2;s:4:"cols";i:1;}}','size' => '','style' => '','modified' => '1295995750',);
-
-$templ_data[] = array('name' => 'timesheet.index','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:4:{s:2:"h1";s:6:",!@msg";s:2:"h2";s:2:",1";s:2:"c4";s:7:"noPrint";s:2:"h4";s:34:",!@nm[selectcols]=/legacy_actions/";}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:2:{s:4:"type";s:8:"template";s:4:"name";s:5:"dates";}i:2;a:3:{s:4:"type";s:8:"template";s:4:"name";s:3:"add";s:5:"align";s:5:"right";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:4:{s:4:"type";s:9:"nextmatch";s:4:"name";s:2:"nm";s:4:"size";s:20:"timesheet.index.rows";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:10:"buttononly";s:4:"name";s:14:"legacy_actions";s:4:"help";s:13:"Select action";s:5:"label";s:13:"Select action";s:7:"onclick";s:185:"if (!egw_globalObjectManager.getObjectById(\'timesheet.index.rows\').executeActionImplementation(this, \'popup\')) alert(egw::lang(\'You need to select some entries first!\')); return false;;";}i:2;a:8:{s:4:"type";s:6:"button";s:4:"size";s:9:"arrow_ltr";s:5:"label";s:9:"Check all";s:4:"name";s:9:"check_all";s:4:"help";s:9:"Check all";s:7:"onclick";s:96:"egw_globalObjectManager.getObjectById(\'timesheet.index.rows\').toggleAllSelected(); return false;";s:6:"needed";s:1:"1";s:4:"span";s:14:",checkAllArrow";}}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1291996935',);
-
-$templ_data[] = array('name' => 'timesheet.index.add','template' => '','lang' => '','group' => '0','version' => '1.7.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:10:"buttononly";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";s:7:"onclick";s:164:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}}','size' => '','style' => '','modified' => '1158042543',);
-
-$templ_data[] = array('name' => 'timesheet.index.dates','template' => '','lang' => '','group' => '0','version' => '1.2.001','data' => 'a:1:{i:0;a:10:{s:4:"type";s:4:"hbox";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:1:"4";i:1;a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Start";}i:2;a:2:{s:4:"type";s:4:"date";s:4:"name";s:9:"startdate";}i:3;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"End";}i:4;a:3:{s:4:"type";s:4:"date";s:4:"name";s:7:"enddate";s:4:"help";s:30:"Leave it empty for a full week";}s:4:"span";s:12:",custom_hide";}}','size' => '','style' => '.custom_hide { visibility: hidden; }','modified' => '1142973260',);
-
-$templ_data[] = array('name' => 'timesheet.index.rows','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:9:{s:2:"c1";s:2:"th";s:2:"c2";s:16:"$row_cont[class]";s:1:"A";s:3:"15%";s:1:"B";s:3:"50%";s:1:"H";s:14:",@no_owner_col";s:1:"G";s:13:",@no_ts_total";s:1:"F";s:17:",@no_ts_unitprice";s:1:"E";s:16:",@no_ts_quantity";s:1:"I";s:14:",@no_ts_status";}i:1;a:11:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Date";s:4:"name";s:8:"ts_start";}s:1:"B";a:7:{s:4:"type";s:4:"grid";s:7:"no_lang";s:1:"1";s:4:"data";a:5:{i:0;a:2:{s:2:"h1";s:21:",@pm_integration=full";s:2:"h2";s:22:",!@pm_integration=full";}i:1;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"size";s:12:"All projects";s:4:"name";s:10:"ts_project";s:7:"no_lang";s:1:"1";}}i:2;a:1:{s:1:"A";a:4:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:34:"projectmanager-select,All projects";s:4:"name";s:5:"pm_id";s:8:"onchange";i:1;}}i:3;a:1:{s:1:"A";a:6:{s:4:"type";s:22:"nextmatch-customfilter";s:4:"size";s:10:"link-entry";i:1;a:5:{s:4:"type";s:10:"link-entry";s:4:"size";s:15:"infolog,infolog";s:4:"name";s:11:"nm[info_id]";s:8:"onchange";i:1;s:4:"blur";s:14:"select Infolog";}i:2;a:2:{s:4:"type";s:6:"button";s:5:"label";s:6:"submit";}s:8:"onchange";i:1;s:4:"name";s:6:"linked";}}i:4;a:1:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Title";s:4:"name";s:8:"ts_title";}}}s:4:"rows";i:4;s:4:"cols";i:1;s:4:"size";s:7:",,,,0,0";s:7:"options";a:2:{i:4;s:1:"0";i:5;s:1:"0";}}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Category";s:4:"name";s:6:"cat_id";}s:1:"D";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Duration";s:4:"name";s:11:"ts_duration";}i:2;a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:8:"duration";s:4:"size";s:6:",h,,,1";s:8:"readonly";s:1:"1";}}s:1:"E";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"Quantity";s:4:"name";s:11:"ts_quantity";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:8:"quantity";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,3";}}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Price";s:4:"name";s:12:"ts_unitprice";}s:1:"G";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:1:"2";i:1;a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:5:"Total";s:4:"name";s:8:"ts_total";}i:2;a:4:{s:4:"type";s:5:"float";s:4:"name";s:5:"price";s:8:"readonly";s:1:"1";s:4:"size";s:4:",,,2";}}s:1:"H";a:5:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:8:"ts_owner";s:4:"size";s:4:"User";s:7:"no_lang";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:4:{s:4:"type";s:22:"nextmatch-filterheader";s:4:"name";s:9:"ts_status";s:8:"onchange";i:1;s:4:"size";s:6:"Status";}s:1:"J";a:2:{s:4:"type";s:22:"nextmatch-customfields";s:4:"name";s:12:"customfields";}s:1:"K";a:5:{s:4:"type";s:4:"hbox";s:4:"span";s:8:",noPrint";s:4:"size";s:1:"2";i:1;a:5:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:7:"Actions";s:4:"span";s:8:",noPrint";s:5:"align";s:5:"right";s:4:"name";s:14:"legacy_actions";}i:2;a:7:{s:4:"type";s:6:"button";s:5:"label";s:9:"Check all";s:4:"size";s:5:"check";s:4:"name";s:9:"check_all";s:6:"needed";s:1:"1";s:4:"help";s:9:"Check all";s:7:"onclick";s:96:"egw_globalObjectManager.getObjectById(\'timesheet.index.rows\').toggleAllSelected(); return false;";}}}i:2;a:11:{s:1:"A";a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:16:"${row}[ts_start]";s:8:"readonly";s:1:"1";s:4:"size";s:2:",8";}s:1:"B";a:5:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"3,,0,0";i:1;a:3:{s:4:"type";s:4:"link";s:4:"name";s:15:"${row}[ts_link]";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[ts_title]";s:7:"no_lang";s:1:"1";s:4:"span";s:22:",$row_cont[titleClass]";}i:3;a:3:{s:4:"type";s:5:"label";s:4:"name";s:22:"${row}[ts_description]";s:7:"no_lang";s:1:"1";}}s:1:"C";a:4:{s:4:"type";s:10:"select-cat";s:8:"readonly";s:1:"1";s:4:"name";s:14:"${row}[cat_id]";s:4:"span";s:7:",noWrap";}s:1:"D";a:4:{s:4:"type";s:13:"date-duration";s:4:"name";s:19:"${row}[ts_duration]";s:8:"readonly";s:1:"1";s:4:"size";s:6:",h,,,1";}s:1:"E";a:5:{s:4:"type";s:5:"float";s:4:"name";s:19:"${row}[ts_quantity]";s:7:"no_lang";s:1:"1";s:4:"size";s:4:",,,3";s:8:"readonly";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:7:"no_lang";s:1:"1";s:4:"name";s:20:"${row}[ts_unitprice]";}s:1:"G";a:5:{s:4:"type";s:5:"float";s:7:"no_lang";s:1:"1";s:4:"name";s:16:"${row}[ts_total]";s:4:"size";s:4:",,,2";s:8:"readonly";s:1:"1";}s:1:"H";a:4:{s:4:"type";s:14:"select-account";s:4:"name";s:16:"${row}[ts_owner]";s:8:"readonly";s:1:"1";s:4:"span";s:18:",$cont[ownerClass]";}s:1:"I";a:3:{s:4:"type";s:6:"select";s:4:"name";s:17:"${row}[ts_status]";s:8:"readonly";s:1:"1";}s:1:"J";a:3:{s:4:"type";s:17:"customfields-list";s:4:"name";s:4:"$row";s:8:"readonly";s:1:"1";}s:1:"K";a:9:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"view";s:5:"label";s:4:"View";s:4:"name";s:22:"view[$row_cont[ts_id]]";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.view&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";s:4:"help";s:15:"View this entry";}i:2;a:6:{s:4:"type";s:6:"button";s:4:"size";s:4:"edit";s:5:"label";s:4:"Edit";s:4:"name";s:22:"edit[$row_cont[ts_id]]";s:4:"help";s:15:"Edit this entry";s:7:"onclick";s:187:"window.open(egw::link(\'/index.php\',\'menuaction=timesheet.timesheet_ui.edit&ts_id=$row_cont[ts_id]\'),\'_blank\',\'dependent=yes,width=600,height=400,scrollbars=yes,status=yes\'); return false;";}i:3;a:5:{s:4:"type";s:6:"button";s:4:"name";s:26:"document[$row_cont[ts_id]]";s:4:"size";s:15:"etemplate/merge";s:5:"label";s:18:"Insert in document";s:4:"span";s:8:",image16";}s:4:"span";s:8:",noPrint";i:4;a:6:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:4:"name";s:24:"delete[$row_cont[ts_id]]";s:4:"help";s:17:"Delete this entry";s:7:"onclick";s:36:"return confirm(\'Delete this entry\');";}s:5:"align";s:5:"right";i:5;a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:16:"$row_cont[ts_id]";s:4:"name";s:9:"checked[]";s:4:"help";s:47:"Select multiple timeshhets for a further action";}}}}s:4:"rows";i:2;s:4:"cols";i:11;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1296843833',);
-
-$templ_data[] = array('name' => 'timesheet.wizard_import_options','template' => '','lang' => '','group' => '0','version' => '1.9.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:1:{s:2:"h1";s:10:",!@message";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:11:"all,message";s:4:"name";s:7:"message";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:40:"What should be done with unknown values?";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:16:"translate_status";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Category";}s:1:"B";a:2:{s:4:"type";s:6:"select";s:4:"name";s:16:"translate_cat_id";}}}s:4:"rows";i:4;s:4:"cols";i:2;}}','size' => '','style' => '','modified' => '1301427589',);
-
diff --git a/timesheet/setup/setup.inc.php b/timesheet/setup/setup.inc.php
index b083f40991..8f2270c1eb 100644
--- a/timesheet/setup/setup.inc.php
+++ b/timesheet/setup/setup.inc.php
@@ -6,7 +6,7 @@
* @author Ralf Becker
* @package timesheet
* @subpackage setup
- * @copyright (c) 2005-14 by Ralf Becker
+ * @copyright (c) 2005-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
@@ -17,7 +17,7 @@ if (!defined('TIMESHEET_APP'))
}
$setup_info[TIMESHEET_APP]['name'] = TIMESHEET_APP;
-$setup_info[TIMESHEET_APP]['version'] = '14.1';
+$setup_info[TIMESHEET_APP]['version'] = '16.1';
$setup_info[TIMESHEET_APP]['app_order'] = 5;
$setup_info[TIMESHEET_APP]['tables'] = array('egw_timesheet','egw_timesheet_extra');
$setup_info[TIMESHEET_APP]['enable'] = 1;
@@ -49,10 +49,6 @@ $setup_info[TIMESHEET_APP]['hooks']['acl_rights'] = 'timesheet_hooks::acl_rights
/* Dependencies for this app to work */
$setup_info[TIMESHEET_APP]['depends'][] = array(
- 'appname' => 'phpgwapi',
- 'versions' => Array('14.1')
-);
-$setup_info[TIMESHEET_APP]['depends'][] = array(
- 'appname' => 'etemplate',
- 'versions' => Array('14.1')
+ 'appname' => 'api',
+ 'versions' => Array('16.1')
);
diff --git a/timesheet/setup/tables_update.inc.php b/timesheet/setup/tables_update.inc.php
index 7036087e16..17577ad90f 100644
--- a/timesheet/setup/tables_update.inc.php
+++ b/timesheet/setup/tables_update.inc.php
@@ -6,11 +6,13 @@
* @author Ralf Becker
* @package timesheet
* @subpackage setup
- * @copyright (c) 2005-14 by Ralf Becker
+ * @copyright (c) 2005-16 by Ralf Becker
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
+use EGroupware\Api;
+
function timesheet_upgrade0_1_001()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_timesheet','pl_id',array(
@@ -119,7 +121,13 @@ function timesheet_upgrade1_9_001()
function timesheet_upgrade1_9_002()
{
// switch history / delete prevention on, like for new installs, so only admins can finally delete timesheets
- config::save_value('history', 'history', 'timesheet');
+ Api\Config::save_value('history', 'history', 'timesheet');
return $GLOBALS['setup_info']['timesheet']['currentver'] = '14.1';
}
+
+
+function timesheet_upgrade14_1()
+{
+ return $GLOBALS['setup_info']['timesheet']['currentver'] = '16.1';
+}