Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-04 19:51:56

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Hidden/pending file downloads

Should the file_download portion of publish.php check the status of the file before serving it? As it stands, simply changing the file number in the address bar to /file_download/id-of-a-hidden-or-pending-file delivers the file to the browser. Is this a feature I haven’t quite figured a use for yet?

It doesn’t look (to my untrained eye) like the latest SVN is any different from 4.0.5 in this regard. If it’s a bugette, should I work out how to use tortoise or trac to submit a patch, or leave it alone for the professionals to look at? ;-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2007-12-04 21:49:30

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Hidden/pending file downloads

Thanks for the report.

Yes, it should – technically it is an oversight, but yes, it should be fixed.

If you don’t know what you’re doing, then yeah, you should probably leave it for someone else to look after.

Offline

#3 2007-12-04 22:47:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Hidden/pending file downloads

OK, thanks for the clarification.

I know I have to get my feet wet with using SVN one day, but perhaps it’s better when I’ve done it on some “unimportant” test files first :-) If one of you don’t mind taking this forward on your already over-burdened shoulders that’d be brilliant. Do I have to lodge this anywhere “official”, or is this thread enough?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2007-12-05 05:55:35

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Hidden/pending file downloads

Thread is enough.

Try r2720.

Offline

#5 2007-12-05 20:04:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Hidden/pending file downloads

Haven’t tested it (must… search.. and learn… how to apply.. changes) but the diff looks like it’ll do the job nicely: excellent. I’ll update smd_remote_file so it’s ready for prime time when the new version hits the shelves.

And making the download issue a proper error page instead of setting a status header that was difficult to action is much better :-) Many thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2007-12-06 04:53:58

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Hidden/pending file downloads

Just learn how to use SVN (see Textbook entries on the subject), then you can easily update and test without having to do any merging yourself.

Offline

#7 2007-12-06 05:34:20

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Hidden/pending file downloads

Stef

svn is pretty easy — there are loads of graphical front-ends for it too. Are you on a Mac or *nix?


Steve

Offline

#8 2007-12-06 08:54:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Hidden/pending file downloads

net-carver wrote:

svn is pretty easy

Yeah, I looked at it before, checked in and out a file or two but I don’t yet feel confident doing it on a project such as TXP until I’ve had a lot more experience with it. I’ll try and dedicate some time to it.

there are loads of graphical front-ends for it too. Are you on a Mac or *nix?

Windoze at the moment, for my sins :-( But I have a couple of Linux machines, an old iMac, and a MacBook I can play with at a push. Wish I could stump up the cash to get a Mac for myself; saw Leopard running last week on a MacBook Pro. Oh. Wow.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2007-12-06 09:22:22

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: Hidden/pending file downloads

Bloke Wrote:

Yeah, I looked at it before, checked in and out a file or two but I don’t yet feel confident doing it on a project such as TXP until I’ve had a lot more experience with it. I’ll try and dedicate some time to it.

Highly recommend you do — you’ll reap a good return from a version control system like this. If you are worried about running a server and if you want to, I’ll host a repository for your plugins on my domain for you — all you’d need then is an SVN client.

As you’re a plugin author, there’s no reason not to use it on your own plugins. Very useful as you get a changelog for free plus other cool features — and you can make it public read-only if you’d like folks to be able to pull down the latest and greatest of your work.

Re: “…doing it on TXP…” AFAIK, you wouldn’t be doing it to the repository. It’s read-only for all; writable for the core team. You can’t check in something that’ll break it so don’t let your lack of experience put you off.

What you can do is check-out a working version, modify it as you need to, and then generate a patch file to send to the dev team. They’ll verify it and submit the changes if it checks out and they think the change is suitable.

Windoze at the moment … But I have a couple of Linux machines, an old iMac, and a MacBook I can play with at a push.

TortoiseSVN client is all you need for Windows and it works just fine. For Linux there are a few, I’m on RapidSVN at the moment and it does the job. For a Mac you could try svnX but I’ve never used a Mac so no idea what it’s like.

Wish I could stump up the cash to get a Mac for myself; saw Leopard running last week on a MacBook Pro. Oh. Wow.

I’m happy enough running Linux (Ubuntu Gutsy) — it’s free. <grin>


Steve

Offline

#10 2007-12-06 20:57:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

Re: Hidden/pending file downloads

net-carver wrote:

if you want to, I’ll host a repository for your plugins on my domain for you

This is probably getting a tad off-topic, but many thanks for the offer. It’ll depend on how much access I have to Apache on my web host (cpanel — probably not a lot of control). I think they still run 1.3 anyway and it looks like an svn server is happier on 2.0.

If I can coax Smoothie into running an http daemon I’ll set up a repository on my firewall instead. If neither of those work I may come knocking, thanks!

Re: “…doing it on TXP…” … It’s read-only for all; writable for the core team.

Sweet, didn’t realise that. Useful to know.

I’ll download some clients and spend some time playing, thanks for the links. I’ve got Gutsy on a partition somewhere. Having been brought up on UNIX at uni and then moving to Linux, it’d my OS of choice if I could run audio apps reliably. I was waiting for Linux to come of age for audio — DeMuDi came closest — but now it looks like PCIe is going to kill off audio for x86 ‘coz virtually no manufacturers are making PCIe audio cards; and the remaining life of the PCI bus is very short :-( Hence the interest in Mac…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2008-01-30 03:14:32

kimguan
Member
Registered: 2004-12-30
Posts: 14

Re: Hidden/pending file downloads

Please excuse this stupid question: does it mean that if I make the changes linked to in post #4 by Mary to my publish.php file, you won’t be able to download files that are not “live”? Making sure that I have a back up of the original, of course :-).

Offline

#12 2008-01-30 20:24:42

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Hidden/pending file downloads

…does it mean that if I make the changes… you won’t be able to download files that are not “live”?

That’s right.

Offline

Board footer

Powered by FluxBB