[nyphp-talk] PHP5 upgrade and suPHP ?

2008-01-11 Thread mikesz
Hello nyphptalk colleagues, I have a client who has been upgraded to PHP5 and the ISP has also implemented suPHP in the process. The core application that my client is using had/has a write requirement on certain folders that do things like temporary image creation and document generation/storage

Re: [nyphp-talk] Whats the difference between an apostrophe and a quotation

2008-01-11 Thread Donald J Organ IV
his->setRecordStatusId($yourObj->getRecordStatusId()); $this->setRestrictedItemList($restrictedItems); return true; } Once again, this is pseudo-code... Christian -- next part -- An HTML attachment was scrubbed... URL: http://lists.nyphp.org/pipermail/talk/at

Re: [nyphp-talk] Whats the difference between an apostrophe and a quotation

2008-01-11 Thread Ajai Khattri
ord_id) !== true) { > return false; > } > > if (!is_array($restrictedItems = $yourObj->getUnrestrictedItems())) > { > return false; > } > > if ($yourObj->updateUnrestrictedItems(self::ObjectItemStatus) !== > true) { > return fa

[nyphp-talk] Whats the difference between an apostrophe and a quotation

2008-01-11 Thread Jonathan Wagener
his->setRecordStatusId($yourObj->getRecordStatusId()); $this->setRestrictedItemList($restrictedItems); return true; } Once again, this is pseudo-code... Christian -- next part -- An HTML attachment was scrubbed... URL: http://lists.nyphp.org/pipermail/ta

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
On 1/11/08, Daniel Convissor <[EMAIL PROTECTED]> wrote: > I like returning as soon as possible. This clarifies exactly what's > happening. Otherwise you need to read through the whole function. Plus > it dramatically cuts down on the amount of nesting. I think the nesting helps you understand t

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
On 1/11/08, Brian D. <[EMAIL PROTECTED]> wrote: > if ( > $yourObj->loadObjectByRecordId($record_id) > && is_array($restrictedItems = > $yourObj->getUnrestrictedItems() > && $yourObj->updateUnrestrictedItems(self::ObjectItemStatus) > )

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Daniel Convissor
I like returning as soon as possible. This clarifies exactly what's happening. Otherwise you need to read through the whole function. Plus it dramatically cuts down on the amount of nesting. I also try to put the short code bits at the top so you can read it right away and then move on to th

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Brian D.
I actually would go with: loadObjectByRecordId($record_id) && is_array($restrictedItems = $yourObj->getUnrestrictedItems() && $yourObj->updateUnrestrictedItems(self::ObjectItemStatus) ) { $this->setRecordStatusId($yourObj->getRecordStatusId()

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
On 1/11/08, Tod Dailey <[EMAIL PROTECTED]> wrote: > When I'm writing a function that returns a Boolean that indicates that the > given process failed or Verse inline returns, such as "if > ($condition !== true) return false;" that builds a list of failure by > exception. Hi Tod, I don't think it

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Tod Dailey
That's part of the reason I'm asking here, as the replies I've received weren't that informative. I've heard that method #1 is a left-over practice from C/Java programmers, and isn't necessary with PHP (??). I've also heard the argument that returning inline values is faster, and easier to see exac

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Ben Sgro
Hello, Word, I immediately feel version 2 is easier to understand. Yeah you can't check the result, but you could step through with a debugger and then check the *result* $result just adds extra complexity; no need to copy the value and then return it. Just return it at the first point you ca

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread David Krings
Tod Dailey wrote: The validity of one of my coding practices that I've used for awhile has recently come under question. I've tried to listen to arguments on both sides, and there seems to be good points on both ends, but my question still hasn't been answered to my satisfaction. I use versio

[nyphp-talk] Question about explicit returns

2008-01-11 Thread Tod Dailey
The validity of one of my coding practices that I've used for awhile has recently come under question. I've tried to listen to arguments on both sides, and there seems to be good points on both ends, but my question still hasn't been answered to my satisfaction. When I'm writing a function that re

Re: [nyphp-talk] Namespaces

2008-01-11 Thread John Campbell
Namespaces are supposed to be analogous to folders in the file system. Folders are how we prevent file name collisions, and namespaces are how we prevent function/classname collisions. If you have a bunch of files that might have the same names as an existing file, then you just create a new fold

Re: [nyphp-talk] re: Problem with MySQL UPDATE syntax - Update

2008-01-11 Thread David Krings
Tony Furnivall wrote: Certainly my fault - but the gripe about the extremely useless syntax message stands! I agree that those error messages are really worth improving. MySQL knows exactly why it failed, it may not be able to determine the exact spot, but missing quotes or a mistyped command a

Re: [nyphp-talk] Namespaces

2008-01-11 Thread Jake McGraw
UDDI is trying to do the same thing (with limited success, I've only looked at their Web Services registration)... check out: http://en.wikipedia.org/wiki/Universal_Description_Discovery_and_Integration Additionally, if you'd like to release software that won't have a namespace conflict, purchase

[nyphp-talk] re: Problem with MySQL UPDATE syntax - Update

2008-01-11 Thread Tony Furnivall
Yitzchak suggested adding a quote to delimit a value - and it turns out the solution was equally trivial. I'm using a whole load of copied lines to build the query string, and each one (one/field) had a comma at the end. I didn't notice it, buried in the clutter, until I started adding a \n t

Re: [nyphp-talk] Namespaces

2008-01-11 Thread Jim Hendricks
When Palm opened up the platform for 3rd party programming, they created a registration page for the database type id's. This allowed for global registration which would eliminate namespace collissions so long as programmers registered the id's they were using prior to distro. Don't know how

Re: [nyphp-talk] Namespaces

2008-01-11 Thread Kenneth Downs
David Krings wrote: Thank you for the great explanation. It triggers yet another question: What to do if two namespaces are identical? Doesn't that end up to be the same problem? And if one changes the namespace for one, doesn't that require to change code referencing functions and classes f

Re: [nyphp-talk] WYSIWYG editors

2008-01-11 Thread Néstor
Urb, Perhaps you can comeback and gives us recap of what you find out and what you have decide to go with and why. :-) On Jan 10, 2008 5:32 PM, Urb LeJeune <[EMAIL PROTECTED]> wrote: > Thanks to all who responded to my request for suggestions on > WYSIWYG editors. > > Urb > > Dr. Urban A. LeJeu

Re: [nyphp-talk] Problem with MySQL UPDATE syntax

2008-01-11 Thread Yitzchak Schaffer
Did you copy that query directly? You're missing a quote to close value3. Yitzchak Schaffer Systems Librarian Touro College Libraries 33 West 23rd Street New York, NY 10010 Tel (212) 463-0400 x230 Fax (212) 627-3197 [EMAIL PROTECTED] Tony Furnivall wrote: Hi! I'm having a problem with the UP

[nyphp-talk] Problem with MySQL UPDATE syntax

2008-01-11 Thread Tony Furnivall
Hi! I'm having a problem with the UPDATE syntax for MySQL (aside - I hate products that tell me I have a syntax problem, but don't tell me what it is - and then suggest that I go RTFM which is equally uninformative:-() I'm replacing the entire set of fields, WHERE a condition exists for so

Re: [nyphp-talk] Namespaces

2008-01-11 Thread David Krings
Kenneth Downs wrote: Namespaces are an organizing mechanism, usually associated with classes. Think: Class::functions as Namespaces::classes So let's begin with functions. David Krings writes a nifty function called "ValidateEmail()" and puts in a library. Then Ken Downs writes the sa

Re: [nyphp-talk] Namespaces

2008-01-11 Thread Kenneth Downs
Namespaces are an organizing mechanism, usually associated with classes. Think: Class::functions as Namespaces::classes So let's begin with functions. David Krings writes a nifty function called "ValidateEmail()" and puts in a library. Then Ken Downs writes the same function in a diffe

Re: [nyphp-talk] Joomla and SE Friendly URLs

2008-01-11 Thread Gary Mort
Well, first off as the local organizer for the NYC Joomla User Group, I'd point you over to the Joomla mailling list also sponsored and maintained by NYPHP(you can subscribe to it from their site). As to your question, SEF in the Joomla world works in 1 of 2 ways: 1) The ugly way. Using nativ