Simple History - Version 2.0.20

Version Description

(February 2015) =

  • Added: changes via WP-CLI is now detected (was previously shown as "other").
  • Added: severity level (info, warning, debug, etc.) of event is includes in the RSS output.
  • Changed the way user login is logged. Should fix https://github.com/bonny/WordPress-Simple-History/issues/40 + possible more related issues.
  • Added: filter simple_history/simple_logger/log_message_key added, that can be used to shortcut log messages. See example file for usage. Fixes https://wordpress.org/support/topic/stop-logging-certain-types-of-activity.
  • Added: now uses object caching at some places. Should speed up some parts of the plugin for users with caching enabled.
  • Fixed: IP info popup can now be closed with esc.
  • Fixed: works better on small screens (like mobile phones) + misc other style related fixes.
Download this release

Release Info

Developer eskapism
Plugin Icon 128x128 Simple History
Version 2.0.20
Comparing to
See all releases

Code changes from version 2.0.19 to 2.0.20

SimpleHistory.php CHANGED
@@ -6,7 +6,7 @@
6
  class SimpleHistory {
7
 
8
  const NAME = "Simple History";
9
- const VERSION = "2.0.19";
10
 
11
  /**
12
  * Capability required to view the history log
@@ -119,6 +119,27 @@ class SimpleHistory {
119
  * @param SimpleHistory $SimpleHistory This class.
120
  */
121
  do_action("simple_history/after_init", $this);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  }
124
 
@@ -372,6 +393,7 @@ class SimpleHistory {
372
  }
373
 
374
  $data["log_rows"][$key] = $this->getLogRowHTMLOutput($oneLogRow, $args);
 
375
 
376
  }
377
 
@@ -1516,6 +1538,8 @@ foreach ($arr_settings_tabs as $one_tab) {
1516
  )
1517
  );
1518
 
 
 
1519
  }
1520
 
1521
  /**
@@ -1611,6 +1635,8 @@ foreach ($arr_settings_tabs as $one_tab) {
1611
  )
1612
  );
1613
 
 
 
1614
  }
1615
 
1616
  /**
@@ -2257,8 +2283,16 @@ foreach ($arr_settings_tabs as $one_tab) {
2257
  $wpdb->prefix . SimpleHistory::DBTABLE_CONTEXTS
2258
  );
2259
 
2260
- $results_users_today = $wpdb->get_results($sql_users_today);
2261
- $count_users_today = sizeof($results_users_today);
 
 
 
 
 
 
 
 
2262
 
2263
  // Get number of other sources (not wp_user)
2264
  $sql_other_sources_where = sprintf(
@@ -2290,7 +2324,16 @@ foreach ($arr_settings_tabs as $one_tab) {
2290
  );
2291
  // sf_d($sql_other_sources, '$sql_other_sources');
2292
 
2293
- $results_other_sources_today = $wpdb->get_results($sql_other_sources);
 
 
 
 
 
 
 
 
 
2294
  $count_other_sources = sizeof($results_other_sources_today);
2295
 
2296
  #sf_d($logResults, '$logResults');
@@ -2302,125 +2345,126 @@ foreach ($arr_settings_tabs as $one_tab) {
2302
  <p>
2303
  <?php
2304
 
2305
- $msg_tmpl = "";
2306
 
2307
- // No results today at all
2308
- if ($total_row_count == 0) {
2309
 
2310
- $msg_tmpl = __("No events today so far.", "simple-history");
2311
 
2312
- } else {
2313
-
2314
- /*
2315
- Type of results
2316
- x1 event today from 1 user.
2317
- x1 event today from 1 source.
2318
- 3 events today from 1 user.
2319
- x2 events today from 2 users.
2320
- x2 events today from 1 user and 1 other source.
2321
- x3 events today from 2 users and 1 other source.
2322
- x3 events today from 1 user and 2 other sources.
2323
- x4 events today from 2 users and 2 other sources.
2324
- */
2325
-
2326
- // A single event existed and was from a user
2327
- // 1 event today from 1 user.
2328
- if ($total_row_count == 1 && $count_users_today == 1) {
2329
- $msg_tmpl .= __('One event today from one user.', "simple-history");
2330
- }
2331
-
2332
- // A single event existed and was from another source
2333
- // 1 event today from 1 source.
2334
- if ($total_row_count == 1 && !$count_users_today) {
2335
- $msg_tmpl .= __('One event today from one source.', "simple-history");
2336
- }
2337
-
2338
- // Multiple events from a single user
2339
- // 3 events today from one user.
2340
- if ($total_row_count > 1 && $count_users_today == 1 && !$count_other_sources) {
2341
- $msg_tmpl .= __('%1$d events today from one user.', "simple-history");
2342
- }
2343
-
2344
- // Multiple events from only users
2345
- // 2 events today from 2 users.
2346
- if ($total_row_count > 1 && $count_users_today == $total_row_count) {
2347
- $msg_tmpl .= __('%1$d events today from %2$d users.', "simple-history");
2348
- }
2349
 
2350
- // Multiple events from 1 single user and 1 single other source
2351
- // 2 events today from 1 user and 1 other source.
2352
- if ($total_row_count && 1 == $count_users_today && 1 == $count_other_sources) {
2353
- $msg_tmpl .= __('%1$d events today from one user and one other source.', "simple-history");
2354
- }
 
 
 
 
 
 
 
 
 
 
 
 
2355
 
2356
- // Multiple events from multple users but from only 1 single other source
2357
- // 3 events today from 2 users and 1 other source.
2358
- if ($total_row_count > 1 && $count_users_today > 1 && $count_other_sources == 1) {
2359
- $msg_tmpl .= __('%1$d events today from one user and one other source.', "simple-history");
2360
- }
2361
 
2362
- // Multiple events from 1 user but from multiple other source
2363
- // 3 events today from 1 user and 2 other sources.
2364
- if ($total_row_count > 1 && 1 == $count_users_today && $count_other_sources > 1) {
2365
- $msg_tmpl .= __('%1$d events today from one user and %3$d other sources.', "simple-history");
2366
- }
2367
 
2368
- // Multiple events from multiple user and from multiple other sources
2369
- // 4 events today from 2 users and 2 other sources.
2370
- if ($total_row_count > 1 && $count_users_today > 1 && $count_other_sources > 1) {
2371
- $msg_tmpl .= __('%1$s events today from %2$d users and %3$d other sources.', "simple-history");
2372
- }
2373
 
2374
- }
 
 
 
 
2375
 
2376
- /*
2377
- if ( $logResults["total_row_count"] == 0 ) {
 
 
 
2378
 
2379
- $msg_tmpl = __("No events today so far.", "simple-history");
 
 
 
 
2380
 
2381
- } elseif ( $logResults["total_row_count"] == 1 ) {
 
 
 
 
2382
 
2383
- $msg_tmpl = __('%1$d event today from one user.', "simple-history");
2384
 
2385
- } elseif ( $logResults["total_row_count"] > 0 && sizeof( $results_users_today ) > 1 ) {
 
2386
 
2387
- $msg_tmpl = __('%1$d events today from %2$d users.', "simple-history");
 
 
 
 
 
2388
 
2389
- } elseif ( $logResults["total_row_count"] > 0 && sizeof( $results_users_today ) == 1 ) {
 
 
2390
 
2391
- $msg_tmpl = __('%1$d events today from one user.', "simple-history");
 
 
 
 
 
2392
 
2393
- }
2394
- */
2395
 
2396
- // only show stats if we have something to output
2397
- if ($msg_tmpl) {
 
 
2398
 
2399
- printf(
2400
- $msg_tmpl,
2401
- $logResults["total_row_count"], // 1
2402
- $count_users_today, // 2
2403
- $count_other_sources // 3
2404
- );
2405
 
2406
- // Space between texts
2407
- /*
2408
- echo " ";
 
 
 
 
2409
 
2410
- // http://playground-root.ep/wp-admin/options-general.php?page=simple_history_settings_menu_slug&selected-tab=stats
2411
- printf(
2412
- '<a href="%1$s">View more stats</a>.',
2413
- add_query_arg("selected-tab", "stats", menu_page_url(SimpleHistory::SETTINGS_MENU_SLUG, 0))
2414
- );
2415
- */
2416
 
 
 
 
2417
  }
2418
 
2419
- ?>
2420
- </p>
2421
- </div>
2422
- <?php
2423
 
2424
  }
2425
 
2426
- }// class
6
  class SimpleHistory {
7
 
8
  const NAME = "Simple History";
9
+ const VERSION = "2.0.20";
10
 
11
  /**
12
  * Capability required to view the history log
119
  * @param SimpleHistory $SimpleHistory This class.
120
  */
121
  do_action("simple_history/after_init", $this);
122
+
123
+ // @todo run this when a debug const is defined and true
124
+ /*
125
+ add_filter("simple_history/log_argument/context", function($context, $level, $message, $logger) {
126
+
127
+ $context["_debug_get"] = $this->json_encode( $_GET );
128
+ $context["_debug_post"] = $this->json_encode( $_POST );
129
+ $context["_debug_server"] = $this->json_encode( $_SERVER );
130
+ $context["_debug_php_sapi_name"] = php_sapi_name();
131
+
132
+ global $argv;
133
+ $context["_debug_argv"] = $this->json_encode( $argv );
134
+
135
+ // $context["_debug_env"] = $this->json_encode( $_ENV );
136
+
137
+ $context["_debug_constants"] = $this->json_encode( get_defined_constants(true) );
138
+
139
+ return $context;
140
+
141
+ }, 10, 4);
142
+ */
143
 
144
  }
145
 
393
  }
394
 
395
  $data["log_rows"][$key] = $this->getLogRowHTMLOutput($oneLogRow, $args);
396
+ $data["num_queries"] = get_num_queries();
397
 
398
  }
399
 
1538
  )
1539
  );
1540
 
1541
+ $this->get_cache_incrementor(true);
1542
+
1543
  }
1544
 
1545
  /**
1635
  )
1636
  );
1637
 
1638
+ $this->get_cache_incrementor(true);
1639
+
1640
  }
1641
 
1642
  /**
2283
  $wpdb->prefix . SimpleHistory::DBTABLE_CONTEXTS
2284
  );
2285
 
2286
+ $cache_key = "quick_stats_users_today_" . md5( serialize( $sql_loggers_in ) );
2287
+ $cache_group = "simple-history-" . $this->get_cache_incrementor();
2288
+ $results_users_today = wp_cache_get($cache_key, $cache_group );
2289
+
2290
+ if ( false === $results_users_today ) {
2291
+ $results_users_today = $wpdb->get_results($sql_users_today);
2292
+ wp_cache_set($cache_key, $results_users_today, $cache_group );
2293
+ }
2294
+
2295
+ $count_users_today = sizeof( $results_users_today );
2296
 
2297
  // Get number of other sources (not wp_user)
2298
  $sql_other_sources_where = sprintf(
2324
  );
2325
  // sf_d($sql_other_sources, '$sql_other_sources');
2326
 
2327
+ $cache_key = "quick_stats_results_other_sources_today_" . md5( serialize($sql_other_sources) );
2328
+ $results_other_sources_today = wp_cache_get($cache_key, $cache_group);
2329
+
2330
+ if ( false === $results_other_sources_today ) {
2331
+
2332
+ $results_other_sources_today = $wpdb->get_results($sql_other_sources);
2333
+ wp_cache_set($cache_key, $results_other_sources_today, $cache_group);
2334
+
2335
+ }
2336
+
2337
  $count_other_sources = sizeof($results_other_sources_today);
2338
 
2339
  #sf_d($logResults, '$logResults');
2345
  <p>
2346
  <?php
2347
 
2348
+ $msg_tmpl = "";
2349
 
2350
+ // No results today at all
2351
+ if ( $total_row_count == 0 ) {
2352
 
2353
+ $msg_tmpl = __("No events today so far.", "simple-history");
2354
 
2355
+ } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2356
 
2357
+ /*
2358
+ Type of results
2359
+ x1 event today from 1 user.
2360
+ x1 event today from 1 source.
2361
+ 3 events today from 1 user.
2362
+ x2 events today from 2 users.
2363
+ x2 events today from 1 user and 1 other source.
2364
+ x3 events today from 2 users and 1 other source.
2365
+ x3 events today from 1 user and 2 other sources.
2366
+ x4 events today from 2 users and 2 other sources.
2367
+ */
2368
+
2369
+ // A single event existed and was from a user
2370
+ // 1 event today from 1 user.
2371
+ if ( $total_row_count == 1 && $count_users_today == 1 ) {
2372
+ $msg_tmpl .= __('One event today from one user.', "simple-history");
2373
+ }
2374
 
