public static function htaccess() { if (is_readable(ABSPATH . '/.htaccess') && !wfUtils::isNginx()) { return file_get_contents(ABSPATH . '/.htaccess'); } return ""; }
public static function ajax_checkFalconHtaccess_callback() { if (wfUtils::isNginx()) { return array('nginx' => 1); } $file = wfCache::getHtaccessPath(); if (!$file) { return array('err' => "We could not find your .htaccess file to modify it.", 'code' => wfCache::getHtaccessCode()); } $fh = @fopen($file, 'r+'); if (!$fh) { $err = error_get_last(); return array('err' => "We found your .htaccess file but could not open it for writing: " . $err['message'], 'code' => wfCache::getHtaccessCode()); } return array('ok' => 1); }
<?php if (!wfUtils::isNginx()) { ?> <a href="#" onclick="WFAD.disableDirectoryListing('${id}'); return false;">Fix this issue</a> <?php } ?> <a href="#" onclick="WFAD.updateIssueStatus('${id}', 'delete'); return false;">I have fixed this issue</a> <a href="#" onclick="WFAD.updateIssueStatus('${id}', 'ignoreC'); return false;">Ignore this issue</a> {{/if}} {{if status == 'ignoreC' || status == 'ignoreP'}} <a href="#" onclick="WFAD.updateIssueStatus('${id}', 'delete'); return false;">Stop ignoring this issue</a> {{/if}} </div> <?php if (!wfUtils::isNginx()) { ?> {{if (status == 'new')}} <div class="wfIssueOptions"> <strong style="width: auto;">Manual Fix:</strong> Add <code>Options -Indexes</code> to your .htaccess file. </div> {{/if}} <?php } ?> </div> </div> </script>
public static function htaccess() { $htaccess = wfCache::getHtaccessPath(); if (is_readable($htaccess) && !wfUtils::isNginx()) { return file_get_contents($htaccess); } return ""; }