Changeset 1030 for trunk/common
- Timestamp:
- 03/03/09 19:23:59 (3 years ago)
- Location:
- trunk/common
- Files:
-
- 2 edited
-
db/textblock.php (modified) (1 diff)
-
security.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/common/db/textblock.php
r997 r1030 72 72 } 73 73 74 // Delete $revision from database 75 // The revision is identified by name and timestamp 76 // $curr is true if $revision is the current revision and false otherwise 77 function textblock_delete_revision($revision, $curr) 78 { 79 if ($curr == false) { 80 $name = $revision['name']; 81 $timestamp = $revision['timestamp']; 82 $query = "DELETE FROM `ia_textblock_revision` 83 WHERE `name` = ".db_quote($name)." && 84 `timestamp` = ".db_quote($timestamp); 85 db_query($query); 86 } else { 87 $name = $revision['name']; 88 $query = "REPLACE INTO `ia_textblock` 89 (SELECT * FROM `ia_textblock_revision` 90 WHERE `name` = ".db_quote($name)." 91 ORDER BY `timestamp` DESC LIMIT 1)"; 92 db_query($query); 93 94 //delete last_rev from ia_textblock_revision 95 $query = "DELETE FROM `ia_textblock_revision` 96 WHERE `name` = ".db_quote($name)." 97 ORDER BY `timestamp` DESC LIMIT 1"; 98 db_query($query); 99 } 100 } 101 74 102 // This is the function called by most query functions. 75 103 function textblock_complex_query($options) -
trunk/common/security.php
r1008 r1030 131 131 case 'round-delete': 132 132 case 'textblock-delete': 133 case 'textblock-delete-revision': 133 134 case 'grader-overwrite': 134 135 case 'grader-delete':
Note: See TracChangeset
for help on using the changeset viewer.
![[infoarena] development](/chrome/site/logo.png)