Changeset 7290 for extensions
- Timestamp:
- Oct 20, 2010, 10:08:06 AM (14 years ago)
- Location:
- extensions/gvideo/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/gvideo/admin/add_page.php
r7286 r7290 99 99 array_push($page['errors'], l10n('py_error2'), l10n('py_error3')); 100 100 } 101 elseif (!preg_match('/^[a-zA-Z0-9-_.]+$/', $_POST['pywaie_add_name']))102 {103 array_push($page['errors'], l10n('update_wrong_dirname_info'));104 }105 101 else 106 102 { … … 127 123 list($dbnow) = pwg_db_fetch_row(pwg_query('SELECT NOW();')); 128 124 129 $video['name'] = str_replace(" ", "_", $_POST['pywaie_add_name']); 130 $file_name = $video['name'].'.'.$video['ext']; 125 $file_name = str2url($_POST['pywaie_add_name']).'.'.$video['ext']; 131 126 132 127 // prepare database registration 133 128 $insert = array( 129 'name' => $_POST['pywaie_add_name'], 134 130 'file' => $file_name, 135 131 'date_available' => $dbnow, 136 132 ); 137 133 138 $optional_fields = array('author', ' name', 'comment');134 $optional_fields = array('author', 'comment'); 139 135 foreach ($optional_fields as $field) 140 136 { … … 313 309 'PYWAIE_ADD_W' => $_POST['pywaie_add_w'], 314 310 'PYWAIE_ADD_H' => $_POST['pywaie_add_h'], 315 'NAME' => $_POST['name'],316 311 'AUTHOR' => $_POST['author'], 317 312 'COMMENT' => $_POST['comment'])); -
extensions/gvideo/admin/add_page.tpl
r7284 r7290 21 21 <tr> 22 22 <td></td> 23 <td>{' py_filename'|@translate} *</td>23 <td>{'Name'|@translate} *</td> 24 24 <td> 25 25 <input type="text" size="55" maxlength="50" value="{$PYWAIE_ADD_NAME}" name="pywaie_add_name"/></td> … … 112 112 <tr> 113 113 <td></td> 114 <td>{'Name'|@translate}</td>115 <td> 116 <input type="text" size="30" name="name" value="{$NAME}" /></td>117 </tr>118 <tr>119 <td></td>120 114 <td>{'Author'|@translate}</td> 121 115 <td>
Note: See TracChangeset
for help on using the changeset viewer.