Commit fcfa8fa878a352111923c81379b0e281c4458919
1 parent
0ff6e9db
Exists in
master
and in
108 other branches
donot create task node, if it doesnot exist
Showing
1 changed file
with
6 additions
and
13 deletions
Show diff stats
php/classes/AmdaStats.php
... | ... | @@ -133,13 +133,13 @@ class AmdaStats { |
133 | 133 | $realTask = $this->task[$task]; |
134 | 134 | else |
135 | 135 | $realTask = $task; |
136 | - | |
136 | + | |
137 | 137 | if (!in_array($user, $this->usersToExclude)) { |
138 | 138 | $taskElementNode = $this->statXml->getElementsByTagName("$realTask"); |
139 | - if ($taskElementNode->length == 0) { | |
140 | - $taskElementNode = $this->statXml->createElement("$realTask"); | |
141 | - $this->statXml->documentElement->appendChild($taskElementNode); | |
142 | - } | |
139 | + | |
140 | + if ($taskElementNode->length < 1) | |
141 | + return; | |
142 | + | |
143 | 143 | $taskElement = $taskElementNode->item(0); |
144 | 144 | if (is_object($taskElement)) { |
145 | 145 | $newTask = $this->statXml->createElement('item'); |
... | ... | @@ -150,14 +150,7 @@ class AmdaStats { |
150 | 150 | $ID = array(); |
151 | 151 | |
152 | 152 | foreach ($vars as $var) { |
153 | - if (substr($var, 0, 13) == 'spase___IMPEX') { | |
154 | - $ID[] = 'impex'; | |
155 | - } | |
156 | - elseif (substr($var, 0, 4) == 'wsd_') { | |
157 | - $ID[] = 'uploadedData'; | |
158 | - } | |
159 | - else | |
160 | - $ID[] = $var; | |
153 | + $ID[] = $var; | |
161 | 154 | } |
162 | 155 | |
163 | 156 | $ID = array_unique($ID); | ... | ... |