Changeset 11844 for extensions/Copyrights/image.php
- Timestamp:
- Jul 27, 2011, 8:19:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/image.php
r11794 r11844 56 56 $descr = ''; 57 57 if (count($row) > 0) { 58 // If its the authors default copyright, get the data from the author table, instead of the copyright table 58 59 if ($row['cr_id'] == -1) { 59 $query = sprintf(' 60 SELECT name, url, descr 61 FROM %s 62 WHERE cr_id IN ( 63 SELECT a.copyright 64 FROM '.$prefixeTable.'images i, '.$prefixeTable.'author_extended a 65 WHERE i.id = %d 66 AND i.author = a.name 67 ) 60 // Check if the extended author plugin is active 61 $query = ' 62 SELECT * 63 FROM '.$prefixeTable.'plugins 64 WHERE id=\'Extended_author\' 65 AND state=\'active\' 66 ;'; 67 $result = pwg_query($query); 68 $row = pwg_db_fetch_assoc($result); 69 70 // Only get the authors default copyright when it is active. 71 if (count($row) > 0) { 72 $query = sprintf(' 73 SELECT name, url, descr 74 FROM %s 75 WHERE cr_id IN ( 76 SELECT a.copyright 77 FROM '.$prefixeTable.'images i, '.$prefixeTable.'author_extended a 78 WHERE i.id = %d 79 AND i.author = a.name 80 ) 68 81 ;', 69 82 COPYRIGHTS_ADMIN, $page['image_id']); 70 $result = pwg_query($query); 71 $row = pwg_db_fetch_assoc($result); 83 $result = pwg_query($query); 84 $row = pwg_db_fetch_assoc($result); 85 } 72 86 } 73 87 } 88 // Get the data from the chosen row 74 89 if (count($row) > 0) { 75 90 $name = $row['name'];
Note: See TracChangeset
for help on using the changeset viewer.