2375
+ // A single event existed and was from another source
2376
+ // 1 event today from 1 source.
2377
+ if ( $total_row_count == 1 && !$count_users_today ) {
2378
+ $msg_tmpl .= __('One event today from one source.', "simple-history");
2379
+ }
2380
 
2381
+ // Multiple events from a single user
2382
+ // 3 events today from one user.
2383
+ if ( $total_row_count > 1 && $count_users_today == 1 && !$count_other_sources ) {
2384
+ $msg_tmpl .= __('%1$d events today from one user.', "simple-history");
2385
+ }
2386
 
2387
+ // Multiple events from only users
2388
+ // 2 events today from 2 users.
2389
+ if ( $total_row_count > 1 && $count_users_today == $total_row_count ) {
2390
+ $msg_tmpl .= __('%1$d events today from %2$d users.', "simple-history");
2391
+ }
2392
 
2393
+ // Multiple events from 1 single user and 1 single other source
2394
+ // 2 events today from 1 user and 1 other source.
2395
+ if ( $total_row_count && 1 == $count_users_today && 1 == $count_other_sources ) {
2396
+ $msg_tmpl .= __('%1$d events today from one user and one other source.', "simple-history");
2397
+ }
2398
 
2399
+ // Multiple events from multple users but from only 1 single other source
2400
+ // 3 events today from 2 users and 1 other source.
2401
+ if ( $total_row_count > 1 && $count_users_today > 1 && $count_other_sources == 1 ) {
2402
+ $msg_tmpl .= __('%1$d events today from one user and one other source.', "simple-history");
2403
+ }
2404
 
2405
+ // Multiple events from 1 user but from multiple other source
2406
+ // 3 events today from 1 user and 2 other sources.
2407
+ if ( $total_row_count > 1 && 1 == $count_users_today && $count_other_sources > 1 ) {
2408
+ $msg_tmpl .= __('%1$d events today from one user and %3$d other sources.', "simple-history");
2409
+ }
2410
 
2411
+ // Multiple events from multiple user and from multiple other sources
2412
+ // 4 events today from 2 users and 2 other sources.
2413
+ if ( $total_row_count > 1 && $count_users_today > 1 && $count_other_sources > 1 ) {
2414
+ $msg_tmpl .= __('%1$s events today from %2$d users and %3$d other sources.', "simple-history");
2415
+ }
2416
 
2417
+ }
2418
 
2419
+ // only show stats if we have something to output
2420
+ if ( $msg_tmpl ) {
2421
 
2422
+ printf(
2423
+ $msg_tmpl,
2424
+ $logResults["total_row_count"], // 1
2425
+ $count_users_today, // 2
2426
+ $count_other_sources // 3
2427
+ );
2428
 
2429
+ // Space between texts
2430
+ /*
2431
+ echo " ";
2432
 
2433
+ // http://playground-root.ep/wp-admin/options-general.php?page=simple_history_settings_menu_slug&selected-tab=stats
2434
+ printf(
2435
+ '<a href="%1$s">View more stats</a>.',
2436
+ add_query_arg("selected-tab", "stats", menu_page_url(SimpleHistory::SETTINGS_MENU_SLUG, 0))
2437
+ );
2438
+ */
2439
 
2440
+ }
 
2441
 
2442
+ ?>
2443
+ </p>
2444
+ </div>
2445
+ <?php
2446
 
2447
+ } // output_quick_stats
 
 
 
 
 
2448
 
2449
+ /**
2450
+ * https://www.tollmanz.com/invalidation-schemes/
2451
+ *
2452
+ * @param $refresh bool
2453
+ * @return string
2454
+ */
2455
+ public static function get_cache_incrementor( $refresh = false ) {
2456
 
2457
+ $incrementor_key = 'simple_history_incrementor';
2458
+ $incrementor_value = wp_cache_get( $incrementor_key );
 
 
 
 
2459
 
2460
+ if ( false === $incrementor_value || true === $refresh ) {
2461
+ $incrementor_value = time();
2462
+ wp_cache_set( $incrementor_key, $incrementor_value );
2463
  }
2464
 
2465
+ //echo "<br>incrementor_value: $incrementor_value";
2466
+ return $incrementor_value;
 
 
2467
 
2468
  }
2469
 
2470
+ } // class
SimpleHistoryLogQuery.php CHANGED
@@ -70,6 +70,14 @@ class SimpleHistoryLogQuery {
70
  $args = wp_parse_args( $args, $defaults );
71
  // sf_d($args, "Run log query with args");
72
 
 
 
 
 
 
 
 
 
73
  /*
74
  Subequent occasions query thanks to this Stack Overflow thread:
75
  http://stackoverflow.com/questions/13566303/how-to-group-subsequent-rows-based-on-a-criteria-and-then-count-them-mysql/13567320#13567320
@@ -734,6 +742,8 @@ class SimpleHistoryLogQuery {
734
 
735
  #sf_d($arr_return, '$arr_return');exit;
736
 
 
 
737
  return $arr_return;
738
 
739
  } // query
70
  $args = wp_parse_args( $args, $defaults );
71
  // sf_d($args, "Run log query with args");
72
 
73
+ $cache_key = "SimpleHistoryLogQuery_" . md5(serialize( $args )) . "_get_" . md5(serialize( $_GET )) . "_userid_" . get_current_user_id();
74
+ $cache_group = "simple-history-" . SimpleHistory::get_cache_incrementor();
75
+ $arr_return = wp_cache_get($cache_key, $cache_group);
76
+
77
+ if ( false !== $arr_return ) {
78
+ return $arr_return;
79
+ }
80
+
81
  /*
82
  Subequent occasions query thanks to this Stack Overflow thread:
83
  http://stackoverflow.com/questions/13566303/how-to-group-subsequent-rows-based-on-a-criteria-and-then-count-them-mysql/13567320#13567320
742
 
743
  #sf_d($arr_return, '$arr_return');exit;
744
 
745
+ wp_cache_set($cache_key, $arr_return, $cache_group);
746
+
747
  return $arr_return;
748
 
749
  } // query
css/styles.css CHANGED
@@ -53,7 +53,17 @@ The spinner that wp uses:;
53
 
54
  .dashboard_page_simple_history_page .SimpleHistoryGui {
55
  width: 100%;
56
- float: left;background: tran
 
 
 
 
 
 
 
 
 
 
57
  }
58
 
59
 
@@ -224,6 +234,7 @@ Style different log levels.
224
  }
225
 
226
  .SimpleHistoryLogitem__senderImage {
 
227
  border-radius: 50%;
228
  overflow: hidden;
229
  /*opacity: .8;*/
@@ -345,25 +356,29 @@ Style different log levels.
345
  Images/thumbs can be styles nicely
346
  */
347
  .SimpleHistoryLogitemThumbnail {
348
- display: inline-block;
349
- margin: .5em 0 0 0;
350
- padding: 5px;
351
- border: 1px solid #ddd;
352
- border-radius: 2px;
353
 
354
  }
355
 
 
 
 
 
356
  .SimpleHistoryLogitemThumbnail img {
357
- /*
358
- photoshop-like background that represents tranpsarency
359
- so user can see that an image have transparency
360
- */
361
- display: block;
362
- background-image: url('data:image/gif;base64,R0lGODlhEAAQAIAAAOXl5f///yH5BAAAAAAALAAAAAAQABAAAAIfhG+hq4jM3IFLJhoswNly/XkcBpIiVaInlLJr9FZWAQA7');
363
- max-width: 100%;
364
- max-height: 300px;
365
- max-height: 200px;
366
- height: auto;
367
  }
368
 
369
 
@@ -757,6 +772,7 @@ Modal window with detailss
757
  /** wordpress as initiator = add wordpress icon */
758
  /** anonymous user as initiator = plain user image */
759
  .SimpleHistoryLogitem--initiator-wp .SimpleHistoryLogitem__senderImage:before,
 
760
  .SimpleHistoryLogitem--initiator-web_user .SimpleHistoryLogitem__senderImage:before {
761
  display: inline-block;
762
  -webkit-font-smoothing: antialiased;
@@ -765,10 +781,25 @@ Modal window with detailss
765
  color: #999;
766
  }
767
 
768
- .SimpleHistoryLogitem--initiator-wp .SimpleHistoryLogitem__senderImage:before {
 
769
  content: "\f120";
770
  }
771
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
  .SimpleHistoryLogitem--initiator-web_user .SimpleHistoryLogitem__senderImage:before {
773
  content: "\f110";
774
  }
@@ -821,3 +852,4 @@ Modal window with detailss
821
  margin-left: 13px;
822
  margin-right: 13px;
823
  }
 
53
 
54
  .dashboard_page_simple_history_page .SimpleHistoryGui {
55
  width: 100%;
56
+ float: left;
57
+ }
58
+
59
+ @media only screen and (max-width: 850px) {
60
+ .dashboard_page_simple_history_page .SimpleHistoryGuiWrap {
61
+ float: none;
62
+ margin-right: auto;
63
+ }
64
+ .dashboard_page_simple_history_page .SimpleHistoryGui {
65
+ float: none;
66
+ }
67
  }
68
 
69
 
234
  }
235
 
236
  .SimpleHistoryLogitem__senderImage {
237
+ position: relative;
238
  border-radius: 50%;
239
  overflow: hidden;
240
  /*opacity: .8;*/
356
  Images/thumbs can be styles nicely
357
  */
358
  .SimpleHistoryLogitemThumbnail {
359
+ display: inline-block;
360
+ margin: .5em 0 0 0;
361
+ padding: 5px;
362
+ border: 1px solid #ddd;
363
+ border-radius: 2px;
364
 
365
  }
366
 
367
+ .SimpleHistoryLogitemThumbnailLink {
368
+ display: inline-block;
369
+ }
370
+
371
  .SimpleHistoryLogitemThumbnail img {
372
+ /*
373
+ photoshop-like background that represents transparency
374
+ so user can see that an image have transparency
375
+ */
376
+ display: block;
377
+ background-image: url('data:image/gif;base64,R0lGODlhEAAQAIAAAOXl5f///yH5BAAAAAAALAAAAAAQABAAAAIfhG+hq4jM3IFLJhoswNly/XkcBpIiVaInlLJr9FZWAQA7');
378
+ max-width: 100%;
379
+ max-height: 300px;
380
+ max-height: 200px;
381
+ height: auto;
382
  }
383
 
384
 
772
  /** wordpress as initiator = add wordpress icon */
773
  /** anonymous user as initiator = plain user image */
774
  .SimpleHistoryLogitem--initiator-wp .SimpleHistoryLogitem__senderImage:before,
775
+ .SimpleHistoryLogitem--initiator-wp_cli .SimpleHistoryLogitem__senderImage:before,
776
  .SimpleHistoryLogitem--initiator-web_user .SimpleHistoryLogitem__senderImage:before {
777
  display: inline-block;
778
  -webkit-font-smoothing: antialiased;
781
  color: #999;
782
  }
783
 
784
+ .SimpleHistoryLogitem--initiator-wp .SimpleHistoryLogitem__senderImage:before,
785
+ .SimpleHistoryLogitem--initiator-wp_cli .SimpleHistoryLogitem__senderImage:before {
786
  content: "\f120";
787
  }
788
 
789
+ .SimpleHistoryLogitem--initiator-wp_cli .SimpleHistoryLogitem__senderImage:after {
790
+ content: "CLI";
791
+ position: absolute;
792
+ background: rgba(255, 255, 255, 0.7);
793
+ top: 0;
794
+ left: 0;
795
+ right: 0;
796
+ bottom: 0;
797
+ line-height: 36px;
798
+ text-align: center;
799
+ font-family: monospace;
800
+ font-sIze: 12px;
801
+ }
802
+
803
  .SimpleHistoryLogitem--initiator-web_user .SimpleHistoryLogitem__senderImage:before {
804
  content: "\f110";
805
  }
852
  margin-left: 13px;
853
  margin-right: 13px;
854
  }
