Changeset 4094
- Timestamp:
- Wed Nov 16 15:11:00 2005
- Files:
-
- trunk/campsite/implementation/management/priv/lang/en/templates.php (modified) (diff)
- trunk/campsite/implementation/management/priv/templates/do_del.php (modified) (diff)
- trunk/campsite/implementation/management/priv/templates/do_edit.php (modified) (diff)
- trunk/campsite/implementation/management/priv/templates/do_upload_templ.php (modified) (diff)
- trunk/campsite/implementation/management/classes/Template.php (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/campsite/implementation/management/priv/lang/en/templates.php
r3953 r4094 51 51 regGS("Duplicate file", "Duplicate file"); 52 52 regGS("Delete file", "Delete file"); 53 regGS("Unable to save the template '$1' to the path '$2'.", "Unable to save the template '$1' to the path '$2'."); 54 regGS("Please check if the user '$1' has permission to write in this directory.", "Please check if the user '$1' has permission to write in this directory."); 55 regGS("Unable to delete the template '$1' in the path '$2'.", "Unable to delete the template '$1' in the path '$2'."); 53 56 ?> -
trunk/campsite/implementation/management/priv/templates/do_del.php
r4081 r4094 42 42 } 43 43 else { 44 $errorMsgs[] = getGS("The template could not be deleted."); 44 $errorMsgs[] = getGS("Unable to delete the template '$1' in the path '$2'.", $Name, $Path) . " " 45 . getGS("Please check if the user '$1' has permission to write in this directory.", $Campsite['APACHE_USER']); 45 46 } 46 47 } else { 58 59 $crumbs[] = array(getGS("Configure"), ""); 59 60 $crumbs[] = array(getGS("Templates"), "/$ADMIN/templates/"); 60 $crumbs = array_merge($crumbs, camp_template_path_crumbs($ path));61 $crumbs = array_merge($crumbs, camp_template_path_crumbs($Path)); 60 61 if ($What == 1) { 61 62 $crumbs[] = array(getGS("Deleting template"), ""); -
trunk/campsite/implementation/management/priv/templates/do_edit.php
r4078 r4094 26 26 $filename = Template::GetFullPath($Path, $Name); 27 27 $result = false; 28 if ($handle = fopen($filename, 'w')) { 28 if (@$handle = fopen($filename, 'w')) { 28 28 $result = fwrite($handle, $nField); 29 29 fclose($handle); 30 } else { 31 $result = 0; 30 32 } 31 33 32 if ( ($nField == 0) || ($result > 0)) {34 if ($result > 0) { 32 34 $logtext = getGS('Template $1 was changed', $Path."/".$Name); 33 35 Log::Message($logtext, $User->getUserName(), 113); 34 36 header("Location: /$ADMIN/templates/edit_template.php?Path=".urlencode($Path)."&Name=".urlencode($Name)); 37 exit; 38 } else { 39 $errMsg = getGS("Unable to save the template '$1' to the path '$2'.", $Name, $Path) . " " 40 . getGS("Please check if the user '$1' has permission to write in this directory.", $Campsite['APACHE_USER']); 35 41 } 36 42 $crumbs = array(); 37 43 $crumbs[] = array(getGS("Configure"), ""); 38 44 $crumbs[] = array(getGS("Templates"), "/$ADMIN/templates/"); 39 $crumbs = array_merge($crumbs, camp_template_path_crumbs($ path));45 $crumbs = array_merge($crumbs, camp_template_path_crumbs($Path)); 39 45 $crumbs[] = array(getGS("Edit template"), ""); 40 46 echo camp_html_breadcrumbs($crumbs); 54 60 <TR> 55 61 <TD COLSPAN="2"> 56 <BLOCKQUOTE> <LI><?php putGS('The template could not be saved'); ?></LI> </BLOCKQUOTE>62 <BLOCKQUOTE> <LI><?php echo $errMsg; ?></LI> </BLOCKQUOTE> 56 62 </TD> 57 63 </TR> -
trunk/campsite/implementation/management/priv/templates/do_upload_templ.php
r4077 r4094 2 2 3 3 require_once($_SERVER['DOCUMENT_ROOT']. "/$ADMIN_DIR/templates/template_common.php"); 4 require_once($Campsite['HTML_DIR']."/$ADMIN_DIR/templates/lib_upload.php");5 4 6 5 list($access, $User) = check_basic_access($_REQUEST); … … 38 37 header("Location: /$ADMIN/templates?Path=" . urlencode($Path)); 39 38 exit; 39 } else { 40 $errMsg = getGS("Unable to save the template '$1' to the path '$2'.", $File_name, $Path) . " " 41 . getGS("Please check if the user '$1' has permission to write in this directory.", $Campsite['APACHE_USER']); 40 42 } 41 43 57 59 </TR> 58 60 <TR> 59 <TD COLSPAN="2"><BLOCKQUOTE><LI><?php p($ FSresult)?> </LI> </BLOCKQUOTE></TD>61 <TD COLSPAN="2"><BLOCKQUOTE><LI><?php p($errMsg)?> </LI> </BLOCKQUOTE></TD> 59 61 </TR> 60 62 <TR> -
trunk/campsite/implementation/management/classes/Template.php
r4054 r4094 282 282 283 283 $origFile = $newname.".orig"; 284 $renok = move_uploaded_file($fileName, $origFile); 284 @$renok = move_uploaded_file($fileName, $origFile); 284 284 if ($renok == false){ 285 285 return false;