Changeset 2923 for trunk/admin/extend_for_templates.php
- Timestamp:
- Dec 6, 2008, 3:28:54 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/extend_for_templates.php
r2712 r2923 103 103 'tags.tpl' => 'tags', 104 104 'upload.tpl' => 'upload',); 105 $flip_templates = array_flip($eligible_templates); 105 106 $flip_templates = array_flip($eligible_templates); 107 108 $available_templates = array_merge( 109 array('N/A' => '----------'), 110 get_dirs(PHPWG_ROOT_PATH.'template')); 111 106 112 // +-----------------------------------------------------------------------+ 107 113 // | selected templates | … … 119 125 $url_keyword = $_POST['url'][$i]; 120 126 if ($url_keyword == '----------') $url_keyword = 'N/A'; 127 $bound_tpl = $_POST['bound'][$i]; 128 if ($bound_tpl == '----------') $bound_tpl = 'N/A'; 121 129 if ($handle != 'N/A') 122 130 { 123 $replacements[$newtpl] = array($handle, $url_keyword );131 $replacements[$newtpl] = array($handle, $url_keyword, $bound_tpl); 124 132 } 125 133 $i++; … … 151 159 foreach ($new_extensions as $file) 152 160 { 153 $tpl_extension[$file] = array('N/A', 'N/A' );161 $tpl_extension[$file] = array('N/A', 'N/A', 'N/A'); 154 162 } 155 163 … … 168 176 $handle = $conditions[0]; 169 177 $url_keyword = $conditions[1]; 178 $bound_tpl = $conditions[2]; 170 179 { 171 180 $template->append('extents', 172 181 array( 173 'replacer' => $file, 174 'url_parameter' => $relevant_parameters, 175 'original_tpl' => array_keys($eligible_templates), 176 'selected_tpl' => $flip_templates[$handle], 177 'selected_url' => $url_keyword,) 182 'replacer' => $file, 183 'url_parameter' => $relevant_parameters, 184 'original_tpl' => array_keys($eligible_templates), 185 'bound_tpl' => $available_templates, 186 'selected_tpl' => $flip_templates[$handle], 187 'selected_url' => $url_keyword, 188 'selected_bound' => $bound_tpl,) 178 189 ); 179 190 }
Note: See TracChangeset
for help on using the changeset viewer.