[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] preferences changeprofile.php inc/class.boadmin...
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] preferences changeprofile.php inc/class.boadmin... |
Date: |
Tue, 25 Jul 2006 01:13:38 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: preferences
Changes by: Dave Hall <skwashd> 06/07/25 01:13:38
Modified files:
. : changeprofile.php
inc : class.boadmin_acl.inc.php
class.soadmin_acl.inc.php
class.uicategories.inc.php
hook_settings.inc.php
templates/base : filter_location.xsl
Log message:
add wysiwyg editor preferencepreferences.php
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/preferences/changeprofile.php?cvsroot=phpgroupware&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.boadmin_acl.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.soadmin_acl.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.uicategories.inc.php?cvsroot=phpgroupware&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/hook_settings.inc.php?cvsroot=phpgroupware&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/preferences/templates/base/filter_location.xsl?cvsroot=phpgroupware&r1=1.1&r2=1.2
Patches:
Index: changeprofile.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/changeprofile.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- changeprofile.php 17 Apr 2005 15:14:31 -0000 1.12
+++ changeprofile.php 25 Jul 2006 01:13:38 -0000 1.13
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package preferences
- * @version $Id: changeprofile.php,v 1.12 2005/04/17 15:14:31 powerstat
Exp $
+ * @version $Id: changeprofile.php,v 1.13 2006/07/25 01:13:38 skwashd
Exp $
*/
Header('Cache-Control: no-cache');
@@ -23,7 +23,7 @@
if ($GLOBALS['phpgw_info']['user']['permissions']['anonymous'])
{
- Header('Location: ' . $GLOBALS['phpgw']->link('/'));
+ $GLOBALS['phpgw']->redirect_link('/index.php');
$GLOBALS['phpgw']->common->phpgw_exit();
}
Index: inc/class.boadmin_acl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/class.boadmin_acl.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.boadmin_acl.inc.php 26 Mar 2006 19:58:21 -0000 1.2
+++ inc/class.boadmin_acl.inc.php 25 Jul 2006 01:13:38 -0000 1.3
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage admin
- * @version $Id: class.boadmin_acl.inc.php,v 1.2 2006/03/26 19:58:21
sigurdne Exp $
+ * @version $Id: class.boadmin_acl.inc.php,v 1.3 2006/07/25 01:13:38
skwashd Exp $
*/
/**
@@ -128,7 +128,7 @@
}
}
- function
select_location($format='',$selected='',$grant='',$allow_c_attrib='')
+ function select_location($format = 'filter', $selected='',
$grant = false, $allow_c_attrib = false)
{
switch($format)
@@ -141,45 +141,32 @@
break;
}
- $locations=
$this->so->select_location($grant,$this->acl_app,$allow_c_attrib);
+ $location_list = array();
- $i = count($locations);
- $api_cats = $this->catbo->return_array('all', 0, True,
False, False, 'cat_name', True);
- if ( is_array($api_cats) )
- {
- foreach ($api_cats as $cat)
- {
- $locations[$i]['id'] = 'C' .
$cat['id'];
- $locations[$i]['descr'] = $cat['name'];
- $i++;
- }
- }
- unset($api_cats);
+ $locations = $this->so->select_location($grant,
$this->acl_app, $allow_c_attrib);
- while (is_array($locations) && list(,$loc) =
each($locations))
+ $i = 0;
+ foreach ( $locations as $loc_id => $loc_descr )
{
$sel_loc = '';
- if ($loc['id']==$selected)
+ if ($loc_id == $selected)
{
$sel_loc = 'selected';
}
- $location_list[] = array
+ $location_list[$i] = array
(
- 'id' => $loc['id'],
- 'descr' => $loc['id'] . ' [' .
$loc['descr'] . ']',
+ 'id' => $loc_id,
+ 'descr' => "{$loc_id}
[{$loc_descr}]",
'selected' => $sel_loc
);
- }
- for ($i=0;$i<count($location_list);$i++)
- {
if ($location_list[$i]['selected'] !=
'selected')
{
unset($location_list[$i]['selected']);
}
+ ++$i;
}
-
return $location_list;
}
@@ -206,7 +193,7 @@
$sel_category = '';
if ($category['id']==$selected)
{
- $sel_category = 'selected';
+ $sel_category = 'selected="selected"';
}
$category_list[] = array
@@ -389,3 +376,4 @@
return $user_list;
}
}
+?>
\ No newline at end of file
Index: inc/class.soadmin_acl.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/class.soadmin_acl.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- inc/class.soadmin_acl.inc.php 26 Mar 2006 19:58:21 -0000 1.2
+++ inc/class.soadmin_acl.inc.php 25 Jul 2006 01:13:38 -0000 1.3
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package hrm
* @subpackage admin
- * @version $Id: class.soadmin_acl.inc.php,v 1.2 2006/03/26 19:58:21
sigurdne Exp $
+ * @version $Id: class.soadmin_acl.inc.php,v 1.3 2006/07/25 01:13:38
skwashd Exp $
*/
/**
@@ -50,14 +50,17 @@
}
- function select_location($grant='', $appname = '',
$allow_c_attrib = '')
+ function select_location($grant = false, $appname = '',
$allow_c_attrib = false)
{
- if(!$appname)
+ $location = array();
+
+ if ( !$appname )
{
$appname = $this->currentapp;
}
+ $appname = $this->db->db_addslashes($appname);
- $filter = " WHERE appname='$appname'";
+ $filter = " WHERE appname='{$appname}'";
if($allow_c_attrib)
{
@@ -66,19 +69,15 @@
if($grant)
{
- $filter .= ' AND allow_grant=1';
+ $filter .= ' AND allow_grant = 1';
}
- $this->db->query("SELECT * FROM phpgw_acl_location
$filter ORDER BY id ");
+ $this->db->query("SELECT id, descr FROM
phpgw_acl_location $filter ORDER BY descr");
- $i = 0;
while ($this->db->next_record())
{
- $location[$i]['id']
= $this->db->f('id');
- $location[$i]['descr']
= stripslashes($this->db->f('descr'));
- $i++;
+ $location[$this->db->f('id')] =
$this->db->f('descr', true);
}
-
return $location;
}
-
}
+?>
\ No newline at end of file
Index: inc/class.uicategories.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/class.uicategories.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- inc/class.uicategories.inc.php 4 May 2005 13:39:05 -0000 1.29
+++ inc/class.uicategories.inc.php 25 Jul 2006 01:13:38 -0000 1.30
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2003,2005 Free Software Foundation,
Inc. http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package preferences
- * @version $Id: class.uicategories.inc.php,v 1.29 2005/05/04 13:39:05
powerstat Exp $
+ * @version $Id: class.uicategories.inc.php,v 1.30 2006/07/25 01:13:38
skwashd Exp $
*/
/**
@@ -173,7 +173,7 @@
' '.lang('categories
for').': '.$this->user;
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
-
+ die('PHPGW_APP_TPL == ' . PHPGW_APP_TPL);
$GLOBALS['phpgw']->template->set_file(array('cat_list_t' => 'listcats.tpl',
'data_column' => 'listcats.tpl'));
$GLOBALS['phpgw']->template->set_block('cat_list_t','data_column','column');
Index: inc/hook_settings.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/inc/hook_settings.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- inc/hook_settings.inc.php 17 Apr 2005 15:14:31 -0000 1.14
+++ inc/hook_settings.inc.php 25 Jul 2006 01:13:38 -0000 1.15
@@ -5,7 +5,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package preferences
- * @version $Id: hook_settings.inc.php,v 1.14 2005/04/17 15:14:31
powerstat Exp $
+ * @version $Id: hook_settings.inc.php,v 1.15 2006/07/25 01:13:38
skwashd Exp $
*/
$templates = $GLOBALS['phpgw']->common->list_templates();
@@ -132,5 +132,15 @@
create_select_box('How do you like to display
accounts','account_display',$account_display,
'Set this to your convenience. For security reasons, you might
not want to show your Loginname in public.');
+
+ $rteditors = array
+ (
+ 'none' => lang('none'),
+ 'fckeditor' => 'FCKeditor',
+ 'tinymce' => 'tinyMCE'
+ );
+ create_select_box('Rich text (WYSIWYG) editor', 'rteditor', $rteditors,
+ 'Which editor would you like to use for editing html and other
rich content?');
+
create_check_box('Show helpmessages by default','show_help',
'Should this help messages shown up always, when you enter the
preferences or only on request.');
Index: templates/base/filter_location.xsl
===================================================================
RCS file: /cvsroot/phpgroupware/preferences/templates/base/filter_location.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- templates/base/filter_location.xsl 14 Mar 2006 10:30:10 -0000 1.1
+++ templates/base/filter_location.xsl 25 Jul 2006 01:13:38 -0000 1.2
@@ -1,14 +1,11 @@
-<!-- $Id: filter_location.xsl,v 1.1 2006/03/14 10:30:10 sigurdne Exp $ -->
-
+<!-- $Id: filter_location.xsl,v 1.2 2006/07/25 01:13:38 skwashd Exp $ -->
<xsl:template name="filter_location">
<xsl:variable name="select_action"><xsl:value-of
select="select_action"/></xsl:variable>
<xsl:variable name="select_name_location"><xsl:value-of
select="select_name_location"/></xsl:variable>
<xsl:variable name="lang_submit"><xsl:value-of
select="lang_submit"/></xsl:variable>
<form method="post" action="{$select_action}">
<xsl:for-each select="hidden_vars" >
- <xsl:variable
name="name"><xsl:value-of select="name"/></xsl:variable>
- <xsl:variable
name="value"><xsl:value-of select="value"/></xsl:variable>
- <INPUT type="hidden"
name="{$name}" value="{$value}" ></INPUT>
+ <input type="hidden" name="{name}"
value="{value}" />
</xsl:for-each>
<select name="{$select_name_location}"
onChange="this.form.submit();" onMouseout="window.status='';return true;">
<xsl:attribute name="onMouseover">
@@ -27,13 +24,12 @@
</xsl:template>
<xsl:template match="location_list">
- <xsl:variable name="id"><xsl:value-of select="id"/></xsl:variable>
<xsl:choose>
<xsl:when test="selected">
- <option value="{$id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="descr"/></option>
+ <option value="{id}"
selected="selected"><xsl:value-of disable-output-escaping="yes"
select="descr"/></option>
</xsl:when>
<xsl:otherwise>
- <option value="{$id}"><xsl:value-of
disable-output-escaping="yes" select="descr"/></option>
+ <option value="{id}"><xsl:value-of
disable-output-escaping="yes" select="descr"/></option>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] preferences changeprofile.php inc/class.boadmin...,
Dave Hall <=