Changeset 11619


Ignore:
Timestamp:
07/04/11 13:49:42 (8 years ago)
Author:
J.Commelin
Message:

Fixed the smarty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Copyrights/batch_single.php

    r11615 r11619  
    3737function CR_add_bsm_vars_to_template() 
    3838{ 
    39         //global $page, $template, $prefixeTable; 
    40  
    41         // Show block only on the photo page 
    42         //if ( !empty($page['image_id']) )    
    43         //{ 
    44                 // Sending data to the template 
    45                 //$template->assign( 
    46                 //array ( 
    47                 //'CR_TEST' => 'TEST' 
    48                 //              )); 
    49         //} 
     39  // set template variables ($CRoptions) 
     40  global $template; 
     41  load_language('plugin.lang', dirname(__FILE__).'/'); 
     42  // Fetch all the copyrights and assign them to the template 
     43  $query = sprintf( 
     44    'SELECT `cr_id`,`name` 
     45    FROM %s 
     46    WHERE `visible`<>0 
     47    ;', 
     48  COPYRIGHTS_ADMIN); 
     49  $result = pwg_query($query); 
     50  $CRoptions = array(); 
     51  while ($row = pwg_db_fetch_assoc($result)) { 
     52    $CRoptions[$row['cr_id']] = $row['name']; 
     53  } 
     54  $template->assign('CRoptions', $CRoptions); 
    5055} 
    5156 
Note: See TracChangeset for help on using the changeset viewer.