X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;ds=sidebyside;f=maintenance%2FupdateCredits.php;h=eb717e8c66c4739908b77876bb40bb4423f230f9;hb=73224f4f8b8a26b9a9a04e338bb1c3c2f163a820;hp=a43e0ba3f0439d8cc0d4430724e4dea8072a7775;hpb=cf5c36ccfd8dce53ea8d3631b1902050e93d4acd;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateCredits.php b/maintenance/updateCredits.php index a43e0ba3f0..eb717e8c66 100644 --- a/maintenance/updateCredits.php +++ b/maintenance/updateCredits.php @@ -26,8 +26,6 @@ if ( PHP_SAPI != 'cli' ) { die( "This script can only be run from the command line.\n" ); } -chdir( dirname( __DIR__ ) ); - $CREDITS = 'CREDITS'; $START_CONTRIBUTORS = ''; $END_CONTRIBUTORS = ''; @@ -38,6 +36,10 @@ $header = []; $contributors = []; $footer = []; +if ( !file_exists( $CREDITS ) ) { + exit( 'No CREDITS file found. Are you running this script in the right directory?' ); +} + $lines = explode( "\n", file_get_contents( $CREDITS ) ); foreach ( $lines as $line ) { if ( $inHeader ) {