PHP7 constructor syntax
This commit is contained in:
parent
885867e065
commit
4d62124a03
12
owark.php
12
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(
|
||||
|
|
Loading…
Reference in New Issue