dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3a7502
)
respect return value of $article->doWatch() (bug 11135)
author
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 4 Aug 2008 03:37:32 +0000
(
03:37
+0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Mon, 4 Aug 2008 03:37:32 +0000
(
03:37
+0000)
includes/AjaxFunctions.php
patch
|
blob
|
history
diff --git
a/includes/AjaxFunctions.php
b/includes/AjaxFunctions.php
index
327dead
..
6d80b29
100644
(file)
--- a/
includes/AjaxFunctions.php
+++ b/
includes/AjaxFunctions.php
@@
-187,17
+187,21
@@
function wfAjaxWatch($pagename = "", $watch = "") {
if(!$watching) {
$dbw = wfGetDB(DB_MASTER);
$dbw->begin();
- $article->doWatch();
+ $
ok = $
article->doWatch();
$dbw->commit();
}
} else {
if($watching) {
$dbw = wfGetDB(DB_MASTER);
$dbw->begin();
- $article->doUnwatch();
+ $
ok = $
article->doUnwatch();
$dbw->commit();
}
}
+ // Something stopped the change
+ if( isset($ok) && !$ok ) {
+ return '<err#>';
+ }
if( $watch ) {
return '<w#>'.wfMsgExt( 'addedwatchtext', array( 'parse' ), $title->getPrefixedText() );
} else {