Ignore:
Timestamp:
11/02/09 23:31:49 (10 years ago)
Author:
ddtddt
Message:

[extensions] meta - Correction bug:1227 - feature:1128 - add description FR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/meta/maintain.inc.php

    r3978 r4174  
    22 
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
     4 
     5$majm='meta 2.0.5'; 
    46 
    57function plugin_install() 
     
    2729    pwg_query($q); 
    2830         
    29                 $q = ' 
     31        $q = ' 
    3032INSERT INTO ' . $prefixeTable . 'meta(id,metaname,metaval,metatype)VALUES (4,"robots","follow","name");'; 
    3133    pwg_query($q); 
    3234 
    33         $q = ' 
    34 ALTER TABLE '. CATEGORIES_TABLE.' ADD COLUMN `metaKeywords` VARCHAR( 255 )';     
    35     pwg_query($q); 
     35if (!defined('meta_img_TABLE')) define('meta_img_TABLE', $prefixeTable.'meta_img'); 
     36        $query = "CREATE TABLE IF NOT EXISTS ". meta_img_TABLE ." ( 
     37id SMALLINT( 5 ) UNSIGNED NOT NULL , 
     38metaKeyimg VARCHAR( 255 ) NOT NULL , 
     39PRIMARY KEY (id))DEFAULT CHARSET=utf8;"; 
     40        $result = pwg_query($query); 
     41 
     42if (!defined('meta_cat_TABLE')) define('meta_cat_TABLE', $prefixeTable.'meta_cat');      
     43        $query = "CREATE TABLE IF NOT EXISTS ". meta_cat_TABLE ." ( 
     44id SMALLINT( 5 ) UNSIGNED NOT NULL , 
     45metaKeycat VARCHAR( 255 ) NOT NULL , 
     46PRIMARY KEY (id))DEFAULT CHARSET=utf8;"; 
     47        $result = pwg_query($query); 
    3648         
     49        $query = 'INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) VALUES ("'.$majm.'",1,"MAJ meta");'; 
     50    pwg_query($query);   
    3751} 
    3852 
     
    4458    pwg_query($q); 
    4559 
    46         $q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="meta" LIMIT 1;'; 
     60        $q = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="'.$majm.'" LIMIT 1;'; 
    4761    pwg_query($q); 
    4862         
    49         $q = ' ALTER TABLE '. CATEGORIES_TABLE .' DROP COLUMN `metaKeywords`'; 
    50         pwg_query( $q ); 
     63        $q = 'DROP TABLE ' . $prefixeTable . 'meta_img;'; 
     64    pwg_query($q); 
     65 
     66        $q = 'DROP TABLE ' . $prefixeTable . 'meta_cat;'; 
     67    pwg_query($q); 
    5168} 
    5269 
Note: See TracChangeset for help on using the changeset viewer.