mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-25 08:23:42 +00:00
Merge pull request #785 from annando/issue-5911
Solves PHP warning "Use of undefined constant"
This commit is contained in:
commit
fdda495f18
1 changed files with 9 additions and 9 deletions
|
@ -203,8 +203,8 @@ function jappixmini_init()
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
$encrypt_func = openssl_public_encrypt;
|
$encrypt_func = 'openssl_public_encrypt';
|
||||||
$decrypt_func = openssl_public_decrypt;
|
$decrypt_func = 'openssl_public_decrypt';
|
||||||
$key = $r[0]["pubkey"];
|
$key = $r[0]["pubkey"];
|
||||||
} else if ($role == "prv") {
|
} else if ($role == "prv") {
|
||||||
$r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
$r = q("SELECT * FROM `contact` WHERE LENGTH(`prvkey`) AND `issued-id`='%s' LIMIT 1", DBA::escape($dfrn_id));
|
||||||
|
@ -212,8 +212,8 @@ function jappixmini_init()
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
$encrypt_func = openssl_private_encrypt;
|
$encrypt_func = 'openssl_private_encrypt';
|
||||||
$decrypt_func = openssl_private_decrypt;
|
$decrypt_func = 'openssl_private_decrypt';
|
||||||
$key = $r[0]["prvkey"];
|
$key = $r[0]["prvkey"];
|
||||||
} else {
|
} else {
|
||||||
killme();
|
killme();
|
||||||
|
@ -606,14 +606,14 @@ function jappixmini_cron(App $a, $d)
|
||||||
$dfrn_id = $contact_row["dfrn-id"];
|
$dfrn_id = $contact_row["dfrn-id"];
|
||||||
if ($dfrn_id) {
|
if ($dfrn_id) {
|
||||||
$key = $contact_row["pubkey"];
|
$key = $contact_row["pubkey"];
|
||||||
$encrypt_func = openssl_public_encrypt;
|
$encrypt_func = 'openssl_public_encrypt';
|
||||||
$decrypt_func = openssl_public_decrypt;
|
$decrypt_func = 'openssl_public_decrypt';
|
||||||
$role = "prv";
|
$role = "prv";
|
||||||
} else {
|
} else {
|
||||||
$dfrn_id = $contact_row["issued-id"];
|
$dfrn_id = $contact_row["issued-id"];
|
||||||
$key = $contact_row["prvkey"];
|
$key = $contact_row["prvkey"];
|
||||||
$encrypt_func = openssl_private_encrypt;
|
$encrypt_func = 'openssl_private_encrypt';
|
||||||
$decrypt_func = openssl_private_decrypt;
|
$decrypt_func = 'openssl_private_decrypt';
|
||||||
$role = "pub";
|
$role = "pub";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ function jappixmini_cron(App $a, $d)
|
||||||
|
|
||||||
// parse answer
|
// parse answer
|
||||||
$answer = json_decode($answer_json);
|
$answer = json_decode($answer_json);
|
||||||
if ($answer->status != "ok") {
|
if (empty($answer->status) || ($answer->status != "ok")) {
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue