Reworking minor directory structure to get around stupid web browser pathing bug
authorBen Klang <ben@alkaloid.net>
Fri, 15 Jul 2005 04:30:45 +0000 (04:30 +0000)
committerBen Klang <ben@alkaloid.net>
Fri, 15 Jul 2005 04:30:45 +0000 (04:30 +0000)
git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@57 06cd67b6-e706-0410-b29e-9de616bca6e9

dialplan.php [deleted file]
main/dialplan.php [new file with mode: 0644]
main/moh.php [new file with mode: 0644]
main/system.php [new file with mode: 0644]
main/users.php [new file with mode: 0644]
moh.php [deleted file]
shout.webprj
system.php [deleted file]
users.php [deleted file]
users/index.php [deleted file]

diff --git a/dialplan.php b/dialplan.php
deleted file mode 100644 (file)
index 3d4f117..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-if (!defined(SHOUT_BASE)) {
-    define(SHOUT_BASE, dirname(__FILE__));
-}
-
-require SHOUT_TEMPLATES . "/dialplan/dialplanlist.inc";
\ No newline at end of file
diff --git a/main/dialplan.php b/main/dialplan.php
new file mode 100644 (file)
index 0000000..3d4f117
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+if (!defined(SHOUT_BASE)) {
+    define(SHOUT_BASE, dirname(__FILE__));
+}
+
+require SHOUT_TEMPLATES . "/dialplan/dialplanlist.inc";
\ No newline at end of file
diff --git a/main/moh.php b/main/moh.php
new file mode 100644 (file)
index 0000000..7d684e4
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+if (!defined(SHOUT_BASE)) {
+    define(SHOUT_BASE, dirname(__FILE__));
+}
+
+# Check that we are properly initialized
+if (is_a($contexts, 'PEAR_Error')) {
+    # FIXME change this to a Horde::fatal
+    $notification->push(_("Internal error viewing requested page"),
+        'horde.error');
+    $notification->notify();
+    require $registry->get('templates', 'horde') . '/common-footer.inc';
+    exit();
+}
+
diff --git a/main/system.php b/main/system.php
new file mode 100644 (file)
index 0000000..6d5eff4
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * $Horde: shout/system.php,v 1.0 2005/07/07 11:36:01 ben Exp $
+ *
+ * Copyright 2005 Ben Klang <ben@alkaloid.net>
+ *
+ * See the enclosed file LICENSE for license information (GPL). If you
+ * did not receive this file, see http://www.horde.org/licenses/gpl.php.
+ */
+@define('SHOUT_BASE', dirname(__FILE__) . '/..');
+require_once SHOUT_BASE . '/lib/System.php';
+require_once 'Horde/Variables.php';
+
+$RENDERER = &new Horde_Form_Renderer();
+
+$empty = '';
+$beendone = 0;
+$wereerrors = 0;
+
+$vars = &Variables::getDefaultVariables($empty);
+$syscontext = Util::getFormData("syscontext");
+$formname = $vars->get('formname');
+
+$title = _("System Settings");
+
+$ContextForm = &Horde_Form::singleton('ContextForm', $vars);
+$ContextFormValid = $ContextForm->validate($vars, true);
+
+// print_r($vars);
+if ($ContextFormValid) {
+    $SettingsForm = &Horde_Form::singleton('SettingsForm', $vars);
+
+    $SettingsForm->open($RENDERER, $vars, 'index.php', 'post');
+    $SettingsFormValid = $SettingsForm->validate($vars, true);
+    // Render the original form readonly.
+    $ContextForm->preserve($vars);
+    $RENDERER->beginInactive($ContextForm->getTitle());
+    $RENDERER->renderFormInactive($ContextForm, $vars);
+    $RENDERER->end();
+    echo '<br />';
+
+    // Render the second stage form.
+    if ($formname != 'SettingsForm') {
+        $SettingsForm->clearValidation();
+    }
+    $RENDERER->beginActive($SettingsForm->getTitle());
+    $ContextForm->preserveVarByPost($vars, "section");
+    $SettingsForm->preserve($vars);
+    $RENDERER->renderFormActive($SettingsForm, $vars);
+    $RENDERER->submit();
+    $RENDERER->end();
+
+    $SettingsForm->close($RENDERER);
+
+    $beendone = 1;
+} else {
+    if ($formname != 'ContextForm') {
+        $ContextForm->clearValidation();
+    }
+    $ContextForm->open($RENDERER, $vars, 'index.php', 'post');
+    $ContextForm->preserveVarByPost($vars, "section");
+    $ContextForm->preserve($vars);
+    $RENDERER->beginActive($ContextForm->getTitle());
+    $RENDERER->renderFormActive($ContextForm, $vars);
+    $RENDERER->submit();
+    $RENDERER->end();
+    $ContextForm->close($RENDERER);
+}
diff --git a/main/users.php b/main/users.php
new file mode 100644 (file)
index 0000000..8b2b6f4
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+if (!defined(SHOUT_BASE)) {
+    define(SHOUT_BASE, dirname(__FILE__));
+}
+
+require SHOUT_TEMPLATES . "/users/userlist.inc";
\ No newline at end of file
diff --git a/moh.php b/moh.php
deleted file mode 100644 (file)
index 7d684e4..0000000
--- a/moh.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-if (!defined(SHOUT_BASE)) {
-    define(SHOUT_BASE, dirname(__FILE__));
-}
-
-# Check that we are properly initialized
-if (is_a($contexts, 'PEAR_Error')) {
-    # FIXME change this to a Horde::fatal
-    $notification->push(_("Internal error viewing requested page"),
-        'horde.error');
-    $notification->notify();
-    require $registry->get('templates', 'horde') . '/common-footer.inc';
-    exit();
-}
-
index ae3c79c..8b2793d 100644 (file)
@@ -9,51 +9,51 @@
     <item url="templates/" uploadstatus="2" />
     <item url="lib/" uploadstatus="2" />
     <item url="lib/Driver/" uploadstatus="2" />
-    <item modified_time="1121374073" url="lib/Driver/ldap.php" uploadstatus="2" />
-    <item modified_time="1120792108" url="lib/base.php" uploadstatus="2" />
-    <item modified_time="1120815592" url="lib/Driver.php" uploadstatus="2" />
-    <item modified_time="1121377707" url="index.php" uploadstatus="2" />
+    <item modified_time="1121313992" url="lib/Driver/ldap.php" uploadstatus="2" />
+    <item modified_time="1120589135" url="lib/base.php" uploadstatus="2" />
+    <item modified_time="1121306551" url="lib/Driver.php" uploadstatus="2" />
+    <item modified_time="1121396278" url="index.php" uploadstatus="2" />
     <uploadprofiles showtreeviews="true" defaultProfile="Shout" >
       <profile remote_host="picasso.v-office.biz" remote_port="" remote_path="/srv/vhost/users/aklang/sites/intranet.v-office.biz/shout" remote_protocol="sftp" user="aklang" name="Shout" >
         <uploadeditem upload_time="0" url="config/" />
         <uploadeditem upload_time="1120073766" url="config/conf.xml" />
         <uploadeditem upload_time="1120183942" url="contexts.php" />
-        <uploadeditem upload_time="1120648621" url="dialplan.php" />
-        <uploadeditem upload_time="1121377707" url="index.php" />
+        <uploadeditem upload_time="1120355053" url="dialplan.php" />
+        <uploadeditem upload_time="1121396278" url="index.php" />
         <uploadeditem upload_time="1120021874" url="index.php~" />
         <uploadeditem upload_time="0" url="lib/" />
-        <uploadeditem upload_time="1120815592" url="lib/Driver.php" />
+        <uploadeditem upload_time="1121306551" url="lib/Driver.php" />
         <uploadeditem upload_time="1120022560" url="lib/Driver.php~" />
         <uploadeditem upload_time="0" url="lib/Driver/" />
