X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Upgrade made easy (https://forum.x-cart.com/showthread.php?t=4653)

funkydunk 10-07-2003 01:41 AM

Upgrade made easy
 
The biggest fall down in upgrading is the time to set file permissions - this will make it easier.

change skin1/admin/main/patch_apply.tpl to:

Code:

{include file="location.tpl" last_location="Applying patch"}
{capture name=dialog}
{if $patch_type eq "upgrade" and $patch_phase ne "upgrade_final"}



CHECKING PATCH EXECUTABLE...



{$patch_exe.patch_exe} ...
{if $patch_exe.status eq "OK"}
[<font color="green">OK</font>]
{else}
[<font color="red">{$patch_exe.status}</font>]
{/if}


</P>
CHECKING UPGRADE PATCH INTEGRITY...



{section name=result_line loop=$integrity_result}
{$integrity_result[result_line].filename} ...
{if $integrity_result[result_line].status eq "OK"}
[<font color="green">OK</font>]
{else}
[<font color="red">{$integrity_result[result_line].status}</font>]
{/if}


{/section}
</P>



{/if}
{if $patch_type eq "text" or ($patch_type eq "upgrade" and $patch_phase ne "upgrade_final")}
CHECKING WRITE PERMISSIONS...



{section name=file loop=$all_files_to_patch}
{$all_files_to_patch[file].filename} ...
{if $all_files_to_patch[file].status eq "OK"}
[<font color="green">OK</font>]
{else}
[<font color="red">{$all_files_to_patch[file].status}</font>]
{/if}


{/section}



IMPORTANT: It is recommended to backup these files.



{if !empty($files_to_patch)}
<FONT color=red>BEFORE YOU CONTINUE PLEASE SET WRITE PERMISSIONS ON FOLLOWING FILES</FONT>

Copy this contents below and paste (right-click)into ssh whilst you are within the xcart directory
<textarea cols=60 rows=10>
{section name=file loop=$files_to_patch}
chmod 666 {$files_to_patch[file]}
{/section}
</textarea>
{/if}
{/if}
{if $confirm_patch ne "" and $patch_phase ne "upgrade_final"}
<FORM action="patch.php" method=POST>
<INPUT type=hidden name=mode value={$smarty.post.mode}>
Patch text:

<TEXTAREA cols=60 rows=10>{$patch_text|escape:"htmlall"}</TEXTAREA>



<INPUT type=hidden name=patch_filename value="{$patch_filename}">
<INPUT type=hidden name=reverse value="{$reverse}">
<INPUT type=hidden name=confirmed value=Y>
<INPUT type=button value="<< Go back" onClick="history.go(-1)">


<INPUT type=submit value="Continue >>">
</FORM>
{/if}
{if !empty($files_to_patch)}
Note:
After applying a patch please set the original permissions on changed files.
{elseif $smarty.post.confirmed ne ""}



APPLYING THE PATCH...
{if $patch_phase eq "upgrade_final"}



{section name=file loop=$patch_files}
{$patch_files[file].orig_file} ... [{$patch_files[file].status}]

{/section}



PATCH RESULTS...



{section name=line loop=$patch_result}
{$patch_result[line]}

{/section}



PATCH LOG...



{section name=line loop=$patch_log}
{$patch_log[line]}

{/section}
{else}



{section name=line loop=$patch_result}
{$patch_result[line]}

{/section}
{/if}
<FORM action="patch.php" method=get>
<INPUT type=submit value="Finish >>">
</FORM>
{/if}
{/capture}
{include file="dialog.tpl" title="Applying patch" content=$smarty.capture.dialog
 extra="width=100%"}



This will then produce a nice easy section in a text area to cut and paste into ssh or telnet or ftp manager to set all the file permissions in one go.

lildawg 10-07-2003 10:06 AM

Thanks for the great ap.

jpsowin 10-07-2003 10:38 AM

You da man!
I normally just 777 the whole skin files, then set them back real quick. This is better ;)

adpboss 10-07-2003 02:32 PM

What FTP application would you guys recommend using with this?

I use WS FTP Pro but I can't figure out how to paste a whack of CHMOD commands in.

FYI, I'm a Windows user.

funkydunk 10-07-2003 02:41 PM

i use this with ssh (putty) to linux servers from a win xp pro.

not sure about ftp for this - can do this in cute ftp by defining a custom command then running

adpboss 10-07-2003 03:25 PM

Forgive my ignorance.

What is Putty?

DogByteMan 10-07-2003 03:37 PM

It's sort of like a user interface for SSH. Kind of like a FTP client program.

jpsowin 10-07-2003 04:05 PM

you can only use puTTY if you have SSH/Telnet access to the server... which I would always recommend getting a host where you have that. X-Cart would be a nightmare for me if I didn't have shell access! ;)

dealsondeals 10-07-2003 06:43 PM

:D Sweet! I really like this one. Keep up the good work!

groovico 10-07-2003 06:49 PM

:D That's class that is, kudos funky!


All times are GMT -8. The time now is 04:11 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.