Re: Re: Waiting for you?
| From: | afshin.meh@gmail.com | Date: | Tue, 08 Feb 2011 16:13:31 +0000 |
| Subject: | Re: Re: Waiting for you? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54081@lists.php.net to get a copy of this message | ||
Hello Christian,
Look at this please : http://ubuntuone.com/p/cB3/
In my editor I don't have any problem but when I make a patch from that, my
code changed!
I use NetBeans 6.9.
However, this is my new patch, please verify that:
Index: Folders.php
--- Folders.php Remotely Modified (Based On HEAD)
+++ Folders.php Locally Modified (Based On LOCAL)
@@ -515,9 +515,13 @@
//env not set, so try the default directory
$strUser = $this->getUserName();
if ($strUser !== null) {
+ if ($strUser == "root") {
+ $strHome = '/root';
+ } else {
$strHome = '/home/' . $strUser;
}
}
+ }
} else if ($this->sys == SYS_MAC) {
if (isset($_ENV['HOME'])) {
//environment variable set
Sincerely yours.
On Tue, Feb 8, 2011 at 1:15 PM, Christian Weiske <cweiske@cweiske.de> wrote:
> Hello Afshin,
>
>
> > This is my patch after running and fixing:
> >
> > --- Folders.php Remotely Modified (Based On HEAD)
> > +++ Folders.php Locally Modified (Based On LOCAL)
> > @@ -515,9 +515,13 @@
> > //env not set, so try the default directory
> > $strUser = $this->getUserName();
> > if ($strUser !== null) {
> > + if ($strUser == "root") {
> > + $strHome = '/root';
> > + } else {
> > $strHome = '/home/' . $strUser;
> > }
> > }
> > + }
> > } else if ($this->sys == SYS_MAC) {
>
> This is actually not correct since you break indentation levels after
> the else line. please install php_codesniffer; its easy:
> $ pear install php_codesniffer
> $ phpcs Folders.php
>
> Your patch would need to look as follows:
> > //env not set, so try the default directory
> > $strUser = $this->getUserName();
> > if ($strUser !== null) {
> > - $strHome = '/home/' . $strUser;
> > + if ($strUser == "root") {
> > + $strHome = '/root';
> > + } else {
> > + $strHome = '/home/' . $strUser;
> > + }
> > }
> > }
> > } else if ($this->sys == SYS_MAC) {
>
>
>
> --
> Regards/Mit freundlichen Grüßen
> Christian Weiske
>
> -= Geeking around in the name of science since 1982 =-
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>