-        <uploadeditem upload_time="1121374073" url="lib/Driver/ldap.php" />
+        <uploadeditem upload_time="1121313992" url="lib/Driver/ldap.php" />
         <uploadeditem upload_time="1120026921" url="lib/Driver/ldap.php~" />
         <uploadeditem upload_time="1120288491" url="lib/SelectContext.php" />
-        <uploadeditem upload_time="1121374073" url="lib/Shout.php" />
-        <uploadeditem upload_time="1120812245" url="lib/System.php" />
-        <uploadeditem upload_time="1121377507" url="lib/User.php" />
+        <uploadeditem upload_time="1121317814" url="lib/Shout.php" />
+        <uploadeditem upload_time="1120815615" url="lib/System.php" />
+        <uploadeditem upload_time="1121396278" url="lib/User.php" />
         <uploadeditem upload_time="1120279975" url="lib/Users.php" />
-        <uploadeditem upload_time="1120792108" url="lib/base.php" />
+        <uploadeditem upload_time="1120589135" url="lib/base.php" />
         <uploadeditem upload_time="1120073766" url="lib/defines.php" />
-        <uploadeditem upload_time="1120296517" url="moh.php" />
+        <uploadeditem upload_time="1120287842" url="moh.php" />
         <uploadeditem upload_time="1120027019" url="shout.webprj" />
-        <uploadeditem upload_time="1120811068" url="system.php" />
+        <uploadeditem upload_time="1120815615" url="system.php" />
         <uploadeditem upload_time="0" url="templates/" />
-        <uploadeditem upload_time="1120158044" url="templates/common-header.inc" />
+        <uploadeditem upload_time="1120174958" url="templates/common-header.inc" />
         <uploadeditem upload_time="1120073766" url="templates/content_page" />
         <uploadeditem upload_time="0" url="templates/context/" />
-        <uploadeditem upload_time="1120169761" url="templates/context/contextline.inc" />
+        <uploadeditem upload_time="1120175005" url="templates/context/contextline.inc" />
         <uploadeditem upload_time="0" url="templates/dialplan/" />
-        <uploadeditem upload_time="1121377789" url="templates/dialplan/dialplanlist.inc" />
-        <uploadeditem upload_time="1121374537" url="templates/menu.inc" />
+        <uploadeditem upload_time="1121396278" url="templates/dialplan/dialplanlist.inc" />
+        <uploadeditem upload_time="1121396278" url="templates/menu.inc" />
         <uploadeditem upload_time="0" url="templates/users/" />
-        <uploadeditem upload_time="1121377793" url="templates/users/userlist.inc" />
+        <uploadeditem upload_time="1121396278" url="templates/users/userlist.inc" />
         <uploadeditem upload_time="0" url="themes/" />
         <uploadeditem upload_time="0" url="themes/graphics/" />
-        <uploadeditem upload_time="1121295816" url="themes/graphics/add-user.gif" />
-        <uploadeditem upload_time="1121298200" url="users.php" />
+        <uploadeditem upload_time="1121300828" url="themes/graphics/add-user.gif" />
+        <uploadeditem upload_time="1121306550" url="users.php" />
         <uploadeditem upload_time="0" url="users/" />
-        <uploadeditem upload_time="1121374700" url="users/add.php" />
-        <uploadeditem upload_time="1121374767" url="users/index.php" />
+        <uploadeditem upload_time="1121401257" url="users/add.php" />
+        <uploadeditem upload_time="1121396278" url="users/index.php" />
       </profile>
     </uploadprofiles>
     <debuggers>
     <defaultDTD>-//w3c//dtd xhtml 1.0 strict//en</defaultDTD>
     <item modified_time="1120073766" url="config/conf.xml" uploadstatus="1" />
     <item url="config/" uploadstatus="1" />
