Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#97 2008-11-25 14:04:29

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

changeset 3016
Filenames should be preserved as much as possible now. It strips potentially harmful or illegal characters, but no longer attempts to create filenames that are free of url-encoded characters (the user can still do this himself by supplying an URL-friendly filename).

Offline

#98 2008-11-25 14:14:26

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

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

ruud wrote:

Filenames should be preserved as much as possible now.

Good move, thanks… except I used that handy sanitizeForFile() function a few times in one of my upcoming plugins, and now the function’s been dropped… dammit!

No bother, I’ll just have to duplicate the regexes you’ve used inline in r3016 instead.

EDIT: unless you fancy putting those two lines inside a new sanitizeForFile() function so we have an official mechanism for dumbing down filenames… :-)

Last edited by Bloke (2008-11-25 16:53:05)


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

#99 2008-11-25 16:46:41

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

… just a little typo in textpattern.css:
fieldset { …
border: 1px solid #ddd;;
}

;~)

Offline

#100 2008-11-25 17:21:57

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

Danke, Welt gerettet.

Offline

#101 2008-11-25 17:27:00

funtoosh
Member
From: Münster, Germany
Registered: 2006-10-09
Posts: 153
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

mit den kleinen dingen muss man anfangen.
it’s all about the little things.

Offline

#102 2008-11-25 19:58:48

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

Robert, confirmed that I overwrote the txp_images table by mistake, which resulted in many images not showing in the Images tab. ;-)

Offline

#103 2008-11-25 21:53:08

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

Not sure if this qualifies as 4.0.7 feedback per se…

I have a fix for the asy_jpcache plugin that allows it to respect 404 status returned by Textpattern. However, the plugin needs a way to learn that Textpattern has returned a 404 status code. The simplest and cleanest method I have devised involves a one-line addition to function txp_status_header in file txplib_misc.php to send a custom header that can be read by the plugin as follows. Would it be possible to add this in to the 4.0.7 release?

function txp_status_header($status='200 OK')
	{
		header("Txp-Status: $status");
		if (IS_FASTCGI)
			header("Status: $status");
		elseif ($_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.0')
			header("HTTP/1.0 $status");
		else
			header("HTTP/1.1 $status");
	}

Offline

#104 2008-11-25 23:05:46

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

^^ It’s far too late to change something like that now.

Offline

#105 2008-11-25 23:29:54

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

ruud wrote:

^^ It’s far too late to change something like that now.

I suspected so. Will submit a patch to the dev list.

Offline

#106 2008-11-26 05:47:39

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

artagesw wrote:

However, the plugin needs a way to learn that Textpattern has returned a 404 status code. The simplest and cleanest method I have devised involves a one-line addition to function txp_status_header in file txplib_misc.php to send a custom header that can be read by the plugin as follows.

I’d rather use an established core-to-plugin channel (register_callback() / callback_event()).

Offline

#107 2008-11-26 15:03:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

Hmm… I’d first like to see why exactly the plugin requires the HTTP header and if the status information isn’t available in some global variable (I’d expect it to be there), because this appears to be not about triggering an action, but about avoiding something.

Offline

#108 2008-11-26 18:33:48

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Feedback to: Help us test the release candidate for the upcoming 4.0.7

The new to 4.0.7 advanced admin preference value SMTP “From:” header value requires an entry for its pop up Textpattern Help window. Something like:

Adding a SMTP “From:” header value for php() mail.

TXP uses the php() mail function to send mail, such as user name and password notifications, from a web site. As PHP 5 becomes more widely deployed, an increasing number of hosting companies, require additional ‘From:’ information to be present in the email header generated by php() mail. Enter a valid email address in the box here, eg me@mymail.com, to add it, prefaced by an ‘-f switch’, as fourth additional parameter to the php() mail function mail($to,$subject,$message,$additional_headers,$additional_parameters) to meet this requirement. $additional_parameters would become -fme@mymail.com and permit the message to be handled by the hosts’ email servers without being blocked or delayed. The box may be left blank if the arrangement is not required by the hosting company.

Last edited by joebaich (2008-11-26 18:41:21)

Offline

Board footer

Powered by FluxBB