Skip to content

Commit

Permalink
more verbose about errors for patrolling on wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Jun 18, 2015
1 parent 258a781 commit 40a698f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions huggle/Localization/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@
<string name="main-page-protect">Protect</string>
<string name="main-page-delete">Delete</string>
<string name="main-page-load">Load</string>
<string name="main-patrol-not-enabled">Patrolling is not enabled on $1</string>
<string name="main-page-restore">Restore this revision</string>
<string name="main-user-info">Show user info</string>
<string name="main-user-ignore">Ignore</string>
Expand Down
6 changes: 6 additions & 0 deletions huggle/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2946,5 +2946,11 @@ void Huggle::MainWindow::on_actionPatrol_triggered()
if (!this->CheckEditableBrowserPage())
return;

if (!this->CurrentEdit->GetSite()->GetProjectConfig()->Patrolling)
{
Syslog::HuggleLogs->ErrorLog(_l("main-patrol-not-enabled", this->CurrentEdit->GetSite()->Name));
return;
}

this->PatrolEdit();
}

0 comments on commit 40a698f

Please sign in to comment.