Dotclear


Ignore:
Timestamp:
06/07/09 01:18:20 (15 years ago)
Author:
Moe
Message:

Bloc-Notes 1.0.3 :

  • fixed bug with logins with special characters, personal notes has been moved to (dc_)user (closes #182)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/blocNotes/inc/lib.blocNotes.php

    r1183 r1208  
    3737                
    3838               $set = $core->blog->settings; 
     39                
     40               $notes = $core->con->select('SELECT blocNotes '. 
     41                    'FROM '.$core->prefix.'user '. 
     42                    'WHERE user_id = \''. 
     43                    $core->con->escape($core->auth->userID()).'\'')->f(0); 
    3944 
    4045               echo '<p class="area" id="blocNotes_personal">'. 
     
    4348                    '</label>'. 
    4449                    form::textarea('blocNotes_personal_text',80,5, 
    45                     html::escapeHTML(base64_decode( 
    46                          $set->{'blocNotes_text_'.$core->auth->userID()}), 
    47                     'maximal')). 
     50                    html::escapeHTML($notes),'maximal'). 
    4851                    '</p>'. 
    4952                    '<p class="area" id="blocNotes">'. 
     
    6669               if (isset($_POST['blocNotes_text'])) 
    6770               { 
     71                    # Personal notebook 
     72                    $cur = $core->con->openCursor($core->prefix.'user'); 
     73                    $cur->blocNotes = $_POST['blocNotes_personal_text']; 
     74                    $cur->update('WHERE user_id = \''.$core->con->escape($core->auth->userID()).'\''); 
     75                     
    6876                    $core->blog->settings->setNameSpace('blocnotes'); 
    69                     # Bloc-Notes' text 
    70                     $core->blog->settings->put( 
    71                          'blocNotes_text_'.$core->auth->userID(), 
    72                          base64_encode($_POST['blocNotes_personal_text']),'text', 
    73                          'Bloc-Notes\' personal text',true,true); 
     77                    # Blog-specific notebook 
    7478                    $core->blog->settings->put('blocNotes_text', 
    7579                         base64_encode($_POST['blocNotes_text']),'text', 
Note: See TracChangeset for help on using the changeset viewer.

Sites map