commit
						4b4d08c854
					
				| @ -33,7 +33,7 @@ class BBCode extends FormatterExtension { | |||||||
| 		) as $el) { | 		) as $el) { | ||||||
| 			$text = preg_replace("!\[$el\](.*?)\[/$el\]!s", "<$el>$1</$el>", $text); | 			$text = preg_replace("!\[$el\](.*?)\[/$el\]!s", "<$el>$1</$el>", $text); | ||||||
| 		} | 		} | ||||||
| 		$text = preg_replace('!>>([^\d].+)!', '<blockquote><small>$1</small></blockquote>', $text); | 		$text = preg_replace('!^>>([^\d].+)!', '<blockquote><small>$1</small></blockquote>', $text); | ||||||
| 		$text = preg_replace('!>>(\d+)(#c?\d+)?!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('post/view/$1$2').'">>>$1$2</a>', $text); | 		$text = preg_replace('!>>(\d+)(#c?\d+)?!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('post/view/$1$2').'">>>$1$2</a>', $text); | ||||||
| 		$text = preg_replace('!\[url=site://(.*?)(#c\d+)?\](.*?)\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$3</a>', $text); | 		$text = preg_replace('!\[url=site://(.*?)(#c\d+)?\](.*?)\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$3</a>', $text); | ||||||
| 		$text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$1$2</a>', $text); | 		$text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '<a class="shm-clink" data-clink-sel="$2" href="'.make_link('$1$2').'">$1$2</a>', $text); | ||||||
|  | |||||||
| @ -4,6 +4,9 @@ | |||||||
| 	position: relative; | 	position: relative; | ||||||
| 	word-wrap: break-word; | 	word-wrap: break-word; | ||||||
| } | } | ||||||
|  | .comment IMG { | ||||||
|  | 	max-width: 100%; | ||||||
|  | } | ||||||
| .comment .info { | .comment .info { | ||||||
| 	visibility: hidden; | 	visibility: hidden; | ||||||
| 	text-align: center; | 	text-align: center; | ||||||
|  | |||||||
| @ -112,8 +112,10 @@ class PrivMsg extends Extension { | |||||||
| 						} | 						} | ||||||
| 						else if(($pm["to_id"] == $user->id) || $user->can("view_other_pms")) { | 						else if(($pm["to_id"] == $user->id) || $user->can("view_other_pms")) { | ||||||
| 							$from_user = User::by_id(int_escape($pm["from_id"])); | 							$from_user = User::by_id(int_escape($pm["from_id"])); | ||||||
|  | 							if($pm["to_id"] == $user->id) { | ||||||
| 								$database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); | 								$database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); | ||||||
| 								$database->cache->delete("pm-count-{$user->id}"); | 								$database->cache->delete("pm-count-{$user->id}"); | ||||||
|  | 							} | ||||||
| 							$this->theme->display_message($page, $from_user, $user, new PM($pm)); | 							$this->theme->display_message($page, $from_user, $user, new PM($pm)); | ||||||
| 						} | 						} | ||||||
| 						else { | 						else { | ||||||
| @ -178,7 +180,8 @@ class PrivMsg extends Extension { | |||||||
| 				SELECT private_message.*,user_from.name AS from_name | 				SELECT private_message.*,user_from.name AS from_name | ||||||
| 				FROM private_message | 				FROM private_message | ||||||
| 				JOIN users AS user_from ON user_from.id=from_id | 				JOIN users AS user_from ON user_from.id=from_id | ||||||
| 				WHERE to_id = :toid", 
 | 				WHERE to_id = :toid | ||||||
|  | 				ORDER BY sent_date DESC",
 | ||||||
| 			array("toid" => $user->id)); | 			array("toid" => $user->id)); | ||||||
| 		$pms = array(); | 		$pms = array(); | ||||||
| 		foreach($arr as $pm) { | 		foreach($arr as $pm) { | ||||||
|  | |||||||
| @ -6,7 +6,7 @@ class PrivMsgTheme extends Themelet { | |||||||
| 
 | 
 | ||||||
| 		$html = " | 		$html = " | ||||||
| 			<table id='pms' class='zebra sortable'> | 			<table id='pms' class='zebra sortable'> | ||||||
| 				<thead><tr><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead> | 				<thead><tr><th>R?</th><th>Subject</th><th>From</th><th>Date</th><th>Action</th></tr></thead> | ||||||
| 				<tbody>";
 | 				<tbody>";
 | ||||||
| 		$n = 0; | 		$n = 0; | ||||||
| 		foreach($pms as $pm) { | 		foreach($pms as $pm) { | ||||||
| @ -18,14 +18,21 @@ class PrivMsgTheme extends Themelet { | |||||||
| 			$pm_url = make_link("pm/read/".$pm->id); | 			$pm_url = make_link("pm/read/".$pm->id); | ||||||
| 			$del_url = make_link("pm/delete"); | 			$del_url = make_link("pm/delete"); | ||||||
| 			$h_date = html_escape($pm->sent_date); | 			$h_date = html_escape($pm->sent_date); | ||||||
| 			if(!$pm->is_read) $h_subject = "<b>$h_subject</b>"; | 			$readYN = "Y"; | ||||||
| 			$html .= "<tr><td><a href='$pm_url'>$h_subject</a></td>
 | 			if(!$pm->is_read) { | ||||||
|  | 				$h_subject = "<b>$h_subject</b>"; | ||||||
|  | 				$readYN = "N"; | ||||||
|  | 			} | ||||||
|  | 			$html .= "<tr>
 | ||||||
|  | 			<td>$readYN</td> | ||||||
|  | 			<td><a href='$pm_url'>$h_subject</a></td> | ||||||
| 			<td><a href='$from_url'>$h_from</a></td><td>$h_date</td> | 			<td><a href='$from_url'>$h_from</a></td><td>$h_date</td> | ||||||
| 			<td><form action='$del_url' method='POST'> | 			<td><form action='$del_url' method='POST'> | ||||||
| 				<input type='hidden' name='pm_id' value='{$pm->id}'> | 				<input type='hidden' name='pm_id' value='{$pm->id}'> | ||||||
| 				".$user->get_auth_html()." | 				".$user->get_auth_html()." | ||||||
| 				<input type='submit' value='Delete'> | 				<input type='submit' value='Delete'> | ||||||
| 			</form></td></tr>";
 | 			</form></td> | ||||||
|  | 			</tr>";
 | ||||||
| 		} | 		} | ||||||
| 		$html .= " | 		$html .= " | ||||||
| 				</tbody> | 				</tbody> | ||||||
|  | |||||||
| @ -261,10 +261,11 @@ class Tag_History extends Extension { | |||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		if(count($select_code) == 0) { | 		if(count($select_code) == 0) { | ||||||
|  | 			log_error("tag_history", "Tried to mass revert without any conditions"); | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		log_info("tag_history", 'Attempting to revert edits where '.implode(" and ", $select_code)." / ".implode(" and ", $select_args)); | 		log_info("tag_history", 'Attempting to revert edits where '.implode(" and ", $select_code)." (".implode(" / ", $select_args).")"); | ||||||
| 		 | 		 | ||||||
| 		// Get all the images that the given IP has changed tags on (within the timeframe) that were last editied by the given IP
 | 		// Get all the images that the given IP has changed tags on (within the timeframe) that were last editied by the given IP
 | ||||||
| 		$result = $database->get_col(' | 		$result = $database->get_col(' | ||||||
|  | |||||||
| @ -14,7 +14,11 @@ TABLE.form TBODY TD {text-align: left;} | |||||||
| TABLE.form TBODY TH {text-align: right; padding-right: 4px; width: 1%;} | TABLE.form TBODY TH {text-align: right; padding-right: 4px; width: 1%;} | ||||||
| TABLE.form TD + TH {padding-left: 8px;} | TABLE.form TD + TH {padding-left: 8px;} | ||||||
| 
 | 
 | ||||||
| *[onclick],H3[class~="shm-toggler"] {cursor: pointer;} | *[onclick], | ||||||
|  | H3[class~="shm-toggler"], | ||||||
|  | .sortable TH { | ||||||
|  | 	cursor: pointer; | ||||||
|  | } | ||||||
| IMG {border: none;} | IMG {border: none;} | ||||||
| FORM {margin: 0px;} | FORM {margin: 0px;} | ||||||
| IMG.lazy {display: none;} | IMG.lazy {display: none;} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user