aboutsummaryrefslogtreecommitdiffstats
path: root/mail/turba/files/patch-config::sources.php.dist
blob: 5f11eab5cc62a945ae04a6ca0ff8b490de43d658 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- config/sources.php.dist.orig    Wed Jun 22 20:21:52 2005
+++ config/sources.php.dist Tue Jul 19 14:25:35 2005
@@ -468,82 +468,82 @@
  * populated with the current username.
  */
 // First, get the user name
-$uid = $GLOBALS['prefs']->getValue('imsp_auth_user');
-$pass = $GLOBALS['prefs']->getValue('imsp_auth_pass');
-if (!strlen($uid)) {
-    $uid = Auth::getAuth();
-    if (preg_match('/(^.*)@/', $uid, $matches)) {
-        $uid = $matches[1];
-    }
-    $pass = Auth::getCredential('password');
-}
-
-$cfgSources['imsp'] = array(
-    'title' => _("IMSP"),
-    'type' => 'imsp',
-    'params' => array(
-        'server'   => 'localhost',
-        'port'     => '406',
-        'username' => $uid,
-        'password' => $pass,
-        'name' => $uid,
-        'auth_method' => 'cram_md5',
-        'group_id_field' => 'group',
-        'group_id_value' => 'group',
-        'contact_ownership' => false
-        ),
-    'map' => array(
-        '__key' => 'name',
-        '__type' => '__type',
-        '__members' => '__members',
-        '__owner' => '__owner',
-        '__uid' => '__uid',
-        'name' => 'fullname',
-        'email' => 'email',
-        'alias' => 'alias',
-        'company' => 'company',
-        'notes' => 'notes',
-        'workPhone' => 'phone-work',
-        'fax' => 'fax',
-        'homePhone' => 'phone-home',
-        'cellPhone' => 'cellphone',
-        'freebusyUrl' => 'freebusyUrl'
-        ),
-    'search' => array(
-        'name',
-        'email',
-        'alias',
-        'company',
-        'homePhone'
-        ),
-    'strict' => array(),
-    'public' => false,
-    'readonly' => false,
-    'export' => true
-    );
+//UNCOMMENTIFIMSP$uid = $GLOBALS['prefs']->getValue('imsp_auth_user');
+//UNCOMMENTIFIMSP$pass = $GLOBALS['prefs']->getValue('imsp_auth_pass');
+//UNCOMMENTIFIMSPif (!strlen($uid)) {
+//UNCOMMENTIFIMSP    $uid = Auth::getAuth();
+//UNCOMMENTIFIMSP    if (preg_match('/(^.*)@/', $uid, $matches)) {
+//UNCOMMENTIFIMSP        $uid = $matches[1];
+//UNCOMMENTIFIMSP    }
+//UNCOMMENTIFIMSP    $pass = Auth::getCredential('password');
+//UNCOMMENTIFIMSP}
+//UNCOMMENTIFIMSP
+//UNCOMMENTIFIMSP$cfgSources['imsp'] = array(
+//UNCOMMENTIFIMSP    'title' => _("IMSP"),
+//UNCOMMENTIFIMSP    'type' => 'imsp',
+//UNCOMMENTIFIMSP    'params' => array(
+//UNCOMMENTIFIMSP        'server'   => 'localhost',
+//UNCOMMENTIFIMSP        'port'     => '406',
+//UNCOMMENTIFIMSP        'username' => $uid,
+//UNCOMMENTIFIMSP        'password' => $pass,
+//UNCOMMENTIFIMSP        'name' => $uid,
+//UNCOMMENTIFIMSP        'auth_method' => 'cram_md5',
+//UNCOMMENTIFIMSP        'group_id_field' => 'group',
+//UNCOMMENTIFIMSP        'group_id_value' => 'group',
+//UNCOMMENTIFIMSP        'contact_ownership' => false
+//UNCOMMENTIFIMSP        ),
+//UNCOMMENTIFIMSP    'map' => array(
+//UNCOMMENTIFIMSP        '__key' => 'name',
+//UNCOMMENTIFIMSP        '__type' => '__type',
+//UNCOMMENTIFIMSP        '__members' => '__members',
+//UNCOMMENTIFIMSP        '__owner' => '__owner',
+//UNCOMMENTIFIMSP        '__uid' => '__uid',
+//UNCOMMENTIFIMSP        'name' => 'fullname',
+//UNCOMMENTIFIMSP        'email' => 'email',
+//UNCOMMENTIFIMSP        'alias' => 'alias',
+//UNCOMMENTIFIMSP        'company' => 'company',
+//UNCOMMENTIFIMSP        'notes' => 'notes',
+//UNCOMMENTIFIMSP        'workPhone' => 'phone-work',
+//UNCOMMENTIFIMSP        'fax' => 'fax',
+//UNCOMMENTIFIMSP        'homePhone' => 'phone-home',
+//UNCOMMENTIFIMSP        'cellPhone' => 'cellphone',
+//UNCOMMENTIFIMSP        'freebusyUrl' => 'freebusyUrl'
+//UNCOMMENTIFIMSP        ),
+//UNCOMMENTIFIMSP    'search' => array(
+//UNCOMMENTIFIMSP        'name',
+//UNCOMMENTIFIMSP        'email',
+//UNCOMMENTIFIMSP        'alias',
+//UNCOMMENTIFIMSP        'company',
+//UNCOMMENTIFIMSP        'homePhone'
+//UNCOMMENTIFIMSP        ),
+//UNCOMMENTIFIMSP    'strict' => array(),
+//UNCOMMENTIFIMSP    'public' => false,
+//UNCOMMENTIFIMSP    'readonly' => false,
+//UNCOMMENTIFIMSP    'export' => true
+//UNCOMMENTIFIMSP    );
 
 /**
  * Get any other addressbooks this user might be privy to.
  */
