Dotclear

Changeset 2000:c0c919d87d02


Ignore:
Timestamp:
09/22/13 11:44:04 (12 years ago)
Author:
Dsls
Branch:
default
Message:

Keep pages checked after update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/list.php

    r1999 r2000  
    2626          { 
    2727               $pager = new dcPager($page,$this->rs_count,$nb_per_page,10); 
    28                 
     28               $entries = array(); 
     29               if (isset($_REQUEST['entries'])) { 
     30                    foreach ($_REQUEST['entries'] as $v) { 
     31                         $entries[(integer)$v]=true; 
     32                    } 
     33               }               
    2934               $html_block = 
    3035               '<table class="maximal dragable"><thead><tr>'. 
     
    5055               while ($this->rs->fetch()) 
    5156               { 
    52                     echo $this->postLine($count); 
     57                    echo $this->postLine($count,isset($entries[$this->rs->post_id])); 
    5358                    $count ++; 
    5459               } 
     
    6065     } 
    6166      
    62      private function postLine($count) 
     67     private function postLine($count,$checked) 
    6368     { 
    6469          $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 
     
    101106          '<td class="nowrap handle minimal">'.form::field(array('order['.$this->rs->post_id.']'),2,3,$count+1,'position','',false,'title="'.sprintf(__('position of %s'),html::escapeHTML($this->rs->post_title)).'"').'</td>'. 
    102107          '<td class="nowrap">'. 
    103           form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>'. 
     108          form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable(),'title="'.__('Select this page').'"').'</td>'. 
    104109          '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 
    105110          html::escapeHTML($this->rs->post_title).'</a></td>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map