+++ /dev/null
-<?php
-/**
- * Copyright 2006-2009 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author Chuck Hagenbuch <chuck@horde.org>
- */
-
-require_once dirname(__FILE__) . '/lib/base.load.php';
-require_once HORDE_BASE . '/lib/core.php';
-
-$registry = Horde_Registry::singleton();
-
-/* Which application. */
-$app = Horde_Util::getFormData('app');
-if (!$app) {
- echo '<ul id="app">';
- foreach ($registry->listApps() as $app) {
- echo '<li>' . htmlspecialchars($app) . '</li>';
- }
- echo '</ul>';
- exit;
-}
-
-/* Load $app's base environment, but don't request that the app perform
- * authentication beyond Horde's. */
-$authentication = 'none';
-$appbase = $registry->get('fileroot', $app);
-require_once $appbase . '/lib/base.php';
-
-/* Which preference. */
-$pref = Horde_Util::getFormData('pref');
-if (!$pref) {
- $_prefs = array();
- extract(Horde::loadConfiguration('prefs.php', array('_prefs'), $app));
-
- echo '<ul id="pref">';
- foreach ($_prefs as $pref => $params) {
- switch ($params['type']) {
- case 'special':
- case 'link':
- break;
-
- default:
- echo '<li preftype="' . htmlspecialchars($params['type']) . '">' . htmlspecialchars($pref) . '</li>';
- }
- }
- echo '</ul>';
-}
-
-/* Which action. */
-if (Horde_Util::getPost('pref') == $pref) {
- /* POST for saving a pref. */
- $prefs->setValue($pref, Horde_Util::getPost('value'));
-}
-
-/* GET returns the current value, POST returns the new value. */
-header('Content-type: text/plain');
-echo $prefs->getValue($pref);
/* Variables used in core javascript files. */
$var = array(
'view_url' => Horde::applicationUrl('view.php'),
- 'pref_api_url' => Horde::applicationUrl('pref_api.php', true),
+ 'pref_api_url' => Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs/', true, -1),
'calendar_info_url' => Horde::applicationUrl('calendars/info.php', true),
'page_title' => $GLOBALS['registry']->get('name') . ' :: ',
);
+++ /dev/null
-<?php
-/**
- * $Horde: skoli/pref_api.php,v 0.1 $
- *
- * Copyright 2006-2008 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author Chuck Hagenbuch <chuck@horde.org>
- */
-
-@define('HORDE_BASE', dirname(dirname(__FILE__)));
-require_once HORDE_BASE . '/lib/core.php';
-
-$registry = Horde_Registry::singleton();
-
-/* Which application. */
-$app = Horde_Util::getFormData('app');
-if (!$app) {
- echo '<ul id="app">';
- foreach ($registry->listApps() as $app) {
- echo '<li>' . htmlspecialchars($app) . '</li>';
- }
- echo '</ul>';
- exit;
-}
-
-/* Load $app's base environment, but don't request that the app perform
- * authentication beyond Horde's. */
-$authentication = 'none';
-$appbase = $registry->get('fileroot', $app);
-require_once $appbase . '/lib/base.php';
-
-/* Which preference. */
-$pref = Horde_Util::getFormData('pref');
-if (!$pref) {
- $_prefs = array();
- extract(Horde::loadConfiguration('prefs.php', array('_prefs'), $app));
-
- echo '<ul id="pref">';
- foreach ($_prefs as $pref => $params) {
- switch ($params['type']) {
- case 'special':
- case 'link':
- break;
-
- default:
- echo '<li preftype="' . htmlspecialchars($params['type']) . '">' . htmlspecialchars($pref) . '</li>';
- }
- }
- echo '</ul>';
-}
-
-/* Which action. */
-if (Horde_Util::getPost('pref') == $pref) {
- /* POST for saving a pref. */
- $prefs->setValue($pref, Horde_Util::getPost('value'));
-}
-
-/* GET returns the current value, POST returns the new value. */
-header('Content-type: text/plain');
-echo $prefs->getValue($pref);
function doPrefsUpdate(column, sortDown)
{
- baseurl = '<?php echo Horde::applicationUrl('pref_api.php', true) ?>';
+ baseurl = '<?php echo Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs/', true, -1) ?>';
try {
column = column.substring(1);
prefscope = 'class';
Element.addClassName(document.body, 'rightPanel');
}
- new Ajax.Request('<?php echo Horde::applicationUrl('pref_api.php', true) ?>', { parameters: { app: 'skoli', pref: 'show_panel', value: pref_value } });
+ new Ajax.Request('<?php echo Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs/', true, -1) ?>', { parameters: { app: 'skoli', pref: 'show_panel', value: pref_value } });
}
</script>
<a id="sbarShow" href="#" onclick="sbarToggle(); return false;"><?php echo _("Classes") ?></a>
function doPrefsUpdate(column, sortDown)
{
- baseurl = '<?php echo Horde::applicationUrl('pref_api.php', true) ?>';
+ baseurl = '<?php echo Horde::url($GLOBALS['registry']->get('webroot', 'horde') . '/services/prefs/', true, -1) ?>';
try {
column = column.substring(1);
new Ajax.Request(baseurl, { parameters: { app: 'skoli', pref: 'sortby', value: encodeURIComponent(column) } });