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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.