Jump to content

Recommended Posts

Posted

Just like the title says, what does this mean?

// Copy the admin.php template over the old one
echo wire('config')->paths->siteModules . 'ProcessAdminCustomPages/admin.php' . '||' . wire('config')->paths->templates . 'admin.php';
//exit;
copy ( wire('config')->paths->siteModules . 'ProcessAdminCustomPages/admin.php', wire('config')->paths->templates . 'admin.php');

got this from ProcessAdminCustomPages module. I understand the copy() part. I'm not sure what the echo part is for.

Posted

Strange. Usually in the command line the double-pipe has a meaning like, "if the first part didn't work, do this next part." So like, "succeed at doing A, OR do B."

Posted

I know.. I'm just making sure that the echo part isn't needed for the call to copy() - which I don't think is, but just want to make sure

Posted

I am sure that it is a line of debug code that diogo was using to check those paths. Note the: //exit on the next line. If you uncomment that, then the echo line will show the from and to paths which are about to be copied.

In other words, that line does nothing and the || are just his means of separating the two paths - nothing to do with the PHP "OR" operator.

  • Like 1
Posted

That's right, notice that this is a string. But that part of the code was written by Pete, credit is given in the code ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...