Skip to content
Snippets Groups Projects
Commit e0e91b13 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Bugs behoben. Zeitliche Löschung aber noch nicht eingebaut. Das kommt bald.

parent 7ec6c3ac
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
......@@ -38,7 +38,7 @@ class HumanVerification
DB::table('humanverification')->insert(
['id' => $id, 'unusedResultPages' => 1, 'locked' => false, 'updated_at' => now()]
);
$user = DB::table('humanverification')->where($id, $id)->first();
$user = DB::table('humanverification')->where('id', $id)->first();
}else if($user->locked !== "1"){
$unusedResultPages = intval($user->unusedResultPages);
$unusedResultPages++;
......
......@@ -14,10 +14,10 @@ class CreateHumanverificationTable extends Migration
public function up()
{
Schema::create('humanverification', function (Blueprint $table) {
$table->string('id');
$table->string('id')->unique();
$table->integer('unusedResultPages');
$table->boolean('locked');
$table->date('updated_at');
$table->timestamp('updated_at');
});
}
......
......@@ -134,7 +134,25 @@ function clickLog () {
function botProtection () {
$(".result").find("a").click(function(){
$.post('/img/cat.jpg', { mm: $("meta[name=mm]").attr("content")});
var link = $(this).attr("href");
var newtab = false;
if($(this).attr("target") == "_blank"){
newtab = true;
}
$.ajax({
url: '/img/cat.jpg',
type: "post",
data: { mm: $("meta[name=mm]").attr("content")},
timeout: 2000
})
.always(function(){
if(!newtab)
document.location.href = link;
});
if(!newtab)
return false;
else
return true;
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment