From 9e2efb6029a6d98dbed7d8a98779514a67d40954 Mon Sep 17 00:00:00 2001
From: ozh
Please read the readme.html to learn how to install YOURLS
' ); @@ -23,7 +23,7 @@ // physical path of YOURLS root if( !defined( 'YOURLS_ABSPATH' ) ) - define( 'YOURLS_ABSPATH', str_replace( '\\', '/', dirname( dirname( __FILE__ ) ) ) ); + define( 'YOURLS_ABSPATH', str_replace( '\\', '/', dirname( __DIR__ ) ) ); // physical path of includes directory if( !defined( 'YOURLS_INC' ) ) diff --git a/includes/pomo/mo.php b/includes/pomo/mo.php index a206da1..6937408 100644 --- a/includes/pomo/mo.php +++ b/includes/pomo/mo.php @@ -7,8 +7,8 @@ * @subpackage mo */ -require_once dirname(__FILE__) . '/translations.php'; -require_once dirname(__FILE__) . '/streams.php'; +require_once __DIR__ . '/translations.php'; +require_once __DIR__ . '/streams.php'; if ( !class_exists( 'MO', false ) ): class MO extends Gettext_Translations { diff --git a/includes/pomo/po.php b/includes/pomo/po.php index 6082d7a..f565748 100644 --- a/includes/pomo/po.php +++ b/includes/pomo/po.php @@ -7,7 +7,7 @@ * @subpackage po */ -require_once dirname(__FILE__) . '/translations.php'; +require_once __DIR__ . '/translations.php'; define('PO_MAX_LINE_LEN', 79); diff --git a/includes/pomo/translations.php b/includes/pomo/translations.php index 9bbd65a..4081ebc 100644 --- a/includes/pomo/translations.php +++ b/includes/pomo/translations.php @@ -7,7 +7,7 @@ * @subpackage translations */ -require_once dirname(__FILE__) . '/entry.php'; +require_once __DIR__ . '/entry.php'; if ( !class_exists( 'Translations', false ) ): class Translations { diff --git a/user/plugins/random-bg/plugin.php b/user/plugins/random-bg/plugin.php index e0c1ef1..a6768ff 100644 --- a/user/plugins/random-bg/plugin.php +++ b/user/plugins/random-bg/plugin.php @@ -14,8 +14,8 @@ // Add the inline style yourls_add_action( 'html_head', 'ozh_yourls_randombg' ); function ozh_yourls_randombg() { - $bg = glob( dirname( __FILE__ ).'/img/*png' ); - $url = yourls_plugin_url( dirname( __FILE__ ) ); + $bg = glob( __DIR__.'/img/*png' ); + $url = yourls_plugin_url( __DIR__ ); $rnd = yourls_plugin_url( $bg[ mt_rand( 0, count( $bg ) - 1 ) ] ); echo <<