855
+
dropins/SimpleHistoryIpInfoDropin.css CHANGED
@@ -99,6 +99,10 @@
99
  border-top: 0;
100
  }
101
 
 
 
 
 
102
  .SimpleHistoryIpInfoDropin__ipInfoTable__mapRow td {
103
  padding: 0;
104
  }
99
  border-top: 0;
100
  }
101
 
102
+ .SimpleHistoryIpInfoDropin__ipInfoTable__mapRow a {
103
+ display: inline-block;
104
+ }
105
+
106
  .SimpleHistoryIpInfoDropin__ipInfoTable__mapRow td {
107
  padding: 0;
108
  }
dropins/SimpleHistoryIpInfoDropin.js CHANGED
@@ -27,6 +27,7 @@
27
  // Close popup
28
  $popup.on("click", ".SimpleHistoryIpInfoDropin__popupCloseButton", hidePopup);
29
  $(window).on("click", maybeHidePopup);
 
30
  $(document).on("SimpleHistory:logReloadStart", hidePopup);
31
 
32
  // Position and then show popup.
@@ -62,6 +63,11 @@
62
  return true;
63
  }
64
 
 
 
 
 
 
65
  // Else it should be ok to hide
66
  hidePopup();
67
 
27
  // Close popup
28
  $popup.on("click", ".SimpleHistoryIpInfoDropin__popupCloseButton", hidePopup);
29
  $(window).on("click", maybeHidePopup);
30
+ $(window).on("keyup", maybeHidePopup);
31
  $(document).on("SimpleHistory:logReloadStart", hidePopup);
32
 
33
  // Position and then show popup.
63
  return true;
64
  }
65
 
66
+ // If initiated by keyboard but not esc, then don't close
67
+ if (e.originalEvent.type == "keyup" && e.originalEvent.keyCode != 27) {
68
+ return;
69
+ }
70
+
71
  // Else it should be ok to hide
72
  hidePopup();
73
 
