X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=blobdiff_plain;f=maintenance%2FpatchSql.php;h=1f393556a66db61287106c72706f7ae9390b70bd;hb=67bfdc7a68940d901e585eadd984a2074bf0216a;hp=ddfabbbe757ce7bdb106d9c077394a454e7a5d84;hpb=659778619cc12d156d3547834c0f90f407584104;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/patchSql.php b/maintenance/patchSql.php index ddfabbbe75..1f393556a6 100644 --- a/maintenance/patchSql.php +++ b/maintenance/patchSql.php @@ -18,11 +18,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * + * @file * @ingroup Maintenance */ -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); +require_once( __DIR__ . '/Maintenance.php' ); +/** + * Maintenance script that manually runs an SQL patch outside of the general updaters. + * + * @ingroup Maintenance + */ class PatchSql extends Maintenance { public function __construct() { parent::__construct(); @@ -39,8 +45,8 @@ class PatchSql extends Maintenance { foreach ( $this->mArgs as $arg ) { $files = array( $arg, - DatabaseBase::patchPath( $arg ), - DatabaseBase::patchPath( "patch-$arg.sql" ), + $dbw->patchPath( $arg ), + $dbw->patchPath( "patch-$arg.sql" ), ); foreach ( $files as $file ) { if ( file_exists( $file ) ) { @@ -56,4 +62,4 @@ class PatchSql extends Maintenance { } $maintClass = "PatchSql"; -require_once( DO_MAINTENANCE ); +require_once( RUN_MAINTENANCE_IF_MAIN );