old unused code removed
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Fri, 4 Jan 2013 09:11:42 +0000 (10:11 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.it>
Fri, 4 Jan 2013 09:11:42 +0000 (10:11 +0100)
web/Obj/brisk.phh
web/Obj/user.phh

index 5ed3588..00c3222 100644 (file)
@@ -337,42 +337,6 @@ function file_unlock($res)
     }
 }
 
-function webservers_exceeded()
-{
-    return(file_exists(PROXY_PATH."/webservers_exceded.flag"));
-}
-
-function webservers_check()
-{
-    GLOBAL $G_webserver_max;
-
-    /* FIXME: check all procs expirations */
-    return (10);
-
-    $ct = 0;
-
-    $dh = opendir('/proc');
-    while (($file = readdir($dh)) !== false) {
-        if (preg_match('/[0-9]+/', $file)) {
-            $cmdline = explode("\0", file_get_contents('/proc/'.$file.'/cmdline'));
-            // echo "xxx".$cmdline[0].$n;
-            if (strstr('/usr/sbin/apache2', $cmdline[0]) != FALSE) {
-                // echo "yyy".$cmdline[0].$n;
-                $ct++;
-            }
-        }
-    }
-    closedir($dh);
-
-    if ($ct >= $G_webserver_max) {
-        touch(PROXY_PATH."/webservers_exceded.flag");
-    }
-    else {
-        unlink(PROXY_PATH."/webservers_exceded.flag");
-    }
-    return ($ct);
-}
-
 $escpush_from = array("\\", "\"");
 $escpush_to   = array("\\\\", "\\\"");
 function escpush($s)
@@ -743,8 +707,6 @@ class Room
         return ($ismod);
     }
       
-    webservers_check();
-    
     // Before all align times with table timeout
     for ($table_idx = 0 ; $table_idx < TABLES_N ; $table_idx++) {
        $table_cur = $this->table[$table_idx];
index d5e82ee..b7409de 100644 (file)
@@ -679,8 +679,6 @@ function stream_init($init_string, $enc, &$header_out, &$body, $get, $post, $coo
     $curtime = time();
     
     printf("CLASS: [%s] base: [%s]\n", get_class($this), self::base_get());
-    
-    // (webservers_exceeded() || stristr($HTTP_USER_AGENT, "Mozilla/5.0 (Windows NT 6.1; rv:5.0)") || stristr($HTTP_USER_AGENT, "MSIE") || stristr($HTTP_USER_AGENT, "CHROME") ? TRUE : FALSE);
 
     log_load("index_rd_ifra_init.php");