64 lines
1.9 KiB
Plaintext
64 lines
1.9 KiB
Plaintext
<?php
|
|
/**
|
|
* Turba hooks configuration file.
|
|
*
|
|
* THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM
|
|
* BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM
|
|
* TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
|
|
*
|
|
* For more information please see the horde/config/hooks.php.dist file.
|
|
*
|
|
* $Id: aec06f88d7f4cc0ee7d50555011a4e5935463d43 $
|
|
*/
|
|
|
|
class Turba_Hooks
|
|
{
|
|
/**
|
|
* Called when we store a value.
|
|
*
|
|
* @param string $attribute Attribute name.
|
|
* @param string $new New value.
|
|
* @param string $old Old value.
|
|
* @param Turba_Object $contact Contact object.
|
|
*
|
|
* @return string The encoded value.
|
|
*/
|
|
// public function encode_attribute($attribute, $new, $old, $contact)
|
|
// {
|
|
// switch ($attribute) {
|
|
// case 'password':
|
|
// /* Passwords should be MD5 encoded, but not displayed. */
|
|
// return (is_null($new) || ($new == '') || ($new == '[Not Displayed]'))
|
|
// ? $old
|
|
// : hash('md5', $new);
|
|
// }
|
|
//
|
|
// return $new;
|
|
// }
|
|
|
|
|
|
/**
|
|
* Called when we display a value.
|
|
*
|
|
* @param string $attribute Attribute name.
|
|
* @param mixed $value Attribute value.
|
|
* @param Turba_Object $contact Contact object.
|
|
*
|
|
* @return string The decoded value.
|
|
* @throws Turba_Exception Thrown if there is nothing to decode.
|
|
*/
|
|
// public function decode_attribute($attribute, $value, $contact)
|
|
// {
|
|
// switch ($attribute) {
|
|
// case 'password':
|
|
// /* Passwords should be MD5 encoded, but not displayed. */
|
|
// return (strstr($_SERVER['PHP_SELF'], 'editobject'))
|
|
// ? null
|
|
// : '[Not Displayed]';
|
|
// }
|
|
//
|
|
// throw new Turba_Exception('No decode handler.');
|
|
// }
|
|
|
|
}
|