i18n-tools: Remove PHP4 constructor from add-textdomain.php.

`_deprecated_constructor()` isn't available in non-WordPress context.

See #31982.

git-svn-id: https://develop.svn.wordpress.org/trunk@36599 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-02-20 20:33:48 +00:00
parent 8b37597ad3
commit 4c4add2837
1 changed files with 2 additions and 9 deletions

View File

@ -15,7 +15,7 @@ class AddTextdomain {
var $funcs;
/**
* PHP5 constructor.
* Constructor.
*/
function __construct() {
$makepot = new MakePOT;
@ -23,13 +23,6 @@ class AddTextdomain {
$this->funcs[] = 'translate_nooped_plural';
}
/**
* PHP4 constructor.
*/
public function AddTextdomain() {
_deprecated_constructor( 'AddTextdomain' , '4.3' );
}
function usage() {
$usage = "Usage: php add-textdomain.php [-i] <domain> <file>\n\nAdds the string <domain> as a last argument to all i18n function calls in <file>\nand prints the modified php file on standard output.\n\nOptions:\n -i Modifies the PHP file in place, instead of printing it to standard output.\n";
fwrite(STDERR, $usage);
@ -110,7 +103,7 @@ if ($included_files[0] == __FILE__) {
if ('-i' == $argv[1]) {
$inplace = true;
if (!isset($argv[3])) $adddomain->usage();
array_shift($argv);
array_shift($argv);
}
$adddomain->process_file($argv[1], $argv[2], $inplace);