Dotclear

Changeset 1925 for plugins/blocNotes


Ignore:
Timestamp:
11/30/09 19:14:55 (14 years ago)
Author:
Moe
Message:

Bloc-Notes 1.0.4:

  • fixed bug with PostgreSQL (closes #230)
Location:
plugins/blocNotes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/blocNotes/_define.php

    r1208 r1925  
    2929     /* Description*/    'Display notebooks on the backend', 
    3030     /* Author */        'Moe (http://gniark.net/)', 
    31      /* Version */       '1.0.3', 
     31     /* Version */       '1.0.4', 
    3232     /* Permissions */   'usage,contentadmin' 
    3333); 
  • plugins/blocNotes/_install.php

    r1208 r1925  
    7171} 
    7272 
     73if (version_compare($i_version,'1.0.4','<')) 
     74{ 
     75     # rename blocNotes field to bloc_notes (fix problem with PostgreSQL) 
     76     if ($core->con->driver() == 'pgsql') 
     77     { 
     78          $core->con->execute('ALTER TABLE '.$core->prefix.'user '. 
     79               'RENAME COLUMN blocNotes TO bloc_notes;'); 
     80     } 
     81     else 
     82     { 
     83          $core->con->execute('ALTER TABLE '.$core->prefix.'user '. 
     84               'CHANGE blocNotes bloc_notes TEXT;'); 
     85     } 
     86} 
     87 
    7388# table 
    7489$s = new dbStruct($core->con,$core->prefix); 
    7590  
    76 # add blocNotes column to (dc_)user  
     91# add bloc_notes column to (dc_)user  
    7792$s->user 
    78      ->blocNotes('text',0,true,null) 
     93     ->bloc_notes('text',0,true,null) 
    7994; 
    8095 
  • plugins/blocNotes/inc/lib.blocNotes.php

    r1604 r1925  
    3838               $set = $core->blog->settings; 
    3939                
    40                $notes = $core->con->select('SELECT blocNotes '. 
     40               $notes = $core->con->select('SELECT bloc_notes '. 
    4141                    'FROM '.$core->prefix.'user '. 
    4242                    'WHERE user_id = \''. 
     
    7171                    # Personal notebook 
    7272                    $cur = $core->con->openCursor($core->prefix.'user'); 
    73                     $cur->blocNotes = $_POST['blocNotes_personal_text']; 
     73                    $cur->bloc_notes = $_POST['blocNotes_personal_text']; 
    7474                    $cur->update('WHERE user_id = \''.$core->con->escape($core->auth->userID()).'\''); 
    7575                     
Note: See TracChangeset for help on using the changeset viewer.

Sites map