File/plugins/unsafe_image_rules/functions.php

Description

Unsafe Image Rules plugin - Functions

The functions and inclusions needed for this plugin to work.

Copyright (c) 1999-2006 The SquirrelMail Project Team Copyright (c) 2008 The NaSMail Project

  • version: $Id: functions.php 1279 2008-04-16 06:30:34Z tokul $
  • license: GNU Public License
Includes
 include_once (SM_PATH.'plugins/unsafe_image_rules/config.php') (line 28)

Initialise the default configuration and, if a configuration file exists, let the configuration file overrule them.

DON'T EDIT THIS FILE TO CONFIGURE THIS PLUGIN! READ "INSTALL" FOR INSTRUCTIONS!

Functions
is_good_unsafe_image_regexp (line 302)

Checks if provided regular expression is valid

  • return: true - good regexp, false = bad regexp
boolean is_good_unsafe_image_regexp (string $regexp)
  • string $regexp: POSIX regular expression
is_in_unsafe_image_rules_list (line 115)

Figure out if the message we're looking matches any details in our list.

boolean is_in_unsafe_image_rules_list (object Message $message)
  • object Message $message
is_unsafe_image_from_address_in_list (line 214)

Given the message and a list of addresses, see if it's from one of those addresses.

boolean is_unsafe_image_from_address_in_list (object Message $message, array $address_list)
  • object Message $message: message object
  • array $address_list: Whitelisted addresses
is_unsafe_image_from_our_id (line 193)

Function to figure out if sender is one of our IDs.

boolean is_unsafe_image_from_our_id (object Message $message)
  • object Message $message
is_unsafe_image_from_sender_in_address_book (line 170)

Function to figure out if sender is in address book.

boolean is_unsafe_image_from_sender_in_address_book (object Message $message)
  • object Message $message
load_unsafe_image_rules (line 270)

Function to load trusted message details

void load_unsafe_image_rules ()
remove_trusted_unsafe_image (line 392)

Removes specified rule

void remove_trusted_unsafe_image (int $id)
  • int $id
unsafe_image_rules_link_array (line 332)
void unsafe_image_rules_link_array ( $array)
  • $array
unsafe_image_rules_link_do (line 339)
void unsafe_image_rules_link_do ()
unsafe_image_rules_link_string (line 316)
void unsafe_image_rules_link_string ( $str)
  • $str
unsafe_image_rules_main_do (line 42)

TODO: Undocumented function.

For some reason, probably backwards compability, "view_unsafe_images" and "view_unsafe_images_match" are passed to other functions using $_GET instead of being defined as global variables.

If "view_unsafe_images" is TRUE, the unsafe images will be displayed. If "view_unsafe_images_match" is TRUE, no link will be displayed in unsafe_image_rules_link_do().

void unsafe_image_rules_main_do ()
unsafe_image_rules_match (line 137)

TODO: Undocumented function.

void unsafe_image_rules_match ( $message,  $where,  $how,  $what)
  • $message
  • $where
  • $how
  • $what
unsafe_image_rules_notice_do (line 406)

Prints notices from add.php on message display

void unsafe_image_rules_notice_do ()
unsafe_image_rules_optpage_register_block_do (line 251)

Register our options section.

void unsafe_image_rules_optpage_register_block_do ()

Documentation generated on Sun, 22 Nov 2009 17:36:34 +0200 by phpDocumentor 1.4.3