OK, a couple of issues so far. Uploading a image give me this error on page, nothing in error log.
"Something went wrong while uploading this item:
Something went wrong with the upload (invalid async). If the error continues contact the administrator."
And: clicking the Gallery Stats gives me an error on page, and error in log.
"An Error Has Occurred
Division by zero"
Error log says,
Warning: Division by zero
http://lurkts1.epizy.com/ts12/index.php?action=media;sa=stats
File: /home/vol7_2/epizy.com/epiz_28298983/htdocs/ts12/sources/levgal_src/Model/Stats.php
Line: 198
182: );
183: $max = 0;
184: $temp = array();
185: while ($row = $db->fetch_assoc($request))
186: {
187: $temp[] = $row;
188: if ($row['count'] > $max)
189: {
190: $max = $row['count'];
191: }
192: }
193: $db->free_result($request);
194:
195: // Now to add percentages.
196: foreach ($temp as $k => $v)
197: {
198: $temp[$k]['percent'] = round($v['count'] / $max * 100);
199: $temp[$k]['count_format'] = comma_format($v['count']);
200: $temp[$k]['item'] = '<a href="' . $scripturl . '?media/album/' . (!empty($v['album_slug']) ? $v['album_slug'] . '.' . $v['id_album'] : $v['id_album']) . '/">' . $v['album_name'] . '</a>';
201: }
202: cache_put_data($cache_key, $temp, $cache_ttl);
203: }
204:
205: return $temp;
206: }
207:
208: public function getTopItemsByComments()
209: {
210: global $scripturl;
211:
212: $db = database();
213:
214: $cache_ttl = 360;
215: $cache_key = 'lgal_top_items_by_comments-' . $this->groups;
216: if (($temp = cache_get_data($cache_key, $cache_ttl)) === null)
217: {
218: $album_list = $this->getVisibleAlbums();