@@ -407,10 +407,14 @@ public function isAccountOnly() {
407407 * @return bool
408408 */
409409 public function isContactsBackend (): bool {
410- return ($ this ->getAppValue (ConfigService::CIRCLES_CONTACT_BACKEND ) !== '0 ' );
410+ return ($ this ->getAppValue (ConfigService::CIRCLES_CONTACT_BACKEND ) !== '0 '
411+ && $ this ->getAppValue (ConfigService::CIRCLES_CONTACT_BACKEND ) !== '' );
411412 }
412413
413414
415+ /**
416+ * @return int
417+ */
414418 public function contactsBackendType (): int {
415419 return (int )$ this ->getAppValue (ConfigService::CIRCLES_CONTACT_BACKEND );
416420 }
@@ -420,7 +424,7 @@ public function contactsBackendType(): int {
420424 * @return bool
421425 */
422426 public function stillFrontEnd (): bool {
423- if ($ this ->getAppValue ( self :: CIRCLES_CONTACT_BACKEND ) !== ' 1 ' ) {
427+ if (! $ this ->isContactsBackend () ) {
424428 return true ;
425429 }
426430
@@ -438,7 +442,7 @@ public function stillFrontEnd(): bool {
438442 * @return bool
439443 */
440444 public function sendPasswordByMail () {
441- if ($ this ->getAppValue ( self :: CIRCLES_CONTACT_BACKEND ) === ' 1 ' ) {
445+ if ($ this ->isContactsBackend () ) {
442446 return false ;
443447 }
444448
@@ -453,7 +457,7 @@ public function sendPasswordByMail() {
453457 * @return bool
454458 */
455459 public function enforcePasswordProtection (Circle $ circle ) {
456- if ($ this ->getAppValue ( self :: CIRCLES_CONTACT_BACKEND ) === ' 1 ' ) {
460+ if ($ this ->isContactsBackend () ) {
457461 return false ;
458462 }
459463
@@ -552,7 +556,7 @@ public function configureRequest(NC19Request $request) {
552556 }
553557
554558// if ($this->getAppValue(ConfigService::CIRCLES_NON_SSL_LOCAL) === '1') {
555- $ request ->setLocalAddressAllowed (true );
559+ $ request ->setLocalAddressAllowed (true );
556560// }
557561 }
558562
0 commit comments