Changeset 11625
- Timestamp:
- Jul 4, 2011, 5:08:07 PM (13 years ago)
- Location:
- extensions/Copyrights
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/TODO
r11624 r11625 10 10 11 11 === Bugs === 12 - If you create a new copyright with a name that's already used 12 - If you create a new copyright with a name that's already used (fixed??) -
extensions/Copyrights/admin.php
r11268 r11625 50 50 $visible = (isset($_REQUEST['visible']) ? 1 : 0); 51 51 $query = sprintf( 52 ' INSERT INTO %s53 (`name`,`url`,`descr`,`visible`) VALUES54 ("%s","%s","%s",%d)52 'SELECT COUNT(*) 53 FROM %s 54 WHERE `name` = '%s' 55 55 ;', 56 COPYRIGHTS_ADMIN, $name, $url, $descr, $visible); 57 pwg_query($query); 56 COPYRIGHTS_ADMIN, $name); 57 list($counter) = pwg_db_fetch_row(pwg_query($query)); 58 if ($counter != 0) { 59 array_push($page['errors'], l10n('This copyright already exists')); 60 } else { 61 $query = sprintf( 62 'INSERT INTO %s 63 (`name`,`url`,`descr`,`visible`) VALUES 64 ("%s","%s","%s",%d) 65 ;', 66 COPYRIGHTS_ADMIN, $name, $url, $descr, $visible); 67 pwg_query($query); 68 } 58 69 } 59 70
Note: See TracChangeset
for help on using the changeset viewer.