Open
Description
While looking into #123 I came across kalatheme_has_write_access() and kalatheme_lib_dir()
These functions seem a little fuzzy to me and I have questions for @pirog or anyone who knows better.
function kalatheme_has_write_access() {
return is_writable(drupal_realpath(kalatheme_lib_dir())) && is_writable(drupal_realpath('sites/all/modules'));
}
Why do we ever need to check if the modules dir is writable? What are we writing to the modules dir and why? My understanding was that if your module's dir is writable you got some serious security problems...
function kalatheme_lib_dir() {
return is_dir('sites/all/libraries') ? 'sites/all/libraries' : 'sites/all';
}
Seems a little hard coded and sledge hammery to me. Panopoly includes the libraries module which can tell us where the libraries dir is. At worst it's probably a site var anyway. Is there a reason we're not doing that?