Załącznik 'patch-lib__DBEngine.class.php'

Download

   1 --- ./lib/DBEngine.class.php.orig    2016-08-23 20:06:06.000000000 +0200
   2 +++ ./lib/DBEngine.class.php    2016-08-24 11:43:41.982221000 +0200
   3 @@ -133,35 +133,35 @@ class DBEngine {
   4             MAX(stattable.pending) AS pending
   5             FROM (
   6                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
   7 -                    COUNT(content) AS spam,
   8 +                    COUNT(msgs.content) AS spam,
   9                     0 AS banned,
  10                     0 AS viruses,
  11                     0 AS badheaders,
  12                     0 AS pending
  13                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  14 -                    WHERE content='S' AND NOT (msgs.quar_type = '')
  15 +                    WHERE msgs.content='S' AND NOT (msgs.quar_type = '')
  16                     AND msgrcpt.rs IN ('','v')
  17                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  18                 UNION
  19                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
  20                     0 AS spam,
  21 -                    COUNT(content) AS banned,
  22 +                    COUNT(msgs.content) AS banned,
  23                     0 AS viruses,
  24                     0 AS badheaders,
  25                     0 AS pending 
  26                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  27 -                    WHERE content='B' AND NOT (msgs.quar_type = '')
  28 +                    WHERE msgs.content='B' AND NOT (msgs.quar_type = '')
  29                     AND msgrcpt.rs IN ('','v')
  30                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  31                 UNION
  32                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
  33                     0 AS spam,
  34                     0 AS banned,
  35 -                    COUNT(content) AS viruses,
  36 +                    COUNT(msgs.content) AS viruses,
  37                     0 AS badheaders,
  38                     0 AS pending
  39                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  40 -                    WHERE content='V' AND NOT (msgs.quar_type = '')
  41 +                    WHERE msgs.content='V' AND NOT (msgs.quar_type = '')
  42                     AND msgrcpt.rs IN ('','v')
  43                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  44                 UNION
  45 @@ -169,10 +169,10 @@ class DBEngine {
  46                     0 AS spam,
  47                     0 AS banned,
  48                     0 AS viruses,
  49 -                    COUNT(content) AS badheaders,
  50 +                    COUNT(msgs.content) AS badheaders,
  51                     0 AS pending
  52                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  53 -                    WHERE content='H' AND NOT (msgs.quar_type = '')
  54 +                    WHERE msgs.content='H' AND NOT (msgs.quar_type = '')
  55                     AND msgrcpt.rs IN ('','v')
  56                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  57                 UNION
  58 @@ -181,7 +181,7 @@ class DBEngine {
  59                     0 AS banned,
  60                     0 AS viruses,
  61                     0 AS badheaders,
  62 -                    COUNT(content) AS pending
  63 +                    COUNT(msgs.content) AS pending
  64                     FROM msgs JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  65                     WHERE msgrcpt.rs='p' AND NOT (msgs.quar_type = '')
  66                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  67 @@ -240,7 +240,7 @@ class DBEngine {
  68         $recipEmailClause =  $this->convertEmailaddresses2SQL($emailaddresses);
  69  
  70         # mysql seems to run faster with a left join
  71 -        if ($conf['db']['dbtype'] == 'mysql') {
  72 +        if ($conf['db']['dbType'] == 'mysql') {
  73             $join_type = ' LEFT JOIN';
  74         } else {
  75             $join_type = ' INNER JOIN';
  76 @@ -254,38 +254,38 @@ class DBEngine {
  77             MAX(stattable.pending) AS pending
  78             FROM (
  79                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
  80 -                    COUNT(content) AS spam,
  81 +                    COUNT(msgs.content) AS spam,
  82                     0 AS banned,
  83                     0 AS viruses,
  84                     0 AS badheaders,
  85                     0 AS pending
  86                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
  87                     $join_type maddr AS recip ON msgrcpt.rid=recip.id
  88 -                    WHERE content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
  89 +                    WHERE msgs.content='S' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
  90                     AND $recipEmailClause
  91                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
  92                 UNION
  93                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
  94                     0 AS spam,
  95 -                    COUNT(content) AS banned,
  96 +                    COUNT(msgs.content) AS banned,
  97                     0 AS viruses,
  98                     0 AS badheaders,
  99                     0 AS pending 
 100                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
 101                     $join_type maddr AS recip ON msgrcpt.rid=recip.id
 102 -                    WHERE content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 103 +                    WHERE msgs.content='B' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 104                     AND $recipEmailClause
 105                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
 106                 UNION
 107                 SELECT CAST(FROM_UNIXTIME(time_num) AS DATE) AS date,
 108                     0 AS spam,
 109                     0 AS banned,
 110 -                    COUNT(content) AS viruses,
 111 +                    COUNT(msgs.content) AS viruses,
 112                     0 AS badheaders,
 113                     0 AS pending
 114                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
 115                     $join_type maddr AS recip ON msgrcpt.rid=recip.id
 116 -                    WHERE content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 117 +                    WHERE msgs.content='V' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 118                     AND $recipEmailClause
 119                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
 120                 UNION
 121 @@ -293,11 +293,11 @@ class DBEngine {
 122                     0 AS spam,
 123                     0 AS banned,
 124                     0 AS viruses,
 125 -                    COUNT(content) AS badheaders,
 126 +                    COUNT(msgs.content) AS badheaders,
 127                     0 AS pending
 128                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
 129                     $join_type maddr AS recip ON msgrcpt.rid=recip.id
 130 -                    WHERE content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 131 +                    WHERE msgs.content='H' AND NOT (msgs.quar_type = '') AND msgrcpt.rs IN ('','v')
 132                     AND $recipEmailClause
 133                     GROUP BY CAST(FROM_UNIXTIME(time_num) AS DATE)
 134                 UNION
 135 @@ -306,7 +306,7 @@ class DBEngine {
 136                     0 AS banned,
 137                     0 AS viruses,
 138                     0 AS badheaders,
 139 -                    COUNT(content) AS pending
 140 +                    COUNT(msgs.content) AS pending
 141                     FROM msgs INNER JOIN msgrcpt ON msgs.mail_id=msgrcpt.mail_id
 142                     $join_type maddr AS recip ON msgrcpt.rid=recip.id
 143                     WHERE msgrcpt.rs='p' AND NOT (msgs.quar_type = '')

Załączone pliki

Aby odnieść się do załącznika na stronie, użyj attachment:filename, jak pokazano poniżej na liście plików. NIGDY nie używaj URLa [get], ponieważ odnośnik może się zmienić i spowodować utratę informacji, którą chcesz przekazać.
  • [pobierz | zobacz] (2016-09-28 20:05:38, 0.7 KB) [[attachment:patch-config__langs.php]]
  • [pobierz | zobacz] (2016-09-28 20:05:48, 3.7 KB) [[attachment:patch-lib__Auth.class.php]]
  • [pobierz | zobacz] (2016-09-28 20:05:59, 10.8 KB) [[attachment:patch-lib__CmnFns.class.php]]
  • [pobierz | zobacz] (2016-09-28 20:06:55, 5.5 KB) [[attachment:patch-lib__DBEngine.class.php]]
  • [pobierz | zobacz] (2016-09-28 20:07:04, 0.7 KB) [[attachment:patch-lib__Quarantine.lib.php]]
  • [pobierz | zobacz] (2016-09-28 20:07:13, 0.4 KB) [[attachment:patch-lib__Template.class.php]]
  • [pobierz | zobacz] (2016-09-28 20:21:55, 0.4 KB) [[attachment:patch-messagesAdmin.php]]
  • [pobierz | zobacz] (2016-09-28 20:22:15, 0.6 KB) [[attachment:patch-read_mail.php]]
  • [pobierz | zobacz] (2016-09-28 20:22:21, 0.8 KB) [[attachment:patch-templates__quarantine.template.php]]
  • [pobierz | zobacz] (2009-10-14 08:52:01, 8.0 KB) [[attachment:pl.help.php]]
  • [pobierz | zobacz] (2009-10-14 08:52:05, 14.4 KB) [[attachment:pl.lang.php]]
 All files | Wybrane pliki Usuń Przejdź do strony copy to page

Nie możesz załączać plików do niniejszej strony.