Subversion Repositories oidplus

Rev

Rev 652 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 652 Rev 661
Line 239... Line 239...
239
	$outscript .= "@set_time_limit(0);\n";
239
	$outscript .= "@set_time_limit(0);\n";
240
	$outscript .= "\n";
240
	$outscript .= "\n";
241
	$outscript .= "@header('Content-Type: text/plain');\n";
241
	$outscript .= "@header('Content-Type: text/plain');\n";
242
	$outscript .= "\n";
242
	$outscript .= "\n";
243
	$outscript .= "chdir(__DIR__);\n";
243
	$outscript .= "chdir(__DIR__);\n";
-
 
244
	if ($i >= 662) {
-
 
245
		$outscript .= "if (trim(@file_get_contents('.version.php')) !== '<?php // Revision ".($i-1)."')\n\terr('This update can only be applied to OIDplus SVN Rev ".($i-1)."!');\n";
-
 
246
	} else {
244
	$outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision ".($i-1)."')\n\terr('This update can only be applied to OIDplus SVN Rev ".($i-1)."!');\n";
247
		$outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision ".($i-1)."')\n\terr('This update can only be applied to OIDplus SVN Rev ".($i-1)."!');\n";
-
 
248
	}
245
	$outscript .= "\n";
249
	$outscript .= "\n";
246
	/*
250
	/*
247
	if ($i >= 99999) {
251
	if ($i >= 99999) {
248
		... once we require PHP 7.1, we add the requirement here
252
		... once we require PHP 7.1, we add the requirement here
249
		... also if we require fancy new PHP modules, we must add it here
253
		... also if we require fancy new PHP modules, we must add it here
Line 256... Line 260...
256
	$outscript .= "\n";
260
	$outscript .= "\n";
257
	$outscript .= "info('Update to SVN Rev $i...');\n";
261
	$outscript .= "info('Update to SVN Rev $i...');\n";
258
	$outscript .= "\n";
262
	$outscript .= "\n";
259
	getDirContents($outdir_old, $outdir_new);
263
	getDirContents($outdir_old, $outdir_new);
260
	$outscript .= "\n";
264
	$outscript .= "\n";
-
 
265
	if ($i >= 661) {
-
 
266
		$outscript .= "file_put_contents('.version.php', \"<?php // Revision $i\\n\");\n";
-
 
267
		$outscript .= "if (trim(@file_get_contents('.version.php')) !== '<?php // Revision $i') err('Could not write to .version.php!');\n";
-
 
268
		if ($i == 661) {
-
 
269
			$outscript .= "@unlink('oidplus_version.txt');\n";
-
 
270
			$outscript .= "if (file_exists('oidplus_version.txt')) err('Could not delete oidplus_version.txt! Please delete it manually');\n";
-
 
271
		}
-
 
272
	} else {
261
	$outscript .= "file_put_contents('oidplus_version.txt', \"Revision $i\\n\");\n";
273
		$outscript .= "file_put_contents('oidplus_version.txt', \"Revision $i\\n\");\n";
262
	$outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision $i') err('Could not write to oidplus_version.txt!');\n";
274
		$outscript .= "if (trim(@file_get_contents('oidplus_version.txt')) !== 'Revision $i') err('Could not write to oidplus_version.txt!');\n";
-
 
275
	}
263
	$outscript .= "\n";
276
	$outscript .= "\n";
264
	$outscript .= "\n";
277
	$outscript .= "\n";
265
	$outscript .= "info('Update to SVN Rev $i done!');\n";
278
	$outscript .= "info('Update to SVN Rev $i done!');\n";
266
	$outscript .= "\n";
279
	$outscript .= "\n";
267
	$outscript .= "unlink(__FILE__);\n";
280
	$outscript .= "unlink(__FILE__);\n";