initial commit of file from CVS for smeserver-nag on Sat Sep 7 20:45:20 AEST 2024
This commit is contained in:
300
root/etc/e-smith/events/actions/nag_upgrade
Normal file
300
root/etc/e-smith/events/actions/nag_upgrade
Normal file
@@ -0,0 +1,300 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2002-20085 Mitel Networks Corporation
|
||||
# copyright (C) 2002-2008 SME Server, INC
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use DBI;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
# Exit early if there is nothing to do
|
||||
die("horde db must exist") unless ( -d "/var/lib/mysql/horde/");
|
||||
die("nag db must exist") unless ( -f "/var/lib/mysql/horde/nag_tasks.frm");
|
||||
die("nag db must exist") unless ( -f "/var/lib/mysql/horde/nag_shares.frm");
|
||||
|
||||
# This is a translation of the script 'mysql_upgrade_1.1_to_1.2.sql
|
||||
# that is safe to run multiple times, and which can be run on a 1.2
|
||||
# installation without barfing.
|
||||
|
||||
my $conf = esmith::ConfigDB->open_ro
|
||||
or die "Can't open configuration database: $!\n";
|
||||
our $username = 'root';
|
||||
our $password = esmith::util::LdapPassword();
|
||||
our $nag_DATABASE = 'horde';
|
||||
our $dbi_options = {RaiseError => 1, ChopBlanks => 1, AutoCommit => 1};
|
||||
|
||||
my $db_naghandle = DBI->connect
|
||||
("DBI:mysql:$nag_DATABASE",
|
||||
$username, $password, $dbi_options )
|
||||
|| die ("Connection error: $DBI::errstr");
|
||||
|
||||
|
||||
# These are all safe to run multiple times
|
||||
|
||||
my @statements = (
|
||||
"ALTER TABLE nag_shares CHANGE share_owner share_owner VARCHAR(255)",
|
||||
"ALTER TABLE nag_shares_users CHANGE user_uid user_uid VARCHAR(255)",
|
||||
"ALTER TABLE nag_shares_groups CHANGE group_uid group_uid VARCHAR(255)",
|
||||
);
|
||||
|
||||
foreach my $statement (@statements)
|
||||
{
|
||||
$statement =
|
||||
$db_naghandle->prepare("$statement")
|
||||
or die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# We now need to create some columns, but we need to first check
|
||||
# whether they exist already
|
||||
my $sth = $db_naghandle->prepare("show columns from nag_tasks");
|
||||
$sth->execute;
|
||||
my $nag_tasks = $sth->fetchall_hashref('Field');
|
||||
|
||||
my $sth1 = $db_naghandle->prepare("show columns from nag_shares");
|
||||
$sth1->execute;
|
||||
my $nag_shares = $sth1->fetchall_hashref('Field');
|
||||
|
||||
my $sth2 = $db_naghandle->prepare("show columns from nag_shares_groups");
|
||||
$sth2->execute;
|
||||
my $nag_shares_groups = $sth2->fetchall_hashref('Field');
|
||||
|
||||
my $sth3 = $db_naghandle->prepare("show columns from nag_shares_users");
|
||||
$sth3->execute;
|
||||
my $nag_shares_users = $sth3->fetchall_hashref('Field');
|
||||
|
||||
unless (defined $nag_tasks->{task_estimate})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
'ALTER TABLE nag_tasks ADD task_estimate FLOAT';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_completed_date})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
'ALTER TABLE nag_tasks ADD task_completed_date INT';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_start})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
'ALTER TABLE nag_tasks ADD task_start INT';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_parent})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
"ALTER TABLE nag_tasks ADD task_parent VARCHAR(255) ".
|
||||
"DEFAULT '' NOT NULL";
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_creator})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
"ALTER TABLE nag_tasks ADD task_creator VARCHAR(255) NOT NULL ";
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_assignee})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
"ALTER TABLE nag_tasks ADD task_assignee VARCHAR(255) ";
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
unless (defined $nag_tasks->{task_private})
|
||||
{
|
||||
# We need to be careful about this one as it will fail if the
|
||||
# column exists, so we check the error.
|
||||
my $statement =
|
||||
"ALTER TABLE nag_tasks ADD task_private SMALLINT ".
|
||||
"DEFAULT 0 NOT NULL";
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for task_owner if needed
|
||||
unless ($nag_tasks->{task_owner}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_tasks ' .
|
||||
'add index nag_tasklist_idx (task_owner)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for task_uid if needed
|
||||
unless ($nag_tasks->{task_uid}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_tasks ' .
|
||||
'add index nag_uid_idx (task_uid)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for task_start if needed
|
||||
unless ($nag_tasks->{task_start}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_tasks ' .
|
||||
'add index nag_start_idx (task_start)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for share_name if needed
|
||||
unless ($nag_shares->{share_name}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares ' .
|
||||
'add index nag_shares_share_name_idx (share_name)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for share_owner if needed
|
||||
unless ($nag_shares->{share_owner}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares ' .
|
||||
'add index nag_shares_share_owner_idx (share_owner)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for perm_creator if needed
|
||||
unless ($nag_shares->{perm_creator}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares ' .
|
||||
'add index nag_shares_perm_creator_idx (perm_creator)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for perm_default if needed
|
||||
unless ($nag_shares->{perm_default}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares ' .
|
||||
'add index nag_shares_perm_default_idx (perm_default)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for perm_guest if needed
|
||||
unless ($nag_shares->{perm_guest}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares ' .
|
||||
'add index nag_shares_perm_guest_idx (perm_guest)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for share_id if needed
|
||||
unless ($nag_shares_groups->{share_id}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_groups ' .
|
||||
'add index nag_shares_groups_share_id_idx (share_id)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for group_uid if needed
|
||||
unless ($nag_shares_groups->{group_uid}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_groups ' .
|
||||
'add index nag_shares_groups_group_uid_idx (group_uid)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for perm if needed
|
||||
unless ($nag_shares_groups->{perm}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_groups ' .
|
||||
'add index nag_shares_groups_perm_idx (perm)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for share_id if needed
|
||||
unless ($nag_shares_users->{share_id}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_users ' .
|
||||
'add index nag_shares_users_share_id_idx (share_id)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for user_uid if needed
|
||||
unless ($nag_shares_users->{user_uid}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_users ' .
|
||||
'add index nag_shares_users_user_uid_idx (user_uid)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
||||
# Create an index for perm if needed
|
||||
unless ($nag_shares_users->{perm}->{Key})
|
||||
{
|
||||
my $statement = 'alter table nag_shares_users ' .
|
||||
'add index nag_shares_users_perm_idx (perm)';
|
||||
$statement = $db_naghandle->prepare($statement) or
|
||||
die "prepare: $$statement: $DBI::errstr";
|
||||
$statement->execute or die "execute: $$statement: $DBI::errstr";
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
PERMS=0540
|
@@ -0,0 +1 @@
|
||||
PERMS=0540
|
@@ -0,0 +1,2 @@
|
||||
GID="www"
|
||||
PERMS=0640
|
@@ -0,0 +1,2 @@
|
||||
GID="www"
|
||||
PERMS=0640
|
@@ -0,0 +1,2 @@
|
||||
GID="www"
|
||||
PERMS=0640
|
@@ -0,0 +1,4 @@
|
||||
#! /bin/sh
|
||||
# test -f /var/lib/mysql/horde/nag_tasks.frm && exit 0
|
||||
exec mysql horde < /home/httpd/html/horde/smeserver/nag.sql
|
||||
|
@@ -0,0 +1,3 @@
|
||||
#! /bin/sh
|
||||
exec /etc/e-smith/events/actions/nag_upgrade
|
||||
|
@@ -0,0 +1,30 @@
|
||||
{
|
||||
my $status = $imp{status} || 'disabled';
|
||||
|
||||
if ($status eq 'enabled')
|
||||
{
|
||||
$OUT .= qq(
|
||||
# Nag specific access configuration
|
||||
|
||||
<Directory /home/httpd/html/horde/nag/config>
|
||||
order deny,allow
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
<Directory /home/httpd/html/horde/nag/lib>
|
||||
order deny,allow
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
<Directory /home/httpd/html/horde/nag/locale>
|
||||
order deny,allow
|
||||
deny from all
|
||||
</Directory>
|
||||
|
||||
<Directory /home/httpd/html/horde/nag/templates>
|
||||
order deny,allow
|
||||
deny from all
|
||||
</Directory>
|
||||
);
|
||||
}
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
{
|
||||
my $NagMenu = $nag{MenuArray} || "enabled"; return "" unless ($NagMenu eq "enabled");
|
||||
$apps{nag} = 1;
|
||||
$OUT = '';
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
// 230AppRegistryNag
|
||||
$this->applications['nag'] = array(
|
||||
'fileroot' => dirname(__FILE__) . '/../nag',
|
||||
'webroot' => $this->applications['horde']['webroot'] . '/nag',
|
||||
'name' => _("Tasks"),
|
||||
'status' => 'active',
|
||||
'provides' => 'tasks',
|
||||
'menu_parent' => 'organizing'
|
||||
);
|
||||
|
||||
$this->applications['nag-alarms'] = array(
|
||||
'status' => 'block',
|
||||
'app' => 'nag',
|
||||
'blockname' => 'tree_alarms',
|
||||
'menu_parent' => 'nag',
|
||||
);
|
||||
|
||||
$this->applications['nag-menu'] = array(
|
||||
'status' => 'block',
|
||||
'app' => 'nag',
|
||||
'blockname' => 'tree_menu',
|
||||
'menu_parent' => 'nag',
|
||||
);
|
||||
|
@@ -0,0 +1,4 @@
|
||||
//00Header
|
||||
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
|
||||
// $Horde: nag/config/conf.xml,v 1.25.10.2 2007/12/20 14:23:06 jan Exp $
|
||||
|
@@ -0,0 +1,5 @@
|
||||
//100StorageSettings
|
||||
$conf['storage']['params']['table'] = 'nag_tasks';
|
||||
$conf['storage']['params']['driverconfig'] = 'horde';
|
||||
$conf['storage']['driver'] = 'sql';
|
||||
|
@@ -0,0 +1,3 @@
|
||||
//110PrintSettings
|
||||
$conf['menu']['print'] = true;
|
||||
|
@@ -0,0 +1,3 @@
|
||||
//115ImportExportSettings
|
||||
$conf['menu']['import_export'] = true;
|
||||
|
@@ -0,0 +1,3 @@
|
||||
//120MenuSettings
|
||||
include '/home/httpd/html/horde/conf.menu.apps.php';
|
||||
|
@@ -0,0 +1,3 @@
|
||||
// 999footer
|
||||
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
|
||||
|
@@ -0,0 +1,7 @@
|
||||
//00Header
|
||||
/**
|
||||
* $Horde: nag/config/prefs.php.dist,v 1.42.2.13 2010/04/20 08:24:21 jan Exp $
|
||||
*
|
||||
* See horde/config/prefs.php for documentation on the structure of this file.
|
||||
*/
|
||||
|
@@ -0,0 +1,4 @@
|
||||
//100Constants
|
||||
// Make sure that constants are defined.
|
||||
require_once dirname(__FILE__) . '/../lib/Nag.php';
|
||||
|
@@ -0,0 +1,8 @@
|
||||
//110Display
|
||||
$prefGroups['display'] = array(
|
||||
'column' => _("General Options"),
|
||||
'label' => _("Display Options"),
|
||||
'desc' => _("Change your task sorting and display options."),
|
||||
'members' => array('tasklist_columns', 'sortby', 'altsortby', 'sortdir'),
|
||||
);
|
||||
|
@@ -0,0 +1,8 @@
|
||||
//115Deletion
|
||||
$prefGroups['deletion'] = array(
|
||||
'column' => _("General Options"),
|
||||
'label' => _("Delete Confirmation"),
|
||||
'desc' => _("Delete button behaviour"),
|
||||
'members' => array('delete_opt'),
|
||||
);
|
||||
|
@@ -0,0 +1,8 @@
|
||||
//120Tasks
|
||||
$prefGroups['tasks'] = array(
|
||||
'column' => _("General Options"),
|
||||
'label' => _("Task Defaults"),
|
||||
'desc' => _("Defaults for new tasks"),
|
||||
'members' => array('default_due', 'default_due_days', 'defaultduetimeselect'),
|
||||
);
|
||||
|
@@ -0,0 +1,8 @@
|
||||
//130Share
|
||||
$prefGroups['share'] = array(
|
||||
'column' => _("Task List and Share Options"),
|
||||
'label' => _("Default Task List"),
|
||||
'desc' => _("Choose your default task list."),
|
||||
'members' => array('tasklistselect'),
|
||||
);
|
||||
|
@@ -0,0 +1,8 @@
|
||||
//140Notification
|
||||
$prefGroups['notification'] = array(
|
||||
'column' => _("Task List and Share Options"),
|
||||
'label' => _("Notifications"),
|
||||
'desc' => _("Choose if you want to be notified of task changes and task alarms."),
|
||||
'members' => array('task_notification', 'task_notification_exclude_self'),
|
||||
);
|
||||
|
@@ -0,0 +1,5 @@
|
||||
//150Globals
|
||||
if (!empty($GLOBALS['conf']['alarms']['driver'])) \{
|
||||
$prefGroups['notification']['members'][] = 'task_alarms';
|
||||
\}
|
||||
|
@@ -0,0 +1,14 @@
|
||||
//160ShowExternal
|
||||
$_show_external = array();
|
||||
if ($GLOBALS['registry']->hasMethod('getListTypes', 'whups')) \{
|
||||
$_show_external['whups'] = $GLOBALS['registry']->get('name', 'whups');
|
||||
\}
|
||||
if (count($_show_external)) \{
|
||||
$prefGroups['external'] = array(
|
||||
'column' => _("Task List and Share Options"),
|
||||
'label' => _("External Data"),
|
||||
'desc' => _("Show data from other applications or sources."),
|
||||
'members' => array('show_external'),
|
||||
);
|
||||
\}
|
||||
|
@@ -0,0 +1,16 @@
|
||||
//170Tasklist_Columns
|
||||
// columns in the list view
|
||||
$_prefs['tasklist_columns'] = array(
|
||||
'value' => 'a:3:\{i:0;s:8:"priority";i:1;s:3:"due";i:2;s:8:"category";\}',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'multienum',
|
||||
'enum' => array('tasklist' => _("Task List"),
|
||||
'priority' => _("Priority"),
|
||||
'assignee' => _("Assignee"),
|
||||
'due' => _("Due Date"),
|
||||
'estimate' => _("Estimated Time"),
|
||||
'category' => _("Category")),
|
||||
'desc' => _("Select the columns that should be shown in the list view:")
|
||||
);
|
||||
|
@@ -0,0 +1,10 @@
|
||||
//180ShowPanel
|
||||
// show the task list options panel?
|
||||
// a value of 0 = no, 1 = yes
|
||||
$_prefs['show_panel'] = array(
|
||||
'value' => 1,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'implicit',
|
||||
);
|
||||
|
@@ -0,0 +1,18 @@
|
||||
//190SortBy
|
||||
// user preferred sorting column
|
||||
$_prefs['sortby'] = array(
|
||||
'value' => NAG_SORT_PRIORITY,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'enum',
|
||||
'enum' => array(NAG_SORT_PRIORITY => _("Priority"),
|
||||
NAG_SORT_NAME => _("Task Name"),
|
||||
NAG_SORT_CATEGORY => _("Category"),
|
||||
NAG_SORT_DUE => _("Due Date"),
|
||||
NAG_SORT_COMPLETION => _("Completed?"),
|
||||
NAG_SORT_ESTIMATE => _("Estimated Time"),
|
||||
NAG_SORT_ASSIGNEE => _("Assignee"),
|
||||
NAG_SORT_OWNER => _("Task List")),
|
||||
'desc' => _("Sort tasks by:"),
|
||||
);
|
||||
|
@@ -0,0 +1,18 @@
|
||||
//200AltSortBy
|
||||
// alternate sort column
|
||||
$_prefs['altsortby'] = array(
|
||||
'value' => NAG_SORT_CATEGORY,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'enum',
|
||||
'enum' => array(NAG_SORT_PRIORITY => _("Priority"),
|
||||
NAG_SORT_NAME => _("Task Name"),
|
||||
NAG_SORT_CATEGORY => _("Category"),
|
||||
NAG_SORT_DUE => _("Due Date"),
|
||||
NAG_SORT_COMPLETION => _("Completed?"),
|
||||
NAG_SORT_ESTIMATE => _("Estimated Time"),
|
||||
NAG_SORT_ASSIGNEE => _("Assignee"),
|
||||
NAG_SORT_OWNER => _("Task List")),
|
||||
'desc' => _("Then:"),
|
||||
);
|
||||
|
@@ -0,0 +1,12 @@
|
||||
//210SortDir
|
||||
// user preferred sorting direction
|
||||
$_prefs['sortdir'] = array(
|
||||
'value' => NAG_SORT_ASCEND,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'enum',
|
||||
'enum' => array(NAG_SORT_ASCEND => _("Ascending"),
|
||||
NAG_SORT_DESCEND => _("Descending")),
|
||||
'desc' => _("Sort direction:"),
|
||||
);
|
||||
|
@@ -0,0 +1,10 @@
|
||||
//220DeleteOpt
|
||||
// preference for delete confirmation dialog.
|
||||
$_prefs['delete_opt'] = array(
|
||||
'value' => 1,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'checkbox',
|
||||
'desc' => _("Do you want to confirm deleting entries?"),
|
||||
);
|
||||
|
@@ -0,0 +1,10 @@
|
||||
//230DefaultDue
|
||||
// default to tasks having a due date?
|
||||
$_prefs['default_due'] = array(
|
||||
'value' => 0,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'checkbox',
|
||||
'desc' => _("When creating a new task, should it default to having a due date?"),
|
||||
);
|
||||
|
@@ -0,0 +1,10 @@
|
||||
//240DefaultDueDays
|
||||
// default number of days out for due dates
|
||||
$_prefs['default_due_days'] = array(
|
||||
'value' => 1,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'number',
|
||||
'desc' => _("When creating a new task, how many days in the future should the default due date be (0 means today)?"),
|
||||
);
|
||||
|
@@ -0,0 +1,12 @@
|
||||
//250DefaultDueTime
|
||||
// default due time
|
||||
$_prefs['default_due_time'] = array(
|
||||
'value' => 'now',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'implicit',
|
||||
);
|
||||
|
||||
// default due time selection widget
|
||||
$_prefs['defaultduetimeselect'] = array('type' => 'special');
|
||||
|
@@ -0,0 +1,14 @@
|
||||
//260TaskNotification
|
||||
// new task notifications
|
||||
$_prefs['task_notification'] = array(
|
||||
'value' => '',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'enum',
|
||||
'enum' => array('' => _("No"),
|
||||
'owner' => _("On my task lists only"),
|
||||
'show' => _("On all shown task lists"),
|
||||
'read' => _("On all task lists I have read access to")),
|
||||
'desc' => _("Choose if you want to be notified of new, edited, and deleted tasks by email:"),
|
||||
);
|
||||
|
@@ -0,0 +1,18 @@
|
||||
//270TaskAlarms
|
||||
$_prefs['task_notification_exclude_self'] = array(
|
||||
'value' => 0,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'checkbox',
|
||||
'desc' => _("Don't send me a notification if I've added, changed or deleted the task?")
|
||||
);
|
||||
|
||||
// alarm methods
|
||||
$_prefs['task_alarms'] = array(
|
||||
'value' => 'a:1:\{s:6:"notify";a:0:\{\}\}',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'alarm',
|
||||
'desc' => _("Choose how you want to receive reminders for tasks with alarms:"),
|
||||
);
|
||||
|
@@ -0,0 +1,13 @@
|
||||
//280ShowExternal
|
||||
// show data from other applications that can be listed as tasks?
|
||||
if (count($_show_external)) \{
|
||||
$_prefs['show_external'] = array(
|
||||
'value' => 'a:0:\{\}',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'multienum',
|
||||
'enum' => $_show_external,
|
||||
'desc' => _("Show data from any of these other applications in your task list?"),
|
||||
);
|
||||
\}
|
||||
|
@@ -0,0 +1,13 @@
|
||||
//290ShowCompleted
|
||||
// show complete/incomplete tasks?
|
||||
$_prefs['show_completed'] = array(
|
||||
'value' => 1,
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'enum',
|
||||
'enum' => array(1 => _("All tasks"),
|
||||
0 => _("Incomplete tasks"),
|
||||
2 => _("Complete tasks")),
|
||||
'desc' => _("Show complete, incomplete, or all tasks in the task list?"),
|
||||
);
|
||||
|
@@ -0,0 +1,9 @@
|
||||
//300TaskCategories
|
||||
// user task categories
|
||||
$_prefs['task_categories'] = array(
|
||||
'value' => '',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'implicit'
|
||||
);
|
||||
|
@@ -0,0 +1,13 @@
|
||||
//310TaskLists
|
||||
// default task list selection widget
|
||||
$_prefs['tasklistselect'] = array('type' => 'special');
|
||||
|
||||
// default tasklists
|
||||
// Set locked to true if you don't want users to have multiple task lists.
|
||||
$_prefs['default_tasklist'] = array(
|
||||
'value' => Auth::getAuth() ? Auth::getAuth() : 0,
|
||||
'locked' => false,
|
||||
'shared' => true,
|
||||
'type' => 'implicit',
|
||||
);
|
||||
|
@@ -0,0 +1,9 @@
|
||||
//320DisplayTaskLists
|
||||
// store the task lists to display
|
||||
$_prefs['display_tasklists'] = array(
|
||||
'value' => 'a:0:\{\}',
|
||||
'locked' => false,
|
||||
'shared' => false,
|
||||
'type' => 'implicit',
|
||||
);
|
||||
|
49
root/home/httpd/html/horde/smeserver/nag.sql
Normal file
49
root/home/httpd/html/horde/smeserver/nag.sql
Normal file
@@ -0,0 +1,49 @@
|
||||
-- $Horde: nag/scripts/sql/nag.sql,v 1.4.8.10 2009-10-22 14:24:20 jan Exp $
|
||||
|
||||
CREATE TABLE IF NOT EXISTS nag_tasks (
|
||||
task_id VARCHAR(32) NOT NULL,
|
||||
task_owner VARCHAR(255) NOT NULL,
|
||||
task_creator VARCHAR(255) NOT NULL,
|
||||
task_parent VARCHAR(255),
|
||||
task_assignee VARCHAR(255),
|
||||
task_name VARCHAR(255) NOT NULL,
|
||||
task_uid VARCHAR(255) NOT NULL,
|
||||
task_desc TEXT,
|
||||
task_start INT,
|
||||
task_due INT,
|
||||
task_priority INT DEFAULT 0 NOT NULL,
|
||||
task_estimate FLOAT,
|
||||
task_category VARCHAR(80),
|
||||
task_completed SMALLINT DEFAULT 0 NOT NULL,
|
||||
task_completed_date INT,
|
||||
task_alarm INT DEFAULT 0 NOT NULL,
|
||||
task_private SMALLINT DEFAULT 0 NOT NULL,
|
||||
--
|
||||
PRIMARY KEY (task_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS nag_shares (
|
||||
share_id INT NOT NULL,
|
||||
share_name VARCHAR(255) NOT NULL,
|
||||
share_owner VARCHAR(255) NOT NULL,
|
||||
share_flags SMALLINT DEFAULT 0 NOT NULL,
|
||||
perm_creator SMALLINT DEFAULT 0 NOT NULL,
|
||||
perm_default SMALLINT DEFAULT 0 NOT NULL,
|
||||
perm_guest SMALLINT DEFAULT 0 NOT NULL,
|
||||
attribute_name VARCHAR(255) NOT NULL,
|
||||
attribute_desc VARCHAR(255),
|
||||
PRIMARY KEY (share_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS nag_shares_groups (
|
||||
share_id INT NOT NULL,
|
||||
group_uid VARCHAR(255) NOT NULL,
|
||||
perm SMALLINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS nag_shares_users (
|
||||
share_id INT NOT NULL,
|
||||
user_uid VARCHAR(255) NOT NULL,
|
||||
perm SMALLINT NOT NULL
|
||||
);
|
||||
|
Reference in New Issue
Block a user