コード例 #1
0
ファイル: parameters.php プロジェクト: jvos/nl.bosqom.server
function parameters_display($params)
{
    message('Paramters');
    foreach ($params as $key => $param) {
        if ('pass' == $key or 'user' == $key) {
            message_save($key . ': (niet zichtbaar)');
            message_display($key . ': ' . $param);
        } else {
            message($key . ': ' . $param);
        }
    }
    if (!input_continue()) {
        exit(0);
    }
}
コード例 #2
0
ファイル: message.php プロジェクト: jvos/nl.bosqom.server
function message($message, $status = 'info')
{
    message_save($message, $status);
    message_display($message, $status);
}
コード例 #3
0
        return;
    }
    foreach (array_keys($result['message']) as $mid) {
        $i++;
        // Load the message.
        $message = message_load($mid);
        $tokens = array('message:field-node-reference:url', 'message:field-node-reference:title');
        $save_message = FALSE;
        foreach ($tokens as $token) {
            // Check that the token is not hard coded.
            if (isset($message->arguments['@{' . $token . '}'])) {
                continue;
            }
            $save_message = TRUE;
            // Creating a hard coded value for the toekn.
            $token_options = message_get_property_values($message, 'data', 'token options');
            $context = array('message' => $message);
            $message->arguments['@{' . $token . '}'] = token_replace('[' . $token . ']', $context, $token_options);
        }
        if ($save_message) {
            $param = array('@mid' => $mid, '@tokens' => implode(' ', $tokens));
            drush_log(dt($mid . '\\ ' . $max . ') Processing the @tokens in the message @mid', $param), 'success');
            // Saving the message and the display message for the user.
            message_save($message);
            // The script taking to much memory. Stop it and display message.
            if (round(memory_get_usage() / 1048576) >= $memory_limit) {
                return drush_set_error('OS_ACTIVITY OUT_OF_MEMORY', dt('Stopped before out of memory. Last message ID was @mid', array('@mid' => $mid)));
            }
        }
    }
}
コード例 #4
0
            case 'delete':
                block_delete($id, generate_link('messages', array('admin' => true)));
                break;
            case 'auth':
                block_auth($id);
                break;
        }
    }
    switch ($_REQUEST['mode']) {
        case 'add':
        case 'edit':
            message_edit($id);
            script_close(false);
            break;
        case 'save':
            message_save($id);
            break;
    }
}
$result = $_CLASS['core_db']->query('SELECT block_id, block_position, block_title, block_starts, block_expires, block_order, block_status FROM ' . BLOCKS_TABLE . '
				WHERE block_position IN (' . BLOCK_MESSAGE_TOP . ', ' . BLOCK_MESSAGE_BOTTOM . ') 
					 ORDER BY block_position, block_order ASC');
$block_position = array(BLOCK_MESSAGE_TOP => 'top', BLOCK_MESSAGE_BOTTOM => 'bottom');
$in_position = false;
$messages = array();
while ($row = $_CLASS['core_db']->fetch_row_assoc($result)) {
    if ($in_position != $row['block_position']) {
        $weigth[$row['block_position']] = $row['block_order'];
        $in_position == $row['block_position'];
    }
    $messages[] = $row;
コード例 #5
0
ファイル: exec.php プロジェクト: jvos/nl.bosqom.server
 public static function message_save($message, $status = 'info')
 {
     message_save($message, $status);
 }