Exemple #1
0
 /**
  * Remove a directory path from the list of ignored paths.
  *
  * @param  string  $directory_path The (full) absolute path of a directory.
  * @return boolean                 TRUE if the directory path was removed to the list, FALSE otherwise.
  */
 public static function unignore_directory($directory_path = '')
 {
     $cache = new SucuriScanCache('ignorescanning');
     // Use the checksum of the directory path as the cache key.
     $cache_key = md5($directory_path);
     $removed = $cache->delete($cache_key);
     return $removed;
 }
 public static function unblock($users = array())
 {
     if (is_array($users) && !empty($users)) {
         $cache = new SucuriScanCache('blockedusers');
         $blocked = $cache->getAll();
         foreach ($users as $user) {
             $cache_key = md5($user);
             if (array_key_exists($cache_key, $blocked)) {
                 $cache->delete($cache_key);
             }
         }
     }
 }