Commit 65638824 authored by stimpy's avatar stimpy

added semaphore function

parent c583a0f9
......@@ -106,8 +106,10 @@
if ( $echo == 'netmail' ) {
echo $jam->saveMessage( $echos[$echo]['filename'], $user['realname'], $fromaka, $receivername, $receiveraka, $subject, time(), time(), time(), $message, $domain, $replyid, array( 'MSG_LOCAL', 'MSG_PRIVATE', 'MSG_TYPENET' ) );
if ( $cfg['semaphores']['netscan'] != false ) touch( $cfg['semaphores']['netscan'] );
} else {
echo $jam->saveMessage( $echos[$echo]['filename'], $user['realname'], $fromaka, $receivername, false, $subject, time(), time(), time(), $message, $domain, $replyid );
if ( $cfg['semaphores']['echoscan'] != false ) touch( $cfg['semaphores']['echoscan'] );
}
} else {
echo -1;
......
......@@ -18,6 +18,11 @@
// url path to your webJAM installation (e.G: /webJAM/ or just /)
$cfg['urlbase'] = '/';
// full path and filename of semaphore (flag) files to create when new messages are saved.
// absolute or relative to urlbase or set to false to disable
$cfg['semaphores']['netscan'] = 'data/flags/netscan';
$cfg['semaphores']['echoscan'] = false;
// User configuration
// 1st array key is the username used for login.
// realname = Name used as sender name.
......
......@@ -116,3 +116,10 @@
unset( $username );
}
$message_headers = false;
if ( !array_key_exists( 'semaphores', $cfg ) ) {
$cfg['semaphores']['echoscan'] = false;
$cfg['semaphores']['netscan'] = false;
}
if ( !array_key_exists( 'echoscan', $cfg['semaphores'] ) ) $cfg['semaphores']['echoscan'] = false;
if ( !array_key_exists( 'netscan', $cfg['semaphores'] ) ) $cfg['semaphores']['netscan'] = false;
\ No newline at end of file
......@@ -106,8 +106,10 @@
if ( $echo == 'netmail' ) {
echo $jam->saveMessage( $echos[$echo]['filename'], $user['realname'], $fromaka, $receivername, $receiveraka, $subject, time(), time(), time(), $message, $domain, $replyid, array( 'MSG_LOCAL', 'MSG_PRIVATE', 'MSG_TYPENET' ) );
if ( $cfg['semaphores']['netscan'] != false ) touch( $cfg['semaphores']['netscan'] );
} else {
echo $jam->saveMessage( $echos[$echo]['filename'], $user['realname'], $fromaka, $receivername, false, $subject, time(), time(), time(), $message, $domain, $replyid );
if ( $cfg['semaphores']['echoscan'] != false ) touch( $cfg['semaphores']['echoscan'] );
}
} else {
echo -1;
......
......@@ -13,6 +13,9 @@
$cfg['theme'] = 'light'; // can be "light" or "dark";
$cfg['urlbase'] = '/dev/website_jamreader/src/';
$cfg['semaphores']['netscan'] = 'data/flags/netscan';
$cfg['semaphores']['echoscan'] = 'data/flags/echoscan';
$cfg['users'] = array( 'stimpy' => array( 'realname' => 'Philipp Giebel',
'aliases' => array( 'stimpy' ),
......
......@@ -18,6 +18,11 @@
// url path to your webJAM installation (e.G: /webJAM/ or just /)
$cfg['urlbase'] = '/';
// full path and filename of semaphore (flag) files to create when new messages are saved.
// absolute or relative to urlbase or set to false to disable
$cfg['semaphores']['netscan'] = 'data/flags/netscan';
$cfg['semaphores']['echoscan'] = false;
// User configuration
// 1st array key is the username used for login.
// realname = Name used as sender name.
......
......@@ -116,3 +116,10 @@
unset( $username );
}
$message_headers = false;
if ( !array_key_exists( 'semaphores', $cfg ) ) {
$cfg['semaphores']['echoscan'] = false;
$cfg['semaphores']['netscan'] = false;
}
if ( !array_key_exists( 'echoscan', $cfg['semaphores'] ) ) $cfg['semaphores']['echoscan'] = false;
if ( !array_key_exists( 'netscan', $cfg['semaphores'] ) ) $cfg['semaphores']['netscan'] = false;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment