|
From: <var...@us...> - 2021-08-06 07:54:30
|
Revision: 10442
http://sourceforge.net/p/phpwiki/code/10442
Author: vargenau
Date: 2021-08-06 07:54:22 +0000 (Fri, 06 Aug 2021)
Log Message:
-----------
Simplify include_once
Modified Paths:
--------------
trunk/lib/WikiUser/File.php
trunk/lib/main.php
Modified: trunk/lib/WikiUser/File.php
===================================================================
--- trunk/lib/WikiUser/File.php 2021-08-05 14:06:23 UTC (rev 10441)
+++ trunk/lib/WikiUser/File.php 2021-08-06 07:54:22 UTC (rev 10442)
@@ -22,6 +22,8 @@
*
*/
+include_once 'lib/pear/File_Passwd.php';
+
class _FilePassUser
extends _PassUser
/**
@@ -43,13 +45,10 @@
parent::__construct($UserName);
}
$this->_userid = $UserName;
- // read the .htaccess style file. We use our own copy of the standard pear class.
+ // read the .htaccess style file.
$this->_may_change = defined('AUTH_USER_FILE_STORABLE') && AUTH_USER_FILE_STORABLE;
if (empty($file) and defined('AUTH_USER_FILE'))
$file = AUTH_USER_FILE;
- // same style as in main.php
- include_once(dirname(__FILE__) . "/../pear/File_Passwd.php");
- // "__PHP_Incomplete_Class"
if (empty($file)) {
return;
}
@@ -84,7 +83,6 @@
if (!$this->_checkPassLength($submitted_password)) {
return WIKIAUTH_FORBIDDEN;
}
- //include_once 'lib/pear/File_Passwd.php';
if ($this->_file->verifyPassword($this->_userid, $submitted_password)) {
$this->_authmethod = 'File';
$this->_level = WIKIAUTH_USER;
Modified: trunk/lib/main.php
===================================================================
--- trunk/lib/main.php 2021-08-05 14:06:23 UTC (rev 10441)
+++ trunk/lib/main.php 2021-08-06 07:54:22 UTC (rev 10442)
@@ -57,8 +57,7 @@
// first mysql request costs [958ms]! [670ms] is mysql_connect()
if (in_array('File', $this->_dbi->getAuthParam('USER_AUTH_ORDER'))) {
- // force our local copy, until the pear version is fixed.
- include_once(dirname(__FILE__) . "/pear/File_Passwd.php");
+ include_once 'lib/pear/File_Passwd.php';
}
// Preload all necessary userclasses. Otherwise session => __PHP_Incomplete_Class_Name
// There's no way to demand-load it later. This way it's much slower, but needs slightly
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|