plugins/Gallery.php
changeset 18 c1c398349651
parent 9 ebd7003e73c6
child 26 023a21c8f47c
--- a/plugins/Gallery.php	Sat Nov 24 11:43:34 2007 -0500
+++ b/plugins/Gallery.php	Sat Feb 16 23:07:31 2008 -0500
@@ -10,7 +10,7 @@
 
 global $db, $session, $paths, $template, $plugins; // Common objects
 
-define('GALLERY_VERSION', '0.1b1');
+define('GALLERY_VERSION', '0.1b2');
 
 $magick_path = getConfig('imagemagick_path');
 if ( !file_exists($magick_path) || !is_executable($magick_path) )
@@ -32,6 +32,7 @@
                         img_filename varchar(255) NOT NULL,
                         img_time_upload int(12) NOT NULL DEFAULT 0,
                         img_time_mod int(12) NOT NULL DEFAULT 0,
+                        img_tags longtext DEFAULT NULL,
                         PRIMARY KEY ( img_id )
                       );');
   
@@ -50,6 +51,13 @@
   
   setConfig('gallery_version', GALLERY_VERSION);
 }
+if ( getConfig('gallery_version') == '0.1b1' )
+{
+  $q = $db->sql_query('ALTER TABLE ' . table_prefix . 'gallery ADD COLUMN img_tags longtext DEFAULT NULL');
+  if ( !$q )
+    $db->_die();
+  setConfig('gallery_version', '0.1b2');
+}
 
 require( ENANO_ROOT . '/plugins/gallery/functions.php' );
 require( ENANO_ROOT . '/plugins/gallery/nssetup.php' );