예제 #1
0
 static function isEditPage()
 {
     require_once __DIR__ . '/protect.php';
     return nnProtect::isEditPage();
 }
예제 #2
0
 function protectString($string)
 {
     if (nnProtect::isEditPage()) {
         $string = preg_replace('#(<' . 'form [^>]*(id|name)="(adminForm|postform)".*?</form>)#si', '{nocdn}\\1{/nocdn}', $string);
     }
     if (strpos($string, '{nocdn}') === false || strpos($string, '{/nocdn}') === false) {
         $string = str_replace(array('{nocdn}', '{/nocdn}'), '', $string);
         return array($string);
     }
     $string = str_replace(array('{nocdn}', '{/nocdn}'), '[[CDN_SPLIT]]', $string);
     return explode('[[CDN_SPLIT]]', $string);
 }