Ignore:
Timestamp:
May 31, 2011, 4:08:12 PM (13 years ago)
Author:
Mattias
Message:

Several bugfixes in admin.php, admin.tpl and main.inc.php, concerning the "Invalid URL - plugin copyrights not active"

Also it shows "N/A" at the picture information when there is no copyright for that picture.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Copyrights/image.php

    r11084 r11143  
    3131                <td class="label">Copyright</td>
    3232                <td class="value">
     33                        {if $CR_INFO_NAME}
    3334                        <a target="_blanc" href="{$CR_INFO_URL}" title="{$CR_INFO_NAME}">{$CR_INFO_NAME}</a>
     35                        {else}N/A{/if}
    3436                </td>
    3537        </tr>
     
    5658                $query = '
    5759                  select name, url
    58                   FROM '.$prefixeTable.'copyrights_admin NATURAL JOIN '.$prefixeTable.'copyrights_media
     60                  FROM '.COPYRIGHTS_ADMIN.' NATURAL JOIN '.COPYRIGHTS_MEDIA.'
    5961                  WHERE media_id = '.$page['image_id'].'
     62                  AND visible = 1
    6063                  ;';
    6164                $result = pwg_query($query);
    6265                $row = mysql_fetch_array($result);
    63                 $name = $row['name'];
    64                 $url = $row['url'];
     66                //if(count($row) > 0)
     67                //{
     68                        $name = $row['name'];
     69                        $url = $row['url'];
     70                //}
    6571                       
    6672                // Sending data to the template
Note: See TracChangeset for help on using the changeset viewer.