Dotclear

Changeset 232


Ignore:
Timestamp:
09/09/08 09:28:58 (15 years ago)
Author:
bruno
Message:

Fixed bug in gal.php + various xhtml validation fixes on admin site

Location:
plugins/gallery
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • plugins/gallery/_prepend.php

    r217 r232  
    3131     $core->url->register('browse','browse','^browser$',array('urlGallery','browse')); 
    3232     */ 
    33      $core->setPostType('gal','plugin.php?p=gallery&m=gal&id=%d',$core->url->getBase('gal').'/%s'); 
    34      $core->setPostType('galitem','plugin.php?p=gallery&m=item&id=%d',$core->url->getBase('galitem').'/%s'); 
     33     $core->setPostType('gal','plugin.php?p=gallery&m=gal&id=%d',$core->url->getBase('gal').'/%s'); 
     34     $core->setPostType('galitem','plugin.php?p=gallery&m=item&id=%d',$core->url->getBase('galitem').'/%s'); 
    3535} 
    3636?> 
  • plugins/gallery/class.dc.gallerylists.php

    r217 r232  
    102102          '<td class="nowrap">'. 
    103103          form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 
    104           '<td class="maximal"><a href="plugin.php?p=gallery&m=gal&id='.$this->rs->post_id.'">'. 
     104          '<td class="maximal"><a href="plugin.php?p=gallery&amp;m=gal&amp;id='.$this->rs->post_id.'">'. 
    105105          html::escapeHTML($this->rs->post_title).'</a></td>'. 
    106106          '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
     
    210210          form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 
    211211          '<td class="nowrap"><img class="img-hideable" src="'.$media->media_icon.'" alt="'.$media->media_title.'" /></td>'. 
    212           '<td class="maximal"><a href="plugin.php?p=gallery&m=item&id='.$this->rs->post_id.'">'. 
     212          '<td class="maximal"><a href="plugin.php?p=gallery&amp;m=item&amp;id='.$this->rs->post_id.'">'. 
    213213          html::escapeHTML($this->rs->post_title).'</a></td>'. 
    214214          '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 
  • plugins/gallery/gal.php

    r217 r232  
    5252$next_link = $prev_link = $next_headlink = $prev_headlink = null; 
    5353 
    54 $gal_headlink = '<link rel="%s" title="%s" href="plugin.php?p=gallery&m=gal&id=%s" />'; 
    55 $gal_link = '<a href="plugin.php?p=gallery&m=gal&id=%s" title="%s">%s</a>'; 
     54$gal_headlink = '<link rel="%s" title="%s" href="plugin.php?p=gallery&amp;m=gal&amp;id=%s" />'; 
     55$gal_link = '<a href="plugin.php?p=gallery&amp;m=gal&amp;id=%s" title="%s">%s</a>'; 
    5656 
    5757 
     
    317317               $core->gallery->refreshGallery($post_id); 
    318318 
    319                http::redirect('plugin.php?p=gallery&m=gal&id='.$post_id.'&upd=1'); 
     319               http::redirect('plugin.php?p=gallery&amp;m=gal&amp;id='.$post_id.'&upd=1'); 
    320320          } 
    321321          catch (Exception $e) 
     
    352352               $core->gallery->refreshGallery($return_id); 
    353353                
    354                http::redirect('plugin.php?p=gallery&m=gal&id='.$return_id.'&crea=1'); 
     354               http::redirect('plugin.php?p=gallery&amp;m=gal&amp;id='.$return_id.'&amp;crea=1'); 
    355355          } 
    356356          catch (Exception $e) 
     
    443443          '<div class="col">'. 
    444444          "<h3>".__('Presentation thumbnail')."</h3>"; 
    445      $change_thumb_url='plugin.php?p=gallery&m=galthumb&gal_id='.$post_id; 
     445     $change_thumb_url='plugin.php?p=gallery&amp;m=galthumb&amp;gal_id='.$post_id; 
    446446     if ($c_media_dir) 
    447           $change_thumb_url .= '&d='.$f_media_dir; 
     447          $change_thumb_url .= '&amp;d='.$f_media_dir; 
    448448 
    449449     if ($has_thumb) { 
     
    454454          echo '<li>'.$gal_thumb->media_dtstr.' - '. files::size($gal_thumb->size).' - '. 
    455455          '<a href="'.$change_thumb_url.'">'.__('Change').'</a>'.'</li></ul>'; 
    456           echo '<li class="media-action"><form action="plugin.php?p=gallery&m=galthumb" method="post">'. 
     456          echo '<li class="media-action"><form action="plugin.php?p=gallery&amp;m=galthumb" method="post">'. 
    457457          '<input type="image" src="images/minus.png" alt="'.__('Remove').'" '. 
    458458          'title="'.__('Remove').'" /> '. 
     
    481481{ 
    482482 
    483      echo '<form action="plugin.php?p=gallery&m=gal" method="post" id="entry-form">'; 
     483     echo '<form action="plugin.php?p=gallery&amp;m=gal" method="post" id="entry-form">'; 
    484484     echo '<div id="entry-sidebar">'; 
    485485      
     
    583583     echo '</fieldset></div>';          // End #entry-content 
    584584     echo '</form>'; 
    585      echo '</div>'; 
     585     //echo '</div>'; 
    586586      
    587587     /*if ($post_id && $post->post_status == 1) { 
  • plugins/gallery/gals.php

    r217 r232  
    240240echo '<div class="multi-part" id="gal_list" title="'.__('Galleries').'">'; 
    241241 
    242 echo '<p><a class="button" href="plugin.php?p=gallery&m=gal">'.__('New gallery').'</a></p>'; 
     242echo '<p><a class="button" href="plugin.php?p=gallery&amp;m=gal">'.__('New gallery').'</a></p>'; 
    243243if (!$show_filters) { 
    244244     echo '<p><a id="filter-control" class="form-control" href="#">'. 
     
    248248echo 
    249249'<form action="plugin.php" method="get" id="filters-form">'. 
    250 '<input type="hidden" name="p" value="gallery" />'. 
    251250'<fieldset><legend>'.__('Filters').'</legend>'. 
    252251'<div class="three-cols">'. 
     
    285284'<p><label class="classic">'. form::field('nb',3,3,$nb_per_page).' '. 
    286285__('Entries per page').'</label></p>'. 
    287 '<p><input type="submit" value="'.__('filter').'" /></p>'. 
     286'<p><input type="hidden" name="p" value="gallery" />'. 
     287'<input type="submit" value="'.__('filter').'" /></p>'. 
    288288'</div>'. 
    289289'</div>'. 
     
    306306     # Show posts 
    307307     $gal_list->display($page,30, 
    308      '<form action="plugin.php?p=gallery&m=galsactions" method="post" id="form-entries">'. 
     308     '<form action="plugin.php?p=gallery&amp;m=galsactions" method="post" id="form-entries">'. 
    309309     '%s'. 
    310310     '<div class="two-cols">'. 
  • plugins/gallery/gals_actions.php

    r217 r232  
    3232     { 
    3333          $redir = 'plugin.php?p=gallery'. 
    34           '&page='.$_POST['page']; 
     34          '&amp;page='.$_POST['page']; 
    3535     } 
    3636      
     
    186186      
    187187     echo 
    188      '<form action="plugin.php?p=gallery&m=galsactions" method="post">'. 
     188     '<form action="plugin.php?p=gallery&amp;m=galsactions" method="post">'. 
    189189     '<p><label class="classic">'.__('Category:').' '. 
    190190     form::combo('new_cat_id',$categories_combo,''). 
     
    203203      
    204204     echo 
    205      '<form action="plugin.php?p=gallery&m=galsactions" method="post">'. 
     205     '<form action="plugin.php?p=gallery&amp;m=galsactions" method="post">'. 
    206206     '<p><label class="classic">'.__('Author ID:').' '. 
    207207     form::field('new_auth_id',20,255). 
  • plugins/gallery/galthumbnail.php

    r217 r232  
    2020$media_id = !empty($_REQUEST['media_id']) ? (integer) $_REQUEST['media_id'] : null; 
    2121$display_page=true; 
    22 $redir = "plugin.php?p=gallery&m=gal&id=".$core->con->escape($gal_id); 
     22$redir = "plugin.php?p=gallery&amp;m=gal&amp;id=".$core->con->escape($gal_id); 
    2323if ($gal_id) { 
    2424     $gal = $core->gallery->getGalleries(array('post_id'=>$gal_id)); 
     
    6060$type = !empty($_GET['type']) ? $_GET['type'] : ''; 
    6161 
    62 $page_url = 'plugin.php?p=gallery&m=galthumb&gal_id='.$gal_id; 
     62$page_url = 'plugin.php?p=gallery&amp;m=galthumb&amp;gal_id='.$gal_id; 
    6363 
    6464try { 
     
    8181<?php 
    8282 
    83 echo '<h2><a href="'.html::escapeURL($page_url.'&d=').'">'.__('Media manager').'</a>'. 
     83echo '<h2><a href="'.html::escapeURL($page_url.'&amp;d=').'">'.__('Media manager').'</a>'. 
    8484' / '.$core->media->breadCrumb(html::escapeURL($page_url).'&amp;d=%s').'</h2>'; 
    8585 
    8686if ($gal_id) { 
    8787     echo '<p><strong>'.sprintf(__('Choose a media to attach to gallery %s by clicking on %s.'), 
    88      '<a href="plugin.php?p=gallery&m=gal&id='.$gal_id.'">'.$post_title.'</a>', 
     88     '<a href="plugin.php?p=gallery&amp;m=gal&amp;id='.$gal_id.'">'.$post_title.'</a>', 
    8989     '<img src="images/plus.png" alt="'.__('Attach this file to entry').'" />').'</strong></p>'; 
    9090} 
     
    162162      
    163163     if ($gal_id && !$f->d) { 
    164           $res .= '<form action="plugin.php?p=gallery&m=galthumb" method="post">'. 
     164          $res .= '<form action="plugin.php?p=gallery&amp;m=galthumb" method="post">'. 
    165165          '<input type="image" src="images/plus.png" alt="'.__('Attach this file to entry').'" '. 
    166166          'title="'.__('Attach this file to entry').'" /> '. 
  • plugins/gallery/item.php

    r217 r232  
    5252$next_link = $prev_link = $next_headlink = $prev_headlink = null; 
    5353 
    54 $item_headlink = '<link rel="%s" title="%s" href="plugin.php?p=gallery&m=item&id=%s" />'; 
    55 $item_link = '<a href="plugin.php?p=gallery&m=item&id=%s" title="%s">%s</a>'; 
     54$item_headlink = '<link rel="%s" title="%s" href="plugin.php?p=gallery&amp;m=item&amp;id=%s" />'; 
     55$item_link = '<a href="plugin.php?p=gallery&amp;m=item&amp;id=%s" title="%s">%s</a>'; 
    5656 
    5757 
     
    220220               /*$core->meta->delPostMeta($post_id,"galmediadir"); 
    221221               $core->meta->setPostMeta($post_id,"galmediadir",$gal_directory);*/ 
    222                http::redirect('plugin.php?p=gallery&m=item&id='.$post_id.'&upd=1'); 
     222               http::redirect('plugin.php?p=gallery&amp;m=item&amp;id='.$post_id.'&upd=1'); 
    223223          } 
    224224          catch (Exception $e) 
     
    238238               $core->meta->setPostMeta($return_id,"galmediadir",$gal_directory); 
    239239                
    240                http::redirect('plugin.php?p=gallery&m=gal&id='.$return_id.'&crea=1'); 
     240               http::redirect('plugin.php?p=gallery&amp;m=gal&amp;id='.$return_id.'&crea=1'); 
    241241          } 
    242242          catch (Exception $e) 
     
    328328     '<div class="col">'. 
    329329     '<h3>'.__('Media').'</h3>'. 
    330      '<p><a href="media_item.php?id='.$media->media_id.'&popup=0">'.__('View associated media').'</a></p>'; 
     330     '<p><a href="media_item.php?id='.$media->media_id.'&amp;popup=0">'.__('View associated media').'</a></p>'; 
    331331 
    332332$img_gals_txt = ($img_gals->count() > 1)?__('This image belongs to %d galleries'):__('This image belongs to %d gallery'); 
     
    339339     echo '<ul>'; 
    340340     while ($img_gals->fetch()) { 
    341           echo '<li><a href="plugin.php?p=gallery&m=gal&id='.$img_gals->post_id.'" alt="'.$img_gals->post_title.'">'.$img_gals->post_title.'</a></li>'; 
     341          echo '<li><a href="plugin.php?p=gallery&amp;m=gal&amp;id='.$img_gals->post_id.'" alt="'.$img_gals->post_title.'">'.$img_gals->post_title.'</a></li>'; 
    342342     } 
    343343     echo '</ul>'; 
     
    354354?> 
    355355<?php 
    356      echo '<form action="plugin.php?p=gallery&m=item" method="post" id="entry-form">'; 
     356     echo '<form action="plugin.php?p=gallery&amp;m=item" method="post" id="entry-form">'; 
    357357     echo '<div id="entry-sidebar">'. 
    358358      
  • plugins/gallery/items.php

    r217 r232  
    284284echo 
    285285'<form action="plugin.php" method="get" id="filters-form">'. 
    286 '<input type="hidden" name="p" value="gallery" />'. 
    287 '<input type="hidden" name="m" value="items" />'. 
    288286'<fieldset><legend>'.__('Filters').'</legend>'. 
    289287'<div class="three-cols">'. 
     
    328326'<p><label class="classic">'. form::field('nb',3,3,$nb_per_page).' '. 
    329327__('Entries per page').'</label></p>'. 
    330 '<p><input type="submit" value="'.__('filter').'" /></p>'. 
     328'<p><input type="hidden" name="p" value="gallery" />'. 
     329'<input type="hidden" name="m" value="items" />'. 
     330'<input type="submit" value="'.__('filter').'" /></p>'. 
    331331'</div>'. 
    332332'</div>'. 
     
    362362          echo '</legend>'. 
    363363          '<h3>'.__('Gallery').' : '.$gal_title[$gal_id]. 
    364           '&nbsp[<a href="plugin.php?p=gallery&m=gal&id='.$gal_id.'">'.__('edit').'</a>]</h3>'. 
     364          '&nbsp[<a href="plugin.php?p=gallery&amp;m=gal&id='.$gal_id.'">'.__('edit').'</a>]</h3>'. 
    365365          '</fieldset>'; 
    366366     } 
     
    368368     # Show posts 
    369369     $gal_list->display($page,$nb_per_page, 
    370      '<form action="plugin.php?p=gallery&m=itemsactions" method="post" id="form-entries">'. 
     370     '<form action="plugin.php?p=gallery&amp;m=itemsactions" method="post" id="form-entries">'. 
    371371     '<p class="col checkboxes-helpers"></p>'. 
    372372     '%s'. 
  • plugins/gallery/items_actions.php

    r217 r232  
    2828     { 
    2929          $redir = 
    30           'plugin.php?p=gallery&m=items&user_id='.$_POST['user_id']. 
    31           '&cat_id='.$_POST['cat_id']. 
    32           '&status='.$_POST['status']. 
    33           '&selected='.$_POST['selected']. 
    34           '&month='.$_POST['month']. 
    35           '&lang='.$_POST['lang']. 
    36           '&sortby='.$_POST['sortby']. 
    37           '&order='.$_POST['order']. 
    38           '&gal_id='.$_POST['gal_id']. 
    39           '&media_dir='.$_POST['media_dir']. 
    40           '&tag='.$_POST['tag']. 
    41           '&page='.$_POST['page']. 
    42           '&nb='.$_POST['nb']; 
     30          'plugin.php?p=gallery&amp;m=items&amp;user_id='.$_POST['user_id']. 
     31          '&amp;cat_id='.$_POST['cat_id']. 
     32          '&amp;status='.$_POST['status']. 
     33          '&amp;selected='.$_POST['selected']. 
     34          '&amp;month='.$_POST['month']. 
     35          '&amp;lang='.$_POST['lang']. 
     36          '&amp;sortby='.$_POST['sortby']. 
     37          '&amp;order='.$_POST['order']. 
     38          '&amp;gal_id='.$_POST['gal_id']. 
     39          '&amp;media_dir='.$_POST['media_dir']. 
     40          '&amp;tag='.$_POST['tag']. 
     41          '&amp;page='.$_POST['page']. 
     42          '&amp;nb='.$_POST['nb']; 
    4343     } 
    4444      
     
    225225      
    226226     echo 
    227      '<form action="plugin.php?p=gallery&m=itemsactions" method="post">'. 
     227     '<form action="plugin.php?p=gallery&amp;m=itemsactions" method="post">'. 
    228228     '<p><label class="classic">'.__('Category:').' '. 
    229229     form::combo('new_cat_id',$categories_combo,''). 
     
    242242      
    243243     echo 
    244      '<form action="plugin.php?p=gallery&m=itemsactions" method="post">'. 
     244     '<form action="plugin.php?p=gallery&amp;m=itemsactions" method="post">'. 
    245245     '<p><label class="classic">'.__('Author ID:').' '. 
    246246     form::field('new_auth_id',20,255). 
     
    258258     echo 
    259259     '<h2>'.__('Add tags to entries').'</h2>'. 
    260      '<form action="plugin.php?p=gallery&m=itemsactions" method="post">'. 
     260     '<form action="plugin.php?p=gallery&amp;m=itemsactions" method="post">'. 
    261261     '<p><label class="area">'.__('Tags to add:').' '. 
    262262     form::textarea('new_tags',60,3). 
  • plugins/gallery/newitems.php

    r217 r232  
    7171echo '<div class="multi-part" id="new_items" title="'.__('Manage new items').'">'; 
    7272 
    73 echo '<form action="#" method="post" id="actions-form" onSubmit="return false;">'. 
     73echo '<form action="#" method="post" id="actions-form" onsubmit="return false;">'. 
    7474     '<fieldset><legend>'.__('New Items').'</legend>'. 
    7575     '<p><label class="classic">'.__('Media dir:'). 
     
    8989     '<input type="button" id="proceed" value="'.__('proceed').'" />'. 
    9090     '</fieldset></form>'; 
    91      echo '<form action="#" method="post" id="update-form" onSubmit="return false;">'. 
     91     echo '<form action="#" method="post" id="update-form" onsubmit="return false;">'. 
    9292     '<fieldset><legend>'.__('Gallery mass update').'</legend>'. 
    9393     '<p><input type="button" id="proceedgal" value="'.__('Update all galeries').'" /></p>'. 
  • plugins/gallery/options.php

    r217 r232  
    4848     $core->blog->settings->put('gallery_galleries_order',$gallery_galleries_order,'string','Galleries list sort order criteria'); 
    4949     $core->blog->settings->put('gallery_galleries_orderbycat',$gallery_galleries_orderbycat,'boolean','Galleries list group by category'); 
    50      http::redirect('plugin.php?p=gallery&m=options&upd=1'); 
     50     http::redirect('plugin.php?p=gallery&amp;m=options&amp;upd=1'); 
    5151} 
    5252 
     
    7777     $core->blog->settings->put('gallery_new_items_default',$gallery_new_items_default,'string','Default options for new items management'); 
    7878     $defaults=$gallery_new_items_default; 
    79      http::redirect('plugin.php?p=gallery&m=options&upd=1'); 
     79     http::redirect('plugin.php?p=gallery&amp;m=options&amp;upd=1'); 
    8080} elseif (!empty($_POST['save_general'])) { 
    8181     $c_sort = !empty($_POST['galleries_sort'])?$_POST['galleries_sort']:$c_sort; 
     
    9191     $core->blog->settings->put('gallery_galleries_orderbycat',$c_orderbycat,'boolean','Galleries list group by category'); 
    9292     $core->blog->triggerBlog(); 
    93      http::redirect('plugin.php?p=gallery&m=options&upd=1'); 
     93     http::redirect('plugin.php?p=gallery&amp;m=options&amp;upd=1'); 
    9494} elseif (!empty($_POST['save_advanced'])) { 
    9595     $c_gals_prefix = !empty($_POST['galleries_prefix'])?$_POST['galleries_prefix']:$c_gals_prefix; 
     
    101101     $core->blog->settings->put('gallery_image_url_prefix',$c_img_prefix,'string','Images URL prefix'); 
    102102     $core->blog->triggerBlog(); 
    103      http::redirect('plugin.php?p=gallery&m=options&upd=1'); 
     103     http::redirect('plugin.php?p=gallery&amp;m=options&amp;upd=1'); 
    104104} 
    105105 
Note: See TracChangeset for help on using the changeset viewer.

Sites map