PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.20
ووسلام – همگام سازی ووکامرس و باسلام v1.10.20
1.10.19 1.10.20 1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 All 53 releases
← All changes | includes/Utilities/TicketExtraInfoFormatter.php +3 -53 1.10.41.10.20 View file →
@@ -23,59 +23,9 @@
23 23 }
24 24
25 25 public static function appendFromRequest(string $content, array $request): string
26 26 {
27 - $dashboardLines = self::collectDashboardLines($request);
28 - $hostPanelLines = self::collectHostPanelLines($request);
29 -
30 - if (empty($dashboardLines) && empty($hostPanelLines)) {
31 - return trim($content);
32 - }
33 -
34 - $sections = [trim($content)];
35 -
36 - if (!empty($dashboardLines)) {
37 - $sections[] = "اطلاعات پیشخوان:\n" . implode("\n", $dashboardLines);
38 - }
39 -
40 - if (!empty($hostPanelLines)) {
41 - $sections[] = "کنترل پنل هاست:\n" . implode("\n", $hostPanelLines);
42 - }
43 -
44 - return trim(implode("\n\n", array_filter($sections)));
45 - }
46 -
47 - private static function collectDashboardLines(array $request): array
48 - {
49 - $lines = [];
50 -
51 - $dashboardLoginUrl = self::sanitize($request['dashboard_login_url'] ?? '');
52 - $dashboardUsername = self::sanitize($request['dashboard_username'] ?? '');
53 - $dashboardPassword = self::sanitize($request['dashboard_password'] ?? '');
54 -
55 - if ($dashboardLoginUrl !== '') $lines[] = 'آدرس لاگین پیشخوان: ' . $dashboardLoginUrl;
56 - if ($dashboardUsername !== '') $lines[] = 'نام کاربری پیشخوان: ' . $dashboardUsername;
57 - if ($dashboardPassword !== '') $lines[] = 'رمز عبور پیشخوان: ' . $dashboardPassword;
58 -
59 - return $lines;
60 - }
61 -
62 - private static function collectHostPanelLines(array $request): array
63 - {
64 - $lines = [];
65 -
66 - $hostPanelLoginUrl = self::sanitize($request['host_panel_login_url'] ?? '');
67 - $hostPanelUsername = self::sanitize($request['host_panel_username'] ?? '');
68 - $hostPanelPassword = self::sanitize($request['host_panel_password'] ?? '');
69 -
70 - if ($hostPanelLoginUrl !== '') $lines[] = 'آدرس لاگین کنترل پنل هاست: ' . $hostPanelLoginUrl;
71 - if ($hostPanelUsername !== '') $lines[] = 'نام کاربری کنترل پنل هاست: ' . $hostPanelUsername;
72 - if ($hostPanelPassword !== '') $lines[] = 'رمز عبور کنترل پنل هاست: ' . $hostPanelPassword;
73 -
74 - return $lines;
75 - }
76 -
77 - private static function sanitize($value): string
78 - {
79 - return preg_replace('/\s+/', ' ', self::sanitizeContent($value));
27 + // Kept as a compatibility shim for third-party callers. Access data is
28 + // intentionally ignored and must be sent with TicketAccessData instead.
29 + return trim($content);
80 30 }
81 31 }