Re: [PHP] alt() - unknown function?

2009-04-16 Thread Nitsan Bin-Nun
alt sounds like alternator ;)

On Wed, Apr 15, 2009 at 10:00 PM, Paul M Foster wrote:

> On Wed, Apr 15, 2009 at 03:23:19PM +0100, Tom Calpin wrote:
>
> > Hi all,
> >
> > I've just started looking at the code of an e-commerce site we are taking
> > over the development of, that another company has previously developed .
> > Coupled with the difficulty of taking over development of someone else's
> > code (also poorly commented), I've been stumped by a fatal error on a
> > function call alt() which is dotted everywhere in the main templating
> script
> > (sample below):
> >
> > // Get/Set a specific property of a page
> > function getPageProp($prop,$id="") { return
> > $this->PAGES[alt($id,$this->getPageID())][$prop]; }
> > function setPageProp($prop,$val,$id="") {
> > $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
> >
> > It looks to be defining properties for a list of pages, with each page
> > providing its own PageID.
> >
> > I've never seen this function before, nor can I find any definition of it
> in
> > the site code, I was wondering if anyone recognises this, is it from a
> > thirdparty templating tool at all?
>
> It's been suggested you do a thorough search for this function, but the
> fact that PHP isn't finding it in the first place leads me to believe it
> isn't there. If that's the case, I'd suggest you make up your own alt()
> function that does what you think this one is doing (maybe just return
> the passed variable). You'll have to decide where to put it that's
> visible in all the places where it's called.
>
> Paul
>
> --
> Paul M. Foster
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] alt() - unknown function?

2009-04-15 Thread Paul M Foster
On Wed, Apr 15, 2009 at 03:23:19PM +0100, Tom Calpin wrote:

> Hi all,
> 
> I've just started looking at the code of an e-commerce site we are taking
> over the development of, that another company has previously developed .
> Coupled with the difficulty of taking over development of someone else's
> code (also poorly commented), I've been stumped by a fatal error on a
> function call alt() which is dotted everywhere in the main templating script
> (sample below):
> 
> // Get/Set a specific property of a page
> function getPageProp($prop,$id="") { return
> $this->PAGES[alt($id,$this->getPageID())][$prop]; }
> function setPageProp($prop,$val,$id="") {
> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
> 
> It looks to be defining properties for a list of pages, with each page
> providing its own PageID.
> 
> I've never seen this function before, nor can I find any definition of it in
> the site code, I was wondering if anyone recognises this, is it from a
> thirdparty templating tool at all?

It's been suggested you do a thorough search for this function, but the
fact that PHP isn't finding it in the first place leads me to believe it
isn't there. If that's the case, I'd suggest you make up your own alt()
function that does what you think this one is doing (maybe just return
the passed variable). You'll have to decide where to put it that's
visible in all the places where it's called.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] alt() - unknown function?

2009-04-15 Thread Richard Heyes
> grep gets my vote, since i don't use netbeans

I'd go for grep too (unix or Win32):

grep -rin "function alt" *

What's the exact error?

-- 
Richard Heyes

HTML5 Canvas graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.net (Updated April 11th)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] alt() - unknown function?

2009-04-15 Thread Thodoris



This is someplace where NetBeans really benefits me.  You can hit CTRL-B, or
right-click, to take you to a definition.  Holding CTRL turns darned-near
everything into a hyperlink, doing the same thing.

Lastly, CTRL-SHIFT-F lets you search through every file in the project for
your string.

Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
coffee.  :)

On Wed, Apr 15, 2009 at 10:39 AM, Thodoris  wrote:

  

 Hi all,


I've just started looking at the code of an e-commerce site we are taking
over the development of, that another company has previously developed .
Coupled with the difficulty of taking over development of someone else's
code (also poorly commented), I've been stumped by a fatal error on a
function call alt() which is dotted everywhere in the main templating
script
(sample below):

// Get/Set a specific property of a page
function getPageProp($prop,$id="") { return
$this->PAGES[alt($id,$this->getPageID())][$prop]; }
function setPageProp($prop,$val,$id="") {
$this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }

It looks to be defining properties for a list of pages, with each page
providing its own PageID.
I've never seen this function before, nor can I find any definition of it
in
the site code, I was wondering if anyone recognises this, is it from a
thirdparty templating tool at all?

Thanks

-Tom




  

I think that you should check the included files (require, require_once,
include, include_once) in case it is defined somewhere in there. Another
possibility I can think of is to be defined in a framework that you use.

You can check the user and internal functions using the
get_defined_fumctions():

http://us.php.net/manual/en/function.get-defined-functions.php

--
Thodoris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





  


What if it is not defined in your project but somewhere in your include 
path? You could I suppose grep the whole drive if you have time to waste :)


--
Thodoris



Re: [PHP] alt() - unknown function?

2009-04-15 Thread Bastien Koert
On Wed, Apr 15, 2009 at 10:58 AM, George Larson
wrote:

> This is someplace where NetBeans really benefits me.  You can hit CTRL-B,
> or
> right-click, to take you to a definition.  Holding CTRL turns darned-near
> everything into a hyperlink, doing the same thing.
>
> Lastly, CTRL-SHIFT-F lets you search through every file in the project for
> your string.
>
> Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
> coffee.  :)
>
> On Wed, Apr 15, 2009 at 10:39 AM, Thodoris  wrote:
>
> >
> >  Hi all,
> >>
> >> I've just started looking at the code of an e-commerce site we are
> taking
> >> over the development of, that another company has previously developed .
> >> Coupled with the difficulty of taking over development of someone else's
> >> code (also poorly commented), I've been stumped by a fatal error on a
> >> function call alt() which is dotted everywhere in the main templating
> >> script
> >> (sample below):
> >>
> >> // Get/Set a specific property of a page
> >> function getPageProp($prop,$id="") { return
> >> $this->PAGES[alt($id,$this->getPageID())][$prop]; }
> >> function setPageProp($prop,$val,$id="") {
> >> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
> >>
> >> It looks to be defining properties for a list of pages, with each page
> >> providing its own PageID.
> >> I've never seen this function before, nor can I find any definition of
> it
> >> in
> >> the site code, I was wondering if anyone recognises this, is it from a
> >> thirdparty templating tool at all?
> >>
> >> Thanks
> >>
> >> -Tom
> >>
> >>
> >>
> >>
> >
> >
> > I think that you should check the included files (require, require_once,
> > include, include_once) in case it is defined somewhere in there. Another
> > possibility I can think of is to be defined in a framework that you use.
> >
> > You can check the user and internal functions using the
> > get_defined_fumctions():
> >
> > http://us.php.net/manual/en/function.get-defined-functions.php
> >
> > --
> > Thodoris
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

grep gets my vote, since i don't use netbeans

-- 

Bastien

Cat, the other other white meat


Re: [PHP] alt() - unknown function?

2009-04-15 Thread George Larson
This is someplace where NetBeans really benefits me.  You can hit CTRL-B, or
right-click, to take you to a definition.  Holding CTRL turns darned-near
everything into a hyperlink, doing the same thing.

Lastly, CTRL-SHIFT-F lets you search through every file in the project for
your string.

Finding nothing with those, I'd grep the whole stinkin' drive and go grab a
coffee.  :)

On Wed, Apr 15, 2009 at 10:39 AM, Thodoris  wrote:

>
>  Hi all,
>>
>> I've just started looking at the code of an e-commerce site we are taking
>> over the development of, that another company has previously developed .
>> Coupled with the difficulty of taking over development of someone else's
>> code (also poorly commented), I've been stumped by a fatal error on a
>> function call alt() which is dotted everywhere in the main templating
>> script
>> (sample below):
>>
>> // Get/Set a specific property of a page
>> function getPageProp($prop,$id="") { return
>> $this->PAGES[alt($id,$this->getPageID())][$prop]; }
>> function setPageProp($prop,$val,$id="") {
>> $this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }
>>
>> It looks to be defining properties for a list of pages, with each page
>> providing its own PageID.
>> I've never seen this function before, nor can I find any definition of it
>> in
>> the site code, I was wondering if anyone recognises this, is it from a
>> thirdparty templating tool at all?
>>
>> Thanks
>>
>> -Tom
>>
>>
>>
>>
>
>
> I think that you should check the included files (require, require_once,
> include, include_once) in case it is defined somewhere in there. Another
> possibility I can think of is to be defined in a framework that you use.
>
> You can check the user and internal functions using the
> get_defined_fumctions():
>
> http://us.php.net/manual/en/function.get-defined-functions.php
>
> --
> Thodoris
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] alt() - unknown function?

2009-04-15 Thread Thodoris



Hi all,

I've just started looking at the code of an e-commerce site we are taking
over the development of, that another company has previously developed .
Coupled with the difficulty of taking over development of someone else's
code (also poorly commented), I've been stumped by a fatal error on a
function call alt() which is dotted everywhere in the main templating script
(sample below):

// Get/Set a specific property of a page
function getPageProp($prop,$id="") { return
$this->PAGES[alt($id,$this->getPageID())][$prop]; }
function setPageProp($prop,$val,$id="") {
$this->PAGES[alt($id,$this->getPageID())][$prop]=$val; }

It looks to be defining properties for a list of pages, with each page
providing its own PageID. 


I've never seen this function before, nor can I find any definition of it in
the site code, I was wondering if anyone recognises this, is it from a
thirdparty templating tool at all?

Thanks

-Tom


  



I think that you should check the included files (require, require_once, 
include, include_once) in case it is defined somewhere in there. Another 
possibility I can think of is to be defined in a framework that you use.


You can check the user and internal functions using the 
get_defined_fumctions():


http://us.php.net/manual/en/function.get-defined-functions.php

--
Thodoris


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php