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()) {
|
if (is_admin()) {
|
||||||
|
@ -73,6 +73,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -548,7 +556,7 @@ if (!class_exists("Owark")) {
|
||||||
|
|
||||||
$output = array();
|
$output = array();
|
||||||
$status = 0;
|
$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);
|
$output, $status);
|
||||||
|
|
||||||
$q = $wpdb->insert("{$wpdb->prefix}owark", array(
|
$q = $wpdb->insert("{$wpdb->prefix}owark", array(
|
||||||
|
|
Loading…
Reference in New Issue