Skip to content

Commit 9dcc253

Browse files
authored
Merge pull request #50 from horde/feat/migrate-netdns2
feat/migrate netdns2
2 parents 9e312a0 + 286728e commit 9dcc253

4 files changed

Lines changed: 58 additions & 81 deletions

File tree

.horde.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ dependencies:
105105
intl: '*'
106106
optional:
107107
composer:
108-
pear/net_dns2: '*'
108+
mikepultz/netdns2: ^2.0
109109
horde/activeSync: ^3
110110
horde/backup: ^2
111111
horde/cli_application: ^2
@@ -117,10 +117,6 @@ dependencies:
117117
horde/service_twitter: ^3
118118
horde/service_weather: ^3
119119
horde/syncml: ^3
120-
pear/console_table: ^1.3
121-
pear/console_getopt: ^1.4
122-
pear/console_color2: ^0.1.2
123-
pear/file_fstab: '*'
124120
ext:
125121
iconv: '*'
126122
dev:

composer.json

Lines changed: 44 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,40 +26,40 @@
2626
"role": "lead"
2727
}
2828
],
29-
"time": "2026-03-09",
29+
"time": "2026-03-13",
3030
"repositories": [],
3131
"require": {
32-
"horde/horde-installer-plugin": "dev-FRAMEWORK_6_0 || ^3 || ^2",
32+
"horde/horde-installer-plugin": "^3 || ^2",
3333
"php": "^8.2",
34-
"horde/alarm": "^3 || dev-FRAMEWORK_6_0",
35-
"horde/argv": "^3 || dev-FRAMEWORK_6_0",
36-
"horde/auth": "^3 || dev-FRAMEWORK_6_0",
37-
"horde/autoloader": "^3 || dev-FRAMEWORK_6_0",
38-
"horde/browser": "^3 || dev-FRAMEWORK_6_0",
39-
"horde/core": "^3 || dev-FRAMEWORK_6_0",
40-
"horde/date": "^3 || dev-FRAMEWORK_6_0",
41-
"horde/exception": "^3 || dev-FRAMEWORK_6_0",
42-
"horde/form": "^3 || dev-FRAMEWORK_6_0",
43-
"horde/group": "^3 || dev-FRAMEWORK_6_0",
44-
"horde/http": "^3 || dev-FRAMEWORK_6_0",
45-
"horde/image": "^3 || dev-FRAMEWORK_6_0",
46-
"horde/logintasks": "^3 || dev-FRAMEWORK_6_0",
47-
"horde/mail": "^3 || dev-FRAMEWORK_6_0",
48-
"horde/mime": "^3 || dev-FRAMEWORK_6_0",
49-
"horde/nls": "^3 || dev-FRAMEWORK_6_0",
50-
"horde/perms": "^3 || dev-FRAMEWORK_6_0",
51-
"horde/prefs": "^3 || dev-FRAMEWORK_6_0",
52-
"horde/rpc": "^3 || dev-FRAMEWORK_6_0",
53-
"horde/serialize": "^3 || dev-FRAMEWORK_6_0",
54-
"horde/support": "^3 || dev-FRAMEWORK_6_0",
55-
"horde/text_diff": "^3 || dev-FRAMEWORK_6_0",
56-
"horde/token": "^3 || dev-FRAMEWORK_6_0",
57-
"horde/text_filter": "^3 || dev-FRAMEWORK_6_0",
58-
"horde/tree": "^3 || dev-FRAMEWORK_6_0",
59-
"horde/url": "^3 || dev-FRAMEWORK_6_0",
60-
"horde/util": "^3 || dev-FRAMEWORK_6_0",
61-
"horde/view": "^3 || dev-FRAMEWORK_6_0",
62-
"horde/vfs": "^3 || dev-FRAMEWORK_6_0",
34+
"horde/alarm": "^3",
35+
"horde/argv": "^3",
36+
"horde/auth": "^3",
37+
"horde/autoloader": "^3",
38+
"horde/browser": "^3",
39+
"horde/core": "^3",
40+
"horde/date": "^3",
41+
"horde/exception": "^3",
42+
"horde/form": "^3",
43+
"horde/group": "^3",
44+
"horde/http": "^3",
45+
"horde/image": "^3",
46+
"horde/logintasks": "^3",
47+
"horde/mail": "^3",
48+
"horde/mime": "^3",
49+
"horde/nls": "^3",
50+
"horde/perms": "^3",
51+
"horde/prefs": "^3",
52+
"horde/rpc": "^3",
53+
"horde/serialize": "^3",
54+
"horde/support": "^3",
55+
"horde/text_diff": "^3",
56+
"horde/token": "^3",
57+
"horde/text_filter": "^3",
58+
"horde/tree": "^3",
59+
"horde/url": "^3",
60+
"horde/util": "^3",
61+
"horde/view": "^3",
62+
"horde/vfs": "^3",
6363
"php81_bc/strftime": "^0.7",
6464
"ext-filter": "*",
6565
"ext-gettext": "*",
@@ -68,25 +68,21 @@
6868
"ext-intl": "*"
6969
},
7070
"require-dev": {
71-
"horde/test": "^3 || dev-FRAMEWORK_6_0"
71+
"horde/test": "^3"
7272
},
7373
"suggest": {
74-
"pear/net_dns2": "*",
75-
"horde/activesync": "^3 || dev-FRAMEWORK_6_0",
76-
"horde/backup": "^2 || dev-FRAMEWORK_6_0",
77-
"horde/cli_application": "^2 || dev-FRAMEWORK_6_0",
78-
"horde/db": "^3 || dev-FRAMEWORK_6_0",
79-
"horde/feed": "^3 || dev-FRAMEWORK_6_0",
80-
"horde/oauth": "^3 || dev-FRAMEWORK_6_0",
81-
"horde/openxchange": "^2 || dev-FRAMEWORK_6_0",
82-
"horde/service_facebook": "^3 || dev-FRAMEWORK_6_0",
83-
"horde/service_twitter": "^3 || dev-FRAMEWORK_6_0",
84-
"horde/service_weather": "^3 || dev-FRAMEWORK_6_0",
85-
"horde/syncml": "^3 || dev-FRAMEWORK_6_0",
86-
"pear/console_table": "^1.3",
87-
"pear/console_getopt": "^1.4",
88-
"pear/console_color2": "^0.1.2",
89-
"pear/file_fstab": "*",
74+
"mikepultz/netdns2": "^2.0",
75+
"horde/activesync": "^3",
76+
"horde/backup": "^2",
77+
"horde/cli_application": "^2",
78+
"horde/db": "^3",
79+
"horde/feed": "^3",
80+
"horde/oauth": "^3",
81+
"horde/openxchange": "^2",
82+
"horde/service_facebook": "^3",
83+
"horde/service_twitter": "^3",
84+
"horde/service_weather": "^3",
85+
"horde/syncml": "^3",
9086
"ext-iconv": "*"
9187
},
9288
"autoload": {
@@ -131,10 +127,5 @@
131127
},
132128
"provide": {
133129
"horde/base": "^6"
134-
},
135-
"extra": {
136-
"branch-alias": {
137-
"dev-FRAMEWORK_6_0": "6.x-dev"
138-
}
139130
}
140131
}

