summaryrefslogtreecommitdiff
path: root/lib/deck/rment.php
diff options
context:
space:
mode:
authorroot <root@adnab.me>2014-01-31 16:42:40 +0100
committerroot <root@adnab.me>2014-01-31 16:42:40 +0100
commitb0c23ea84327d48e3a4383fac3e795c2dc0a1215 (patch)
tree625a8f0882815d9442a4ff2ec15a49e669a15ed3 /lib/deck/rment.php
parentcee55b766230837c21453f85e76a921cb5b8b89e (diff)
downloadBits-b0c23ea84327d48e3a4383fac3e795c2dc0a1215.tar.gz
Bits-b0c23ea84327d48e3a4383fac3e795c2dc0a1215.zip
Remove all studying apps code.
Diffstat (limited to 'lib/deck/rment.php')
-rw-r--r--lib/deck/rment.php20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/deck/rment.php b/lib/deck/rment.php
deleted file mode 100644
index c4f86c8..0000000
--- a/lib/deck/rment.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-
-require("lib/markdown.php");
-
-assert_redir(count($args) >= 3, 'deck');
-$cardid = intval($args[2]);
-
-$card = mysql_fetch_assoc(sql(
- "SELECT decks.id AS deckid, decks.owner AS deckowner, decks.name AS deckname, cards.name AS name, cards.text_md AS text, cards.number AS number ".
- "FROM cards LEFT JOIN decks ON decks.id = cards.deck ".
- "WHERE cards.id = $cardid"));
-assert_error($card && $card["deckowner"] == $user['id'],
- "This card does not exist, or you are not allowed to edit it.");
-
-token_validate("Do you really want to delete this card ?", "view-deck-". $card['deckid']);
-sql("DELETE FROM cards WHERE id = $cardid");
-sql("UPDATE cards SET number = number - 1 WHERE number > " . $card['number'] . " AND deck = " . $card['deckid'] . " ORDER BY number ASC");
-sql("UPDATE deck_study SET need_check = 1 WHERE deck = " . $card['deckid']);
-header("Location: view-deck-" . $card['deckid']);
-die();