Skip to content

Commit f92666a

Browse files
committed
Merge pull request #483
2 parents 4a7f6d5 + 0bcf414 commit f92666a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

config.w32

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function mongodb_generate_header(inpath, outpath, replacements)
1515
replacement = replacement.replace(/"/g, '\\"');
1616
}
1717

18-
outdata = outdata.replace("@" + key + "@", replacement);
18+
outdata = outdata.replace(new RegExp('@' + key + '@', 'g'), replacement);
1919
}
2020

2121
var outfile = FSO.CreateTextFile(outpath, true);
@@ -31,13 +31,14 @@ function mongodb_parse_version_file(inpath, prefix)
3131

3232
var xyz_pre = version.split("-");
3333
var xyz = xyz_pre[0].split(".");
34+
var pre = xyz_pre.length > 1 ? xyz_pre[1] : "";
3435

3536
var replacements = {};
3637
replacements[prefix + "VERSION"] = version;
3738
replacements[prefix + "MAJOR_VERSION"] = xyz[0];
3839
replacements[prefix + "MINOR_VERSION"] = xyz[1];
3940
replacements[prefix + "MICRO_VERSION"] = xyz[2];
40-
replacements[prefix + "PRERELEASE_VERSION"] = xyz_pre[1];
41+
replacements[prefix + "PRERELEASE_VERSION"] = pre;
4142

4243
return replacements;
4344
}
@@ -46,10 +47,10 @@ ARG_ENABLE("mongodb", "MongoDB support", "no");
4647
ARG_WITH("mongodb-sasl", "MongoDB: Build against Cyrus-SASL", "yes");
4748

4849
if (PHP_MONGODB != "no") {
49-
ADD_EXTENSION_DEP("mongodb", "date", false);
50+
/* Note: ADD_EXTENSION_DEP() cannot be used to declare that we depend on the
51+
* date and standard extensions. Assume that they're always enabled. */
5052
ADD_EXTENSION_DEP("mongodb", "json", false);
5153
ADD_EXTENSION_DEP("mongodb", "spl", false);
52-
ADD_EXTENSION_DEP("mongodb", "standard", false);
5354

5455
/* MongoDB does not actually depend on PHP's OpenSSL extension, but this is in
5556
* place to ensure that later SSL library checks succeed. This can be removed

0 commit comments

Comments
 (0)