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
escape tags and entity in doxygen comments
[lhc/web/wiklou.git]
/
includes
/
EditPage.php
diff --git
a/includes/EditPage.php
b/includes/EditPage.php
index
6e6f825
..
1376d57
100644
(file)
--- a/
includes/EditPage.php
+++ b/
includes/EditPage.php
@@
-756,7
+756,7
@@
class EditPage {
} elseif ( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {
# Watch creations
$this->watchthis = true;
} elseif ( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {
# Watch creations
$this->watchthis = true;
- } elseif ( $
this->mTitle->userIsWatching(
) ) {
+ } elseif ( $
wgUser->isWatched( $this->mTitle
) ) {
# Already watched
$this->watchthis = true;
}
# Already watched
$this->watchthis = true;
}
@@
-1470,7
+1470,7
@@
class EditPage {
*/
protected function commitWatch() {
global $wgUser;
*/
protected function commitWatch() {
global $wgUser;
- if ( $
this->watchthis xor $this->mTitle->userIsWatching(
) ) {
+ if ( $
wgUser->isLoggedIn() && $this->watchthis != $wgUser->isWatched( $this->mTitle
) ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->begin( __METHOD__ );
if ( $this->watchthis ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->begin( __METHOD__ );
if ( $this->watchthis ) {
@@
-2414,7
+2414,16
@@
HTML
'</div>' );
}
'</div>' );
}
+ /**
+ * Get the copyright warning
+ *
+ * Renamed to getCopyrightWarning(), old name kept around for backwards compatibility
+ */
protected function getCopywarn() {
protected function getCopywarn() {
+ return self::getCopyrightWarning( $this->mTitle );
+ }
+
+ public static function getCopyrightWarning( $title ) {
global $wgRightsText;
if ( $wgRightsText ) {
$copywarnMsg = array( 'copyrightwarning',
global $wgRightsText;
if ( $wgRightsText ) {
$copywarnMsg = array( 'copyrightwarning',
@@
-2425,7
+2434,7
@@
HTML
'[[' . wfMsgForContent( 'copyrightpage' ) . ']]' );
}
// Allow for site and per-namespace customization of contribution/copyright notice.
'[[' . wfMsgForContent( 'copyrightpage' ) . ']]' );
}
// Allow for site and per-namespace customization of contribution/copyright notice.
- wfRunHooks( 'EditPageCopyrightWarning', array( $t
his->mT
itle, &$copywarnMsg ) );
+ wfRunHooks( 'EditPageCopyrightWarning', array( $title, &$copywarnMsg ) );
return "<div id=\"editpage-copywarn\">\n" .
call_user_func_array( "wfMsgNoTrans", $copywarnMsg ) . "\n</div>";
return "<div id=\"editpage-copywarn\">\n" .
call_user_func_array( "wfMsgNoTrans", $copywarnMsg ) . "\n</div>";
@@
-2983,8
+2992,8
@@
HTML
* failure, etc).
*
* @todo This doesn't include category or interlanguage links.
* failure, etc).
*
* @todo This doesn't include category or interlanguage links.
- * Would need to enhance it a bit, <s>maybe wrap them in XML
- * or something...</s> that might also require more skin
+ * Would need to enhance it a bit,
"
<s>maybe wrap them in XML
+ * or something...</s>
"
that might also require more skin
* initialization, so check whether that's a problem.
*/
function livePreview() {
* initialization, so check whether that's a problem.
*/
function livePreview() {