src Standards

This basically completes coding standards changes for the entire src directory, with the exception of App.php
This commit is contained in:
Adam Magness 2017-11-23 14:01:58 -05:00
commit 609a4de5d0
15 changed files with 370 additions and 338 deletions

View file

@ -440,7 +440,7 @@ function dfrn_confirm_post(App $a, $handsfree = null) {
if ((isset($new_relation) && $new_relation == CONTACT_IS_FRIEND)) {
if (($contact) && ($contact['network'] === NETWORK_DIASPORA)) {
$ret = Diaspora::send_share($user[0],$r[0]);
$ret = Diaspora::sendShare($user[0],$r[0]);
logger('share returns: ' . $ret);
}

View file

@ -175,7 +175,7 @@ function dfrn_notify_post(App $a) {
*we got a key. old code send only the key, without RINO version.
* we assume RINO 1 if key and no RINO version
*/
$data = DFRN::aes_decrypt(hex2bin($data), $final_key);
$data = DFRN::aesDecrypt(hex2bin($data), $final_key);
break;
case 2:
try {

View file

@ -68,12 +68,12 @@ function fetch_init(App $a)
}
$user = $r[0];
$status = Diaspora::build_status($item[0], $user);
$xml = Diaspora::build_post_xml($status["type"], $status["message"]);
$status = Diaspora::buildStatus($item[0], $user);
$xml = Diaspora::buildPostXml($status["type"], $status["message"]);
// Send the envelope
header("Content-Type: application/magic-envelope+xml; charset=utf-8");
echo Diaspora::build_magic_envelope($xml, $user);
echo Diaspora::buildMagicEnvelope($xml, $user);
killme();
}

View file

@ -985,7 +985,7 @@ function item_post(App $a) {
// Store the comment signature information in case we need to relay to Diaspora
Diaspora::store_comment_signature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
Diaspora::storeCommentSignature($datarray, $author, ($self ? $user['prvkey'] : false), $post_id);
} else {
$parent = $post_id;

View file

@ -58,8 +58,8 @@ function p_init($a){
}
$user = $r[0];
$status = Diaspora::build_status($item[0], $user);
$xml = Diaspora::build_post_xml($status["type"], $status["message"]);
$status = Diaspora::buildStatus($item[0], $user);
$xml = Diaspora::buildPostXml($status["type"], $status["message"]);
header("Content-Type: application/xml; charset=utf-8");
echo $xml;

View file

@ -49,14 +49,14 @@ function receive_post(App $a) {
}
logger('mod-diaspora: message is in the new format', LOGGER_DEBUG);
$msg = Diaspora::decode_raw($importer, $postdata);
$msg = Diaspora::decodeRaw($importer, $postdata);
} else {
logger('mod-diaspora: decode message in the old format', LOGGER_DEBUG);
$msg = Diaspora::decode($importer, $xml);
if ($public && !$msg) {
logger('mod-diaspora: decode message in the new format', LOGGER_DEBUG);
$msg = Diaspora::decode_raw($importer, $xml);
$msg = Diaspora::decodeRaw($importer, $xml);
}
}
@ -72,7 +72,7 @@ function receive_post(App $a) {
$ret = true;
if ($public) {
Diaspora::dispatch_public($msg);
Diaspora::dispatchPublic($msg);
} else {
$ret = Diaspora::dispatch($importer, $msg);
}