lib/Block/Account/Localhost.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,16 @@ public function getQuota()
8282
$information = $this->_getAccount();
8383
$homedir = $information['dir'];
8484

85-
// If we want mount point translations, then translate the login dir
86-
// name to a mount point. If not, then simply parse out the device
87-
// name from the login directory, and use that instead.
88-
if ($this->_params['translateMountPoint']
89-
&& file_exists($this->_params['translationTable'])) {
90-
$sysTab = File_Fstab::singleton($this->_params['translationTable']);
91-
do {
92-
$entry = $sysTab->getEntryForPath($homedir);
93-
$homedir = dirname($homedir);
94-
if ($homedir == '.' || empty($homedir)) {
95-
$homedir = '/';
96-
}
97-
} while (is_a($entry, 'PEAR_Error'));
98-
$mountPoint = $entry->device;
85+
// If we want mount point translations, then use df to find the device.
86+
// If not, then simply parse out the device name from the login directory.
87+
if ($this->_params['translateMountPoint']) {
88+
// Use df to find the device/mount point for the home directory
89+
$mountPoint = trim(shell_exec("df -P " . escapeshellarg($homedir) . " | tail -1 | awk '{print \$1}'"));
90+
if (empty($mountPoint)) {
91+
// Fallback to parsing first path component
92+
$homedir = explode('/', $homedir);
93+
$mountPoint = '/' . $homedir[1];
94+
}
9995
} else {
10096
$homedir = explode('/', $homedir);
10197
$mountPoint = '/' . $homedir[1];

lib/Test.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,11 @@ class Horde_Test
283283
* @var array
284284
*/
285285
protected $_pearList = [
286-
'File_Fstab' => [
287-
'error' => 'Horde requires the File_Fstab package if using the localhost driver for the Accounts block.',
288-
],
289-
'Net_DNS2' => [
290-
'error' => 'Net_DNS2 can speed up hostname lookups against broken DNS servers.',
291-
],
292-
'Math_BigInteger' => [
293-
'error' => 'The Math_BigInteger library is used in decoding certain embedded attachments in TNEF data.',
286+
'NetDNS2\\Resolver' => [
287+
'error' => 'NetDNS2 (mikepultz/netdns2 via Composer) can speed up hostname lookups against broken DNS servers. Install with: composer require mikepultz/netdns2',
294288
],
295289
'Predis\\Client' => [
296-
'error' => 'The Predis library is only needed if you are using a Redis server as a hash table backend for caching or sessions. This library is provided by the pear.nrk.io PEAR channel.',
290+
'error' => 'The Predis library (predis/predis via Composer) is only needed if you are using a Redis server as a hash table backend for caching or sessions. Install with: composer require predis/predis',
297291
],
298292
];
299293

0 commit comments

Comments
 (0)