PHP code: avoid using a global var

This commit is contained in:
David Anderson 2016-04-05 12:10:40 -07:00
parent e6858433ee
commit 39a57c07eb
1 changed files with 7 additions and 3 deletions

View File

@ -16,9 +16,13 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
$d = dirname(__FILE__);
require_once("$d/db_conn.inc");
require_once("$d/util_basic.inc");
function incs() {
$d = dirname(__FILE__);
require_once("$d/db_conn.inc");
require_once("$d/util_basic.inc");
}
incs();
class BoincDb extends DbConn {
static $instance;