Deskthority can see into the future!

User avatar
Minskleip

06 Nov 2011, 00:12

deskthority-future.png
deskthority-future.png (17.53 KiB) Viewed 2309 times

User avatar
webwit
Wild Duck

06 Nov 2011, 00:18

I guess it's related to daylight saving time.

Findecanor

06 Nov 2011, 00:22

Nah.. The server is located in CET, right? Then it should be the same.

BTW. I had added entries for G80-1800, G80-11800 and G80-11900.

User avatar
webwit
Wild Duck

06 Nov 2011, 00:30

Hmm, somewhere in this piece of shite. I wonder who wrote it.
Spoiler:

Code: Select all

		/* BEGIN changed by webwit */
		$wiki_pages = $wiki_revisions = $last_post_url_wiki = '';
		if ('/wiki' === $u_viewforum)
		{
			if (@mysql_connect($sqlhost, $sqluser, $sqlpass) && @mysql_select_db($sqldb)) {
				$query = "
				        SELECT
				                ss_good_articles,ss_total_edits
				        FROM
				                site_stats
				        ";

				$result = mysql_query($query);
				if ($result && mysql_num_rows($result))
				{
					$wiki_pages = mysql_result($result, 0);
					$wiki_revisions = mysql_result($result, 0, 1);
				}

				$query = "
				        SELECT
				                rev_user_text, rev_timestamp, page_title
				        FROM
				                revision
				        LEFT JOIN
				        		page
				   		ON
				   				revision.rev_page = page.page_id
				        ORDER BY
				        		rev_id DESC
				        LIMIT
				        	1
				        ";

				$result = mysql_query($query);
				if ($result && mysql_num_rows($result))
				{
					$rev_user_text = mysql_result($result, 0);
					$rev_timestamp = mysql_result($result, 0, 1);
					$php_timestamp = mktime(substr($rev_timestamp, 8, 2), substr($rev_timestamp, 10, 2), substr($rev_timestamp, 12, 2),
						substr($rev_timestamp, 4, 2), substr($rev_timestamp, 6, 2), substr($rev_timestamp, 0, 4));
					$php_timestamp += $config['board_timezone'] * 3600;
					$php_timestamp += $config['board_dst'] * 3600;
					$last_post_time = $user->format_date($php_timestamp);
					$last_post_url_wiki = '/wiki/' . mysql_result($result, 0, 2);
					$sql = "
						SELECT
							user_id, username
						FROM
							" . USERS_TABLE . "
						WHERE
							username_clean = '" . strtolower(mysql_escape_string($rev_user_text)) . "'
						";
					$result = $db->sql_query($sql);
					if ($user_row = $db->sql_fetchrow($result))
					{
						$row['forum_last_poster_id'] = $user_row['user_id'];
						$row['forum_last_poster_name'] = $user_row['username'];
						$row['forum_last_poster_colour'] = '';
					}
					$db->sql_freeresult($result);
				}
			}
		}

User avatar
7bit

06 Nov 2011, 09:44

Findecanor wrote:BTW. I had added entries for G80-1800, G80-11800 and G80-11900.
Where are the pictures?

Post Reply

Return to “Deskthority talk”