HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

I sometimes edit my comcode pages by hand

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#4399 (In Topic #909)
Avatar

Fan in training

I sometimes edit my comcode pages by hand

This mod stops me from getting a chmod warning when editing a comcode page from within ocportal.

In sources/support.php at line 693:

Code

function fix_permissions($path,$perms=0666)
{
   if (fileowner(get_file_base().'/index.php')!=fileowner($path))
   {
    @chmod($path,$perms);
   } else
   {
    if ($perms==0666) @chmod($path,0644);
    elseif ($perms==0777) @chmod($path,0744);
   }
}

Changes:
All I did was put an '@' before each chmod function, to silence any errors or warnings.

Edit: fixed filename and added line number
Back to the top
 
Posted
Rating:
#4439
Avatar

ocStaff (admin)

I'll incorporate this idea :).



Become a fan of ocPortal on Facebook or add me as a friend.

Expand: Was I helpful? Was I helpful?

Expand: Follow me on Twitter Follow me on Twitter







If I answered something that you think should be in the documentation, please take the initiative and add it to the community documentation. We really need people to help out here and build a well-organised large support resource.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: