The eAuction Support Forums
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl
eAuction 1.6.1.x >> Discussion of Functions >> Keeping a copy of reposted items
https://www.everyscript.de/cgi-bin/yabb/YaBB.pl?num=1092610625

Message started by ernestb on 08/16/04 at 00:57:04

Title: Keeping a copy of reposted items
Post by ernestb on 08/16/04 at 00:57:04

I noticed that when you repost a closed item, the original listing that is in the closed folder is deleted.

Is there an easy patch to keep the system from deleting the orginal closed item?

I would like to keep a copy of all listings for future dispute issues.

Thanks,
EB

I also noticed that when you edit an item, the item number changes, should it not stay the same for reference purposes?  Or may be it should change and then  orginal item placed in the closed folder - for posible future reference?


If you change categories the item gets lost even though it is still in the orginal category folder.

???

Title: Re: Keeping a copy of reposted items
Post by Forum Admin on 08/16/04 at 13:19:48


ernestb wrote:
I noticed that when you repost a closed item, the original listing that is in the closed folder is deleted.
Is there an easy patch to keep the system from deleting the orginal closed item?

That's easy but not recommended.
Go to sub proc_new
and search the sub for this lines:

Code:

       if ($form{'FROMPREVIEW'}) {
           $form{'REPOST'} && do {
               unlink "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat" or oops($!);


comment out this line

Code:

           unlink "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat" or oops($!);


it should look like this

Code:

       if ($form{'FROMPREVIEW'}) {
           $form{'REPOST'} && do {
               #unlink "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat" or oops($!);



ernestb wrote:
I also noticed that when you edit an item, the item number changes, should it not stay the same for reference purposes?  Or may be it should change and then  orginal item placed in the closed folder - for posible future reference?


The changed (edited) item is no longer valid - so why should it be stored?


ernestb wrote:
If you change categories the item gets lost even though it is still in the orginal category folder.


The edit problem is a real bug - sorry - my mistake :'(

Goto sub new
and search the sub for this lines:

Code:

print <<EO_HTML if exists $form{'EDIT'};
                   </select>
               </td>
           </tr>
           <tr bgcolor="$config{'colortablebody'}">
               <td valign="middle" nowrap>
                   <input type="hidden" name="EDIT" value="$form{'EDIT'}">


add this line:

Code:

                   <input type="hidden" name="old_cat" value="$form{'category'}">


it should look like this

Code:

print <<EO_HTML if exists $form{'EDIT'};
                   </select>
               </td>
           </tr>
           <tr bgcolor="$config{'colortablebody'}">
               <td valign="middle" nowrap>
               <input type="hidden" name="EDIT" value="$form{'EDIT'}">
               <input type="hidden" name="old_cat" value="$form{'category'}">


Go to sub proc_new
and search the sub for this lines:

Code:
   
       if ($form{'FROMPREVIEW'}) {
           $form{'REPOST'} && do {
               #unlink "$config{'basepath'}$config{'closedir'}/$form{'REPOST'}.dat" or oops($!);
               delete $form{'REPOST'};
           };
           $form{'EDIT'} && do {
               unlink "$config{'basepath'}$form{'CATEGORY'}/$form{'EDIT'}.dat" or oops($!);


edit this line

Code:

               unlink "$config{'basepath'}$form{'CATEGORY'}/$form{'EDIT'}.dat" or oops($!);


it should look like this

Code:

               unlink "$config{'basepath'}$form{'old_cat'}/$form{'EDIT'}.dat" or oops($!);

The eAuction Support Forums » Powered by YaBB 2.2!
YaBB © 2000-2007. All Rights Reserved.