@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Surface a better warning when the LDAP extension is not installed

Summary:
Fixes T3347. We can't really do this one as a config thing since we don't know if the user wants to use LDAP.

Instead, just give them a better message than they otherwise get when they try to install/configure/use LDAP.

Test Plan: Faked it and got a reasonable message.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T3347

Differential Revision: https://secure.phabricator.com/D10260

+16
+2
src/applications/auth/management/PhabricatorAuthManagementLDAPWorkflow.php
··· 15 15 $console = PhutilConsole::getConsole(); 16 16 $console->getServer()->setEnableLog(true); 17 17 18 + PhabricatorLDAPAuthProvider::assertLDAPExtensionInstalled(); 19 + 18 20 $provider = PhabricatorLDAPAuthProvider::getLDAPProvider(); 19 21 if (!$provider) { 20 22 $console->writeOut(
+14
src/applications/auth/provider/PhabricatorLDAPAuthProvider.php
··· 251 251 return array($errors, $issues, $values); 252 252 } 253 253 254 + public static function assertLDAPExtensionInstalled() { 255 + if (!function_exists('ldap_bind')) { 256 + throw new Exception( 257 + pht( 258 + 'Before you can set up or use LDAP, you need to install the PHP '. 259 + 'LDAP extension. It is not currently installed, so PHP can not '. 260 + 'talk to LDAP. Usually you can install it with '. 261 + '`yum install php-ldap`, `apt-get install php5-ldap`, or a '. 262 + 'similar package manager command.')); 263 + } 264 + } 265 + 254 266 public function extendEditForm( 255 267 AphrontRequest $request, 256 268 AphrontFormView $form, 257 269 array $values, 258 270 array $issues) { 271 + 272 + self::assertLDAPExtensionInstalled(); 259 273 260 274 $labels = $this->getPropertyLabels(); 261 275