Code Duplication    Length = 2-5 lines in 3 locations

Sources/Class-Package.php 1 location

@@ 1157-1158 (lines=2) @@
1154
1155
				$path = strtr($_SERVER['DOCUMENT_ROOT'], array('/home/' . $match[1] . '/' => '', '/home2/' . $match[1] . '/' => ''));
1156
1157
				if (substr($path, -1) == '/')
1158
					$path = substr($path, 0, -1);
1159
1160
				if (strlen(dirname($_SERVER['PHP_SELF'])) > 1)
1161
					$path .= dirname($_SERVER['PHP_SELF']);

Sources/PersonalMessage.php 1 location

@@ 2573-2577 (lines=5) @@
2570
				$type = 'add';
2571
				$action = substr($action, 4);
2572
			}
2573
			elseif (substr($action, 0, 4) == 'rem_')
2574
			{
2575
				$type = 'rem';
2576
				$action = substr($action, 4);
2577
			}
2578
			else
2579
				$type = 'unk';
2580

Sources/Subs.php 1 location

@@ 1367-1368 (lines=2) @@
1364
				'after' => '</a>',
1365
				'validate' => function (&$tag, &$data, $disabled)
1366
				{
1367
					if (substr($data, 0, 1) == '#')
1368
						$data = '#post_' . substr($data, 1);
1369
					if (empty(parse_url($data, PHP_URL_SCHEME)))
1370
						$data = 'http://' . ltrim($data, ':/');
1371
				},