if (Util::nonInputVar('js_vars')) {
echo '<script type="text/javascript">//<![CDATA[' . "\n" .
- 'var Chora = ' . Horde_Serialize::serialize($js_vars, SERIALIZE_JSON, NLS::getCharset()) . ";\n//]]></script>\n";
+ 'var Chora = ' . Horde_Serialize::serialize($js_vars, Horde_Serialize::JSON, NLS::getCharset()) . ";\n//]]></script>\n";
}
Horde::includeScriptFiles();
}
}
-echo Horde_Serialize::serialize($block_data, SERIALIZE_JSON, NLS::getCharset());
+echo Horde_Serialize::serialize($block_data, Horde_Serialize::JSON, NLS::getCharset());
}
}
- $content = Horde_Serialize::serialize($content, SERIALIZE_JSON, NLS::getCharset());
- $title = Horde_Serialize::serialize($title, SERIALIZE_JSON, NLS::getCharset());
- $params = Horde_Serialize::serialize($params, SERIALIZE_JSON, NLS::getCharset());
+ $content = Horde_Serialize::serialize($content, Horde_Serialize::JSON, NLS::getCharset());
+ $title = Horde_Serialize::serialize($title, Horde_Serialize::JSON, NLS::getCharset());
+ $params = Horde_Serialize::serialize($params, Horde_Serialize::JSON, NLS::getCharset());
$js_init .= 'portal.add(new Xilinus.Widget().'
. 'setTitle(title_' . $js_id .').'
// Decode the data and print out the HTML. You could also just output
// the json within your page's javascript for use later etc...
-$results = Horde_Serialize::unserialize($embed, SERIALIZE_JSON);
+$results = Horde_Serialize::unserialize($embed, Horde_Serialize::JSON);
echo $results->html;
'slice_end' => intval($slice_end)
);
} else {
- $search = Horde_Serialize::unserialize($search, SERIALIZE_JSON);
+ $search = Horde_Serialize::unserialize($search, Horde_Serialize::JSON);
$args += array(
'search_uid' => $search->imapuid,
'search_view' => $search->view,
if (!$flags || empty($indices)) {
break;
}
- $flags = Horde_Serialize::unserialize($flags, SERIALIZE_JSON);
+ $flags = Horde_Serialize::unserialize($flags, Horde_Serialize::JSON);
$set = $notset = array();
foreach ($flags as $val) {
IMP::addInlineScript(array(DIMP::notify()), 'dom');
/* Javascript to be run on window load. */
-$compose_result['js_onload'][] = 'DimpCompose.fillForm(' . Horde_Serialize::serialize($msg, SERIALIZE_JSON) . ', ' . Horde_Serialize::serialize($header, SERIALIZE_JSON) . ', "' . (($type == 'new' || $type == 'forward') ? 'to' : 'message') . '", true)';
+$compose_result['js_onload'][] = 'DimpCompose.fillForm(' . Horde_Serialize::serialize($msg, Horde_Serialize::JSON) . ', ' . Horde_Serialize::serialize($header, Horde_Serialize::JSON) . ', "' . (($type == 'new' || $type == 'forward') ? 'to' : 'message') . '", true)';
IMP::addInlineScript($compose_result['js_onload'], 'load');
$scripts = array(
Horde_Mime_Address::addrArray2String($identity->getBccAddresses($ident))
);
}
- $js_code[] = 'ImpCompose.identities = ' . Horde_Serialize::serialize($js_ident, SERIALIZE_JSON, NLS::getCharset());
+ $js_code[] = 'ImpCompose.identities = ' . Horde_Serialize::serialize($js_ident, Horde_Serialize::JSON, NLS::getCharset());
}
$charset = NLS::getCharset();
IMP::addInlineScript(array(
- 'ImpFetchmailprefs.fetchurl = ' . Horde_Serialize($fetch_url, SERIALIZE_JSON, $charset),
- 'ImpFetchmailprefs.prefsurl = ' . Horde_Serialize($prefs_url, SERIALIZE_JSON, $charset)
+ 'ImpFetchmailprefs.fetchurl = ' . Horde_Serialize($fetch_url, Horde_Serialize::JSON, $charset),
+ 'ImpFetchmailprefs.prefsurl = ' . Horde_Serialize($prefs_url, Horde_Serialize::JSON, $charset)
));
echo $t->fetch(IMP_TEMPLATES . '/fetchmail/fetchmailprefs.html');
list($raw_rows, $newmsgs, $displayNames) = $imaptree->build();
IMP::addInlineScript(array(
- 'ImpFolders.displayNames = ' . Horde_Serialize::serialize($displayNames, SERIALIZE_JSON, $charset),
- 'ImpFolders.folders_url = ' . Horde_Serialize::serialize($folders_url, SERIALIZE_JSON, $charset)
+ 'ImpFolders.displayNames = ' . Horde_Serialize::serialize($displayNames, Horde_Serialize::JSON, $charset),
+ 'ImpFolders.folders_url = ' . Horde_Serialize::serialize($folders_url, Horde_Serialize::JSON, $charset)
));
/* Prepare the header template. */
));
}
- return array('var DIMP = ' . Horde_Serialize::serialize($code, SERIALIZE_JSON, NLS::getCharset()) . ';');
+ return array('var DIMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()) . ';');
}
/**
return '';
}
- return 'DimpCore.showNotifications(' . Horde_Serialize::serialize($msgs, SERIALIZE_JSON) . ')';
+ return 'DimpCore.showNotifications(' . Horde_Serialize::serialize($msgs, Horde_Serialize::JSON) . ')';
}
/**
*/
static public function escapeJSON($json)
{
- return '/*-secure-' . rawurlencode(Horde_Serialize::serialize($json, SERIALIZE_JSON, NLS::getCharset())) . '*/';
+ return '/*-secure-' . rawurlencode(Horde_Serialize::serialize($json, Horde_Serialize::JSON, NLS::getCharset())) . '*/';
}
/**
if (!isset($addrlist)) {
$addrlist = IMP_Compose::getAddressList();
}
- IMP::addInlineScript('if (!IMP) { var IMP = {}; } IMP.ac_list = '. Horde_Serialize::serialize(array_map('htmlspecialchars', $addrlist), SERIALIZE_JSON, NLS::getCharset()));
+ IMP::addInlineScript('if (!IMP) { var IMP = {}; } IMP.ac_list = '. Horde_Serialize::serialize(array_map('htmlspecialchars', $addrlist), Horde_Serialize::JSON, NLS::getCharset()));
self::$_listOutput = true;
}
$func = 'Autocompleter.Local';
if (empty($params['states'])) {
$params['states'] = '""';
} else {
- $params['states'] = Horde_Serialize::serialize($params['states'], SERIALIZE_JSON, NLS::getCharset());
+ $params['states'] = Horde_Serialize::serialize($params['states'], Horde_Serialize::JSON, NLS::getCharset());
}
if (empty($params['locales'])) {
$params['locales'] = array();
}
}
asort($params['locales'], SORT_LOCALE_STRING);
- $params['locales'] = Horde_Serialize::serialize($params['locales'], SERIALIZE_JSON, NLS::getCharset());
+ $params['locales'] = Horde_Serialize::serialize($params['locales'], Horde_Serialize::JSON, NLS::getCharset());
parent::__construct($params);
}
$result['js'] = array(
'DIMP.conf_compose.auto_save_interval_val = ' . intval($GLOBALS['prefs']->getValue('auto_save_drafts')),
- 'DIMP.conf_compose.identities = ' . Horde_Serialize::serialize($identities, SERIALIZE_JSON),
+ 'DIMP.conf_compose.identities = ' . Horde_Serialize::serialize($identities, Horde_Serialize::JSON),
'DIMP.conf_compose.qreply = ' . intval(!empty($args['qreply'])),
);
$cached = array();
} else {
if (isset($md->search)) {
- $cached = Horde_Serialize::unserialize($args['cached'], SERIALIZE_JSON);
+ $cached = Horde_Serialize::unserialize($args['cached'], Horde_Serialize::JSON);
} else {
$cached = IMP::parseRangeString($args['cached']);
$cached = reset($cached);
$charset = NLS::getCharset();
IMP::addInlineScript(array(
- 'ImpLogin.autologin_url = ' . Horde_Serialize::serialize(Util::addParameter(Horde::selfUrl(), array('autologin' => $autologin, 'server_key' => '')), SERIALIZE_JSON, $charset),
+ 'ImpLogin.autologin_url = ' . Horde_Serialize::serialize(Util::addParameter(Horde::selfUrl(), array('autologin' => $autologin, 'server_key' => '')), Horde_Serialize::JSON, $charset),
'ImpLogin.ie_clientcaps = ' . intval($t->get('ie_clientcaps')),
'ImpLogin.imp_auth = ' . intval($imp_auth),
- 'ImpLogin.lang_url = ' . Horde_Serialize::serialize($lang_url, SERIALIZE_JSON, $charset),
+ 'ImpLogin.lang_url = ' . Horde_Serialize::serialize($lang_url, Horde_Serialize::JSON, $charset),
'ImpLogin.nomenu = ' . intval(empty($conf['menu']['always'])),
'ImpLogin.reloadmenu = ' . intval($logout_reason && $imp_auth && $conf['menu']['always']),
'ImpLogin.show_list = ' . intval($show_list),
}
IMP::addInlineScript(array(
- 'ImpMessage.messagelist = ' . Horde_Serialize::serialize($ids, SERIALIZE_JSON, NLS::getCharset()),
+ 'ImpMessage.messagelist = ' . Horde_Serialize::serialize($ids, Horde_Serialize::JSON, NLS::getCharset()),
'ImpMessage.sortlimit = ' . intval($sortpref['limit']),
'ImpMessage.unread = ' . strval($unread)
));
foreach (array('from', 'to', 'cc', 'bcc', 'replyTo') as $val) {
if (!empty($show_msg_result[$val])) {
- $compose_result['js'][] = 'DimpFullmessage.' . $val . ' = ' . Horde_Serialize::serialize($show_msg_result[$val], SERIALIZE_JSON);
+ $compose_result['js'][] = 'DimpFullmessage.' . $val . ' = ' . Horde_Serialize::serialize($show_msg_result[$val], Horde_Serialize::JSON);
}
}
IMP::addInlineScript($compose_result['js']);
IMP::status();
IMP::addInlineScript(array(
- 'ImpSearch.search_date = ' . Horde_Serialize::serialize(array('m' => date('m'), 'd' => date('d'), 'y' => date('Y')), SERIALIZE_JSON, $charset),
+ 'ImpSearch.search_date = ' . Horde_Serialize::serialize(array('m' => date('m'), 'd' => date('d'), 'y' => date('Y')), Horde_Serialize::JSON, $charset),
'ImpSearch.not_search = ' . intval(empty($search['mbox'])),
'ImpSearch.inverse_sub = ' . intval($t->get('inverse_subscribe')),
));
))
);
-echo IMP::wrapInlineScript(array('var IMP = ' . Horde_Serialize::serialize($code, SERIALIZE_JSON, NLS::getCharset()) . ';'));
+echo IMP::wrapInlineScript(array('var IMP = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()) . ';'));
switch ($ct) {
case 'json':
header('Content-Type: application/json');
- echo Horde_Serialize::serialize($result, SERIALIZE_JSON, NLS::getCharset());
+ echo Horde_Serialize::serialize($result, Horde_Serialize::JSON, NLS::getCharset());
break;
case 'plain':
$code['text']['weekday'][$i] = NLS::getLangInfo(constant('DAY_' . $i));
}
- return array('var Kronolith = ' . Horde_Serialize::serialize($code, SERIALIZE_JSON, NLS::getCharset()) . ';');
+ return array('var Kronolith = ' . Horde_Serialize::serialize($code, Horde_Serialize::JSON, NLS::getCharset()) . ';');
}
/**
/* Retrieve Freebusy object. TODO: check for multiple
* results and merge them into one and return. */
require_once 'Horde/Serialize.php';
- $vfb = Horde_Serialize::unserialize($row['vfb_serialized'], SERIALIZE_BASIC);
+ $vfb = Horde_Serialize::unserialize($row['vfb_serialized'], Horde_Serialize::BASIC);
return $vfb;
}
}
require_once 'Horde/Serialize.php';
$query = sprintf('INSERT INTO %s (vfb_owner, vfb_email, vfb_serialized) VALUES (?, ?, ?)',
$this->_params['table']);
- $values = array($owner, $email, Horde_Serialize::serialize($vfb, SERIALIZE_BASIC));
+ $values = array($owner, $email, Horde_Serialize::serialize($vfb, Horde_Serialize::BASIC));
/* Log the query at debug level. */
Horde::logMessage(sprintf('SQL insert by %s: query = "%s"',
?>
<script type="text/javascript">//<![CDATA[
-var KronolithVar = <?php echo Horde_Serialize::serialize($var, SERIALIZE_JSON, $charset) ?>;
-var KronolithText = <?php echo Horde_Serialize::serialize($gettext, SERIALIZE_JSON, $charset) ?>;
+var KronolithVar = <?php echo Horde_Serialize::serialize($var, Horde_Serialize::JSON, $charset) ?>;
+var KronolithText = <?php echo Horde_Serialize::serialize($gettext, Horde_Serialize::JSON, $charset) ?>;
//]]></script>