* corrected use of our absolute directories
authorWilfried Göesgens <willi@citadel.org>
Mon, 5 Feb 2007 21:45:11 +0000 (21:45 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 5 Feb 2007 21:45:11 +0000 (21:45 +0000)
* updated changelog.

webcit/debian/changelog
webcit/debian/rules
webcit/webcit.c
webcit/webserver.c

index bb021445084e740ec90652ef10c140e191696a47..0f870279f34f873dfaa1175f6b90f09c2d00f96d 100644 (file)
@@ -1,3 +1,9 @@
+webcit (7.02-6) unstable; urgency=low
+
+  * calculate static directories acurate
+  * new css features by tierry
+
+ -- Wilfried Goesgens <citadel@outgesourced.org>  Wed, 3 Jan 2007 21:09:00 +0100
 webcit (7.02-5) unstable; urgency=low
 
   * ask questions in the obvious cases. 
index c7333e143d9cceaacc5f55c04d8c21f9ba041369..3181109629b2715e13cc9a430d498443d1aa0ec7 100755 (executable)
@@ -9,7 +9,7 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DESTDIR=$(CURDIR)/debian/citadel-webcit/
+DESTDIR=$(CURDIR)/debian/citadel-webcit
 
 
 
index afb88822e97c15f98147753a48a19e4b2f0459de..6e11ccfed3d3bf818bfd18ddec3a4ed0f468b714 100644 (file)
@@ -1013,7 +1013,7 @@ void session_loop(struct httprequest *req)
        char user_agent[256];
        int body_start = 0;
        int is_static = 0;
-
+       int n_static = 0;
        /**
         * We stuff these with the values coming from the client cookies,
         * so we can use them to reconnect a timed out session if we have to.
@@ -1173,13 +1173,15 @@ void session_loop(struct httprequest *req)
        for (a=0; a<ndirs; ++a) {
                if (!strcasecmp(action, (char*)static_content_dirs[a])) { /* map web to disk location */
                        is_static = 1;
+                       n_static = a;
                }
        }
        if (is_static) {
                if (nBackDots < 2)
                {
                        snprintf(buf, sizeof buf, "%s/%s/%s/%s/%s/%s/%s/%s",
-                                index[0], index[1], index[2], index[3], index[4], index[5], index[6], index[7]);
+                                static_dirs[n_static], 
+                                index[1], index[2], index[3], index[4], index[5], index[6], index[7]);
                        for (a=0; a<8; ++a) {
                                if (buf[strlen(buf)-1] == '/') {
                                        buf[strlen(buf)-1] = 0;
index 64d63d27a14f178c1373f93ab7bbb751b1b21e9f..78ee06f3153c58a9c6c385b2f95630e36e8fb28c 100644 (file)
@@ -33,9 +33,10 @@ extern pthread_key_t MyConKey;
 char socket_dir[PATH_MAX];      /**< where to talk to our citadel server */
 static const char editor_absolut_dir[PATH_MAX]=EDITORDIR; /**< nailed to what configure gives us. */
 static char static_dir[PATH_MAX]; /**< calculated on startup */
+static char static_local_dir[PATH_MAX]; /**< calculated on startup */
 char  *static_dirs[]={ /**< needs same sort order as the web mapping */
        (char*)static_dir,                  /** our templates on disk */
-       (char*)static_dir,                  /** our templates on disk */
+       (char*)static_local_dir,            /** user provided templates disk */
        (char*)editor_absolut_dir           /** the editor on disk */
 };
 
@@ -747,8 +748,10 @@ int main(int argc, char **argv)
                         (dirbuffer[0]!='\0')?"/":"");
        basedir=RUNDIR;
        COMPUTE_DIRECTORY(socket_dir);
-       basedir=DATADIR;
+       basedir=DATADIR "/static";
        COMPUTE_DIRECTORY(static_dir);
+       basedir=DATADIR "/static.local";
+       COMPUTE_DIRECTORY(static_local_dir);
        /** we should go somewhere we can leave our coredump, if enabled... */
        lprintf(9, "Changing directory to %s\n", socket_dir);
        if (chdir(webcitdir) != 0) {