Quellcode durchsuchen

Use the right environment variables.

pull/24/head
Ben Kurtovic vor 11 Jahren
Ursprung
Commit
e204194875
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen
  1. +1
    -1
      copyvios/cookies.py
  2. +1
    -1
      pages/index.mako
  3. +3
    -3
      pages/settings.mako

+ 1
- 1
copyvios/cookies.py Datei anzeigen

@@ -9,7 +9,7 @@ class _CookieManager(SimpleCookie):
MAGIC = "--cpv2"

def __init__(self, environ):
self._path = path.split(environ["PATH_INFO"])[0]
self._path = path.dirname(environ["SCRIPT_NAME"])
try:
super(_CookieManager, self).__init__(environ["HTTP_COOKIE"])
except (CookieError, KeyError):


+ 1
- 1
pages/index.mako Datei anzeigen

@@ -18,7 +18,7 @@
% endif
<p>This tool attempts to detect <a href="//en.wikipedia.org/wiki/WP:COPYVIO">copyright violations</a> in articles. Simply give the title of the page you want to check and hit Submit. The tool will then search for its content elsewhere on the web and display a report if a similar webpage is found. If you also provide a URL, it will not query any search engines and instead display a report comparing the article to that particular webpage, like the <a href="//toolserver.org/~dcoetzee/duplicationdetector/">Duplication Detector</a>. Check out the <a href="//en.wikipedia.org/wiki/User:EarwigBot/Copyvios/FAQ">FAQ</a> for more information and technical details.</p>
<p><i>Note:</i> The tool is still in beta. You are completely welcome to use it and provide <a href="//en.wikipedia.org/wiki/User_talk:The_Earwig">feedback</a>, but be aware that it may produce strange or broken results.</p>
<form action="${environ['PATH_INFO']}" method="get">
<form action="${environ['SCRIPT_URL']}" method="get">
<table>
<tr>
<td>Site:</td>


+ 3
- 3
pages/settings.mako Datei anzeigen

@@ -9,7 +9,7 @@
% endif
<h1>Settings</h1>
<p>This page contains some configurable options for the copyvio detector. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.</p>
<form action="${environ['PATH_INFO']}" method="post">
<form action="${environ['SCRIPT_URL']}" method="post">
<table>
<tr>
<td>Default site:</td>
@@ -86,7 +86,7 @@
<td><span class="mono">${cookie.value | h}</span></td>
% endtry
<td>
<form action="${environ['PATH_INFO']}" method="post">
<form action="${environ['SCRIPT_URL']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="cookie" value="${key | h}">
<button type="submit">Delete</button>
@@ -96,7 +96,7 @@
% endfor
<tr>
<td>
<form action="${environ['PATH_INFO']}" method="post">
<form action="${environ['SCRIPT_URL']}" method="post">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="all" value="1">
<button type="submit">Delete all</button>


Laden…
Abbrechen
Speichern