dropins/SimpleHistoryNewRowsNotifier.php CHANGED
@@ -63,7 +63,6 @@ class SimpleHistoryNewRowsNotifier {
63
  $logQueryArgs = $apiArgs;
64
 
65
  $logQuery = new SimpleHistoryLogQuery();
66
-
67
  $answer = $logQuery->query( $logQueryArgs );
68
 
69
  // Use our own repsonse array instead of $answer to keep size down
@@ -71,6 +70,7 @@ class SimpleHistoryNewRowsNotifier {
71
 
72
  $numNewRows = isset( $answer["total_row_count"] ) ? $answer["total_row_count"] : 0;
73
  $json_data["num_new_rows"] = $numNewRows;
 
74
 
75
  if ($numNewRows) {
76
 
63
  $logQueryArgs = $apiArgs;
64
 
65
  $logQuery = new SimpleHistoryLogQuery();
 
66
  $answer = $logQuery->query( $logQueryArgs );
67
 
68
  // Use our own repsonse array instead of $answer to keep size down
70
 
71
  $numNewRows = isset( $answer["total_row_count"] ) ? $answer["total_row_count"] : 0;
72
  $json_data["num_new_rows"] = $numNewRows;
73
+ $json_data["num_mysql_queries"] = get_num_queries();
74
 
75
  if ($numNewRows) {
76
 
dropins/SimpleHistoryRSSDropin.php CHANGED
@@ -183,6 +183,8 @@ class SimpleHistoryRSSDropin {
183
  #$item_title = wp_kses( $header_output . ": " . $text_output, array() );
184
  $item_title = wp_kses( $text_output, array() );
185
 
 
 
186
  ?>
187
  <item>
188
  <title><![CDATA[<?php echo $item_title; ?>]]></title>
@@ -190,6 +192,7 @@ class SimpleHistoryRSSDropin {
190
  <p><?php echo $header_output ?></p>
191
  <p><?php echo $text_output ?></p>
192
  <div><?php echo $details_output ?></div>
 
193
  <?php
194
  $occasions = $row->subsequentOccasions - 1;
195
  if ( $occasions ) {
183
  #$item_title = wp_kses( $header_output . ": " . $text_output, array() );
184
  $item_title = wp_kses( $text_output, array() );
185
 
186
+ $level_output = sprintf( __('Severity level: %1$s'), $this->sh->getLogLevelTranslated( $row->level ));
187
+
188
  ?>
189
  <item>
190
  <title><![CDATA[<?php echo $item_title; ?>]]></title>
192
  <p><?php echo $header_output ?></p>
193
  <p><?php echo $text_output ?></p>
194
  <div><?php echo $details_output ?></div>
195
+ <p><?php echo $level_output ?></p>
196
  <?php
197
  $occasions = $row->subsequentOccasions - 1;
198
  if ( $occasions ) {
dropins/SimpleHistorySidebarDropin.css CHANGED
@@ -5,6 +5,15 @@
5
  margin-right: -340px;
6
  }
7
 
 
 
 
 
 
 
 
 
 
8
  .SimpleHistory__pageSidebar .inside {
9
  margin-bottom: 0;
10
  }
@@ -16,3 +25,4 @@
16
  .SimpleHistory__pageSidebar .postbox .hndle {
17
  cursor: auto;
18
  }
 
5
  margin-right: -340px;
6
  }
7
 
8
+ @media only screen and (max-width: 850px) {
9
+ .SimpleHistory__pageSidebar {
10
+ width: 100%;
11
+ float: none;
12
+ margin-right: auto;
13
+ margin-top: 20px;
14
+ }
15
+ }
16
+
17
  .SimpleHistory__pageSidebar .inside {
18
  margin-bottom: 0;
19
  }
25
  .SimpleHistory__pageSidebar .postbox .hndle {
26
  cursor: auto;
27
  }
28
+
examples.php CHANGED
@@ -7,6 +7,23 @@ exit;
7
  * Some examples of filter usage and so on
8
  */
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  // Never clear the log (default is 60 days)
11
  add_filter("simple_history/db_purge_days_interval", "__return_zero");
12
 
7
  * Some examples of filter usage and so on
8
  */
9
 
10
+ // Don't log failed logins
11
+ add_filter("simple_history/simple_logger/log_message_key", function($doLog, $loggerSlug, $messageKey, $SimpleLoggerLogLevelsLevel, $context) {
12
+
13
+ // Don't log login attempts to non existing users
14
+ if ( "SimpleUserLogger" == $loggerSlug && "user_unknown_login_failed" == $messageKey ) {
15
+ $doLog = false;
16
+ }
17
+
18
+ // Don't log failed logins to existing users
19
+ if ( "SimpleUserLogger" == $loggerSlug && "user_login_failed" == $messageKey ) {
20
+ $doLog = false;
21
+ }
22
+
23
+ return $doLog;
24
+
25
+ }, 10, 5);
26
+
27
  // Never clear the log (default is 60 days)
28
  add_filter("simple_history/db_purge_days_interval", "__return_zero");
29
 
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Simple History
4
  Plugin URI: http://simple-history.com
5
  Description: Plugin that logs various things that occur in WordPress and then presents those events in a very nice GUI.
6
- Version: 2.0.19
7
  Author: Pär Thernström
8
  Author URI: http://simple-history.com/
9
  License: GPL2
3
  Plugin Name: Simple History
4
  Plugin URI: http://simple-history.com
5
  Description: Plugin that logs various things that occur in WordPress and then presents those events in a very nice GUI.
6
+ Version: 2.0.20
7
  Author: Pär Thernström
8
  Author URI: http://simple-history.com/
9
  License: GPL2
languages/simple-history-sv_SE.mo CHANGED
Binary file
languages/simple-history-sv_SE.po CHANGED
@@ -4,8 +4,8 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Simple History 2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/Simple-History\n"
7
- "POT-Creation-Date: 2015-01-20 21:16:38+00:00\n"
8
- "PO-Revision-Date: 2015-01-20 22:17+0100\n"
9
  "Last-Translator: Pär Thernström <par.thernstrom@gmail.com>\n"
10
  "Language-Team: \n"
11
  "Language: sv\n"
@@ -22,150 +22,154 @@ msgstr ""
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
- #: SimpleHistory.php:447 SimpleHistory.php:709
26
  msgid "Settings"
27
  msgstr "Inställningar"
28
 
29
- #: SimpleHistory.php:458
30
  msgid "Log (debug)"
31
  msgstr "Logg (debug)"
32
 
33
- #: SimpleHistory.php:463
34
  msgid "Styles example (debug)"
35
  msgstr "Stilexempel (debug)"
36
 
37
  #. Plugin Name of the plugin/theme
38
- #: SimpleHistory.php:724
39
  msgid "Simple History"
40
  msgstr "Simple History"
41
 
42
- #: SimpleHistory.php:800
43
  msgid "Remove all log items?"
44
  msgstr "Ta bort alla händelser?"
45
 
46
- #: SimpleHistory.php:802
47
  msgid "Go to the first page"
48
  msgstr "Gå till första sidan"
49
 
50
- #: SimpleHistory.php:803
51
  msgid "Go to the previous page"
52
  msgstr "Gå till föregående sida"
53
 
54
- #: SimpleHistory.php:804
55
  msgid "Go to the next page"
56
  msgstr "Gå till nästa sida"
57
 
58
- #: SimpleHistory.php:805
59
  msgid "Go to the last page"
60
  msgstr "Gå till sista sidan"
61
 
62
- #: SimpleHistory.php:806
63
  msgid "Current page"
64
  msgstr "Aktuell sida"
65
 
66
- #: SimpleHistory.php:808
67
  msgid "Oups, the log could not be loaded right now."
68
  msgstr "Hoppsan, historiken kunde inte laddas just nu."
69
 
70
- #: SimpleHistory.php:809
71
  msgid "Your search did not match any history events."
72
  msgstr "Din sökning matchade inte några händelser i historiken."
73
 
74
- #: SimpleHistory.php:1103 SimpleHistory.php:1206
75
  msgid "Simple History Settings"
76
  msgstr "Inställningar för Simple History"
77
 
78
- #: SimpleHistory.php:1137
79
  msgid "No valid callback found"
80
  msgstr "Inget giltigt callback hittades."
81
 
82
- #: SimpleHistory.php:1227
83
  msgid "Cleared database"
84
  msgstr "Databasen rensades"
85
 
86
- #: SimpleHistory.php:1254
87
  msgid "Show history"
88
  msgstr "Visa historik"
89
 
90
- #: SimpleHistory.php:1267
91
  msgid "Number of items per page"
92
  msgstr "Antal händelser per sida"
93
 
94
- #: SimpleHistory.php:1279
95
  msgid "Clear log"
96
  msgstr "Rensa logg"
97
 
98
- #: SimpleHistory.php:1419
99
  msgid "on the dashboard"
100
  msgstr "i panelen"
101
 
102
- #: SimpleHistory.php:1424
103
  msgid "as a page under the dashboard menu"
104
  msgstr "som en sida under panel-menyn"
105
 
106
- #: SimpleHistory.php:1440
107
  msgid "Items in the database are automatically removed after %1$s days."
108
  msgstr "Händelser i databasen tas automatiskt bort efter %1$s dagar."
109
 
110
- #: SimpleHistory.php:1442
111
  msgid "Items in the database are kept forever."
112
  msgstr "Händelser i databasen lagras för evigt."
113
 
114
- #: SimpleHistory.php:1446
115
  msgid "Clear log now"
116
  msgstr "Rensa loggen nu"
117
 
118
- #: SimpleHistory.php:1744
 
 
 
 
119
  msgid "+%1$s similar event"
120
  msgid_plural "+%1$s similar events"
121
  msgstr[0] "+%1$s liknande händelse"
122
  msgstr[1] "+%1$s liknande händelser"
123
 
124
- #: SimpleHistory.php:1751
125
  msgid "Loading…"
126
  msgstr "Laddar historik..."
127
 
128
- #: SimpleHistory.php:1758
129
  msgid "Showing %1$s more"
130
  msgstr "+%1$s fler"
131
 
132
- #: SimpleHistory.php:1777
133
  msgid "Context data"
134
  msgstr "Kontextuell data"
135
 
136
- #: SimpleHistory.php:1778
137
  msgid "This is potentially useful meta data that a logger has saved."
138
  msgstr "Detta eventuellt användbar metadata som en logger har sparat."
139
 
140
- #: SimpleHistory.php:2243
141
  msgid "No events today so far."
142
  msgstr "Inga händelser idag ännu."
143
 
144
- #: SimpleHistory.php:2262
145
  msgid "One event today from one user."
146
  msgstr "En händelse idag från en användare."
147
 
148
- #: SimpleHistory.php:2268
149
  msgid "One event today from one source."
150
  msgstr "En händelse idag från en källa."
151
 
152
- #: SimpleHistory.php:2274
153
  msgid "%1$d events today from one user."
154
  msgstr "%1$d händelser idag från en användare."
155
 
156
- #: SimpleHistory.php:2280
157
  msgid "%1$d events today from %2$d users."
158
  msgstr "%1$d händelser idag från %2$d användare."
159
 
160
- #: SimpleHistory.php:2286 SimpleHistory.php:2292
161
  msgid "%1$d events today from one user and one other source."
162
  msgstr "%1$d händelser idag från en användare och från en annan källa."
163
 
164
- #: SimpleHistory.php:2298
165
  msgid "%1$d events today from one user and %3$d other sources."
166
  msgstr "%1$d händelser idag från en användare och från %3$d andra källor."
167
 
168
- #: SimpleHistory.php:2304
169
  msgid "%1$s events today from %2$d users and %3$d other sources."
170
  msgstr "%1$s händelser idag från %2$d användare och %3$d andra källor."
171
 
@@ -286,7 +290,7 @@ msgstr "Testdata (debug)"
286
  msgid "Stats"
287
  msgstr "Statistik"
288
 
289
- #: dropins/SimpleHistorySidebarDropin.php:159 loggers/SimpleLogger.php:299
290
  msgid "Just now"
291
  msgstr "Just nu"
292
 
@@ -298,27 +302,27 @@ msgstr ""
298
  "Simple History är en rackarns bra plugin, men för att använda den måste din "
299
  "server ha minst PHP 5.3 installerat (du har version %s)."
300
 
301
- #: loggers/SimpleCommentsLogger.php:695
302
  msgid "Spam"
303
  msgstr "Skräp"
304
 
305
- #: loggers/SimpleCommentsLogger.php:697
306
  msgid "Approved"
307
  msgstr "Godkänd"
308
 
309
- #: loggers/SimpleCommentsLogger.php:699
310
  msgid "Pending"
311
  msgstr "Väntande"
312
 
313
- #: loggers/SimpleCommentsLogger.php:713
314
  msgid "Trackback"
315
  msgstr "Trackback"
316
 
317
- #: loggers/SimpleCommentsLogger.php:715
318
  msgid "Pingback"
319
  msgstr "Pingback"
320
 
321
- #: loggers/SimpleCommentsLogger.php:717
322
  msgid "Comment"
323
  msgstr "Kommentar"
324
 
@@ -343,25 +347,25 @@ msgstr "Av %s"
343
  msgid "%d occasions"
344
  msgstr "%d tillfällen"
345
 
346
- #: loggers/SimpleLogger.php:205
347
  msgid "Deleted user (had id %1$s, email %2$s, login %3$s)"
348
  msgstr "Raderad användare (hade id %1$s, epost %2$s, login %3$s)"
349
 
350
- #: loggers/SimpleLogger.php:220
351
  msgid "Anonymous web user"
352
  msgstr "Anonym webbanvändare"
353
 
354
- #: loggers/SimpleLogger.php:228
355
  msgid "Anonymous user from %1$s"
356
  msgstr "Anonym användare från %1$s"
357
 
358
  #. translators: Date format for log row header, see http:php.net/date
359
- #: loggers/SimpleLogger.php:304
360
  msgid "M j, Y \\a\\t G:i"
361
  msgstr "M j, Y \\a\\t G:i"
362
 
363
  #. translators: 1: last modified date and time in human time diff-format
364
- #: loggers/SimpleLogger.php:312
365
  msgid "%1$s ago"
366
  msgstr "%1$s sedan"
367
 
@@ -507,7 +511,7 @@ msgstr "Ändrade inställningar för temats anpassade bakgrund"
507
  msgid "Section"
508
  msgstr "Sektion"
509
 
510
- #: loggers/SimpleUserLogger.php:23
511
  msgid ""
512
  "Failed to login to account with username \"{login_user_login}\" because an "
513
  "incorrect password was entered"
@@ -515,32 +519,32 @@ msgstr ""
515
  "Misslyckades att logga in på kontot med användarnamnet \"{login_user_login}\" "
516
  "eftersom ett felaktigt lösenord angavs"
517
 
518
- #: loggers/SimpleUserLogger.php:24
519
  msgid ""
520
  "Failed to login with username \"{failed_login_username}\" because no user "
521
  "with that username exists"
522
  msgstr ""
523
- "Det gick inte att logga in med användarnamn \"{failed_login_username}\" "
524
  "eftersom ingen användare med det användarnamnet existerar"
525
 
526
- #: loggers/SimpleUserLogger.php:25
527
  msgid "Logged in"
528
  msgstr "Loggade in"
529
 
530
- #: loggers/SimpleUserLogger.php:26
531
  msgid "Unknown user logged in"
532
  msgstr "Okänd användare loggade in"
533
 
534
- #: loggers/SimpleUserLogger.php:27
535
  msgid "Logged out"
536
  msgstr "Loggade ut"
537
 
538
- #: loggers/SimpleUserLogger.php:28
539
  msgid "Edited the profile for user {edited_user_login} ({edited_user_email})"
540
  msgstr ""
541
  "Redigerade profilen för användaren {edited_user_login} ({edited_user_email})"
542
 
543
- #: loggers/SimpleUserLogger.php:29
544
  msgid ""
545
  "Created user {created_user_login} ({created_user_email}) with role "
546
  "{created_user_role}"
@@ -548,23 +552,23 @@ msgstr ""
548
  "Skapade användare {created_user_login} ({created_user_email}) med rollen "
549
  "{created_user_role}"
550
 
551
- #: loggers/SimpleUserLogger.php:30
552
  msgid "Deleted user {deleted_user_login} ({deleted_user_email})"
553
  msgstr "Raderade användaren {deleted_user_login} ({deleted_user_email})"
554
 
555
- #: loggers/SimpleUserLogger.php:229
556
  msgid "Edited <a href=\"{edit_profile_link}\">your profile</a>"
557
  msgstr "Redigerade <a href=\"{edit_profile_link}\">din profl</a>"
558
 
559
- #: loggers/SimpleUserLogger.php:233
560
  msgid "Edited <a href=\"{edit_profile_link}\">their profile</a>"
561
  msgstr "Redigerade <a href=\"{edit_profile_link}\">sin profil</a>"
562
 
563
- #: loggers/SimpleUserLogger.php:242
564
  msgid "Edited your profile"
565
  msgstr "Redigerade din profil"
566
 
567
- #: loggers/SimpleUserLogger.php:253
568
  msgid ""
569
  "Edited the profile for user <a href="
570
  "\"{edit_profile_link}\">{edited_user_login} ({edited_user_email})</a>"
@@ -640,33 +644,33 @@ msgstr "Pär Thernström"
640
  msgid "http://simple-history.com/"
641
  msgstr "http://simple-history.com"
642
 
643
- #: SimpleHistory.php:190
644
  msgctxt ""
645
  "Message visible while waiting for log to load from server the first time"
646
  msgid "Loading history..."
647
  msgstr "Laddar historik..."
648
 
649
- #: SimpleHistory.php:227
650
  msgctxt "page n of n"
651
  msgid "of"
652
  msgstr "av"
653
 
654
- #: SimpleHistory.php:298
655
  msgctxt "API: not enought arguments passed"
656
  msgid "Not enough args specified"
657
  msgstr "Inte tillräckligt med arguments specifierade"
658
 
659
- #: SimpleHistory.php:1191
660
  msgctxt "dashboard menu name"
661
  msgid "Simple History"
662
  msgstr "Simple History"
663
 
664
- #: SimpleHistory.php:1316
665
  msgctxt "history page headline"
666
  msgid "Simple History"
667
  msgstr "Simple History"
668
 
669
- #: SimpleHistory.php:1570
670
  msgctxt "simple-history"
671
  msgid "Simple History removed one event that were older than {days} days"
672
  msgid_plural ""
@@ -675,82 +679,82 @@ msgstr[0] "Simple History raderade en händelse som var äldre än {days} dagar.
675
  msgstr[1] ""
676
  "Simple History radera {num_rows} händelser som var äldre än {days} dagar"
677
 
678
- #: SimpleHistory.php:1914
679
  msgctxt "Log level in gui"
680
  msgid "emergency"
681
  msgstr "kritiskt"
682
 
683
- #: SimpleHistory.php:1918
684
  msgctxt "Log level in gui"
685
  msgid "alert"
686
  msgstr "alert"
687
 
688
- #: SimpleHistory.php:1922
689
  msgctxt "Log level in gui"
690
  msgid "critical"
691
  msgstr "kritiskt"
692
 
693
- #: SimpleHistory.php:1926
694
  msgctxt "Log level in gui"
695
  msgid "error"
696
  msgstr "error"
697
 
698
- #: SimpleHistory.php:1930
699
  msgctxt "Log level in gui"
700
  msgid "warning"
701
  msgstr "warning"
702
 
703
- #: SimpleHistory.php:1934
704
  msgctxt "Log level in gui"
705
  msgid "notice"
706
  msgstr "notice"
707
 
708
- #: SimpleHistory.php:1938
709
  msgctxt "Log level in gui"
710
  msgid "info"
711
  msgstr "info"
712
 
713
- #: SimpleHistory.php:1942
714
  msgctxt "Log level in gui"
715
  msgid "debug"
716
  msgstr "debug"
717
 
718
- #: SimpleHistory.php:1947
719
  msgctxt "Log level in gui"
720
  msgid "Emergency"
721
  msgstr "Emergency"
722
 
723
- #: SimpleHistory.php:1951
724
  msgctxt "Log level in gui"
725
  msgid "Alert"
726
  msgstr "Alert"
727
 
728
- #: SimpleHistory.php:1955
729
  msgctxt "Log level in gui"
730
  msgid "Critical"
731
  msgstr "Critical"
732
 
733
- #: SimpleHistory.php:1959
734
  msgctxt "Log level in gui"
735
  msgid "Error"
736
  msgstr "Error"
737
 
738
- #: SimpleHistory.php:1963
739
  msgctxt "Log level in gui"
740
  msgid "Warning"
741
  msgstr "Warning"
742
 
743
- #: SimpleHistory.php:1967
744
  msgctxt "Log level in gui"
745
  msgid "Notice"
746
  msgstr "Notice"
747
 
748
- #: SimpleHistory.php:1971
749
  msgctxt "Log level in gui"
750
  msgid "Info"
751
  msgstr "Info"
752
 
753
- #: SimpleHistory.php:1975
754
  msgctxt "Log level in gui"
755
  msgid "Debug"
756
  msgstr "Debug"
@@ -1133,35 +1137,35 @@ msgctxt "Comments logger: search"
1133
  msgid "Deleted comments"
1134
  msgstr "Borttagna kommentarer"
1135
 
1136
- #: loggers/SimpleCommentsLogger.php:612 loggers/SimpleCommentsLogger.php:625
1137
- #: loggers/SimpleCommentsLogger.php:639
1138
  msgctxt "comments logger - detailed output comment status"
1139
  msgid "Status"
1140
  msgstr "Status"
1141
 
1142
- #: loggers/SimpleCommentsLogger.php:614 loggers/SimpleCommentsLogger.php:627
1143
- #: loggers/SimpleCommentsLogger.php:641
1144
  msgctxt "comments logger - detailed output author"
1145
  msgid "Name"
1146
  msgstr "Namn"
1147
 
1148
- #: loggers/SimpleCommentsLogger.php:615 loggers/SimpleCommentsLogger.php:628
1149
- #: loggers/SimpleCommentsLogger.php:642
1150
  msgctxt "comments logger - detailed output email"
1151
  msgid "Email"
1152
  msgstr "E-post"
1153
 
1154
- #: loggers/SimpleCommentsLogger.php:616 loggers/SimpleCommentsLogger.php:629
1155
  msgctxt "comments logger - detailed output content"
1156
  msgid "Content"
1157
  msgstr "Innehåll"
1158
 
1159
- #: loggers/SimpleCommentsLogger.php:643
1160
  msgctxt "comments logger - detailed output content"
1161
  msgid "Comment"
1162
  msgstr "Kommentar"
1163
 
1164
- #: loggers/SimpleCommentsLogger.php:769
1165
  msgctxt "comments logger - edit comment"
1166
  msgid "View/Edit"
1167
  msgstr "Visa/Redigera"
@@ -1176,42 +1180,42 @@ msgctxt "User logger: search"
1176
  msgid "WordPress core updates"
1177
  msgstr "WordPress core uppdateringar"
1178
 
1179
- #: loggers/SimpleUserLogger.php:55
1180
  msgctxt "User logger: search"
1181
  msgid "Users"
1182
  msgstr "Användare"
1183
 
1184
- #: loggers/SimpleUserLogger.php:56
1185
  msgctxt "User logger: search"
1186
  msgid "All user activity"
1187
  msgstr "All användaraktivitet"
1188
 
1189
- #: loggers/SimpleUserLogger.php:58
1190
  msgctxt "User logger: search"
1191
  msgid "Successful user logins"
1192
  msgstr "Lyckade inloggningar av användare"
1193
 
1194
- #: loggers/SimpleUserLogger.php:62
1195
  msgctxt "User logger: search"
1196
  msgid "Failed user logins"
1197
  msgstr "Misslyckade inloggningar av användare"
1198
 
1199
- #: loggers/SimpleUserLogger.php:66
1200
  msgctxt "User logger: search"
1201
  msgid "User logouts"
1202
  msgstr "Utloggning av användare"
1203
 
1204
- #: loggers/SimpleUserLogger.php:69
1205
  msgctxt "User logger: search"
1206
  msgid "Created users"
1207
  msgstr "Skapade användare"
1208
 
1209
- #: loggers/SimpleUserLogger.php:72
1210
  msgctxt "User logger: search"
1211
  msgid "User profile updates"
1212
  msgstr "Uppdateringar av användarprofiler"
1213
 
1214
- #: loggers/SimpleUserLogger.php:75
1215
  msgctxt "User logger: search"
1216
  msgid "User deletions"
1217
  msgstr "Radering av användare"
@@ -1226,7 +1230,7 @@ msgctxt "Export logger: search"
1226
  msgid "Created exports"
1227
  msgstr "Skapade exporter"
1228
 
1229
- #: loggers/SimpleLogger.php:192
1230
  msgctxt "header output when initiator is the currently logged in user"
1231
  msgid "You"
1232
  msgstr "Du"
@@ -1393,47 +1397,47 @@ msgctxt "Plugin logger: search"
1393
  msgid "Deleted plugins"
1394
  msgstr "Raderade plugins"
1395
 
1396
- #: loggers/SimplePluginLogger.php:858
1397
  msgctxt "plugin logger - detailed output version"
1398
  msgid "Version"
1399
  msgstr "Version"
1400
 
1401
- #: loggers/SimplePluginLogger.php:860
1402
  msgctxt "plugin logger - detailed output author"
1403
  msgid "Author"
1404
  msgstr "Författare"
1405
 
1406
- #: loggers/SimplePluginLogger.php:862
1407
  msgctxt "plugin logger - detailed output author"
1408
  msgid "Requires"
1409
  msgstr "Kräver"
1410
 
1411
- #: loggers/SimplePluginLogger.php:861
1412
  msgctxt "plugin logger - detailed output url"
1413
  msgid "URL"
1414
  msgstr "URL"
1415
 
1416
- #: loggers/SimplePluginLogger.php:863
1417
  msgctxt "plugin logger - detailed output compatible"
1418
  msgid "Compatible up to"
1419
  msgstr "Kompatibel upp till"
1420
 
1421
- #: loggers/SimplePluginLogger.php:864
1422
  msgctxt "plugin logger - detailed output downloaded"
1423
  msgid "Downloads"
1424
  msgstr "Nedladdningar"
1425
 
1426
- #: loggers/SimplePluginLogger.php:924
1427
  msgctxt "plugin logger: plugin info thickbox title view all info"
1428
  msgid "View plugin info"
1429
  msgstr "Visa information om plugin"
1430
 
1431
- #: loggers/SimplePluginLogger.php:939
1432
  msgctxt "plugin logger: plugin info thickbox title"
1433
  msgid "View plugin info"
1434
  msgstr "Visa information om plugin"
1435
 
1436
- #: loggers/SimplePluginLogger.php:943
1437
  msgctxt "plugin logger: plugin info thickbox title"
1438
  msgid "View changelog"
1439
  msgstr "Visa ändringslogg"
@@ -1508,12 +1512,12 @@ msgctxt "Theme logger: search"
1508
  msgid "Background of themes changed"
1509
  msgstr "Ändrade bakgrunder för teman"
1510
 
1511
- #: loggers/SimpleUserLogger.php:37
1512
  msgctxt "User destroys other login sessions for themself"
1513
  msgid "Logged out from all other sessions"
1514
  msgstr "Loggade ut från alla andra sessioner"
1515
 
1516
- #: loggers/SimpleUserLogger.php:46
1517
  msgctxt "User destroys all login sessions for a user"
1518
  msgid "Logged out \"{user_display_name}\" from all sessions"
1519
  msgstr "Loggade ut \"{user_display_name}\" från alla sessioner"
4
  msgstr ""
5
  "Project-Id-Version: Simple History 2\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/Simple-History\n"
7
+ "POT-Creation-Date: 2015-01-26 15:41:57+00:00\n"
8
+ "PO-Revision-Date: 2015-02-11 13:42+0100\n"
9
  "Last-Translator: Pär Thernström <par.thernstrom@gmail.com>\n"
10
  "Language-Team: \n"
11
  "Language: sv\n"
22
  "X-Textdomain-Support: yes\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
+ #: SimpleHistory.php:504 SimpleHistory.php:765
26
  msgid "Settings"
27
  msgstr "Inställningar"
28
 
29
+ #: SimpleHistory.php:515
30
  msgid "Log (debug)"
31
  msgstr "Logg (debug)"
32
 
33
+ #: SimpleHistory.php:520
34
  msgid "Styles example (debug)"
35
  msgstr "Stilexempel (debug)"
36
 
37
  #. Plugin Name of the plugin/theme
38
+ #: SimpleHistory.php:780
39
  msgid "Simple History"
40
  msgstr "Simple History"
41
 
42
+ #: SimpleHistory.php:856
43
  msgid "Remove all log items?"
44
  msgstr "Ta bort alla händelser?"
45
 
46
+ #: SimpleHistory.php:858
47
  msgid "Go to the first page"
48
  msgstr "Gå till första sidan"
49
 
50
+ #: SimpleHistory.php:859
51
  msgid "Go to the previous page"
52
  msgstr "Gå till föregående sida"
53
 
54
+ #: SimpleHistory.php:860
55
  msgid "Go to the next page"
56
  msgstr "Gå till nästa sida"
57
 
58
+ #: SimpleHistory.php:861
59
  msgid "Go to the last page"
60
  msgstr "Gå till sista sidan"
61
 
62
+ #: SimpleHistory.php:862
63
  msgid "Current page"
64
  msgstr "Aktuell sida"
65
 
66
+ #: SimpleHistory.php:864
67
  msgid "Oups, the log could not be loaded right now."
68
  msgstr "Hoppsan, historiken kunde inte laddas just nu."
69
 
70
+ #: SimpleHistory.php:865
71
  msgid "Your search did not match any history events."
72
  msgstr "Din sökning matchade inte några händelser i historiken."
73
 
74
+ #: SimpleHistory.php:1149 SimpleHistory.php:1250
75
  msgid "Simple History Settings"
76
  msgstr "Inställningar för Simple History"
77
 
78
+ #: SimpleHistory.php:1183
79
  msgid "No valid callback found"
80
  msgstr "Inget giltigt callback hittades."
81
 
82
+ #: SimpleHistory.php:1271
83
  msgid "Cleared database"
84
  msgstr "Databasen rensades"
85
 
86
+ #: SimpleHistory.php:1298
87
  msgid "Show history"
88
  msgstr "Visa historik"
89
 
90
+ #: SimpleHistory.php:1311
91
  msgid "Number of items per page"
92
  msgstr "Antal händelser per sida"
93
 
94
+ #: SimpleHistory.php:1323
95
  msgid "Clear log"
96
  msgstr "Rensa logg"
97
 
98
+ #: SimpleHistory.php:1462
99
  msgid "on the dashboard"
100
  msgstr "i panelen"
101
 
102
+ #: SimpleHistory.php:1467
103
  msgid "as a page under the dashboard menu"
104
  msgstr "som en sida under panel-menyn"
105
 
106
+ #: SimpleHistory.php:1483
107
  msgid "Items in the database are automatically removed after %1$s days."
108
  msgstr "Händelser i databasen tas automatiskt bort efter %1$s dagar."
109
 
110
+ #: SimpleHistory.php:1485
111
  msgid "Items in the database are kept forever."
112
  msgstr "Händelser i databasen lagras för evigt."
113
 
114
+ #: SimpleHistory.php:1489
115
  msgid "Clear log now"
116
  msgstr "Rensa loggen nu"
117
 
118
+ #: SimpleHistory.php:1533
119
+ msgid "The log for Simple History was cleared ({num_rows} rows were removed)."
120
+ msgstr "Rensade historiken för Simple History. ({num_rows} rader togs bort)."
121
+
122
+ #: SimpleHistory.php:1793
123
  msgid "+%1$s similar event"
124
  msgid_plural "+%1$s similar events"
125
  msgstr[0] "+%1$s liknande händelse"
126
  msgstr[1] "+%1$s liknande händelser"
127
 
128
+ #: SimpleHistory.php:1800
129
  msgid "Loading…"
130
  msgstr "Laddar historik..."
131
 
132
+ #: SimpleHistory.php:1807
133
  msgid "Showing %1$s more"
134
  msgstr "+%1$s fler"
135
 
136
+ #: SimpleHistory.php:1826
137
  msgid "Context data"
138
  msgstr "Kontextuell data"
139
 
140
+ #: SimpleHistory.php:1827
141
  msgid "This is potentially useful meta data that a logger has saved."
142
  msgstr "Detta eventuellt användbar metadata som en logger har sparat."
143
 
144
+ #: SimpleHistory.php:2302
145
  msgid "No events today so far."
146
  msgstr "Inga händelser idag ännu."
147
 
148
+ #: SimpleHistory.php:2321
149
  msgid "One event today from one user."
150
  msgstr "En händelse idag från en användare."
151
 
152
+ #: SimpleHistory.php:2327
153
  msgid "One event today from one source."
154
  msgstr "En händelse idag från en källa."
155
 
156
+ #: SimpleHistory.php:2333
157
  msgid "%1$d events today from one user."
158
  msgstr "%1$d händelser idag från en användare."
159
 
160
+ #: SimpleHistory.php:2339
161
  msgid "%1$d events today from %2$d users."
162
  msgstr "%1$d händelser idag från %2$d användare."
163
 
164
+ #: SimpleHistory.php:2345 SimpleHistory.php:2351
165
  msgid "%1$d events today from one user and one other source."
166
  msgstr "%1$d händelser idag från en användare och från en annan källa."
167
 
168
+ #: SimpleHistory.php:2357
169
  msgid "%1$d events today from one user and %3$d other sources."
170
  msgstr "%1$d händelser idag från en användare och från %3$d andra källor."
171
 
172
+ #: SimpleHistory.php:2363
173
  msgid "%1$s events today from %2$d users and %3$d other sources."
174
  msgstr "%1$s händelser idag från %2$d användare och %3$d andra källor."
175
 
290
  msgid "Stats"
291
  msgstr "Statistik"
292
 
293
+ #: dropins/SimpleHistorySidebarDropin.php:159 loggers/SimpleLogger.php:296
294
  msgid "Just now"
295
  msgstr "Just nu"
296
 
302
  "Simple History är en rackarns bra plugin, men för att använda den måste din "
303
  "server ha minst PHP 5.3 installerat (du har version %s)."
304
 
305
+ #: loggers/SimpleCommentsLogger.php:685
306
  msgid "Spam"
307
  msgstr "Skräp"
308
 
309
+ #: loggers/SimpleCommentsLogger.php:687
310
  msgid "Approved"
311
  msgstr "Godkänd"
312
 
313
+ #: loggers/SimpleCommentsLogger.php:689
314
  msgid "Pending"
315
  msgstr "Väntande"
316
 
317
+ #: loggers/SimpleCommentsLogger.php:703
318
  msgid "Trackback"
319
  msgstr "Trackback"
320
 
321
+ #: loggers/SimpleCommentsLogger.php:705
322
  msgid "Pingback"
323
  msgstr "Pingback"
324
 
325
+ #: loggers/SimpleCommentsLogger.php:707
326
  msgid "Comment"
327
  msgstr "Kommentar"
328
 
347
  msgid "%d occasions"
348
  msgstr "%d tillfällen"
349
 
350
+ #: loggers/SimpleLogger.php:203
351
  msgid "Deleted user (had id %1$s, email %2$s, login %3$s)"
352
  msgstr "Raderad användare (hade id %1$s, epost %2$s, login %3$s)"
353
 
354
+ #: loggers/SimpleLogger.php:218
355
  msgid "Anonymous web user"
356
  msgstr "Anonym webbanvändare"
357
 
358
+ #: loggers/SimpleLogger.php:226
359
  msgid "Anonymous user from %1$s"
360
  msgstr "Anonym användare från %1$s"
361
 
362
  #. translators: Date format for log row header, see http:php.net/date
363
+ #: loggers/SimpleLogger.php:301
364
  msgid "M j, Y \\a\\t G:i"
365
  msgstr "M j, Y \\a\\t G:i"
366
 
367
  #. translators: 1: last modified date and time in human time diff-format
368
+ #: loggers/SimpleLogger.php:309
369
  msgid "%1$s ago"
370
  msgstr "%1$s sedan"
371
 
511
  msgid "Section"
512
  msgstr "Sektion"
513
 
514
+ #: loggers/SimpleUserLogger.php:22
515
  msgid ""
516
  "Failed to login to account with username \"{login_user_login}\" because an "
517
  "incorrect password was entered"
519
  "Misslyckades att logga in på kontot med användarnamnet \"{login_user_login}\" "
520
  "eftersom ett felaktigt lösenord angavs"
521
 
522
+ #: loggers/SimpleUserLogger.php:23
523
  msgid ""
524
  "Failed to login with username \"{failed_login_username}\" because no user "
525
  "with that username exists"
526
  msgstr ""
527
+ "Det gick inte att logga in med användarnamn \"{failed_login_username}\" "
528
  "eftersom ingen användare med det användarnamnet existerar"
529
 
530
+ #: loggers/SimpleUserLogger.php:24
531
  msgid "Logged in"
532
  msgstr "Loggade in"
533
 
534
+ #: loggers/SimpleUserLogger.php:25
535
  msgid "Unknown user logged in"
536
  msgstr "Okänd användare loggade in"
537
 
538
+ #: loggers/SimpleUserLogger.php:26
539
  msgid "Logged out"
540
  msgstr "Loggade ut"
541
 
542
+ #: loggers/SimpleUserLogger.php:27
543
  msgid "Edited the profile for user {edited_user_login} ({edited_user_email})"
544
  msgstr ""
545
  "Redigerade profilen för användaren {edited_user_login} ({edited_user_email})"
546
 
547
+ #: loggers/SimpleUserLogger.php:28
548
  msgid ""
549
  "Created user {created_user_login} ({created_user_email}) with role "
550
  "{created_user_role}"
552
  "Skapade användare {created_user_login} ({created_user_email}) med rollen "
553
  "{created_user_role}"
554
 
555
+ #: loggers/SimpleUserLogger.php:29
556
  msgid "Deleted user {deleted_user_login} ({deleted_user_email})"
557
  msgstr "Raderade användaren {deleted_user_login} ({deleted_user_email})"
558
 
559
+ #: loggers/SimpleUserLogger.php:227
560
  msgid "Edited <a href=\"{edit_profile_link}\">your profile</a>"
561
  msgstr "Redigerade <a href=\"{edit_profile_link}\">din profl</a>"
562
 
563
+ #: loggers/SimpleUserLogger.php:231
564
  msgid "Edited <a href=\"{edit_profile_link}\">their profile</a>"
565
  msgstr "Redigerade <a href=\"{edit_profile_link}\">sin profil</a>"
566
 
567
+ #: loggers/SimpleUserLogger.php:240
568
  msgid "Edited your profile"
569
  msgstr "Redigerade din profil"
570
 
571
+ #: loggers/SimpleUserLogger.php:251
572
  msgid ""
573
  "Edited the profile for user <a href="
574
  "\"{edit_profile_link}\">{edited_user_login} ({edited_user_email})</a>"
644
  msgid "http://simple-history.com/"
645
  msgstr "http://simple-history.com"
646
 
647
+ #: SimpleHistory.php:249
648
  msgctxt ""
649
  "Message visible while waiting for log to load from server the first time"
650
  msgid "Loading history..."
651
  msgstr "Laddar historik..."
652
 
653
+ #: SimpleHistory.php:286
654
  msgctxt "page n of n"
655
  msgid "of"
656
  msgstr "av"
657
 
658
+ #: SimpleHistory.php:357
659
  msgctxt "API: not enought arguments passed"
660
  msgid "Not enough args specified"
661
  msgstr "Inte tillräckligt med arguments specifierade"
662
 
663
+ #: SimpleHistory.php:1235
664
  msgctxt "dashboard menu name"
665
  msgid "Simple History"
666
  msgstr "Simple History"
667
 
668
+ #: SimpleHistory.php:1359
669
  msgctxt "history page headline"
670
  msgid "Simple History"
671
  msgstr "Simple History"
672
 
673
+ #: SimpleHistory.php:1619
674
  msgctxt "simple-history"
675
  msgid "Simple History removed one event that were older than {days} days"
676
  msgid_plural ""
679
  msgstr[1] ""
680
  "Simple History radera {num_rows} händelser som var äldre än {days} dagar"
681
 
682
+ #: SimpleHistory.php:1963
683
  msgctxt "Log level in gui"
684
  msgid "emergency"
685
  msgstr "kritiskt"
686
 
687
+ #: SimpleHistory.php:1967
688
  msgctxt "Log level in gui"
689
  msgid "alert"
690
  msgstr "alert"
691
 
692
+ #: SimpleHistory.php:1971
693
  msgctxt "Log level in gui"
694
  msgid "critical"
695
  msgstr "kritiskt"
696
 
697
+ #: SimpleHistory.php:1975
698
  msgctxt "Log level in gui"
699
  msgid "error"
700
  msgstr "error"
701
 
702
+ #: SimpleHistory.php:1979
703
  msgctxt "Log level in gui"
704
  msgid "warning"
705
  msgstr "warning"
706
 
707
+ #: SimpleHistory.php:1983
708
  msgctxt "Log level in gui"
709
  msgid "notice"
710
  msgstr "notice"
711
 
712
+ #: SimpleHistory.php:1987
713
  msgctxt "Log level in gui"
714
  msgid "info"
715
  msgstr "info"
716
 
717
+ #: SimpleHistory.php:1991
718
  msgctxt "Log level in gui"
719
  msgid "debug"
720
  msgstr "debug"
721
 
722
+ #: SimpleHistory.php:1996
723
  msgctxt "Log level in gui"
724
  msgid "Emergency"
725
  msgstr "Emergency"
726
 
727
+ #: SimpleHistory.php:2000
728
  msgctxt "Log level in gui"
729
  msgid "Alert"
730
  msgstr "Alert"
731
 
732
+ #: SimpleHistory.php:2004
733
  msgctxt "Log level in gui"
734
  msgid "Critical"
735
  msgstr "Critical"
736
 
737
+ #: SimpleHistory.php:2008
738
  msgctxt "Log level in gui"
739
  msgid "Error"
740
  msgstr "Error"
741
 
742
+ #: SimpleHistory.php:2012
743
  msgctxt "Log level in gui"
744
  msgid "Warning"
745
  msgstr "Warning"
746
 
747
+ #: SimpleHistory.php:2016
748
  msgctxt "Log level in gui"
749
  msgid "Notice"
750
  msgstr "Notice"
751
 
752
+ #: SimpleHistory.php:2020
753
  msgctxt "Log level in gui"
754
  msgid "Info"
755
  msgstr "Info"
756
 
757
+ #: SimpleHistory.php:2024
758
  msgctxt "Log level in gui"
759
  msgid "Debug"
760
  msgstr "Debug"
1137
  msgid "Deleted comments"
1138
  msgstr "Borttagna kommentarer"
1139
 
1140
+ #: loggers/SimpleCommentsLogger.php:602 loggers/SimpleCommentsLogger.php:615
1141
+ #: loggers/SimpleCommentsLogger.php:629
1142
  msgctxt "comments logger - detailed output comment status"
1143
  msgid "Status"
1144
  msgstr "Status"
1145
 
1146
+ #: loggers/SimpleCommentsLogger.php:604 loggers/SimpleCommentsLogger.php:617
1147
+ #: loggers/SimpleCommentsLogger.php:631
1148
  msgctxt "comments logger - detailed output author"
1149
  msgid "Name"
1150
  msgstr "Namn"
1151
 
1152
+ #: loggers/SimpleCommentsLogger.php:605 loggers/SimpleCommentsLogger.php:618
1153
+ #: loggers/SimpleCommentsLogger.php:632
1154
  msgctxt "comments logger - detailed output email"
1155
  msgid "Email"
1156
  msgstr "E-post"
1157
 
1158
+ #: loggers/SimpleCommentsLogger.php:606 loggers/SimpleCommentsLogger.php:619
1159
  msgctxt "comments logger - detailed output content"
1160
  msgid "Content"
1161
  msgstr "Innehåll"
1162
 
1163
+ #: loggers/SimpleCommentsLogger.php:633
1164
  msgctxt "comments logger - detailed output content"
1165
  msgid "Comment"
1166
  msgstr "Kommentar"
1167
 
1168
+ #: loggers/SimpleCommentsLogger.php:759
1169
  msgctxt "comments logger - edit comment"
1170
  msgid "View/Edit"
1171
  msgstr "Visa/Redigera"
1180
  msgid "WordPress core updates"
1181
  msgstr "WordPress core uppdateringar"
1182
 
1183
+ #: loggers/SimpleUserLogger.php:54
1184
  msgctxt "User logger: search"
1185
  msgid "Users"
1186
  msgstr "Användare"
1187
 
1188
+ #: loggers/SimpleUserLogger.php:55
1189
  msgctxt "User logger: search"
1190
  msgid "All user activity"
1191
  msgstr "All användaraktivitet"
1192
 
1193
+ #: loggers/SimpleUserLogger.php:57
1194
  msgctxt "User logger: search"
1195
  msgid "Successful user logins"
1196
  msgstr "Lyckade inloggningar av användare"
1197
 
1198
+ #: loggers/SimpleUserLogger.php:61
1199
  msgctxt "User logger: search"
1200
  msgid "Failed user logins"
1201
  msgstr "Misslyckade inloggningar av användare"
1202
 
1203
+ #: loggers/SimpleUserLogger.php:65
1204
  msgctxt "User logger: search"
1205
  msgid "User logouts"
1206
  msgstr "Utloggning av användare"
1207
 
1208
+ #: loggers/SimpleUserLogger.php:68
1209
  msgctxt "User logger: search"
1210
  msgid "Created users"
1211
  msgstr "Skapade användare"
1212
 
1213
+ #: loggers/SimpleUserLogger.php:71
1214
  msgctxt "User logger: search"
1215
  msgid "User profile updates"
1216
  msgstr "Uppdateringar av användarprofiler"
1217
 
1218
+ #: loggers/SimpleUserLogger.php:74
1219
  msgctxt "User logger: search"
1220
  msgid "User deletions"
1221
  msgstr "Radering av användare"
1230
  msgid "Created exports"
1231
  msgstr "Skapade exporter"
1232
 
1233
+ #: loggers/SimpleLogger.php:190
1234
  msgctxt "header output when initiator is the currently logged in user"
1235
  msgid "You"
1236
  msgstr "Du"
1397
  msgid "Deleted plugins"
1398
  msgstr "Raderade plugins"
1399
 
1400
+ #: loggers/SimplePluginLogger.php:887
1401
  msgctxt "plugin logger - detailed output version"
1402
  msgid "Version"
1403
  msgstr "Version"
1404
 
1405
+ #: loggers/SimplePluginLogger.php:889
1406
  msgctxt "plugin logger - detailed output author"
1407
  msgid "Author"
1408
  msgstr "Författare"
1409
 
1410
+ #: loggers/SimplePluginLogger.php:891
1411
  msgctxt "plugin logger - detailed output author"
1412
  msgid "Requires"
1413
  msgstr "Kräver"
1414
 
1415
+ #: loggers/SimplePluginLogger.php:890
1416
  msgctxt "plugin logger - detailed output url"
1417
  msgid "URL"
1418
  msgstr "URL"
1419
 
1420
+ #: loggers/SimplePluginLogger.php:892
1421
  msgctxt "plugin logger - detailed output compatible"
1422
  msgid "Compatible up to"
1423
  msgstr "Kompatibel upp till"
1424
 
1425
+ #: loggers/SimplePluginLogger.php:893
1426
  msgctxt "plugin logger - detailed output downloaded"
1427
  msgid "Downloads"
1428
  msgstr "Nedladdningar"
1429
 
1430
+ #: loggers/SimplePluginLogger.php:953
1431
  msgctxt "plugin logger: plugin info thickbox title view all info"
1432
  msgid "View plugin info"
1433
  msgstr "Visa information om plugin"
1434
 
1435
+ #: loggers/SimplePluginLogger.php:968
1436
  msgctxt "plugin logger: plugin info thickbox title"
1437
  msgid "View plugin info"
1438
  msgstr "Visa information om plugin"
1439
 
1440
+ #: loggers/SimplePluginLogger.php:972
1441
  msgctxt "plugin logger: plugin info thickbox title"
1442
  msgid "View changelog"
1443
  msgstr "Visa ändringslogg"
1512
  msgid "Background of themes changed"
1513
  msgstr "Ändrade bakgrunder för teman"
1514
 
1515
+ #: loggers/SimpleUserLogger.php:36
1516
  msgctxt "User destroys other login sessions for themself"
1517
  msgid "Logged out from all other sessions"
1518
  msgstr "Loggade ut från alla andra sessioner"
1519
 
1520
+ #: loggers/SimpleUserLogger.php:45
1521
  msgctxt "User destroys all login sessions for a user"
1522
  msgid "Logged out \"{user_display_name}\" from all sessions"
1523
  msgstr "Loggade ut \"{user_display_name}\" från alla sessioner"
loggers/SimpleCoreUpdatesLogger.php CHANGED
@@ -27,7 +27,7 @@ class SimpleCoreUpdatesLogger extends SimpleLogger
27
  "capability" => "update_core",
28
  "messages" => array(
29
  'core_updated' => __('Updated WordPress from {prev_version} to {new_version}', 'simple-history'),
30
- 'core_auto_updated' => __('WordPress auto-updated from {prev_version} to {new_version}', 'simple-history')
31
  ),
32
  "labels" => array(
33
  "search" => array(
27
  "capability" => "update_core",
28
  "messages" => array(
29
  'core_updated' => __('Updated WordPress from {prev_version} to {new_version}', 'simple-history'),
30
+ 'core_auto_updated' => __('WordPress auto-updated to {new_version} from {prev_version}', 'simple-history')
31
  ),
32
  "labels" => array(
33
  "search" => array(
loggers/SimpleLogger.php CHANGED
@@ -144,6 +144,10 @@ class SimpleLogger {
144
  $initiator_html .= '<strong class="SimpleHistoryLogitem__inlineDivided">WordPress</strong> ';
145
  break;
146
 
 
 
 
 
147
  // wp_user = wordpress uses, but user may have been deleted since log entry was added
148
  case "wp_user":
149
 
@@ -172,14 +176,14 @@ class SimpleLogger {
172
  ' ;
173
  }
174
 
175
- /**
176
- * Filter the format for the user output
177
- *
178
- * @since 2.0
179
- *
180
- * @param string $format.
181
- */
182
- $$tmpl_initiator_html = apply_filters("simple_history/header_initiator_html_existing_user", $tmpl_initiator_html);
183
 
184
  $initiator_html .= sprintf(
185
  $tmpl_initiator_html,
@@ -517,17 +521,51 @@ class SimpleLogger {
517
  */
518
  public function emergencyMessage($message, array $context = array()) {
519
 
520
- if (!isset($this->messages[$message]["untranslated_text"])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  return;
522
  }
523
 
524
- $context["_message_key"] = $message;
525
- $message = $this->messages[$message]["untranslated_text"];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
 
527
- $this->log(SimpleLoggerLogLevels::EMERGENCY, $message, $context);
528
 
529
  }
530
 
 
531
  /**
532
  * Action must be taken immediately.
533
  *
@@ -549,14 +587,7 @@ class SimpleLogger {
549
  */
550
  public function alertMessage($message, array $context = array()) {
551
 
552
- if (!isset($this->messages[$message]["untranslated_text"])) {
553
- return;
554
- }
555
-
556
- $context["_message_key"] = $message;
557
- $message = $this->messages[$message]["untranslated_text"];
558
-
559
- $this->log(SimpleLoggerLogLevels::ALERT, $message, $context);
560
 
561
  }
562
 
@@ -619,14 +650,7 @@ class SimpleLogger {
619
  */
620
  public function errorMessage($message, array $context = array()) {
621
 
622
- if (!isset($this->messages[$message]["untranslated_text"])) {
623
- return;
624
- }
625
-
626
- $context["_message_key"] = $message;
627
- $message = $this->messages[$message]["untranslated_text"];
628
-
629
- $this->log(SimpleLoggerLogLevels::ERROR, $message, $context);
630
 
631
  }
632
 
@@ -655,14 +679,7 @@ class SimpleLogger {
655
  */
656
  public function warningMessage($message, array $context = array()) {
657
 
658
- if (!isset($this->messages[$message]["untranslated_text"])) {
659
- return;
660
- }
661
-
662
- $context["_message_key"] = $message;
663
- $message = $this->messages[$message]["untranslated_text"];
664
-
665
- $this->log(SimpleLoggerLogLevels::WARNING, $message, $context);
666
 
667
  }
668
 
@@ -688,14 +705,7 @@ class SimpleLogger {
688
  */
689
  public function noticeMessage($message, array $context = array()) {
690
 
691
- if (!isset($this->messages[$message]["untranslated_text"])) {
692
- return;
693
- }
694
-
695
- $context["_message_key"] = $message;
696
- $message = $this->messages[$message]["untranslated_text"];
697
-
698
- $this->log(SimpleLoggerLogLevels::NOTICE, $message, $context);
699
 
700
  }
701
 
@@ -725,14 +735,7 @@ class SimpleLogger {
725
  */
726
  public function infoMessage($message, array $context = array()) {
727
 
728
- if (!isset($this->messages[$message]["untranslated_text"])) {
729
- return;
730
- }
731
-
732
- $context["_message_key"] = $message;
733
- $message = $this->messages[$message]["untranslated_text"];
734
-
735
- $this->log(SimpleLoggerLogLevels::INFO, $message, $context);
736
 
737
  }
738
 
@@ -758,14 +761,7 @@ class SimpleLogger {
758
  */
759
  public function debugMessage($message, array $context = array()) {
760
 
761
- if (!isset($this->messages[$message]["untranslated_text"])) {
762
- return;
763
- }
764
-
765
- $context["_message_key"] = $message;
766
- $message = $this->messages[$message]["untranslated_text"];
767
-
768
- $this->log(SimpleLoggerLogLevels::DEBUG, $message, $context);
769
 
770
  }
771
 
@@ -810,8 +806,12 @@ class SimpleLogger {
810
  * @param string $level
811
  * @param string $message
812
  * @param array $context
 
813
  */
814
- apply_filters("simple_history/log_arguments", $level, $message, $context);
 
 
 
815
 
816
  /* Store date at utc or local time?
817
  * Some info here:
@@ -888,24 +888,25 @@ class SimpleLogger {
888
  */
889
 
890
  // Log initiator, defaults to current user if exists, or other if not user exist
891
- if (isset($context["_initiator"])) {
892
 
893
  // Manually set in context
894
  $data["initiator"] = $context["_initiator"];
895
- unset($context["_initiator"]);
896
 
897
  } else {
898
 
899
- // No initiator set.
900
 
 
901
  $data["initiator"] = SimpleLoggerLogInitiators::OTHER;
902
 
903
  // Check if user is responsible.
904
- if (function_exists("wp_get_current_user")) {
905
 
906
  $current_user = wp_get_current_user();
907
 
908
- if (isset($current_user->ID) && $current_user->ID) {
909
 
910
  $data["initiator"] = SimpleLoggerLogInitiators::WP_USER;
911
  $context["_user_id"] = $current_user->ID;
@@ -917,7 +918,7 @@ class SimpleLogger {
917
  }
918
 
919
  // If cron then set WordPress as responsible
920
- if (defined('DOING_CRON') && DOING_CRON) {
921
 
922
  // Seems to be wp cron running and doing this
923
  $data["initiator"] = SimpleLoggerLogInitiators::WORDPRESS;
@@ -925,6 +926,18 @@ class SimpleLogger {
925
 
926
  }
927
 
 
 
 
 
 
 
 
 
 
 
 
 
928
  }
929
 
930
  /**
@@ -1055,10 +1068,12 @@ class SimpleLogger {
1055
 
1056
  $this->lastInsertID = $history_inserted_id;
1057
 
 
 
1058
  // Return $this so we can chain methods
1059
  return $this;
1060
 
1061
- }// log
1062
 
1063
  /**
1064
  * Ensures an ip address is both a valid IP and does not fall within
@@ -1125,6 +1140,9 @@ class SimpleLoggerLogInitiators {
1125
  // WordPress core or plugins updated automatically via wp-cron
1126
  const WORDPRESS = "wp";
1127
 
 
 
 
1128
  // I dunno
1129
  const OTHER = 'other';
1130
  }
144
  $initiator_html .= '<strong class="SimpleHistoryLogitem__inlineDivided">WordPress</strong> ';
145
  break;
146
 
147
+ case "wp_cli":
148
+ $initiator_html .= '<strong class="SimpleHistoryLogitem__inlineDivided">WP-CLI</strong> ';
149
+ break;
150
+
151
  // wp_user = wordpress uses, but user may have been deleted since log entry was added
152
  case "wp_user":
153
 
176
  ' ;
177
  }
178
 
179
+ /**
180
+ * Filter the format for the user output
181
+ *
182
+ * @since 2.0
183
+ *
184
+ * @param string $format.
185
+ */
186
+ $tmpl_initiator_html = apply_filters("simple_history/header_initiator_html_existing_user", $tmpl_initiator_html);
187
 
188
  $initiator_html .= sprintf(
189
  $tmpl_initiator_html,
521
  */
522
  public function emergencyMessage($message, array $context = array()) {
523
 
524
+ return $this->logByMessageKey(SimpleLoggerLogLevels::EMERGENCY, $message, $context);
525
+
526
+ }
527
+
528
+ /**
529
+ * Log with message
530
+ * Called from infoMessage(), errorMessage(), and so on
531
+ *
532
+ * Call like this:
533
+ *
534
+ * return $this->logByMessageKey(SimpleLoggerLogLevels::EMERGENCY, $message, $context);
535
+ */
536
+ private function logByMessageKey($SimpleLoggerLogLevelsLevel, $messageKey, $context) {
537
+
538
+ // When logging by message then the key must exist
539
+ if ( ! isset( $this->messages[ $messageKey ]["untranslated_text"] ) ) {
540
  return;
541
  }
542
 
543
+ /**
544
+ * Filter so plugins etc. can shortut logging
545
+ *
546
+ * @since 2.0.20
547
+ *
548
+ * @param true yes, we default to do the logging
549
+ * @param string logger slug
550
+ * @param string messageKey
551
+ * @param string log level
552
+ * @param array context
553
+ * @return bool false to abort logging
554
+ */
555
+ $doLog = apply_filters("simple_history/simple_logger/log_message_key", true, $this->slug, $messageKey, $SimpleLoggerLogLevelsLevel, $context);
556
+
557
+ if ( ! $doLog ) {
558
+ return;
559
+ }
560
+
561
+ $context["_message_key"] = $messageKey;
562
+ $message = $this->messages[ $messageKey ]["untranslated_text"];
563
 
564
+ $this->log( $SimpleLoggerLogLevelsLevel, $message, $context );
565
 
566
  }
567
 
568
+
569
  /**
570
  * Action must be taken immediately.
571
  *
587
  */
588
  public function alertMessage($message, array $context = array()) {
589
 
590
+ return $this->logByMessageKey(SimpleLoggerLogLevels::ALERT, $message, $context);
 
 
 
 
 
 
 
591
 
592
  }
593
 
650
  */
651
  public function errorMessage($message, array $context = array()) {
652
 
653
+ return $this->logByMessageKey(SimpleLoggerLogLevels::ERROR, $message, $context);
 
 
 
 
 
 
 
654
 
655
  }
656
 
679
  */
680
  public function warningMessage($message, array $context = array()) {
681
 
682
+ return $this->logByMessageKey(SimpleLoggerLogLevels::WARNING, $message, $context);
 
 
 
 
 
 
 
683
 
684
  }
685
 
705
  */
706
  public function noticeMessage($message, array $context = array()) {
707
 
708
+ return $this->logByMessageKey(SimpleLoggerLogLevels::NOTICE, $message, $context);
 
 
 
 
 
 
 
709
 
710
  }
711
 
735
  */
736
  public function infoMessage($message, array $context = array()) {
737
 
738
+ return $this->logByMessageKey(SimpleLoggerLogLevels::INFO, $message, $context);
 
 
 
 
 
 
 
739
 
740
  }
741
 
761
  */
762
  public function debugMessage($message, array $context = array()) {
763
 
764
+ return $this->logByMessageKey(SimpleLoggerLogLevels::DEBUG, $message, $context);
 
 
 
 
 
 
 
765
 
766
  }
767
 
806
  * @param string $level
807
  * @param string $message
808
  * @param array $context
809
+ * @param object SimpleLogger object
810
  */
811
+ apply_filters("simple_history/log_arguments", $level, $message, $context, $this);
812
+ $context = apply_filters("simple_history/log_argument/context", $context, $level, $message, $this);
813
+ $level = apply_filters("simple_history/log_argument/level", $level, $context, $message, $this);
814
+ $message = apply_filters("simple_history/log_argument/message", $message, $level, $context, $this);
815
 
816
  /* Store date at utc or local time?
817
  * Some info here:
888
  */
889
 
890
  // Log initiator, defaults to current user if exists, or other if not user exist
891
+ if ( isset( $context["_initiator"] ) ) {
892
 
893
  // Manually set in context
894
  $data["initiator"] = $context["_initiator"];
895
+ unset( $context["_initiator"] );
896
 
897
  } else {
898
 
899
+ // No initiator set, try to determine
900
 
901
+ // Default to other
902
  $data["initiator"] = SimpleLoggerLogInitiators::OTHER;
903
 
904
  // Check if user is responsible.
905
+ if ( function_exists("wp_get_current_user") ) {
906
 
907
  $current_user = wp_get_current_user();
908
 
909
+ if ( isset( $current_user->ID ) && $current_user->ID ) {
910
 
911
  $data["initiator"] = SimpleLoggerLogInitiators::WP_USER;
912
  $context["_user_id"] = $current_user->ID;
918
  }
919
 
920
  // If cron then set WordPress as responsible
921
+ if ( defined('DOING_CRON') && DOING_CRON ) {
922
 
923
  // Seems to be wp cron running and doing this
924
  $data["initiator"] = SimpleLoggerLogInitiators::WORDPRESS;
926
 
927
  }
928
 
929
+ // If running as CLI and WP_CLI_PHP_USED is set then it is WP CLI that is doing it
930
+ // How to log this? Is this a user, is it WordPress, or what?
931
+ // I'm thinking:
932
+ // - it is a user that is manually doing this, on purpose, with intent, so not auto wordpress
933
+ // - it is a specific user, but we don't know who
934
+ // - sounds like a special case, set initiator to wp_cli
935
+ if ( isset( $_SERVER["WP_CLI_PHP_USED"] ) && "cli" == php_sapi_name() ) {
936
+
937
+ $data["initiator"] = SimpleLoggerLogInitiators::WP_CLI;
938
+
939
+ }
940
+
941
  }
942
 
943
  /**
1068
 
1069
  $this->lastInsertID = $history_inserted_id;
1070
 
1071
+ $this->simpleHistory->get_cache_incrementor(true);
1072
+
1073
  // Return $this so we can chain methods
1074
  return $this;
1075
 
1076
+ } // log
1077
 
1078
  /**
1079
  * Ensures an ip address is both a valid IP and does not fall within
1140
  // WordPress core or plugins updated automatically via wp-cron
1141
  const WORDPRESS = "wp";
1142
 
1143
+ // WP CLI / terminal
1144
+ const WP_CLI = "wp_cli";
1145
+
1146
  // I dunno
1147
  const OTHER = 'other';
1148
  }
loggers/SimpleMediaLogger.php CHANGED
@@ -191,7 +191,7 @@ class SimpleMediaLogger extends SimpleLogger
191
  if ( ! empty( $context["attachment_thumb"] ) ) {
192
 
193
  if ( $is_image ) {
194
- $message .= "<a href='".$edit_link."'>";
195
  }
196
 
197
  $message .= __('{attachment_thumb}', 'simple-history');
191
  if ( ! empty( $context["attachment_thumb"] ) ) {
192
 
193
  if ( $is_image ) {
194
+ $message .= "<a class='SimpleHistoryLogitemThumbnailLink' href='".$edit_link."'>";
195
  }
196
 
197
  $message .= __('{attachment_thumb}', 'simple-history');
loggers/SimpleUserLogger.php CHANGED
@@ -272,49 +272,44 @@ class SimpleUserLogger extends SimpleLogger {
272
  */
273
  function on_wp_login($user_login, $user) {
274
 
275
- $context = array();
 
 
276
 
277
- if ($user->ID) {
 
 
 
 
 
 
 
 
 
 
278
 
279
  $context = array(
280
- "user_id" => $user->ID,
281
- "user_email" => $user->user_email,
282
- "user_login" => $user->user_login,
283
  );
284
 
285
  // Override some data that is usually set automagically by Simple History
286
  // Because wp_get_current_user() does not return any data yet at this point
287
  $context["_initiator"] = SimpleLoggerLogInitiators::WP_USER;
288
- $context["_user_id"] = $user->ID;
289
- $context["_user_login"] = $user->user_login;
290
- $context["_user_email"] = $user->user_email;
291
  $context["server_http_user_agent"] = $_SERVER["HTTP_USER_AGENT"];
292
 
293
  $this->infoMessage("user_logged_in", $context);
294
 
295
  } else {
296
 
297
- // when does this happen?
298
- // Aha! I can happen when a plugin is logging in the user, for example the "WP-OAuth"-plugin:
299
- // https://github.com/bonny/WordPress-Simple-History/issues/40
300
-
301
- // @TODO: does this still count as a valid login?
302
- // It should be valid right, because this action should not be called otherwise
303
-
304
- // Some temp debug things
305
- /*
306
- $context["_debug_user_login"] = $user_login;
307
- $context["_debug_user"] = simpleHistory::json_encode($user);
308
- $context["_debug_server"] = simpleHistory::json_encode($_SERVER);
309
- $context["_debug_get"] = simpleHistory::json_encode($_GET);
310
- $context["_debug_get"] = simpleHistory::json_encode($_POST);
311
- $context["_debug_cookies"] = simpleHistory::json_encode($_COOKIES);
312
- */
313
-
314
  $this->warningMessage("user_unknown_logged_in", $context);
315
-
316
  }
317
-
318
  }
319
 
320
  /**
272
  */
273
  function on_wp_login($user_login, $user) {
274
 
275
+ $context = array(
276
+ "user_login" => $user_login
277
+ );
278
 
279
+ if ( isset( $user_login ) ) {
280
+
281
+ $user_obj = get_user_by( "login", $user_login );
282
+
283
+ } else if ( isset( $user ) && isset( $user->ID ) ) {
284
+
285
+ $user_obj = get_user_by( "id", $user->ID );
286
+
287
+ }
288
+
289
+ if ( is_a( $user_obj, "WP_User" ) ) {
290
 
291
  $context = array(
292
+ "user_id" => $user_obj->ID,
293
+ "user_email" => $user_obj->user_email,
294
+ "user_login" => $user_obj->user_login,
295
  );
296
 
297
  // Override some data that is usually set automagically by Simple History
298
  // Because wp_get_current_user() does not return any data yet at this point
299
  $context["_initiator"] = SimpleLoggerLogInitiators::WP_USER;
300
+ $context["_user_id"] = $user_obj->ID;
301
+ $context["_user_login"] = $user_obj->user_login;
302
+ $context["_user_email"] = $user_obj->user_email;
303
  $context["server_http_user_agent"] = $_SERVER["HTTP_USER_AGENT"];
304
 
305
  $this->infoMessage("user_logged_in", $context);
306
 
307
  } else {
308
 
309
+ // Could not get any info about the user logging in
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
  $this->warningMessage("user_unknown_logged_in", $context);
 
311
  }
312
+
313
  }
314
 
315
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://eskapism.se/sida/donate/
4
  Tags: history, log, changes, changelog, audit, trail, pages, attachments, users, cms, dashboard, admin, syslog, feed, activity, stream
5
  Requires at least: 3.6.0
6
  Tested up to: 4.1
7
- Stable tag: 2.0.19
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
@@ -111,9 +111,19 @@ initiated by a specific user.
111
 
112
  == Changelog ==
113
 
 
 
 
 
 
 
 
 
 
 
114
  = 2.0.19 (February 2015) =
115
 
116
- - Added: Dutch translation by (https://github.com/niknetniko)[https://github.com/niknetniko]. Thanks!
117
  - Changed: better compatibilty with plugins like [WP User Avatar](https://wordpress.org/plugins/wp-user-avatar/).
118
  - Updated: German translation update.
119
 
4
  Tags: history, log, changes, changelog, audit, trail, pages, attachments, users, cms, dashboard, admin, syslog, feed, activity, stream
5
  Requires at least: 3.6.0
6
  Tested up to: 4.1
7
+ Stable tag: 2.0.20
8
 
9
  View changes made by users within WordPress. See who created a page, uploaded an attachment or approved an comment, and more.
10
 
111
 
112
  == Changelog ==
113
 
114
+ = 2.0.20 (February 2015) =
115
+
116
+ - Added: changes via [WP-CLI](http://wp-cli.org) is now detected (was previously shown as "other").
117
+ - Added: severity level (info, warning, debug, etc.) of event is includes in the RSS output.
118
+ - Changed the way user login is logged. Should fix https://github.com/bonny/WordPress-Simple-History/issues/40 + possible more related issues.
119
+ - Added: filter `simple_history/simple_logger/log_message_key` added, that can be used to shortcut log messages. See [example file](https://github.com/bonny/WordPress-Simple-History/blob/master/examples.php) for usage. Fixes https://wordpress.org/support/topic/stop-logging-certain-types-of-activity.
120
+ - Added: now uses object caching at some places. Should speed up some parts of the plugin for users with caching enabled.
121
+ - Fixed: IP info popup can now be closed with `esc`.
122
+ - Fixed: works better on small screens (like mobile phones) + misc other style related fixes.
123
+
124
  = 2.0.19 (February 2015) =
125
 
126
+ - Added: Dutch translation by [https://github.com/niknetniko](https://github.com/niknetniko). Thanks!
127
  - Changed: better compatibilty with plugins like [WP User Avatar](https://wordpress.org/plugins/wp-user-avatar/).
128
  - Updated: German translation update.
129