X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FPingback.php;h=c3393bcc1cecb7b780d0f3d5ac8cd51585c700ae;hb=2a000de6a427a02bcee2f35d3296581057ba338f;hp=10d290403937df763f20a3057c334992a0b0cc1c;hpb=bbb705a0b1465725cadccb6da70c1d057b6d1885;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Pingback.php b/includes/Pingback.php index 10d2904039..c3393bcc1c 100644 --- a/includes/Pingback.php +++ b/includes/Pingback.php @@ -72,7 +72,7 @@ class Pingback { * @return bool */ private function checkIfSent() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $sent = $dbr->selectField( 'updatelog', '1', [ 'ul_key' => $this->key ], __METHOD__ ); return $sent !== false; @@ -117,6 +117,9 @@ class Pingback { * * This is public so we can display it in the installer * + * Developers: If you're adding a new piece of data to this, please ensure + * that you update https://www.mediawiki.org/wiki/Manual:$wgPingback + * * @return array */ public function getSystemInfo() { @@ -165,7 +168,7 @@ class Pingback { */ private function getOrCreatePingbackId() { if ( !$this->id ) { - $id = wfGetDB( DB_SLAVE )->selectField( + $id = wfGetDB( DB_REPLICA )->selectField( 'updatelog', 'ul_value', [ 'ul_key' => 'PingBack' ] ); if ( $id == false ) { @@ -202,7 +205,7 @@ class Pingback { * * - * @param data Pingback data as an associative array + * @param array $data Pingback data as an associative array * @return bool true on success, false on failure */ private function postPingback( array $data ) { @@ -225,6 +228,7 @@ class Pingback { * * The schema for the data is located at: * + * @return bool */ public function sendPingback() { if ( !$this->acquireLock() ) {