summaryrefslogtreecommitdiff
path: root/www/admin/user
diff options
context:
space:
mode:
Diffstat (limited to 'www/admin/user')
-rwxr-xr-x[-rw-r--r--]www/admin/user/activesync.php44
-rw-r--r--www/admin/user/index.php10
-rw-r--r--www/admin/user/user.php3
3 files changed, 34 insertions, 23 deletions
diff --git a/www/admin/user/activesync.php b/www/admin/user/activesync.php
index 081a15a..24aea3e 100644..100755
--- a/www/admin/user/activesync.php
+++ b/www/admin/user/activesync.php
@@ -27,30 +27,30 @@ require_once('KolabAdmin/include/authenticate.php');
require_once('KolabAdmin/include/form.class.php');
require_once('KolabAdmin/include/passwd.php');
+//try to include ALL possible configuration files
+@include_once '/kolab/var/kolab/www/z-push/config.php';
+@include_once '/etc/z-push/config.php';
+@include_once '/usr/share/z-push/config.php';
+@include_once '/var/www/z-push/config.php';
-///kolab/etc/kolab/templates/zpush-config.php.template which is then copied to /kolab/var/kolab/www/z-push/zpush.config
+//define errors array
+$errors = array();
if((@include_once 'Horde/Kolab/Kolab_Zpush/lib/kolabActivesyncData.php') === false ) {
//z-Push in not installed. Why don't you show some scarry warining?
$errors[] =_('zPush in not enabled in your system.');
}
-@include_once '/kolab/var/kolab/www/z-push/config.php';
-@include_once '/etc/z-push/config.php';
-@include_once '/usr/share/z-push/config.php';
-@include_once '/var/www/z-push/config.php';
-/*read from here value of the KOLAB_LAXPIC
+/*read from her value of the KOLAB_LAXPIC
-1 = allow the user to select (or if the constant doesn't exist)
0 = same as the annotations (no lax mode just jpeg)
1 = force the lax mode for all
*/
-
if(!defined('KOLAB_LAXPIC')){define('KOLAB_LAXPIC',-1);}
-//define errors array
-$errors = array();
+
//delete device
if(isset($_POST['deid']))
@@ -215,16 +215,22 @@ function __construct()
//remove Inbox/ part from the name
$folder_chunk=explode("/",$folder);
- //if if only inbox/ show it
- if($folder_chunk[1]!=""){
+ //if it's only inbox/ show it
+
+
+ if($folder_chunk[1]!="" and count($folder_chunk)==2 and $folder_chunk[0]=="INBOX"){
//else is inbox/somepart - show only somepart
$folder=$folder_chunk[1];
- }if($folder_chunk[2]!="")
+ }if($folder_chunk[2]!="" and count($folder_chunk)==3 and $folder_chunk[0]=="user")
{
//user folder
- $folder="(".$folder_chunk[1].") ".$folder_chunk[2];
- }
+ $folder="(".$folder_chunk[1].") ".$folder_chunk[2];
+ }else
+ {
+ $folder= preg_replace(array('/INBOX\//'),array(''),$folder);
+
+ }
//for saving annot
$part_folder[]=$folders[$i]['realname'];
@@ -437,7 +443,7 @@ function is_default($folder)
/**** Authentication etc. ***/
-$sidx = 'user';
+$sidx = 'activesync';
require_once('KolabAdmin/include/menu.php');
/**** Submenu for current page ***/
@@ -446,16 +452,22 @@ $menuitems[$sidx]['selected'] = 'selected';
//ActiveSync part
+if(count($errors) <1)
+{
$d= new ActiveSyncManager;
$devs= $d->getdevices();
$folds=$d->getfolders();
$ola=true;
+
if(count($devs)<1)
{
$errors[] =_("There are currently no devices known for your user.<br/><br/>In order to register a device, please connect it to the server first, using <a href='http://wiki.kolab.org/Z_push#Clients'>the instructions in the Wiki</a>. Afterwards the device should become available for configuration in this dialogue.");
$ola = false;
}
+}
+
+
/**** Insert into template and output ***/
$smarty = new MySmarty();
@@ -514,4 +526,4 @@ $smarty->display('page-ajax.tpl');
End:
vim:encoding=utf-8:
*/
-?>
+?> \ No newline at end of file
diff --git a/www/admin/user/index.php b/www/admin/user/index.php
index 51675ed..1f0b2aa 100644
--- a/www/admin/user/index.php
+++ b/www/admin/user/index.php
@@ -53,10 +53,8 @@ if( !$errors ) {
if (isset($_SESSION['base_dn'])) $base_dn = $_SESSION['base_dn'];
else $base_dn = 'k=kolab';
- $privmembers = array_merge( (array)$ldap->groupMembers( "cn=internal,$base_dn", 'admin' ),
- (array)$ldap->groupMembers( "cn=internal,$base_dn", 'maintainer' ) );
-
- $userfilter = "cn=*";
+
+ $userfilter = "uid=*";
$filterattr = KolabForm::getRequestVar('filterattr');
$filtertype = KolabForm::getRequestVar('filtertype');
$filtervalue = KolabForm::getRequestVar('filtervalue');
@@ -157,7 +155,7 @@ if( !$errors ) {
}
// skip admins and maintainers
- if( !array_key_exists( $dn, $privmembers ) ) {
+
$entries[] = array( 'dn' => $dn,
'sn' => $sn,
'fn' => $fn,
@@ -165,7 +163,7 @@ if( !$errors ) {
'mail' => $mail,
'uid' => $uid,
'deleted' => $deleted );
- }
+
$entry = ldap_next_entry( $ldap->connection,$entry );
}
}
diff --git a/www/admin/user/user.php b/www/admin/user/user.php
index 215e792..9ee1a6a 100644
--- a/www/admin/user/user.php
+++ b/www/admin/user/user.php
@@ -510,7 +510,8 @@ $entries['street_0'] = array( 'name' => _('Street Address') );
$entries['postOfficeBox_0'] = array( 'name' => _('Postbox') );
$entries['postalCode_0'] = array( 'name' => _('Postal Code') );
$entries['l_0'] = array( 'name' => _('City') );
-$entries['c_0'] = array( 'name' => _('Country') );
+$entries['c_0'] = array( 'name' => _('Country'),
+ 'comment' => _('2 letter code from <a href="http://www.iso.org/iso/english_country_names_and_code_elements" target="_blank">ISO 3166</a>') );
$entries['telephoneNumber_0'] = array( 'name' => _('Telephone Number'),
'validation' => 'checkphone' );
$entries['facsimileTelephoneNumber_0'] = array( 'name' => _('Fax Number'),