Changeset - c1989e84b4b1
[Not reviewed]
0 1 0
Chel Sea (chain) - 7 years ago 2019-01-21 02:04:33
chain@rpgfiction.net
fix date ordering on custom date format
1 file changed with 10 insertions and 2 deletions:
0 comments (0 inline, 0 general)
inc/plugins/inplaytracker.php
Show inline comments
 
@@ -1343,8 +1343,10 @@ function inplaytracker_profile() {
 
			}
 
		}
 
		else {
 
			$scenes   = array();
 
			$sortdate = array();
 
			$months = explode(", ", $mybb->settings['inplaytracker_months']);
 
			foreach($months as $month) {
 
			foreach($months as $monthnum => $month) {
 
				$query = $db->query("SELECT * , ".TABLE_PREFIX."threads.partners, ".TABLE_PREFIX."threads.ipdate, ".TABLE_PREFIX."threads.iport, ".TABLE_PREFIX."threads.ipdaytime, ".TABLE_PREFIX."threads.subject FROM ".TABLE_PREFIX."threads
 
				LEFT JOIN ".TABLE_PREFIX."posts ON ".TABLE_PREFIX."threads.tid = ".TABLE_PREFIX."posts.tid
 
				LEFT JOIN ".TABLE_PREFIX."forums ON ".TABLE_PREFIX."forums.fid = ".TABLE_PREFIX."threads.fid
 
@@ -1365,10 +1367,16 @@ function inplaytracker_profile() {
 
							$partnerusers[] = $taguser;
 
						}
 
						$szenen['partners'] = implode(" » ", $partnerusers);
 
		    		eval("\$inplaytracker_bit .= \"".$templates->get("member_profile_inplaytracker_bit")."\";");
 
						list($day, $null, $year) = explode(" ", $szenen['ipdate']);
 
						$sortdate[] = ($year*sizeof($months)*31)+($monthnum+1)*31+$day;
 
				$scenes[] = $szenen;
 
					}
 
				}
 
			}
 
			array_multisort($scenes, SORT_ASC, $sortdate);
 
			foreach($scenes as $szenen) {
 
				eval("\$inplaytracker_bit .= \"".$templates->get("member_profile_inplaytracker_bit")."\";");
 
			}
 
		}
 
		eval("\$inplaytracker = \"".$templates->get("member_profile_inplaytracker")."\";");
 
	}
0 comments (0 inline, 0 general)