-    <item modified_time="1121374073" url="lib/Shout.php" uploadstatus="1" />
-    <item modified_time="1120158044" url="templates/common-header.inc" uploadstatus="1" />
-    <item modified_time="1121374537" url="templates/menu.inc" uploadstatus="1" />
-    <item modified_time="1121298200" url="users.php" uploadstatus="1" />
+    <item modified_time="1121317814" url="lib/Shout.php" uploadstatus="1" />
+    <item modified_time="1120174958" url="templates/common-header.inc" uploadstatus="1" />
+    <item modified_time="1121396278" url="templates/menu.inc" uploadstatus="1" />
     <item url="templates/context/" uploadstatus="1" />
-    <item modified_time="1120169761" url="templates/context/contextline.inc" uploadstatus="1" />
-    <item modified_time="1120296517" url="moh.php" uploadstatus="1" />
+    <item modified_time="1120175005" url="templates/context/contextline.inc" uploadstatus="1" />
     <item url="templates/users/" uploadstatus="1" />
-    <item modified_time="1121377793" url="templates/users/userlist.inc" uploadstatus="1" />
-    <item modified_time="1120648621" url="dialplan.php" uploadstatus="1" />
-    <item modified_time="1121377789" url="templates/dialplan/dialplanlist.inc" uploadstatus="1" />
+    <item modified_time="1121396278" url="templates/users/userlist.inc" uploadstatus="1" />
+    <item modified_time="1121396278" url="templates/dialplan/dialplanlist.inc" uploadstatus="1" />
     <item url="templates/dialplan/" uploadstatus="1" />
-    <item modified_time="1120811068" url="system.php" uploadstatus="1" />
-    <item modified_time="1120812245" url="lib/System.php" uploadstatus="1" />
+    <item modified_time="1120815615" url="lib/System.php" uploadstatus="1" />
     <author>Ben Klang</author>
     <email>ben@alkaloid.net</email>
     <debuggerclient>Gubed</debuggerclient>
     <events/>
     <item url="themes/" uploadstatus="1" />
     <item url="themes/graphics/" uploadstatus="1" />
-    <item modified_time="1121295816" url="themes/graphics/add-user.gif" uploadstatus="1" />
-    <item modified_time="1121374767" url="users/index.php" uploadstatus="1" />
+    <item modified_time="1121300828" url="themes/graphics/add-user.gif" uploadstatus="1" />
     <item url="users/" uploadstatus="1" />
-    <item modified_time="1121377507" url="lib/User.php" uploadstatus="1" />
-    <item modified_time="1121374700" url="users/add.php" uploadstatus="1" />
+    <item modified_time="1121396278" url="lib/User.php" uploadstatus="1" />
+    <item modified_time="1121401257" url="users/add.php" uploadstatus="1" />
+    <item url="main/" />
+    <item url="main/dialplan.php" />
+    <item url="main/moh.php" />
+    <item url="main/system.php" />
+    <item url="main/users.php" />
+    <item url="users.php" />
     <treestatus>
       <openfolder url="config" />
       <openfolder url="lib" />
       <openfolder url="lib/Driver" />
+      <openfolder url="main" />
       <openfolder url="templates" />
       <openfolder url="templates/dialplan" />
       <openfolder url="templates/users" />