-require_once 'Net/IMSP/Utils.php';
-$result = Net_IMSP_Utils::getAllBooks($cfgSources['imsp']);
-if (!is_a($result, 'PEAR_Error')) {
-    for ($i = 0; $i < count($result); $i++) {
-        // Make sure we didn't define this source explicitly.
-        $dup = false;
-        foreach ($cfgSources as $thisSource) {
-            if (($thisSource['type'] == 'imsp') &&
-                ($thisSource['params']['name'] == $result[$i]['params']['name'])) {
-                $dup = true;
-            }
-        }
-        if (!$dup) {
-            $cfgSources[sprintf('imsp%d', $i + 1)] = $result[$i];
-        }
-    }
-} else {
-    $notification->push($result);
-}
+//UNCOMMENTIFIMSPrequire_once 'Net/IMSP/Utils.php';
+//UNCOMMENTIFIMSP$result = Net_IMSP_Utils::getAllBooks($cfgSources['imsp']);
+//UNCOMMENTIFIMSPif (!is_a($result, 'PEAR_Error')) {
+//UNCOMMENTIFIMSP    for ($i = 0; $i < count($result); $i++) {
+//UNCOMMENTIFIMSP        // Make sure we didn't define this source explicitly.
+//UNCOMMENTIFIMSP        $dup = false;
+//UNCOMMENTIFIMSP        foreach ($cfgSources as $thisSource) {
+//UNCOMMENTIFIMSP            if (($thisSource['type'] == 'imsp') &&
+//UNCOMMENTIFIMSP                ($thisSource['params']['name'] == $result[$i]['params']['name'])) {
+//UNCOMMENTIFIMSP                $dup = true;
+//UNCOMMENTIFIMSP            }
+//UNCOMMENTIFIMSP        }
+//UNCOMMENTIFIMSP        if (!$dup) {
+//UNCOMMENTIFIMSP            $cfgSources[sprintf('imsp%d', $i + 1)] = $result[$i];
+//UNCOMMENTIFIMSP        }
+//UNCOMMENTIFIMSP    }
+//UNCOMMENTIFIMSP} else {
+//UNCOMMENTIFIMSP    $notification->push($result);
+//UNCOMMENTIFIMSP}
 
 /* Begin Kolab sources. */
 if (!empty($GLOBALS['conf']['kolab']['enabled'])) {