X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fsac-a-push.phh;h=ee30cea80da7b10ca9d91afd989d33a2d265b76b;hb=bd4ee6dd7696eeb5b0f8d7c7dc0cd9c840843146;hp=d582a1035e3205fa0216595843b4446c3a905877;hpb=9ffc7e5dc05fdd25cc273661ba8dc394c5d5518b;p=brisk.git diff --git a/web/Obj/sac-a-push.phh b/web/Obj/sac-a-push.phh index d582a10..ee30cea 100644 --- a/web/Obj/sac-a-push.phh +++ b/web/Obj/sac-a-push.phh @@ -1,5 +1,4 @@ rndstr = ""; for ($i = 0 ; $i < 4096 ; $i++) { if (($i % 128) == 0) - $thiz->rndstr .= "\n"; + $thiz->rndstr .= " "; else $thiz->rndstr .= chr(mt_rand(65, 90)); } @@ -416,7 +461,17 @@ class Sac_a_push { function run() { - GLOBAL $DOCUMENT_ROOT, $HTTP_HOST, $G_with_splash; + GLOBAL $DOCUMENT_ROOT, $HTTP_HOST; + + GLOBAL $G_alarm_passwd, $G_black_list, $G_btrace_pref_sub, $G_dbauth; + GLOBAL $G_dbpfx, $G_donors_all, $G_donors_cur, $G_is_local, $G_lang; + GLOBAL $G_poll_entries, $G_poll_name, $G_poll_title, $G_proxy_white_list; + GLOBAL $G_room_roadmap, $G_shutdown, $G_sidebanner, $G_sidebanner2; + GLOBAL $G_splash_content, $G_splash_contents, $G_splash_cont_idx; + GLOBAL $G_splash_h, $G_splash_idx, $G_splash_interval, $G_splash_timeout; + GLOBAL $G_splash_w, $G_topbanner, $G_with_donors, $G_with_poll; + GLOBAL $G_with_sidebanner, $G_with_sidebanner2, $G_with_splash; + GLOBAL $G_with_topbanner; if ($this->main_loop) { return (FALSE); @@ -487,13 +542,11 @@ class Sac_a_push { $addr = stream_socket_get_name($new_socket, TRUE); $header_out = array(); - $enc = get_encoding($header); - $subs = SITE_PREFIX."briskin5/"; $subs_l = strlen($subs); $rret = FALSE; if (!strncmp($path, SITE_PREFIX, SITE_PREFIX_LEN)) { - $rret = $this->app->request_mgr($this, $enc, $header_out, $new_socket, substr($path, SITE_PREFIX_LEN), $addr, $get, $post, $cookie); + $rret = $this->app->request_mgr($this, $header, $header_out, $new_socket, substr($path, SITE_PREFIX_LEN), $addr, $get, $post, $cookie); } if ($rret == FALSE) { // FIXME: manage 404 !!! @@ -548,6 +601,16 @@ class Sac_a_push { $line = trim($buf); if ($line == "reload") { require("$DOCUMENT_ROOT/Etc/".BRISK_CONF); + + global_dump(); + } + else if ($line == "shutdown") { + if ($this->app->dump_data()) { + exit(0); + } + else { + exit(1); + } } } else {