dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix undefined $db
[lhc/web/wiklou.git]
/
includes
/
Pingback.php
diff --git
a/includes/Pingback.php
b/includes/Pingback.php
index
10d2904
..
c3393bc
100644
(file)
--- a/
includes/Pingback.php
+++ b/
includes/Pingback.php
@@
-72,7
+72,7
@@
class Pingback {
* @return bool
*/
private function checkIfSent() {
* @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;
$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
*
*
* 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() {
* @return array
*/
public function getSystemInfo() {
@@
-165,7
+168,7
@@
class Pingback {
*/
private function getOrCreatePingbackId() {
if ( !$this->id ) {
*/
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 ) {
'updatelog', 'ul_value', [ 'ul_key' => 'PingBack' ] );
if ( $id == false ) {
@@
-202,7
+205,7
@@
class Pingback {
* <https://github.com/wikimedia/mediawiki-extensions-EventLogging/
* blob/7e5fe4f1ef/includes/EventLogging.php#L32-L74>
*
* <https://github.com/wikimedia/mediawiki-extensions-EventLogging/
* blob/7e5fe4f1ef/includes/EventLogging.php#L32-L74>
*
- * @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 ) {
* @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:
* <https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback>
*
* The schema for the data is located at:
* <https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback>
+ * @return bool
*/
public function sendPingback() {
if ( !$this->acquireLock() ) {
*/
public function sendPingback() {
if ( !$this->acquireLock() ) {