diff --git a/owark.php b/owark.php index 80a5c54..6378fc6 100644 --- a/owark.php +++ b/owark.php @@ -43,7 +43,7 @@ if (!class_exists("Owark")) { * * */ - function Owark() { + public function __construct() { if (is_admin()) { @@ -75,6 +75,14 @@ if (!class_exists("Owark")) { } + function Owark() + { + // PHP4-style constructor. + // This will NOT be invoked, unless a sub-class that extends `foo` calls it. + // In that case, call the new-style constructor to keep compatibility. + self::__construct(); + } + /** * Check we have everything we need... * @@ -548,7 +556,7 @@ if (!class_exists("Owark")) { $output = array(); $status = 0; - exec("wget -t3 -E -H -k -K -p -nd -nv --timeout=60 --user-agent=\"Mozilla/5.0 (compatible; owark/0.1; http://owark.org/)\" -P $path {$url->final_url}", + exec("wget -t3 -E -H -k -K -p -nd -nv --timeout=60 --user-agent=\"Mozilla/5.0 (compatible; owark/0.2; http://owark.org/)\" -P $path {$url->final_url}", $output, $status); $q = $wpdb->insert("{$wpdb->prefix}owark", array(