Changeset 12192


Ignore:
Timestamp:
Sep 20, 2011, 8:11:51 PM (9 years ago)
Author:
Mattias
Message:

Fixed a small bug with single quotes in the copyright name
and some very small things

Location:
extensions/Copyrights
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Copyrights/TODO

    r11876 r12192  
    66=== Bugs ===
    77-       We don't check if the CR url has 'http://' (or is this a TODO?)
    8 - Maybe: Cancel buttons in Admin Panel
     8-       Maybe: Cancel buttons in Admin Panel
  • extensions/Copyrights/admin.php

    r11794 r12192  
    33// | Piwigo - a PHP based picture gallery                                  |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
  • extensions/Copyrights/admin.tpl

    r11678 r12192  
    1616        <tr>
    1717          <td>{'Name'|@translate}</td>
    18           <td><input type='text' name='name' id='name' value='{$CRname}' /></td>
     18          <td><input type='text' name='name' id='name' value='{$CRname|escape}' /></td>
    1919        </tr>
    2020        <tr>
    2121          <td>{'URL'|@translate}</td>
    22           <td><input type='text' name='url'  id='url'  value='{$CRurl}' /></td>
     22          <td><input type='text' name='url'  id='url'  value='{$CRurl|escape}' /></td>
    2323        </tr>
    2424        <tr>
  • extensions/Copyrights/index.php

    r11292 r12192  
    33// | Piwigo - a PHP based picture gallery                                  |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
  • extensions/Copyrights/main.inc.php

    r11876 r12192  
    22/*
    33Plugin Name: Copyrights
    4 Version: 1.1.1
     4Version: 1.2.a
    55Description: Create copyrights and assign them to your photos.
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=537
     
    1111// | Piwigo - a PHP based picture gallery                                  |
    1212// +-----------------------------------------------------------------------+
    13 // | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
     13// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
    1414// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    1515// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
  • extensions/Copyrights/maintain.inc.php

    r11844 r12192  
    33// | Piwigo - a PHP based picture gallery                                  |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2008-2009 Piwigo Team                  http://piwigo.org |
     5// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
    66// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
    77// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
     
    2323
    2424function plugin_install() {
    25   global $conf, $prefixeTable;
    26   $query = "
    27     CREATE TABLE IF NOT EXISTS ".$prefixeTable."copyrights_admin (
    28       cr_id int(11) NOT NULL AUTO_INCREMENT,
    29       name varchar(255) UNIQUE NOT NULL,
    30       url varchar(255) NOT NULL,
    31       descr text DEFAULT NULL,
    32       visible bool DEFAULT 0,
    33       PRIMARY KEY (cr_id)
    34     ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8
    35     ;";
    36   pwg_query($query);
     25        global $prefixeTable;
     26        $query = '
     27                CREATE TABLE IF NOT EXISTS '.$prefixeTable.'copyrights_admin (
     28                        cr_id int(11) NOT NULL AUTO_INCREMENT,
     29                        name varchar(255) UNIQUE NOT NULL,
     30                        url varchar(255) NOT NULL,
     31                        descr text DEFAULT NULL,
     32                        visible bool DEFAULT 0,
     33                        PRIMARY KEY (cr_id)
     34                ) ENGINE=MyISAM DEFAULT CHARACTER SET utf8
     35                ;';
     36        pwg_query($query);
    3737
    38   $query = "
    39     CREATE TABLE IF NOT EXISTS ".$prefixeTable."copyrights_media (
     38  $query = '
     39    CREATE TABLE IF NOT EXISTS '.$prefixeTable.'copyrights_media (
    4040      media_id int(11) NOT NULL,
    4141      cr_id int(11) NOT NULL,
    4242      PRIMARY KEY (media_id)
    4343    ) ENGINE = MyISAM DEFAULT CHARACTER SET utf8
    44     ;";
     44    ;';
    4545  pwg_query($query);
    4646}
     
    6262  global $prefixeTable;
    6363
    64   $query = "
    65     DROP TABLE ".$prefixeTable."copyrights_admin
    66     ;";
     64  $query = '
     65    DROP TABLE '.$prefixeTable.'copyrights_admin
     66    ;';
    6767  pwg_query($query);
    6868
    69   $query = "
    70     DROP TABLE ".$prefixeTable."copyrights_media
    71     ;";
     69  $query = '
     70    DROP TABLE '.$prefixeTable.'copyrights_media
     71    ;';
    7272  pwg_query($query);
    7373}
Note: See TracChangeset for help on using the changeset viewer.