@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use define() instead of PHP 5.3-only global 'const' in upgrade_schema.php

Summary:
This global 'const' syntax was introduced in PHP 5.3:

http://www.php.net/manual/en/language.constants.syntax.php

We're PHP 5.2.x elsewhere so just use define(). Made the constant a little more
specific too.

Test Plan:
Ran upgrade_schema.php script.

Reviewed By: Girish
Reviewers: tuomaspelkonen, Girish, davidrecordon
CC: jungejason, aran, epriestley, Girish
Differential Revision: 190

+9 -5
+9 -5
scripts/sql/upgrade_schema.php
··· 23 23 24 24 phutil_require_module('phutil', 'console'); 25 25 26 - const TABLE_NAME = 'schema_version'; 26 + define('SCHEMA_VERSION_TABLE_NAME', 'schema_version'); 27 27 28 28 if (isset($argv[1]) && !is_numeric($argv[1])) { 29 29 print ··· 82 82 $version = queryfx_one( 83 83 $conn, 84 84 'SELECT * FROM %T', 85 - TABLE_NAME); 85 + SCHEMA_VERSION_TABLE_NAME); 86 86 87 87 if (!$version) { 88 88 print "*** No version information in the database ***\n"; ··· 142 142 143 143 // Patch was successful, update the db with the latest applied patch version 144 144 // 'DELETE' and 'INSERT' instead of update, because the table might be empty 145 - queryfx($conn, 'DELETE FROM %T', TABLE_NAME); 146 - queryfx($conn, 'INSERT INTO %T values (%d)', TABLE_NAME, $patch['version']); 145 + queryfx($conn, 'DELETE FROM %T', SCHEMA_VERSION_TABLE_NAME); 146 + queryfx( 147 + $conn, 148 + 'INSERT INTO %T values (%d)', 149 + SCHEMA_VERSION_TABLE_NAME, 150 + $patch['version']); 147 151 148 152 $patch_applied = true; 149 153 } 150 154 151 155 if (!$patch_applied) { 152 - print "Your database is already up-to-date\n"; 156 + print "Your database is already up-to-date.\n"; 153 157 }