diff --git a/system.php b/system.php
deleted file mode 100644 (file)
index 6d5eff4..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-/**
- * $Horde: shout/system.php,v 1.0 2005/07/07 11:36:01 ben Exp $
- *
- * Copyright 2005 Ben Klang <ben@alkaloid.net>
- *
- * See the enclosed file LICENSE for license information (GPL). If you
- * did not receive this file, see http://www.horde.org/licenses/gpl.php.
- */
-@define('SHOUT_BASE', dirname(__FILE__) . '/..');
-require_once SHOUT_BASE . '/lib/System.php';
-require_once 'Horde/Variables.php';
-
-$RENDERER = &new Horde_Form_Renderer();
-
-$empty = '';
-$beendone = 0;
-$wereerrors = 0;
-
-$vars = &Variables::getDefaultVariables($empty);
-$syscontext = Util::getFormData("syscontext");
-$formname = $vars->get('formname');
-
-$title = _("System Settings");
-
-$ContextForm = &Horde_Form::singleton('ContextForm', $vars);
-$ContextFormValid = $ContextForm->validate($vars, true);
-
-// print_r($vars);
-if ($ContextFormValid) {
-    $SettingsForm = &Horde_Form::singleton('SettingsForm', $vars);
-
-    $SettingsForm->open($RENDERER, $vars, 'index.php', 'post');
-    $SettingsFormValid = $SettingsForm->validate($vars, true);
-    // Render the original form readonly.
-    $ContextForm->preserve($vars);
-    $RENDERER->beginInactive($ContextForm->getTitle());
-    $RENDERER->renderFormInactive($ContextForm, $vars);
-    $RENDERER->end();
-    echo '<br />';
-
-    // Render the second stage form.
-    if ($formname != 'SettingsForm') {
-        $SettingsForm->clearValidation();
-    }
-    $RENDERER->beginActive($SettingsForm->getTitle());
-    $ContextForm->preserveVarByPost($vars, "section");
-    $SettingsForm->preserve($vars);
-    $RENDERER->renderFormActive($SettingsForm, $vars);
-    $RENDERER->submit();
-    $RENDERER->end();
-
-    $SettingsForm->close($RENDERER);
-
-    $beendone = 1;
-} else {
-    if ($formname != 'ContextForm') {
-        $ContextForm->clearValidation();
-    }
-    $ContextForm->open($RENDERER, $vars, 'index.php', 'post');
-    $ContextForm->preserveVarByPost($vars, "section");
-    $ContextForm->preserve($vars);
-    $RENDERER->beginActive($ContextForm->getTitle());
-    $RENDERER->renderFormActive($ContextForm, $vars);
-    $RENDERER->submit();
-    $RENDERER->end();
-    $ContextForm->close($RENDERER);
-}
diff --git a/users.php b/users.php
deleted file mode 100644 (file)
index 8b2b6f4..0000000
--- a/users.php
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-if (!defined(SHOUT_BASE)) {
-    define(SHOUT_BASE, dirname(__FILE__));
-}
-
-require SHOUT_TEMPLATES . "/users/userlist.inc";
\ No newline at end of file
diff --git a/users/index.php b/users/index.php
deleted file mode 100644 (file)
index 46fb92a..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/**
- * $Horde: shout/users/index.php,v 0.1 2005/07/13 10:01:01 ben Exp $
- *
- * Copyright 2005 Ben Klang <ben@alkaloid.net>
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- */
-
-@define('SHOUT_BASE', dirname(__FILE__) . "/..");
-$shout_configured = (@is_readable(SHOUT_BASE . '/config/conf.php'));# &&
-    #@is_readable(SHOUT_BASE . '/config/prefs.php'));
-if (!$shout_configured) {
-    require SHOUT_BASE . '/../lib/Test.php';
-    Horde_Test::configFilesMissing('Shout', SHOUT_BASE,
-    array('conf.php', 'prefs.php'));
-}
-
-require_once SHOUT_BASE . '/lib/base.php';
-require_once SHOUT_BASE . '/lib/Shout.php';
-
-$context = Util::getFormData("context");
-$section = "users";
-$action = Util::getFormData("action");
-
-$contexts = $shout->getContexts();
-$vars = &Variables::getDefaultVariables();
-
-if (!isset($context)) {#FIXME || !Shout::checkContext()) {
-    $url = Horde::applicationUrl("/shout/index.php");
-    header("Location: $url");
-    exit(0);
-}
-
-require SHOUT_TEMPLATES . '/common-header.inc';
-require SHOUT_TEMPLATES . '/menu.inc';
-
-echo "<br />";
-
-$tabs = &Shout::getTabs($context, $vars);
-$tabs->preserve('context', $context);
-echo $tabs->render($section);
-
-switch ($action) {
-    case "add":
-    case "edit":
-    case "delete":
-        require SHOUT_BASE . "/users/$action.php";
-        break;
-}
\ No newline at end of file