DB Cache Reloaded Fix - Version 2.2.1

Version Description

  • Fix an error in db.php wrong path in DBCR_PATH thanks to Christian for remind me.
Download this release

Release Info

Developer ivankristianto
Plugin Icon wp plugin DB Cache Reloaded Fix
Version 2.2.1
Comparing to
See all releases

Version 2.2.1

db-cache-reloaded.php ADDED
@@ -0,0 +1,597 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: DB Cache Reloaded Fix
4
+ * Short Name: db_cache_reloaded
5
+ * Description: The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update). Now compatible with WordPress 3.1.
6
+ * Author: Ivan Kristianto
7
+ * Version: 2.2.1
8
+ * Requires at least: 2.7
9
+ * Tested up to: 3.1
10
+ * Tags: db cache, db cache reloaded, db cache reloaded fix
11
+ * Contributors: Ivan Kristianto
12
+ * WordPress URI: http://wordpress.org/extend/plugins/db-cache-reloaded-fix/
13
+ * Author URI: http://www.ivankristianto.com/
14
+ * Donate URI: http://www.ivankristianto.com/portfolio/
15
+ * Plugin URI: http://www.ivankristianto.com/web-development/programming/db-cache-reloaded-fix-for-wordpress-3-1/1784/
16
+ * Text Domain: db-cache-reloaded-fix
17
+
18
+ Copyright 2011 Ivan Kristianto (ivan@ivankristianto.com)
19
+
20
+ Based On DB Cache Reloaded by Daniel Frużyński (email : daniel [A-T] poradnik-webmastera.com)
21
+ Based on DB Cache by Dmitry Svarytsevych
22
+
23
+ This program is free software; you can redistribute it and/or modify
24
+ it under the terms of the GNU General Public License as published by
25
+ the Free Software Foundation; either version 2 of the License, or
26
+ (at your option) any later version.
27
+
28
+ This program is distributed in the hope that it will be useful,
29
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
30
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31
+ GNU General Public License for more details.
32
+
33
+ You should have received a copy of the GNU General Public License
34
+ along with this program; if not, write to the Free Software
35
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
36
+ */
37
+
38
+ define( 'DBCR_DEBUG', false );
39
+
40
+ // Path to plugin
41
+ if ( !defined( 'DBCR_PATH' ) ) {
42
+ define( 'DBCR_PATH', dirname( __FILE__ ) );
43
+ }
44
+ // Cache directory
45
+ if ( !defined( 'DBCR_CACHE_DIR' ) ) {
46
+ define( 'DBCR_CACHE_DIR', WP_CONTENT_DIR.'/tmp' );
47
+ }
48
+
49
+ // Check if we have required functions
50
+ if ( !function_exists( 'is_multisite' ) ) { // Added in WP 3.0
51
+ function is_multisite() {
52
+ return false;
53
+ }
54
+ }
55
+
56
+ // DB Module version (one or more digits for major, two digits for minor and revision numbers)
57
+ define( 'DBCR_CURRENT_DB_MODULE_VER', 10600 );
58
+
59
+ // Load pcache class if needed
60
+ if ( !class_exists('pcache') ) {
61
+ include DBCR_PATH.'/db-functions.php';
62
+ }
63
+
64
+ if ( !class_exists( 'DBCacheReloaded' ) ) {
65
+
66
+ class DBCacheReloaded {
67
+ var $config = null;
68
+ var $folders = null;
69
+ var $settings_page = false;
70
+ var $dbcr_cache = null;
71
+
72
+ // Constructor
73
+ function DBCacheReloaded() {
74
+ $this->config = unserialize( @file_get_contents( WP_CONTENT_DIR.'/db-config.ini' ) );
75
+
76
+ // Load DB Module Wrapper if needed (1st check)
77
+ global $wpdb;
78
+ if ( isset( $this->config['enabled'] ) && $this->config['enabled']
79
+ && isset( $this->config['wrapper'] ) && $this->config['wrapper'] ) {
80
+ global $dbcr_wpdb;
81
+ include DBCR_PATH.'/db-module-wrapper.php';
82
+
83
+ // 3rd check to make sure DB Module Wrapper is loaded
84
+ add_filter( 'query_vars', array( &$this, 'query_vars' ) );
85
+ }
86
+
87
+ // Set our copy of pcache object
88
+ if ( isset ( $wpdb->dbcr_cache ) ) {
89
+ $this->dbcr_cache =& $wpdb->dbcr_cache;
90
+ } else {
91
+ $this->dbcr_cache =& new pcache();
92
+ }
93
+
94
+ // Initialise plugin
95
+ add_action( 'init', array( &$this, 'init' ) );
96
+
97
+ // Install/Upgrade
98
+ add_action( 'activate_'.plugin_basename( __FILE__ ), array( &$this, 'dbcr_install' ) );
99
+ // Uninstall
100
+ add_action( 'deactivate_'.plugin_basename( __FILE__ ), array( &$this, 'dbcr_uninstall' ) );
101
+
102
+ // Add cleaning on publish and new comment
103
+ // Posts
104
+ add_action( 'publish_post', array( &$this, 'dbcr_clear' ), 0 );
105
+ add_action( 'edit_post', array( &$this, 'dbcr_clear' ), 0 );
106
+ add_action( 'delete_post', array( &$this, 'dbcr_clear' ), 0 );
107
+ // Comments
108
+ add_action( 'trackback_post', array( &$this, 'dbcr_clear' ), 0 );
109
+ add_action( 'pingback_post', array( &$this, 'dbcr_clear' ), 0 );
110
+ add_action( 'comment_post', array( &$this, 'dbcr_clear' ), 0 );
111
+ add_action( 'edit_comment', array( &$this, 'dbcr_clear' ), 0 );
112
+ add_action( 'wp_set_comment_status', array( &$this, 'dbcr_clear' ), 0 );
113
+ // Other
114
+ add_action( 'delete_comment', array( &$this, 'dbcr_clear' ), 0 );
115
+ add_action( 'switch_theme', array( &$this, 'dbcr_clear' ), 0 );
116
+
117
+ // Display stats in footer
118
+ add_action( 'wp_footer', 'loadstats', 999999 );
119
+
120
+ if ( is_admin() ) {
121
+ // Show warning message to admin
122
+ add_action( 'admin_notices', array( &$this, 'admin_notices' ) );
123
+
124
+ // Catch options page
125
+ add_action( 'load-settings_page_'.substr( plugin_basename( __FILE__ ), 0, -4 ), array( &$this, 'load_settings_page' ) );
126
+
127
+ // Create options menu
128
+ add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
129
+
130
+ // Clear cache when option is changed
131
+ global $wp_version;
132
+ if ( version_compare( $wp_version, '2.9', '>=' ) ) {
133
+ add_action( 'added_option', array( &$this, 'dbcr_clear' ), 0 );
134
+ add_action( 'updated_option', array( &$this, 'dbcr_clear' ), 0 );
135
+ add_action( 'deleted_option', array( &$this, 'dbcr_clear' ), 0 );
136
+ } else {
137
+ // Hook for all actions
138
+ add_action( 'all', array( &$this, 'all_actions' ) );
139
+ }
140
+
141
+ // Provide icon for Ozh' Admin Drop Down Menu plugin
142
+ add_action( 'ozh_adminmenu_icon_'.plugin_basename( __FILE__ ), array( &$this, 'ozh_adminmenu_icon' ) );
143
+ }
144
+ }
145
+
146
+ // Initialise plugin
147
+ function init() {
148
+ load_plugin_textdomain( 'db-cache-reloaded', false, dirname( plugin_basename( __FILE__ ) ).'/lang' );
149
+
150
+ // 2nd check
151
+ global $wpdb;
152
+ if ( isset( $this->config['enabled'] ) && $this->config['enabled']
153
+ && isset( $this->config['wrapper'] ) && $this->config['wrapper']
154
+ && !isset ( $wpdb->dbcr_version ) ) {
155
+ // Looks that other plugin replaced our object in the meantime - need to fix this
156
+ global $dbcr_wpdb;
157
+ $dbcr_wpdb->dbcr_wpdb = $wpdb;
158
+ $wpdb = $dbcr_wpdb;
159
+ }
160
+ }
161
+
162
+ // Create options menu
163
+ function admin_menu() {
164
+ add_submenu_page( 'options-general.php', 'DB Cache Reloaded', 'DB Cache Reloaded',
165
+ 'manage_options', __FILE__, array( &$this, 'options_page' ) );
166
+ }
167
+
168
+ // 3rd check to make sure DB Module Wrapper is loaded
169
+ function query_vars( $vars ) {
170
+ // 3rd check
171
+ global $wpdb;
172
+ if ( isset( $this->config['enabled'] ) && $this->config['enabled']
173
+ && isset( $this->config['wrapper'] ) && $this->config['wrapper']
174
+ && !isset ( $wpdb->dbcr_version ) ) {
175
+ // Looks that other plugin replaced our object in the meantime - need to fix this
176
+ global $dbcr_wpdb;
177
+ $dbcr_wpdb->dbcr_wpdb = $wpdb;
178
+ $wpdb = $dbcr_wpdb;
179
+ }
180
+
181
+ return $vars;
182
+ }
183
+
184
+ function admin_notices() {
185
+ global $wpdb;
186
+ if ( defined( 'DBCR_WPDB_EXISTED' ) ) {
187
+ // Display error message
188
+ echo '<div id="notice" class="error"><p>';
189
+ _e('<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!', 'db-cache-reloaded');
190
+ if ( DBCR_WPDB_EXISTED !== true ) {
191
+ echo '<br />';
192
+ printf( __('Previous definition is at %s.', 'db-cache-reloaded'), DBCR_WPDB_EXISTED );
193
+ }
194
+ echo '</p></div>', "\n";
195
+ }
196
+
197
+ if ( !$this->settings_page ) {
198
+ if ( ( !isset( $this->config['enabled'] ) || !$this->config['enabled'] ) ) {
199
+ // Caching is disabled - display info message
200
+ echo '<div id="notice" class="updated fade"><p>';
201
+ printf( __('<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href="%s">Options Page</a> to enable it.', 'db-cache-reloaded'), admin_url( 'options-general.php?page='.plugin_basename( __FILE__ ) ) );
202
+ echo '</p></div>', "\n";
203
+ } elseif ( !isset( $wpdb->num_cachequeries ) ) {
204
+ echo '<div id="notice" class="error"><p>';
205
+ printf( __('<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href="%1$s">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href="%2$s">FAQ</a> how to do manual upgrade.', 'db-cache-reloaded'),
206
+ admin_url( 'options-general.php?page='.plugin_basename( __FILE__ ) ),
207
+ 'http://wordpress.org/extend/plugins/db-cache-reloaded/faq/' );
208
+ echo '</p></div>', "\n";
209
+ } else {
210
+ if ( isset ( $wpdb->dbcr_version ) ) {
211
+ $dbcr_db_version = $wpdb->dbcr_version;
212
+ } else {
213
+ $dbcr_db_version = 0;
214
+ }
215
+
216
+ if ( $dbcr_db_version != DBCR_CURRENT_DB_MODULE_VER ) {
217
+ echo '<div id="notice" class="error"><p>';
218
+ printf( __('<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href="%3$s">Options Page</a>, disable caching (remember to save options) and enable it again.', 'db-cache-reloaded'),
219
+ $this->format_ver_num( $dbcr_db_version ),
220
+ $this->format_ver_num( DBCR_CURRENT_DB_MODULE_VER ),
221
+ admin_url( 'options-general.php?page='.plugin_basename( __FILE__ ) ) );
222
+ echo '</p></div>', "\n";
223
+ }
224
+ }
225
+ }
226
+ }
227
+
228
+ // Hook for all actions
229
+ // Note: Called in Admin section only
230
+ function all_actions( $hook ) {
231
+ // Clear cache when option is updated or added
232
+ if ( preg_match( '/^(update_option_|add_option_)/', $hook ) ) {
233
+ $this->dbcr_clear();
234
+ }
235
+ }
236
+
237
+ // Provide icon for Ozh' Admin Drop Down Menu plugin
238
+ function ozh_adminmenu_icon() {
239
+ return plugins_url( 'icon.png', __FILE__ );
240
+ }
241
+
242
+ function load_settings_page() {
243
+ $this->settings_page = true;
244
+ }
245
+
246
+ // Enable cache
247
+ function dbcr_enable( $echo = true ) {
248
+ $status = true;
249
+
250
+ // Copy DB Module (if needed)
251
+ if ( !isset( $this->config['wrapper'] ) || !$this->config['wrapper'] ) {
252
+ if ( !@copy( DBCR_PATH.'/db.php', WP_CONTENT_DIR.'/db.php' ) ) {
253
+ $status = false;
254
+ }
255
+ }
256
+
257
+ // Create cache dirs and copy .htaccess
258
+ if ( $status ) {
259
+ $status = $this->dbcr_cache->install();
260
+ }
261
+
262
+ if ( $echo ) {
263
+ if ( $status ) {
264
+ echo '<div id="message" class="updated fade"><p>';
265
+ _e('Caching activated.', 'db-cache-reloaded');
266
+ echo '</p></div>';
267
+ } else {
268
+ echo '<div id="message" class="error"><p>';
269
+ _e('Caching can\'t be activated. Please <a href="http://codex.wordpress.org/Changing_File_Permissions" target="blank">chmod 755</a> <u>wp-content</u> folder', 'db-cache-reloaded');
270
+ echo '</p></div>';
271
+ }
272
+ }
273
+
274
+ if ( !$status ) {
275
+ $this->dbcr_disable( $echo );
276
+ }
277
+
278
+ return $status;
279
+ }
280
+
281
+ // Disable cache
282
+ function dbcr_disable( $echo = true ) {
283
+ $this->dbcr_uninstall( false );
284
+ if ( $echo ) {
285
+ echo '<div id="message" class="updated fade"><p>';
286
+ _e('Caching deactivated. Cache files deleted.', 'db-cache-reloaded');
287
+ echo '</p></div>';
288
+ }
289
+
290
+ return true;
291
+ }
292
+
293
+ // Install plugin
294
+ function dbcr_install() {
295
+ if ( isset( $this->config['enabled'] ) && $this->config['enabled'] ) { // This should be a plugin upgrade
296
+ $this->dbcr_uninstall( false );
297
+ $this->dbcr_enable( false ); // No echo - ob_start()/ob_ob_end_clean() is used in installer
298
+ }
299
+ }
300
+
301
+ // Uninstall plugin
302
+ function dbcr_uninstall( $remove_all = true ) {
303
+ $this->dbcr_clear();
304
+ @unlink( WP_CONTENT_DIR.'/db.php' );
305
+ if ( $remove_all ) {
306
+ @unlink( WP_CONTENT_DIR.'/db-config.ini' );
307
+ }
308
+ @unlink( DBCR_CACHE_DIR.'/.htaccess' );
309
+
310
+ $this->dbcr_cache->uninstall();
311
+
312
+ @rmdir( DBCR_CACHE_DIR );
313
+ }
314
+
315
+ // Clears the cache folder
316
+ function dbcr_clear() {
317
+ $this->dbcr_cache->clean( false );
318
+ }
319
+
320
+ // Format version number
321
+ function format_ver_num( $version ) {
322
+ if ( $version % 100 == 0 ) {
323
+ return sprintf( '%d.%d', (int)($version / 10000), (int)($version / 100) % 100 );
324
+ } else {
325
+ return sprintf( '%d.%d.%d', (int)($version / 10000), (int)($version / 100) % 100, $version % 100 );
326
+ }
327
+ }
328
+
329
+ // Settings page
330
+ function options_page() {
331
+ if ( !isset( $this->config['timeout'] ) || intval( $this->config['timeout'] ) == 0) {
332
+ $this->config['timeout'] = 5;
333
+ } else {
334
+ $this->config['timeout'] = intval( $this->config['timeout']/60 );
335
+ }
336
+ if ( !isset( $this->config['enabled'] ) ) {
337
+ $this->config['enabled'] = false;
338
+ $cache_enabled = false;
339
+ } else {
340
+ $cache_enabled = true;
341
+ }
342
+ if ( !isset( $this->config['loadstat'] ) ) {
343
+ $this->config['loadstat'] = __('<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->', 'db-cache-reloaded');
344
+ }
345
+ if ( !isset( $this->config['filter'] ) ) {
346
+ $this->config['filter'] = '_posts|_postmeta';
347
+ }
348
+ if ( !isset( $this->config['wrapper'] ) ) {
349
+ $this->config['wrapper'] = false;
350
+ }
351
+ if ( defined( 'DBCR_DEBUG' ) && DBCR_DEBUG ) {
352
+ $this->config['debug'] = 1;
353
+ }
354
+
355
+ if ( isset( $_POST['clear'] ) ) {
356
+ check_admin_referer( 'db-cache-reloaded-update-options' );
357
+ $this->dbcr_cache->clean( false );
358
+ echo '<div id="message" class="updated fade"><p>';
359
+ _e('Cache files deleted.', 'db-cache-reloaded');
360
+ echo '</p></div>';
361
+ } elseif ( isset( $_POST['clearold'] ) ) {
362
+ check_admin_referer( 'db-cache-reloaded-update-options' );
363
+ $this->dbcr_cache->clean();
364
+ echo '<div id="message" class="updated fade"><p>';
365
+ _e('Expired cache files deleted.', 'db-cache-reloaded');
366
+ echo '</p></div>';
367
+ } elseif ( isset( $_POST['save'] ) ) {
368
+ check_admin_referer( 'db-cache-reloaded-update-options' );
369
+ $saveconfig = $this->config = $this->dbcr_request( 'options' );
370
+
371
+ if ( defined( 'DBCR_DEBUG' ) && DBCR_DEBUG ) {
372
+ $saveconfig['debug'] = 1;
373
+ }
374
+ if ( $saveconfig['timeout'] == '' || !is_numeric( $saveconfig['timeout'] ) ) {
375
+ $this->config['timeout'] = 5;
376
+ }
377
+
378
+ // Convert to seconds for save
379
+ $saveconfig['timeout'] = intval( $this->config['timeout']*60 );
380
+
381
+ if ( !isset( $saveconfig['filter'] ) ) {
382
+ $saveconfig['filter'] = '';
383
+ } else {
384
+ $this->config['filter'] = $saveconfig['filter'] = trim( $saveconfig['filter'] );
385
+ }
386
+
387
+ // Activate/deactivate caching
388
+ if ( !isset( $this->config['enabled'] ) && $cache_enabled ) {
389
+ $this->dbcr_disable();
390
+ } elseif ( isset( $this->config['enabled'] ) && $this->config['enabled'] == 1 && !$cache_enabled ) {
391
+ if ( !$this->dbcr_enable() ) {
392
+ unset( $this->config['enabled'] );
393
+ unset( $saveconfig['enabled'] );
394
+ } else {
395
+ $this->config['lastclean'] = time();
396
+ }
397
+ }
398
+
399
+ $file = @fopen( WP_CONTENT_DIR."/db-config.ini", 'w+' );
400
+ if ( $file ) {
401
+ fwrite( $file, serialize( $saveconfig ) );
402
+ fclose( $file );
403
+ echo '<div id="message" class="updated fade"><p>';
404
+ _e('Settings saved.', 'db-cache-reloaded');
405
+ echo '</p></div>';
406
+ } else {
407
+ echo '<div id="message" class="error"><p>';
408
+ _e('Settings can\'t be saved. Please <a href="http://codex.wordpress.org/Changing_File_Permissions" target="blank">chmod 755</a> file <u>config.ini</u>', 'db-cache-reloaded');
409
+ echo '</p></div>';
410
+ }
411
+ }
412
+ ?>
413
+ <div class="wrap">
414
+ <a href="http://www.ivankristianto.com/">
415
+ <div id="db-cache-reloaded-icon" style="background: url(<?php echo plugin_dir_url(__FILE__) ?>dbcache-icon.png) no-repeat;" class="icon32"><br /></div>
416
+ </a>
417
+ <form method="post">
418
+ <?php wp_nonce_field('db-cache-reloaded-update-options'); ?>
419
+ <h2><?php _e('DB Cache Reloaded Fix By Ivan - Options', 'db-cache-reloaded'); ?></h2>
420
+
421
+ <h3><?php _e('Configuration', 'db-cache-reloaded'); ?></h3>
422
+ <table class="form-table">
423
+ <tr valign="top">
424
+ <?php $this->dbcr_field_checkbox( 'enabled', __('Enable', 'db-cache-reloaded') ); ?>
425
+ </tr>
426
+ <tr valign="top">
427
+ <?php $this->dbcr_field_text( 'timeout', __('Expire a cached query after', 'db-cache-reloaded'),
428
+ __('minutes. <em>(Expired files are deleted automatically)</em>', 'db-cache-reloaded'), 'size="5"' ); ?>
429
+ </tr>
430
+ </table>
431
+
432
+ <h3><?php _e('Additional options', 'db-cache-reloaded'); ?></h3>
433
+ <table class="form-table">
434
+ <tr valign="top">
435
+ <?php $this->dbcr_field_text( 'filter', __('Cache filter', 'db-cache-reloaded'),
436
+ '<br/>'.__('Do not cache queries that contains this input contents. Divide different filters with \'|\' (vertical line, e.g. \'_posts|_postmeta\')', 'db-cache-reloaded'), 'size="100"' ); ?>
437
+ </tr>
438
+ <tr valign="top">
439
+ <?php $this->dbcr_field_text( 'loadstat', __('Load stats template', 'db-cache-reloaded'),
440
+ '<br/>'.__('It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory', 'db-cache-reloaded'), 'size="100"' ); ?>
441
+ </tr>
442
+ </table>
443
+
444
+ <h3><?php _e('Advanced', 'db-cache-reloaded'); ?></h3>
445
+ <table class="form-table">
446
+ <tr valign="top">
447
+ <?php
448
+ $wrapper_msg = __('Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1.', 'db-cache-reloaded');
449
+ if ( version_compare( PHP_VERSION, '5', '<' ) ) {
450
+ echo '<td colspan="2">';
451
+ printf( __( 'Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href="http://codex.wordpress.org/Switching_to_PHP5">Switching to PHP5</a> article for information how to switch to PHP 5.', 'db-cache-reloaded' ), PHP_VERSION );
452
+ echo '<br/ ><br />', $wrapper_msg, '</td>';
453
+ } elseif ( isset( $this->config['enabled'] ) && $this->config['enabled'] ) {
454
+ echo '<td colspan="2">';
455
+ echo '<input type="hidden" name="options[wrapper]" value="', isset( $this->config['wrapper'] ) && $this->config['wrapper'] ? 1 : 0, '" />';
456
+ if ( isset( $this->config['wrapper'] ) && $this->config['wrapper'] ) {
457
+ _e( 'Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first.', 'db-cache-reloaded' );
458
+ } else {
459
+ _e( 'Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first.', 'db-cache-reloaded' );
460
+ }
461
+ echo '<br />', $wrapper_msg, '</td>';
462
+ } else { ?>
463
+ <?php $this->dbcr_field_checkbox( 'wrapper', __('Enable Wrapper Mode', 'db-cache-reloaded'), '<br />'.$wrapper_msg ); ?>
464
+ <?php } ?>
465
+ </tr>
466
+ </table>
467
+
468
+ <p class="submit">
469
+ <input class="button" type="submit" name="save" value="<?php _e('Save', 'db-cache-reloaded'); ?>">
470
+ <input class="button" type="submit" name="clear" value="<?php _e('Clear the cache', 'db-cache-reloaded'); ?>">
471
+ <input class="button" type="submit" name="clearold" value="<?php _e('Clear the expired cache', 'db-cache-reloaded'); ?>">
472
+ </p>
473
+ </form>
474
+ <p>This plugin has cost me hours of work, if you use it, please donate a token of your appreciation!</p><br/><form style="margin-left:50px;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
475
+ <input type="hidden" name="cmd" value="_s-xclick">
476
+ <input type="hidden" name="hosted_button_id" value="G463UW5KA8EZ6">
477
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
478
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
479
+ </form>
480
+ </div>
481
+ <?php
482
+ }
483
+
484
+ // Other functions used on options page
485
+ function dbcr_request( $name, $default=null ) {
486
+ if ( !isset( $_POST[$name]) ) {
487
+ return $default;
488
+ }
489
+
490
+ return $_POST[$name];
491
+ }
492
+
493
+ function dbcr_field_checkbox( $name, $label='', $tips='', $attrs='' ) {
494
+ echo '<th scope="row">';
495
+ echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
496
+ echo '<td><input type="checkbox" ' . $attrs . ' name="options[' . $name . ']" value="1" ';
497
+ checked( isset( $this->config[$name] ) && $this->config[$name], true );
498
+ echo '/> ' . $tips . '</td>';
499
+ }
500
+
501
+ function dbcr_field_text($name, $label='', $tips='', $attrs='') {
502
+ if ( strpos($attrs, 'size') === false ) {
503
+ $attrs .= 'size="30"';
504
+ }
505
+ echo '<th scope="row">';
506
+ echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
507
+ echo '<td><input type="text" ' . $attrs . ' name="options[' . $name . ']" value="' .
508
+ htmlspecialchars($this->config[$name]) . '"/>';
509
+ echo ' ' . $tips;
510
+ echo '</td>';
511
+ }
512
+
513
+ function dbcr_field_textarea( $name, $label='', $tips='', $attrs='' ) {
514
+ if ( strpos( $attrs, 'cols' ) === false ) {
515
+ $attrs .= 'cols="70"';
516
+ }
517
+ if ( strpos( $attrs, 'rows' ) === false ) {
518
+ $attrs .= 'rows="5"';
519
+ }
520
+
521
+ echo '<th scope="row">';
522
+ echo '<label for="options[' . $name . ']">' . $label . '</label></th>';
523
+ echo '<td><textarea wrap="off" ' . $attrs . ' name="options[' . $name . ']">' .
524
+ htmlspecialchars($this->config[$name]) . '</textarea>';
525
+ echo '<br />' . $tips;
526
+ echo '</td>';
527
+ }
528
+ }
529
+
530
+ $wp_db_cache_reloaded = new DBCacheReloaded();
531
+
532
+ function get_num_cachequeries() {
533
+ global $wpdb, $wp_db_cache_reloaded;
534
+ if ( isset( $wpdb->num_cachequeries ) ) {
535
+ // DB Module loaded
536
+ return $wpdb->num_cachequeries;
537
+ } elseif ( !isset( $wp_db_cache_reloaded->config['enabled'] ) || !$wp_db_cache_reloaded->config['enabled'] ) {
538
+ // Cache disabled
539
+ return 0;
540
+ } else {
541
+ // Probably conflict with another plugin or configuration issue :)
542
+ return -1;
543
+ }
544
+ }
545
+
546
+ function get_num_dml_queries() {
547
+ global $wpdb, $wp_db_cache_reloaded;
548
+ if ( isset( $wpdb->dbcr_num_dml_queries ) ) {
549
+ // DB Module loaded
550
+ return $wpdb->dbcr_num_dml_queries;
551
+ } elseif ( !isset( $wp_db_cache_reloaded->config['enabled'] ) || !$wp_db_cache_reloaded->config['enabled'] ) {
552
+ // Cache disabled
553
+ return 0;
554
+ } else {
555
+ // Probably conflict with another plugin or configuration issue :)
556
+ return -1;
557
+ }
558
+ }
559
+
560
+ /*
561
+ Function to display load statistics
562
+ Put in your template <? loadstats(); ?>
563
+ */
564
+ function loadstats() {
565
+ global $wp_db_cache_reloaded;
566
+
567
+ if ( strlen( $wp_db_cache_reloaded->config['loadstat'] ) > 7 ) {
568
+ $stats['timer'] = timer_stop();
569
+ $replace['timer'] = "{timer}";
570
+
571
+ $stats['normal'] = get_num_queries();
572
+ $replace['normal'] = "{queries}";
573
+
574
+ $stats['dml'] = get_num_dml_queries();
575
+ $replace['dml'] = "{dml_queries}";
576
+
577
+ $stats['cached'] = get_num_cachequeries();
578
+ $replace['cached'] = "{cached}";
579
+
580
+ if ( function_exists( 'memory_get_usage' ) ) {
581
+ $stats['memory'] = round( memory_get_usage()/1024/1024, 2 ) . 'MB';
582
+ } else {
583
+ $stats['memory'] = 'N/A';
584
+ }
585
+ $replace['memory'] = "{memory}";
586
+
587
+ $result = str_replace( $replace, $stats, $wp_db_cache_reloaded->config['loadstat'] );
588
+
589
+ echo $result;
590
+ }
591
+
592
+ echo "\n<!-- Cached by DB Cache Reloaded -->\n";
593
+ }
594
+
595
+ } // END
596
+
597
+ ?>
db-functions.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Cache framework
4
+ * Author: Daniel Frużyński
5
+ * Based on DB Cache by Dmitry Svarytsevych
6
+ * http://design.lviv.ua
7
+ */
8
+
9
+ /* Original code Copyright Dmitry Svarytsevych
10
+ Modifications Copyright 2009 Daniel Frużyński (email : daniel [A-T] poradnik-webmastera.com)
11
+
12
+ This program is free software; you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation; either version 2 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
+ */
26
+
27
+ // Cache directory
28
+ // Need this here, because some people may upgrade manually by overwriting files
29
+ // without deactivating cache
30
+ if ( !defined( 'DBCR_CACHE_DIR' ) ) {
31
+ define( 'DBCR_CACHE_DIR', WP_CONTENT_DIR.'/tmp' );
32
+ }
33
+
34
+ class pcache {
35
+ // Cache lifetime - by default 1800 sec = 30 min
36
+ var $lifetime = 1800;
37
+
38
+ // Base storage path for global data
39
+ var $base_storage_global = null;
40
+
41
+ // Base storage patch for local data
42
+ var $base_storage = null;
43
+
44
+ // Path to current storage dir
45
+ var $storage = null;
46
+
47
+ // All subdirs
48
+ var $folders = array( 'options', 'links', 'terms', 'users', 'posts', '' );
49
+
50
+ // Constructor
51
+ function pcache() {
52
+ $this->set_storage();
53
+ }
54
+
55
+ // Set storage dir for next operation(s)
56
+ function set_storage( $db = 'local', $context = '' ) {
57
+ /*if ( is_multisite() ) { // WP 3.0+ multisite install
58
+ if ( $db == 'global' ) {
59
+ if ( is_null( $this->base_storage ) ) {
60
+ $this->base_storage_global = DBCR_CACHE_DIR . '/@global';
61
+ }
62
+ } else { // local
63
+ if ( is_null( $this->base_storage_local ) ) {
64
+ global $current_site;
65
+ $this->base_storage = DBCR_CACHE_DIR . '/' . $current_site->domain . $current_site->path;
66
+ }
67
+ $this->storage = $this->base_storage;
68
+ }
69
+ } elseif ( defined( 'DBCR_MULTISITE' ) && DBCR_MULTISITE ) { // HTTP_HOST-based multisite
70
+ if ( is_null( $this->base_storage ) ) {
71
+ $host = strtolower( $_SERVER['HTTP_HOST'] );
72
+ $this->base_storage = DBCR_CACHE_DIR . '/' . $host;
73
+ }
74
+ $this->storage = $this->base_storage;
75
+ } else { // Single WP install
76
+ $this->storage = DBCR_CACHE_DIR;
77
+ }*/
78
+
79
+ $this->base_storage = DBCR_CACHE_DIR;
80
+ $this->storage = DBCR_CACHE_DIR;
81
+
82
+ // Set per-context path
83
+ if ( $context != '' ) {
84
+ $this->storage .= '/' . $context;
85
+ }
86
+ }
87
+
88
+ // Load data from cache for given tag
89
+ function load( $tag ) {
90
+ if ( $tag == '' ) {
91
+ return false;
92
+ }
93
+
94
+ $file = $this->storage.'/'.$tag;
95
+ $result = false;
96
+
97
+ // If file exists
98
+ if ( $filemtime = @filemtime( $file ) ) {
99
+ $f = @fopen( $file, 'r' );
100
+ if ( $f ) {
101
+ @flock( $f, LOCK_SH );
102
+ // for PHP5
103
+ if ( function_exists( 'stream_get_contents' ) ) {
104
+ $result = unserialize( stream_get_contents( $f ) );
105
+ } else { // for PHP4
106
+ $result = '';
107
+ while ( !feof( $f ) ) {
108
+ $result .= fgets( $f, 4096 );
109
+ }
110
+ $result = unserialize( $result );
111
+ }
112
+ @flock( $f, LOCK_UN );
113
+ @fclose( $f );
114
+
115
+ // Remove if expired
116
+ if ( ( $filemtime + $this->lifetime - time() ) < 0 ) {
117
+ $this->remove( $tag );
118
+ }
119
+ }
120
+ }
121
+
122
+ return $result;
123
+ }
124
+
125
+ // Save data to cache for given tag
126
+ function save( $value, $tag ) {
127
+ if ( $tag == '' || $value == '' ) {
128
+ return false;
129
+ }
130
+
131
+ $file = $this->storage.'/'.$tag;
132
+
133
+ $f = @fopen( $file, 'w' );
134
+ if ( !$f ) {
135
+ return false;
136
+ }
137
+
138
+ @flock( $f, LOCK_EX );
139
+ @fwrite( $f, serialize( $value ) );
140
+ @flock( $f, LOCK_UN );
141
+ @fclose( $f );
142
+ @chmod( $file, 0644 );
143
+
144
+ return true;
145
+ }
146
+
147
+ // Remove data from cache for given tag
148
+ function remove( $tag = '', $dir = false, $remove_expired_only = false ) {
149
+ if ( $tag == '' ) {
150
+ return false;
151
+ }
152
+
153
+ if ( $dir === false ) {
154
+ $dir = $this->storage;
155
+ }
156
+
157
+ $file = $dir.'/'.$tag;
158
+
159
+ if ( is_file( $file ) ) {
160
+ if ( $remove_expired_only && ( @filemtime( $file ) + $this->lifetime - time() ) > 0 ) {
161
+ return true;
162
+ }
163
+ if ( @unlink( $file ) ) {
164
+ return true;
165
+ }
166
+ }
167
+
168
+ return false;
169
+ }
170
+
171
+ function clean( $remove_expired_only = true, $db = 'local' ) {
172
+ $this->set_storage( $db );
173
+
174
+ foreach( $this->folders as $folder ) {
175
+ $path = $this->base_storage . '/';
176
+ if ( $folder != '' ) {
177
+ $path .= $folder . '/';
178
+ }
179
+ if ( $dir = @opendir( $path ) ) {
180
+ while ( $tag = readdir( $dir ) ) {
181
+ if ( ( $tag != '.' ) && ( $tag != '..' ) && ( $tag != '.htaccess' ) ) {
182
+ $this->remove( $tag, $path, $remove_expired_only );
183
+ }
184
+ }
185
+ closedir( $dir );
186
+ }
187
+ }
188
+ }
189
+
190
+ // Setup cache dirs
191
+ // Return true on success, false otherwise
192
+ function install( $global = false ) {
193
+ $this->set_storage( 'local' );
194
+
195
+ foreach( $this->folders as $folder ) {
196
+ $path = $this->base_storage . '/';
197
+ if ( $folder != '' ) {
198
+ $path .= $folder . '/';
199
+ }
200
+
201
+ if ( $folder != '' ) { // Skip base folder - it is already created
202
+ if ( !@mkdir( $path, 0755, true ) ) {
203
+ return false;
204
+ }
205
+ }
206
+ if ( !@copy( DBCR_PATH.'/htaccess', $path.'/.htaccess' ) ) {
207
+ return false;
208
+ }
209
+ }
210
+
211
+ /*if ( is_multisite() ) {
212
+ $this->set_storage( 'global' );
213
+ foreach( $this->folders as $folder ) {
214
+ $path = $this->base_storage . '/';
215
+ if ( $folder != '' ) {
216
+ $path .= $folder . '/';
217
+ }
218
+ if ( !@mkdir( $path, 0755, true ) ) {
219
+ return false;
220
+ }
221
+ if ( !@copy( DBCR_PATH.'/htaccess', $path.'/.htaccess' ) ) {
222
+ return false;
223
+ }
224
+ }
225
+ }*/
226
+
227
+ return true;
228
+ }
229
+
230
+ // Remove cache dirs
231
+ // Return true on success, false otherwise
232
+ function uninstall( $global = false ) {
233
+ $this->set_storage( 'local' );
234
+
235
+ $this->clean( false );
236
+
237
+ foreach( $this->folders as $folder ) {
238
+ $path = $this->base_storage . '/';
239
+ if ( $folder != '' ) {
240
+ $path .= $folder . '/';
241
+ }
242
+
243
+ @unlink( $path.'.htaccess' );
244
+ @rmdir( $path );
245
+ }
246
+ }
247
+ }
248
+
249
+ ?>
db-module-wrapper.php ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // --- DB Cache Start ---
4
+ // Path to plugin
5
+ if ( !defined( 'DBCR_PATH' ) ) {
6
+ define( 'DBCR_PATH', WP_PLUGIN_DIR.'/'.dirname( __FILE__ ) );
7
+ }
8
+ // Cache directory
9
+ if ( !defined( 'DBCR_CACHE_DIR' ) ) {
10
+ define( 'DBCR_CACHE_DIR', WP_CONTENT_DIR.'/tmp' );
11
+ }
12
+
13
+ // DB Module version (one or more digits for major, two digits for minor and revision numbers)
14
+ if ( !defined( 'DBCR_DB_MODULE_VER' ) ) {
15
+ define( 'DBCR_DB_MODULE_VER', 10600 );
16
+ }
17
+
18
+ // HACK: need to enable SAVEQUERY in order to save extended query data
19
+ if ( defined( 'DBCR_SAVEQUERIES' ) && DBCR_SAVEQUERIES && !defined ( 'SAVEQUERIES' ) ) {
20
+ define( 'SAVEQUERIES', true );
21
+ }
22
+
23
+ // Check if we have required functions
24
+ if ( !function_exists( 'is_multisite' ) ) { // Added in WP 3.0
25
+ function is_multisite() {
26
+ return false;
27
+ }
28
+ }
29
+
30
+ // --- DB Cache End ---
31
+
32
+
33
+ if ( !class_exists( 'DBCR_WPDB_Wrapper' ) ) {
34
+ class DBCR_WPDB_Wrapper {
35
+
36
+ // --- DB Cache Start ---
37
+ /**
38
+ * Aggregated WPDB object
39
+ *
40
+ * @var object of wpdb|null
41
+ */
42
+ var $dbcr_wpdb = null;
43
+ /**
44
+ * Amount of queries cached by DB Cache Reloaded made
45
+ *
46
+ * @var int
47
+ */
48
+ var $num_cachequeries = 0;
49
+ /**
50
+ * Amount of DML queries
51
+ *
52
+ * @var int
53
+ */
54
+ var $dbcr_num_dml_queries = 0;
55
+ /**
56
+ * True if caching is active, otherwise false
57
+ *
58
+ * @var bool
59
+ */
60
+ var $dbcr_cacheable = true;
61
+ /**
62
+ * Array with DB Cache Reloaded config
63
+ *
64
+ * @var array
65
+ */
66
+ var $dbcr_config = null;
67
+ /**
68
+ * DB Cache Reloaded helper
69
+ *
70
+ * @var object of pcache
71
+ */
72
+ var $dbcr_cache = null;
73
+ /**
74
+ * True if DB Cache Reloaded should show error in admin section
75
+ *
76
+ * @var bool
77
+ */
78
+ var $dbcr_show_error = false;
79
+ /**
80
+ * DB Cache Reloaded DB module version
81
+ *
82
+ * @var int
83
+ */
84
+ var $dbcr_version = DBCR_DB_MODULE_VER;
85
+ // --- DB Cache End ---
86
+
87
+ /**
88
+ * Connects to the database server and selects a database
89
+ *
90
+ * PHP5 style constructor for compatibility with PHP5. Does
91
+ * the actual setting up of the class properties and connection
92
+ * to the database.
93
+ *
94
+ * PHP4 incompatibility is intentional, because of using PHP5 object extensions.
95
+ */
96
+ function __construct($wpdb) {
97
+ $this->dbcr_wpdb = $wpdb;
98
+
99
+ // --- DB Cache Start ---
100
+ // Caching
101
+ // require_once would be better, but some people deletes plugin without deactivating it first
102
+ if ( @include_once( DBCR_PATH.'/db-functions.php' ) ) {
103
+ $this->dbcr_config = unserialize( @file_get_contents( WP_CONTENT_DIR.'/db-config.ini' ) );
104
+
105
+ $this->dbcr_cache =& new pcache();
106
+ $this->dbcr_cache->lifetime = isset( $this->dbcr_config['timeout'] ) ? $this->dbcr_config['timeout'] : 5;
107
+
108
+ // Clean unused
109
+ $dbcheck = date('G')/4;
110
+ if ( $dbcheck == intval( $dbcheck ) && ( !isset( $this->dbcr_config['lastclean'] )
111
+ || $this->dbcr_config['lastclean'] < time() - 3600 ) ) {
112
+ $this->dbcr_cache->clean();
113
+ $this->dbcr_config['lastclean'] = time();
114
+ $file = fopen(WP_CONTENT_DIR.'/db-config.ini', 'w+');
115
+ if ($file) {
116
+ fwrite($file, serialize($this->dbcr_config));
117
+ fclose($file);
118
+ }
119
+ }
120
+
121
+ // cache only frontside
122
+ if (
123
+ ( defined( 'WP_ADMIN' ) && WP_ADMIN ) ||
124
+ ( defined( 'DOING_CRON' ) && DOING_CRON ) ||
125
+ ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
126
+ strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) ||
127
+ strpos( $_SERVER['REQUEST_URI'], 'wp-login' ) ||
128
+ strpos( $_SERVER['REQUEST_URI'], 'wp-register' ) ||
129
+ strpos( $_SERVER['REQUEST_URI'], 'wp-signup' )
130
+ ) {
131
+ $this->dbcr_cacheable = false;
132
+ }
133
+ } else { // Cannot include db-functions.php
134
+ $this->dbcr_cacheable = false;
135
+ $this->dbcr_show_error = true;
136
+ }
137
+ // --- DB Cache End ---
138
+ }
139
+
140
+ /**
141
+ * Perform a MySQL database query, using current database connection.
142
+ *
143
+ * More information can be found on the codex page.
144
+ *
145
+ * @since 0.71
146
+ *
147
+ * @param string $query Database query
148
+ * @return int|false Number of rows affected/selected or false on error
149
+ */
150
+ function query($query) {
151
+ return $this->dbcr_query( $query, true );
152
+ }
153
+
154
+ function dbcr_query( $query, $maybe_cache = true ) {
155
+ if ( ! $this->dbcr_wpdb->ready )
156
+ return false;
157
+
158
+ // --- DB Cache Start ---
159
+ if ( defined('DBCR_SAVEQUERIES') && DBCR_SAVEQUERIES )
160
+ $this->dbcr_wpdb->timer_start();
161
+
162
+ $dbcr_db = 'local';
163
+ // --- DB Cache End ---
164
+
165
+ if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) {
166
+ if( $this->dbcr_wpdb->blogs != '' && preg_match("/(" . $this->dbcr_wpdb->blogs . "|" . $this->dbcr_wpdb->users . "|" . $this->dbcr_wpdb->usermeta . "|" . $this->dbcr_wpdb->site . "|" . $this->dbcr_wpdb->sitemeta . "|" . $this->dbcr_wpdb->sitecategories . ")/i",$query) ) {
167
+ // --- DB Cache Start ---
168
+ $dbcr_db = 'global';
169
+ // --- DB Cache End ---
170
+ }
171
+ } else {
172
+ // DB Cache Start
173
+ if( $this->dbcr_wpdb->blogs != '' && preg_match("/(" . $this->dbcr_wpdb->blogs . "|" . $this->dbcr_wpdb->users . "|" . $this->dbcr_wpdb->usermeta . "|" . $this->dbcr_wpdb->site . "|" . $this->dbcr_wpdb->sitemeta . "|" . $this->dbcr_wpdb->sitecategories . ")/i",$query) ) {
174
+ $dbcr_db = 'global';
175
+ }
176
+ // DB Cache End
177
+ }
178
+
179
+ // --- DB Cache Start ---
180
+ // Caching
181
+ $dbcr_cacheable = false;
182
+ // check if pcache object is in place
183
+ if ( !is_null( $this->dbcr_cache ) ) {
184
+ $dbcr_cacheable = $this->dbcr_cacheable && $maybe_cache;
185
+
186
+ if ( $dbcr_cacheable ) {
187
+ // do not cache non-select queries
188
+ if ( preg_match( "/\\s*(insert|delete|update|replace|alter|SET NAMES|FOUND_ROWS|RAND)\\b/si", $query ) ) {
189
+ $dbcr_cacheable = false;
190
+ } elseif ( // For hard queries - skip them
191
+ !preg_match( "/\\s*(JOIN | \* |\*\,)/si", $query ) ||
192
+ // User-defined cache filters
193
+ ( isset( $config['filter'] ) && ( $config['filter'] != '' ) &&
194
+ preg_match( "/\\s*(".$config['filter'].")/si", $query ) ) ) {
195
+ $dbcr_cacheable = false;
196
+ }
197
+ }
198
+
199
+ if ( $dbcr_cacheable ) {
200
+ $dbcr_queryid = md5( $query );
201
+
202
+ if ( strpos( $query, '_options' ) ) {
203
+ $this->dbcr_cache->set_storage( $dbcr_db, 'options' );
204
+ } elseif ( strpos( $query, '_links' ) ) {
205
+ $this->dbcr_cache->set_storage( $dbcr_db, 'links' );
206
+ } elseif ( strpos( $query, '_terms' ) ) {
207
+ $this->dbcr_cache->set_storage( $dbcr_db, 'terms' );
208
+ } elseif ( strpos( $query, '_user' ) ) {
209
+ $this->dbcr_cache->set_storage( $dbcr_db, 'users' );
210
+ } elseif ( strpos( $query, '_post' ) ) {
211
+ $this->dbcr_cache->set_storage( $dbcr_db, 'posts' );
212
+ } else {
213
+ $this->dbcr_cache->set_storage( $dbcr_db, '' );
214
+ }
215
+ }
216
+
217
+ /* Debug part */
218
+ if ( isset( $config['debug'] ) && $config['debug'] ) {
219
+ if ( $dbcr_cacheable ) {
220
+ echo "\n<!-- cache: $query -->\n\n";
221
+ } else {
222
+ echo "\n<!-- mysql: $query -->\n\n";
223
+ }
224
+ }
225
+ } elseif ( $this->dbcr_show_error ) {
226
+ $this->dbcr_show_error = false;
227
+ add_action( 'admin_notices', array( &$this, '_dbcr_admin_notice' ) );
228
+ }
229
+
230
+ $dbcr_cached = false;
231
+ if ( $dbcr_cacheable ) {
232
+ // Try to load cached query
233
+ $dbcr_cached = $this->dbcr_cache->load( $dbcr_queryid );
234
+ }
235
+
236
+ if ( $dbcr_cached !== false ) {
237
+ // Extract cached query
238
+ ++$this->num_cachequeries;
239
+
240
+ $dbcr_cached = unserialize( $dbcr_cached );
241
+ $this->dbcr_wpdb->last_error = '';
242
+ $this->dbcr_wpdb->last_query = $dbcr_cached['last_query'];
243
+ $this->dbcr_wpdb->last_result = $dbcr_cached['last_result'];
244
+ $this->dbcr_wpdb->col_info = $dbcr_cached['col_info'];
245
+ $this->dbcr_wpdb->num_rows = $dbcr_cached['num_rows'];
246
+
247
+ $return_val = $this->dbcr_wpdb->num_rows;
248
+
249
+ if ( defined('DBCR_SAVEQUERIES') && DBCR_SAVEQUERIES ) {
250
+ $this->dbcr_wpdb->queries[] = array( $query, $this->dbcr_wpdb->timer_stop(), $this->dbcr_wpdb->get_caller(), true );
251
+ }
252
+ } else {
253
+ // Cache not found or query not cacheable, perform query as usual
254
+ $return_val = $this->dbcr_wpdb->query( $query );
255
+ if ( $return_val === false ) { // error executing sql query
256
+ return false;
257
+ }
258
+
259
+ if ( defined('DBCR_SAVEQUERIES') && DBCR_SAVEQUERIES ) {
260
+ $this->dbcr_wpdb->queries[count( $this->dbcr_wpdb->queries ) - 1][3] = false;
261
+ }
262
+ }
263
+
264
+ if ( preg_match( "/^\\s*(insert|delete|update|replace|alter) /i", $query ) ) {
265
+ // --- DB Cache Start ---
266
+ ++$this->dbcr_num_dml_queries;
267
+ // --- DB Cache End ---
268
+ } else {
269
+ // --- DB Cache Start ---
270
+ if ( $dbcr_cacheable && ( $dbcr_cached === false ) ) {
271
+ $dbcr_cached = serialize( array(
272
+ 'last_query' => $this->dbcr_wpdb->last_query,
273
+ 'last_result' => $this->dbcr_wpdb->last_result,
274
+ 'col_info' => $this->dbcr_wpdb->col_info,
275
+ 'num_rows' => $this->dbcr_wpdb->num_rows,
276
+ ) );
277
+ $this->dbcr_cache->save( $dbcr_cached, $dbcr_queryid );
278
+ }
279
+ // DB Cache End
280
+ }
281
+
282
+ return $return_val;
283
+ }
284
+
285
+ // Show error message when something is messed with DB Cache Reloaded plugin
286
+ function _dbcr_admin_notice() {
287
+ // Display error message
288
+ echo '<div id="notice" class="error"><p>';
289
+ printf( __('<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file.', 'db-cache-reloaded'), WP_CONTENT_DIR.'/db.php' );
290
+ echo '</p></div>', "\n";
291
+ }
292
+
293
+ /**
294
+ * Retrieve one variable from the database.
295
+ *
296
+ * Executes a SQL query and returns the value from the SQL result.
297
+ * If the SQL result contains more than one column and/or more than one row, this function returns the value in the column and row specified.
298
+ * If $query is null, this function returns the value in the specified column and row from the previous SQL result.
299
+ *
300
+ * @since 0.71
301
+ *
302
+ * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query.
303
+ * @param int $x Optional. Column of value to return. Indexed from 0.
304
+ * @param int $y Optional. Row of value to return. Indexed from 0.
305
+ * @return string|null Database query result (as string), or null on failure
306
+ */
307
+ function get_var( $query = null, $x = 0, $y = 0 ) {
308
+ $this->dbcr_wpdb->func_call = "\$db->get_var(\"$query\", $x, $y)";
309
+ if ( $query )
310
+ $this->dbcr_query( $query );
311
+
312
+ // Extract var out of cached results based x,y vals
313
+ if ( !empty( $this->dbcr_wpdb->last_result[$y] ) ) {
314
+ $values = array_values( get_object_vars( $this->dbcr_wpdb->last_result[$y] ) );
315
+ }
316
+
317
+ // If there is a value return it else return null
318
+ return ( isset( $values[$x] ) && $values[$x] !== '' ) ? $values[$x] : null;
319
+ }
320
+
321
+ /**
322
+ * Retrieve one row from the database.
323
+ *
324
+ * Executes a SQL query and returns the row from the SQL result.
325
+ *
326
+ * @since 0.71
327
+ *
328
+ * @param string|null $query SQL query.
329
+ * @param string $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants. Return an associative array (column => value, ...),
330
+ * a numerically indexed array (0 => value, ...) or an object ( ->column = value ), respectively.
331
+ * @param int $y Optional. Row to return. Indexed from 0.
332
+ * @return mixed Database query result in format specifed by $output or null on failure
333
+ */
334
+ function get_row( $query = null, $output = OBJECT, $y = 0 ) {
335
+ $this->dbcr_wpdb->func_call = "\$db->get_row(\"$query\",$output,$y)";
336
+ if ( $query )
337
+ $this->dbcr_query( $query );
338
+ else
339
+ return null;
340
+
341
+ if ( !isset( $this->dbcr_wpdb->last_result[$y] ) )
342
+ return null;
343
+
344
+ if ( $output == OBJECT ) {
345
+ return $this->dbcr_wpdb->last_result[$y] ? $this->dbcr_wpdb->last_result[$y] : null;
346
+ } elseif ( $output == ARRAY_A ) {
347
+ return $this->dbcr_wpdb->last_result[$y] ? get_object_vars( $this->dbcr_wpdb->last_result[$y] ) : null;
348
+ } elseif ( $output == ARRAY_N ) {
349
+ return $this->dbcr_wpdb->last_result[$y] ? array_values( get_object_vars( $this->dbcr_wpdb->last_result[$y] ) ) : null;
350
+ } else {
351
+ $this->dbcr_wpdb->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/);
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Retrieve one column from the database.
357
+ *
358
+ * Executes a SQL query and returns the column from the SQL result.
359
+ * If the SQL result contains more than one column, this function returns the column specified.
360
+ * If $query is null, this function returns the specified column from the previous SQL result.
361
+ *
362
+ * @since 0.71
363
+ *
364
+ * @param string|null $query Optional. SQL query. Defaults to previous query.
365
+ * @param int $x Optional. Column to return. Indexed from 0.
366
+ * @return array Database query result. Array indexed from 0 by SQL result row number.
367
+ */
368
+ function get_col( $query = null , $x = 0 ) {
369
+ if ( $query )
370
+ $this->dbcr_query( $query );
371
+
372
+ $new_array = array();
373
+ // Extract the column values
374
+ for ( $i = 0, $j = count( $this->dbcr_wpdb->last_result ); $i < $j; $i++ ) {
375
+ $new_array[$i] = $this->get_var( null, $x, $i );
376
+ }
377
+ return $new_array;
378
+ }
379
+
380
+ /**
381
+ * Retrieve an entire SQL result set from the database (i.e., many rows)
382
+ *
383
+ * Executes a SQL query and returns the entire SQL result.
384
+ *
385
+ * @since 0.71
386
+ *
387
+ * @param string $query SQL query.
388
+ * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number.
389
+ * Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively.
390
+ * With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded.
391
+ * @return mixed Database query results
392
+ */
393
+ function get_results( $query = null, $output = OBJECT ) {
394
+ $this->dbcr_wpdb->func_call = "\$db->get_results(\"$query\", $output)";
395
+
396
+ if ( $query )
397
+ $this->dbcr_query( $query );
398
+ else
399
+ return null;
400
+
401
+ $new_array = array();
402
+ if ( $output == OBJECT ) {
403
+ // Return an integer-keyed array of row objects
404
+ return $this->dbcr_wpdb->last_result;
405
+ } elseif ( $output == OBJECT_K ) {
406
+ // Return an array of row objects with keys from column 1
407
+ // (Duplicates are discarded)
408
+ foreach ( $this->dbcr_wpdb->last_result as $row ) {
409
+ $key = array_shift( get_object_vars( $row ) );
410
+ if ( ! isset( $new_array[ $key ] ) )
411
+ $new_array[ $key ] = $row;
412
+ }
413
+ return $new_array;
414
+ } elseif ( $output == ARRAY_A || $output == ARRAY_N ) {
415
+ // Return an integer-keyed array of...
416
+ if ( $this->dbcr_wpdb->last_result ) {
417
+ foreach( (array) $this->dbcr_wpdb->last_result as $row ) {
418
+ if ( $output == ARRAY_N ) {
419
+ // ...integer-keyed row arrays
420
+ $new_array[] = array_values( get_object_vars( $row ) );
421
+ } else {
422
+ // ...column name-keyed row arrays
423
+ $new_array[] = get_object_vars( $row );
424
+ }
425
+ }
426
+ }
427
+ return $new_array;
428
+ }
429
+ return null;
430
+ }
431
+
432
+ // Wrappers for members of aggregated class
433
+ function __get( $name ) {
434
+ return $this->dbcr_wpdb->$name;
435
+ }
436
+
437
+ function __set( $name, $value ) {
438
+ $this->dbcr_wpdb->$name = $value;
439
+ }
440
+
441
+ function __isset( $name ) {
442
+ return isset( $this->dbcr_wpdb->$name );
443
+ }
444
+
445
+ function __unset( $name ) {
446
+ unset( $this->dbcr_wpdb->$name );
447
+ }
448
+
449
+ function __call( $name, $args ) {
450
+ return call_user_func_array( array( $this->dbcr_wpdb, $name ), $args );
451
+ }
452
+ }
453
+
454
+ $wpdb = new DBCR_WPDB_Wrapper( $wpdb );
455
+ $dbcr_wpdb = $wpdb;
456
+
457
+ }
458
+
459
+ ?>
db-module.php ADDED
@@ -0,0 +1,1883 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin URI: http://www.ivankristianto.com/web-development/programming/db-cache-reloaded-fix-for-wordpress-3-1/1784/
4
+ Description: Database Caching Module provided by DB Cache Reloaded plugin With WordPress 3.1 compatibility.
5
+ Author: Ivan Kristianto
6
+ Version: 1.6.1 (bundled with DB Cache Reloaded 2.2)
7
+ Author URI: http://www.ivankristianto.com
8
+ Text Domain: db-cache-reloaded-fix
9
+ */
10
+
11
+
12
+ /**
13
+ * WordPress DB Class
14
+ *
15
+ * Original code from {@link http://www.poradnik-webmastera.com/ Daniel Fruzynski (daniel@poradnik-webmastera.com)}
16
+ * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)}
17
+ *
18
+ * @package WordPress
19
+ * @subpackage Database
20
+ * @since 0.71
21
+ */
22
+
23
+ /* Modifications Copyright 2011 Ivan Kristianto (email : ivan@ivankristianto.com)
24
+
25
+ This program is free software; you can redistribute it and/or modify
26
+ it under the terms of the GNU General Public License as published by
27
+ the Free Software Foundation; either version 2 of the License, or
28
+ (at your option) any later version.
29
+
30
+ This program is distributed in the hope that it will be useful,
31
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ GNU General Public License for more details.
34
+
35
+ You should have received a copy of the GNU General Public License
36
+ along with this program; if not, write to the Free Software
37
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
38
+ */
39
+
40
+ /**
41
+ * @since 0.71
42
+ */
43
+ define( 'EZSQL_VERSION', 'WP1.25' );
44
+
45
+ /**
46
+ * @since 0.71
47
+ */
48
+ define( 'OBJECT', 'OBJECT', true );
49
+
50
+ /**
51
+ * @since 2.5.0
52
+ */
53
+ define( 'OBJECT_K', 'OBJECT_K' );
54
+
55
+ /**
56
+ * @since 0.71
57
+ */
58
+ define( 'ARRAY_A', 'ARRAY_A' );
59
+
60
+ /**
61
+ * @since 0.71
62
+ */
63
+ define( 'ARRAY_N', 'ARRAY_N' );
64
+
65
+
66
+ // --- DB Cache Start ---
67
+ // wp-settings.php defines this after loading this file, so have to add it here too
68
+ if ( !defined( 'WP_PLUGIN_DIR' ) ) {
69
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins' ); // full path, no trailing slash
70
+ }
71
+ // Path to plugin
72
+ if ( !defined( 'DBCR_PATH' ) ) {
73
+ define( 'DBCR_PATH', WP_PLUGIN_DIR.'/db-cache-reloaded' );
74
+ }
75
+ // Cache directory
76
+ if ( !defined( 'DBCR_CACHE_DIR' ) ) {
77
+ define( 'DBCR_CACHE_DIR', WP_CONTENT_DIR.'/tmp' );
78
+ }
79
+
80
+ // DB Module version (one or more digits for major, two digits for minor and revision numbers)
81
+ if ( !defined( 'DBCR_DB_MODULE_VER' ) ) {
82
+ define( 'DBCR_DB_MODULE_VER', 10600 );
83
+ }
84
+
85
+ // Check if we have required functions
86
+ if ( !function_exists( 'is_multisite' ) ) { // Added in WP 3.0
87
+ function is_multisite() {
88
+ return false;
89
+ }
90
+ }
91
+
92
+ // --- DB Cache End ---
93
+
94
+
95
+ /**
96
+ * WordPress Database Access Abstraction Object
97
+ *
98
+ * It is possible to replace this class with your own
99
+ * by setting the $wpdb global variable in wp-content/db.php
100
+ * file with your class. You can name it wpdb also, since
101
+ * this file will not be included, if the other file is
102
+ * available.
103
+ *
104
+ * @link http://codex.wordpress.org/Function_Reference/wpdb_Class
105
+ *
106
+ * @package WordPress
107
+ * @subpackage Database
108
+ * @since 0.71
109
+ * @final
110
+ */
111
+ if ( !class_exists( 'dbrc_wpdb' ) ) {
112
+ class dbrc_wpdb {
113
+
114
+ /**
115
+ * Whether to show SQL/DB errors
116
+ *
117
+ * @since 0.71
118
+ * @access private
119
+ * @var bool
120
+ */
121
+ var $show_errors = false;
122
+
123
+ /**
124
+ * Whether to suppress errors during the DB bootstrapping.
125
+ *
126
+ * @access private
127
+ * @since 2.5
128
+ * @var bool
129
+ */
130
+ var $suppress_errors = false;
131
+
132
+ /**
133
+ * The last error during query.
134
+ *
135
+ * @see get_last_error()
136
+ * @since 2.5
137
+ * @access private
138
+ * @var string
139
+ */
140
+ var $last_error = '';
141
+
142
+ /**
143
+ * Amount of queries made
144
+ *
145
+ * @since 1.2.0
146
+ * @access private
147
+ * @var int
148
+ */
149
+ var $num_queries = 0;
150
+
151
+ /**
152
+ * Count of rows returned by previous query
153
+ *
154
+ * @since 1.2
155
+ * @access private
156
+ * @var int
157
+ */
158
+ var $num_rows = 0;
159
+
160
+ /**
161
+ * Count of affected rows by previous query
162
+ *
163
+ * @since 0.71
164
+ * @access private
165
+ * @var int
166
+ */
167
+ var $rows_affected = 0;
168
+
169
+ /**
170
+ * The ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT).
171
+ *
172
+ * @since 0.71
173
+ * @access public
174
+ * @var int
175
+ */
176
+ var $insert_id = 0;
177
+
178
+ /**
179
+ * Saved result of the last query made
180
+ *
181
+ * @since 1.2.0
182
+ * @access private
183
+ * @var array
184
+ */
185
+ var $last_query;
186
+
187
+ /**
188
+ * Results of the last query made
189
+ *
190
+ * @since 1.0.0
191
+ * @access private
192
+ * @var array|null
193
+ */
194
+ var $last_result;
195
+
196
+ /**
197
+ * Saved info on the table column
198
+ *
199
+ * @since 1.2.0
200
+ * @access private
201
+ * @var array
202
+ */
203
+ var $col_info;
204
+
205
+ /**
206
+ * Saved queries that were executed
207
+ *
208
+ * @since 1.5.0
209
+ * @access private
210
+ * @var array
211
+ */
212
+ var $queries;
213
+
214
+ /**
215
+ * WordPress table prefix
216
+ *
217
+ * You can set this to have multiple WordPress installations
218
+ * in a single database. The second reason is for possible
219
+ * security precautions.
220
+ *
221
+ * @since 0.71
222
+ * @access private
223
+ * @var string
224
+ */
225
+ var $prefix = '';
226
+
227
+ /**
228
+ * Whether the database queries are ready to start executing.
229
+ *
230
+ * @since 2.5.0
231
+ * @access private
232
+ * @var bool
233
+ */
234
+ var $ready = false;
235
+
236
+ /**
237
+ * {@internal Missing Description}}
238
+ *
239
+ * @since 3.0.0
240
+ * @access public
241
+ * @var int
242
+ */
243
+ var $blogid = 0;
244
+
245
+ /**
246
+ * {@internal Missing Description}}
247
+ *
248
+ * @since 3.0.0
249
+ * @access public
250
+ * @var int
251
+ */
252
+ var $siteid = 0;
253
+
254
+ /**
255
+ * List of WordPress per-blog tables
256
+ *
257
+ * @since 2.5.0
258
+ * @access private
259
+ * @see wpdb::tables()
260
+ * @var array
261
+ */
262
+ var $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta',
263
+ 'terms', 'term_taxonomy', 'term_relationships', 'commentmeta' );
264
+
265
+ /**
266
+ * List of deprecated WordPress tables
267
+ *
268
+ * categories, post2cat, and link2cat were deprecated in 2.3.0, db version 5539
269
+ *
270
+ * @since 2.9.0
271
+ * @access private
272
+ * @see wpdb::tables()
273
+ * @var array
274
+ */
275
+ var $old_tables = array( 'categories', 'post2cat', 'link2cat' );
276
+
277
+ /**
278
+ * List of WordPress global tables
279
+ *
280
+ * @since 3.0.0
281
+ * @access private
282
+ * @see wpdb::tables()
283
+ * @var array
284
+ */
285
+ var $global_tables = array( 'users', 'usermeta' );
286
+
287
+ /**
288
+ * List of Multisite global tables
289
+ *
290
+ * @since 3.0.0
291
+ * @access private
292
+ * @see wpdb::tables()
293
+ * @var array
294
+ */
295
+ var $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',
296
+ 'sitecategories', 'registration_log', 'blog_versions' );
297
+
298
+ /**
299
+ * WordPress Comments table
300
+ *
301
+ * @since 1.5.0
302
+ * @access public
303
+ * @var string
304
+ */
305
+ var $comments;
306
+
307
+ /**
308
+ * WordPress Comment Metadata table
309
+ *
310
+ * @since 2.9.0
311
+ * @access public
312
+ * @var string
313
+ */
314
+ var $commentmeta;
315
+
316
+ /**
317
+ * WordPress Links table
318
+ *
319
+ * @since 1.5.0
320
+ * @access public
321
+ * @var string
322
+ */
323
+ var $links;
324
+
325
+ /**
326
+ * WordPress Options table
327
+ *
328
+ * @since 1.5.0
329
+ * @access public
330
+ * @var string
331
+ */
332
+ var $options;
333
+
334
+ /**
335
+ * WordPress Post Metadata table
336
+ *
337
+ * @since 1.5.0
338
+ * @access public
339
+ * @var string
340
+ */
341
+ var $postmeta;
342
+
343
+ /**
344
+ * WordPress Posts table
345
+ *
346
+ * @since 1.5.0
347
+ * @access public
348
+ * @var string
349
+ */
350
+ var $posts;
351
+
352
+ /**
353
+ * WordPress Terms table
354
+ *
355
+ * @since 2.3.0
356
+ * @access public
357
+ * @var string
358
+ */
359
+ var $terms;
360
+
361
+ /**
362
+ * WordPress Term Relationships table
363
+ *
364
+ * @since 2.3.0
365
+ * @access public
366
+ * @var string
367
+ */
368
+ var $term_relationships;
369
+
370
+ /**
371
+ * WordPress Term Taxonomy table
372
+ *
373
+ * @since 2.3.0
374
+ * @access public
375
+ * @var string
376
+ */
377
+ var $term_taxonomy;
378
+
379
+ /*
380
+ * Global and Multisite tables
381
+ */
382
+
383
+ /**
384
+ * WordPress User Metadata table
385
+ *
386
+ * @since 2.3.0
387
+ * @access public
388
+ * @var string
389
+ */
390
+ var $usermeta;
391
+
392
+ /**
393
+ * WordPress Users table
394
+ *
395
+ * @since 1.5.0
396
+ * @access public
397
+ * @var string
398
+ */
399
+ var $users;
400
+
401
+ /**
402
+ * Multisite Blogs table
403
+ *
404
+ * @since 3.0.0
405
+ * @access public
406
+ * @var string
407
+ */
408
+ var $blogs;
409
+
410
+ /**
411
+ * Multisite Blog Versions table
412
+ *
413
+ * @since 3.0.0
414
+ * @access public
415
+ * @var string
416
+ */
417
+ var $blog_versions;
418
+
419
+ /**
420
+ * Multisite Registration Log table
421
+ *
422
+ * @since 3.0.0
423
+ * @access public
424
+ * @var string
425
+ */
426
+ var $registration_log;
427
+
428
+ /**
429
+ * Multisite Signups table
430
+ *
431
+ * @since 3.0.0
432
+ * @access public
433
+ * @var string
434
+ */
435
+ var $signups;
436
+
437
+ /**
438
+ * Multisite Sites table
439
+ *
440
+ * @since 3.0.0
441
+ * @access public
442
+ * @var string
443
+ */
444
+ var $site;
445
+
446
+ /**
447
+ * Multisite Sitewide Terms table
448
+ *
449
+ * @since 3.0.0
450
+ * @access public
451
+ * @var string
452
+ */
453
+ var $sitecategories;
454
+
455
+ /**
456
+ * Multisite Site Metadata table
457
+ *
458
+ * @since 3.0.0
459
+ * @access public
460
+ * @var string
461
+ */
462
+ var $sitemeta;
463
+
464
+ /**
465
+ * Format specifiers for DB columns. Columns not listed here default to %s. Initialized during WP load.
466
+ *
467
+ * Keys are column names, values are format types: 'ID' => '%d'
468
+ *
469
+ * @since 2.8.0
470
+ * @see wpdb:prepare()
471
+ * @see wpdb:insert()
472
+ * @see wpdb:update()
473
+ * @see wp_set_wpdb_vars()
474
+ * @access public
475
+ * @var array
476
+ */
477
+ var $field_types = array();
478
+
479
+ /**
480
+ * Database table columns charset
481
+ *
482
+ * @since 2.2.0
483
+ * @access public
484
+ * @var string
485
+ */
486
+ var $charset;
487
+
488
+ /**
489
+ * Database table columns collate
490
+ *
491
+ * @since 2.2.0
492
+ * @access public
493
+ * @var string
494
+ */
495
+ var $collate;
496
+
497
+ /**
498
+ * Whether to use mysql_real_escape_string
499
+ *
500
+ * @since 2.8.0
501
+ * @access public
502
+ * @var bool
503
+ */
504
+ var $real_escape = false;
505
+
506
+ /**
507
+ * Database Username
508
+ *
509
+ * @since 2.9.0
510
+ * @access private
511
+ * @var string
512
+ */
513
+ var $dbuser;
514
+
515
+ /**
516
+ * A textual description of the last query/get_row/get_var call
517
+ *
518
+ * @since unknown
519
+ * @access public
520
+ * @var string
521
+ */
522
+ var $func_call;
523
+
524
+ // --- DB Cache Start ---
525
+ /**
526
+ * Amount of all queries cached by DB Cache Reloaded made
527
+ *
528
+ * @var int
529
+ */
530
+ var $num_cachequeries = 0;
531
+ /**
532
+ * Amount of DML queries
533
+ *
534
+ * @var int
535
+ */
536
+ var $dbcr_num_dml_queries = 0;
537
+ /**
538
+ * True if caching is active, otherwise false
539
+ *
540
+ * @var bool
541
+ */
542
+ var $dbcr_cacheable = true;
543
+ /**
544
+ * Array with DB Cache Reloaded config
545
+ *
546
+ * @var array
547
+ */
548
+ var $dbcr_config = null;
549
+ /**
550
+ * DB Cache Reloaded helper
551
+ *
552
+ * @var object of pcache
553
+ */
554
+ var $dbcr_cache = null;
555
+ /**
556
+ * True if DB Cache Reloaded should show error in admin section
557
+ *
558
+ * @var bool
559
+ */
560
+ var $dbcr_show_error = false;
561
+ /**
562
+ * DB Cache Reloaded DB module version
563
+ *
564
+ * @var int
565
+ */
566
+ var $dbcr_version = DBCR_DB_MODULE_VER;
567
+ // --- DB Cache End ---
568
+
569
+ /**
570
+ * Connects to the database server and selects a database
571
+ *
572
+ * PHP4 compatibility layer for calling the PHP5 constructor.
573
+ *
574
+ * @uses wpdb::__construct() Passes parameters and returns result
575
+ * @since 0.71
576
+ *
577
+ * @param string $dbuser MySQL database user
578
+ * @param string $dbpassword MySQL database password
579
+ * @param string $dbname MySQL database name
580
+ * @param string $dbhost MySQL database host
581
+ */
582
+ function wpdb( $dbuser, $dbpassword, $dbname, $dbhost ) {
583
+ if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB )
584
+ $this->db_connect();
585
+ return $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost );
586
+ }
587
+
588
+ /**
589
+ * Connects to the database server and selects a database
590
+ *
591
+ * PHP5 style constructor for compatibility with PHP5. Does
592
+ * the actual setting up of the class properties and connection
593
+ * to the database.
594
+ *
595
+ * @link http://core.trac.wordpress.org/ticket/3354
596
+ * @since 2.0.8
597
+ *
598
+ * @param string $dbuser MySQL database user
599
+ * @param string $dbpassword MySQL database password
600
+ * @param string $dbname MySQL database name
601
+ * @param string $dbhost MySQL database host
602
+ */
603
+ function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
604
+ register_shutdown_function( array( &$this, '__destruct' ) );
605
+
606
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG )
607
+ $this->show_errors();
608
+
609
+ if ( is_multisite() ) {
610
+ $this->charset = 'utf8';
611
+ if ( defined( 'DB_COLLATE' ) && DB_COLLATE )
612
+ $this->collate = DB_COLLATE;
613
+ else
614
+ $this->collate = 'utf8_general_ci';
615
+ } elseif ( defined( 'DB_COLLATE' ) ) {
616
+ $this->collate = DB_COLLATE;
617
+ }
618
+
619
+ if ( defined( 'DB_CHARSET' ) )
620
+ $this->charset = DB_CHARSET;
621
+
622
+ $this->dbuser = $dbuser;
623
+
624
+ $this->dbh = @mysql_connect( $dbhost, $dbuser, $dbpassword, true );
625
+ if ( !$this->dbh ) {
626
+ $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/"
627
+ <h1>Error establishing a database connection</h1>
628
+ <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
629
+ <ul>
630
+ <li>Are you sure you have the correct username and password?</li>
631
+ <li>Are you sure that you have typed the correct hostname?</li>
632
+ <li>Are you sure that the database server is running?</li>
633
+ </ul>
634
+ <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
635
+ "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost ), 'db_connect_fail' );
636
+ return;
637
+ }
638
+
639
+ $this->ready = true;
640
+
641
+ if ( $this->has_cap( 'collation' ) && !empty( $this->charset ) ) {
642
+ if ( function_exists( 'mysql_set_charset' ) ) {
643
+ mysql_set_charset( $this->charset, $this->dbh );
644
+ $this->real_escape = true;
645
+ } else {
646
+ $query = $this->prepare( 'SET NAMES %s', $this->charset );
647
+ if ( ! empty( $this->collate ) )
648
+ $query .= $this->prepare( ' COLLATE %s', $this->collate );
649
+ $this->dbcr_query( $query, false );
650
+ }
651
+ }
652
+
653
+ $this->select( $dbname, $this->dbh );
654
+
655
+ // --- DB Cache Start ---
656
+ // Caching
657
+ // require_once would be better, but some people deletes plugin without deactivating it first
658
+ if ( @include_once( DBCR_PATH.'/db-functions.php' ) ) {
659
+ $this->dbcr_config = unserialize( @file_get_contents( WP_CONTENT_DIR.'/db-config.ini' ) );
660
+
661
+ $this->dbcr_cache =& new pcache();
662
+ $this->dbcr_cache->lifetime = isset( $this->dbcr_config['timeout'] ) ? $this->dbcr_config['timeout'] : 5;
663
+
664
+ // Clean unused
665
+ $dbcheck = date('G')/4;
666
+ if ( $dbcheck == intval( $dbcheck ) && ( !isset( $this->dbcr_config['lastclean'] )
667
+ || $this->dbcr_config['lastclean'] < time() - 3600 ) ) {
668
+ $this->dbcr_cache->clean();
669
+ $this->dbcr_config['lastclean'] = time();
670
+ $file = fopen(WP_CONTENT_DIR.'/db-config.ini', 'w+');
671
+ if ($file) {
672
+ fwrite($file, serialize($this->dbcr_config));
673
+ fclose($file);
674
+ }
675
+ }
676
+
677
+ // cache only frontside
678
+ if (
679
+ ( defined( 'WP_ADMIN' ) && WP_ADMIN ) ||
680
+ ( defined( 'DOING_CRON' ) && DOING_CRON ) ||
681
+ ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ||
682
+ strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) ||
683
+ strpos( $_SERVER['REQUEST_URI'], 'wp-login' ) ||
684
+ strpos( $_SERVER['REQUEST_URI'], 'wp-register' ) ||
685
+ strpos( $_SERVER['REQUEST_URI'], 'wp-signup' )
686
+ ) {
687
+ $this->dbcr_cacheable = false;
688
+ }
689
+ } else { // Cannot include db-functions.php
690
+ $this->dbcr_cacheable = false;
691
+ $this->dbcr_show_error = true;
692
+ }
693
+ // --- DB Cache End ---
694
+ }
695
+
696
+ /**
697
+ * PHP5 style destructor and will run when database object is destroyed.
698
+ *
699
+ * @see wpdb::__construct()
700
+ * @since 2.0.8
701
+ * @return bool true
702
+ */
703
+ function __destruct() {
704
+ return true;
705
+ }
706
+
707
+ /**
708
+ * Sets the table prefix for the WordPress tables.
709
+ *
710
+ * @since 2.5.0
711
+ *
712
+ * @param string $prefix Alphanumeric name for the new prefix.
713
+ * @return string|WP_Error Old prefix or WP_Error on error
714
+ */
715
+ function set_prefix( $prefix, $set_table_names = true ) {
716
+
717
+ if ( preg_match( '|[^a-z0-9_]|i', $prefix ) )
718
+ return new WP_Error('invalid_db_prefix', /*WP_I18N_DB_BAD_PREFIX*/'Invalid database prefix'/*/WP_I18N_DB_BAD_PREFIX*/);
719
+
720
+ $old_prefix = is_multisite() ? '' : $prefix;
721
+
722
+ if ( isset( $this->base_prefix ) )
723
+ $old_prefix = $this->base_prefix;
724
+
725
+ $this->base_prefix = $prefix;
726
+
727
+ if ( $set_table_names ) {
728
+ foreach ( $this->tables( 'global' ) as $table => $prefixed_table )
729
+ $this->$table = $prefixed_table;
730
+
731
+ if ( is_multisite() && empty( $this->blogid ) )
732
+ return $old_prefix;
733
+
734
+ $this->prefix = $this->get_blog_prefix();
735
+
736
+ foreach ( $this->tables( 'blog' ) as $table => $prefixed_table )
737
+ $this->$table = $prefixed_table;
738
+
739
+ foreach ( $this->tables( 'old' ) as $table => $prefixed_table )
740
+ $this->$table = $prefixed_table;
741
+ }
742
+ return $old_prefix;
743
+ }
744
+
745
+ /**
746
+ * Sets blog id.
747
+ *
748
+ * @since 3.0.0
749
+ * @access public
750
+ * @param int $blog_id
751
+ * @param int $site_id Optional.
752
+ * @return string previous blog id
753
+ */
754
+ function set_blog_id( $blog_id, $site_id = 0 ) {
755
+ if ( ! empty( $site_id ) )
756
+ $this->siteid = $site_id;
757
+
758
+ $old_blog_id = $this->blogid;
759
+ $this->blogid = $blog_id;
760
+
761
+ $this->prefix = $this->get_blog_prefix();
762
+
763
+ foreach ( $this->tables( 'blog' ) as $table => $prefixed_table )
764
+ $this->$table = $prefixed_table;
765
+
766
+ foreach ( $this->tables( 'old' ) as $table => $prefixed_table )
767
+ $this->$table = $prefixed_table;
768
+
769
+ return $old_blog_id;
770
+ }
771
+
772
+ /**
773
+ * Gets blog prefix.
774
+ *
775
+ * @uses is_multisite()
776
+ * @since 3.0.0
777
+ * @param int $blog_id Optional.
778
+ * @return string Blog prefix.
779
+ */
780
+ function get_blog_prefix( $blog_id = null ) {
781
+ if ( is_multisite() ) {
782
+ if ( null === $blog_id )
783
+ $blog_id = $this->blogid;
784
+ if ( defined( 'MULTISITE' ) && ( 0 == $blog_id || 1 == $blog_id ) )
785
+ return $this->base_prefix;
786
+ else
787
+ return $this->base_prefix . $blog_id . '_';
788
+ } else {
789
+ return $this->base_prefix;
790
+ }
791
+ }
792
+
793
+ /**
794
+ * Returns an array of WordPress tables.
795
+ *
796
+ * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to
797
+ * override the WordPress users and usersmeta tables that would otherwise
798
+ * be determined by the prefix.
799
+ *
800
+ * The scope argument can take one of the following:
801
+ *
802
+ * 'all' - returns 'all' and 'global' tables. No old tables are returned.
803
+ * 'blog' - returns the blog-level tables for the queried blog.
804
+ * 'global' - returns the global tables for the installation, returning multisite tables only if running multisite.
805
+ * 'ms_global' - returns the multisite global tables, regardless if current installation is multisite.
806
+ * 'old' - returns tables which are deprecated.
807
+ *
808
+ * @since 3.0.0
809
+ * @uses wpdb::$tables
810
+ * @uses wpdb::$old_tables
811
+ * @uses wpdb::$global_tables
812
+ * @uses wpdb::$ms_global_tables
813
+ * @uses is_multisite()
814
+ *
815
+ * @param string $scope Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
816
+ * @param bool $prefix Optional. Whether to include table prefixes. Default true. If blog
817
+ * prefix is requested, then the custom users and usermeta tables will be mapped.
818
+ * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
819
+ * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
820
+ */
821
+ function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
822
+ switch ( $scope ) {
823
+ case 'all' :
824
+ $tables = array_merge( $this->global_tables, $this->tables );
825
+ if ( is_multisite() )
826
+ $tables = array_merge( $tables, $this->ms_global_tables );
827
+ break;
828
+ case 'blog' :
829
+ $tables = $this->tables;
830
+ break;
831
+ case 'global' :
832
+ $tables = $this->global_tables;
833
+ if ( is_multisite() )
834
+ $tables = array_merge( $tables, $this->ms_global_tables );
835
+ break;
836
+ case 'ms_global' :
837
+ $tables = $this->ms_global_tables;
838
+ break;
839
+ case 'old' :
840
+ $tables = $this->old_tables;
841
+ break;
842
+ default :
843
+ return array();
844
+ break;
845
+ }
846
+
847
+ if ( $prefix ) {
848
+ if ( ! $blog_id )
849
+ $blog_id = $this->blogid;
850
+ $blog_prefix = $this->get_blog_prefix( $blog_id );
851
+ $base_prefix = $this->base_prefix;
852
+ $global_tables = array_merge( $this->global_tables, $this->ms_global_tables );
853
+ foreach ( $tables as $k => $table ) {
854
+ if ( in_array( $table, $global_tables ) )
855
+ $tables[ $table ] = $base_prefix . $table;
856
+ else
857
+ $tables[ $table ] = $blog_prefix . $table;
858
+ unset( $tables[ $k ] );
859
+ }
860
+
861
+ if ( isset( $tables['users'] ) && defined( 'CUSTOM_USER_TABLE' ) )
862
+ $tables['users'] = CUSTOM_USER_TABLE;
863
+
864
+ if ( isset( $tables['usermeta'] ) && defined( 'CUSTOM_USER_META_TABLE' ) )
865
+ $tables['usermeta'] = CUSTOM_USER_META_TABLE;
866
+ }
867
+
868
+ return $tables;
869
+ }
870
+
871
+ /**
872
+ * Selects a database using the current database connection.
873
+ *
874
+ * The database name will be changed based on the current database
875
+ * connection. On failure, the execution will bail and display an DB error.
876
+ *
877
+ * @since 0.71
878
+ *
879
+ * @param string $db MySQL database name
880
+ * @param resource $dbh Optional link identifier.
881
+ * @return null Always null.
882
+ */
883
+ function select( $db, $dbh = null) {
884
+ if ( is_null($dbh) )
885
+ $dbh = $this->dbh;
886
+
887
+ if ( !@mysql_select_db( $db, $dbh ) ) {
888
+ $this->ready = false;
889
+ $this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'
890
+ <h1>Can&#8217;t select database</h1>
891
+ <p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>
892
+ <ul>
893
+ <li>Are you sure it exists?</li>
894
+ <li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>
895
+ <li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>
896
+ </ul>
897
+ <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="http://wordpress.org/support/">WordPress Support Forums</a>.</p>'/*/WP_I18N_DB_SELECT_DB*/, $db, $this->dbuser ), 'db_select_fail' );
898
+ return;
899
+ }
900
+ }
901
+
902
+ /**
903
+ * Weak escape, using addslashes()
904
+ *
905
+ * @see addslashes()
906
+ * @since 2.8.0
907
+ * @access private
908
+ *
909
+ * @param string $string
910
+ * @return string
911
+ */
912
+ function _weak_escape( $string ) {
913
+ return addslashes( $string );
914
+ }
915
+
916
+ /**
917
+ * Real escape, using mysql_real_escape_string() or addslashes()
918
+ *
919
+ * @see mysql_real_escape_string()
920
+ * @see addslashes()
921
+ * @since 2.8
922
+ * @access private
923
+ *
924
+ * @param string $string to escape
925
+ * @return string escaped
926
+ */
927
+ function _real_escape( $string ) {
928
+ if ( $this->dbh && $this->real_escape )
929
+ return mysql_real_escape_string( $string, $this->dbh );
930
+ else
931
+ return addslashes( $string );
932
+ }
933
+
934
+ /**
935
+ * Escape data. Works on arrays.
936
+ *
937
+ * @uses wpdb::_escape()
938
+ * @uses wpdb::_real_escape()
939
+ * @since 2.8
940
+ * @access private
941
+ *
942
+ * @param string|array $data
943
+ * @return string|array escaped
944
+ */
945
+ function _escape( $data ) {
946
+ if ( is_array( $data ) ) {
947
+ foreach ( (array) $data as $k => $v ) {
948
+ if ( is_array($v) )
949
+ $data[$k] = $this->_escape( $v );
950
+ else
951
+ $data[$k] = $this->_real_escape( $v );
952
+ }
953
+ } else {
954
+ $data = $this->_real_escape( $data );
955
+ }
956
+
957
+ return $data;
958
+ }
959
+
960
+ /**
961
+ * Escapes content for insertion into the database using addslashes(), for security.
962
+ *
963
+ * Works on arrays.
964
+ *
965
+ * @since 0.71
966
+ * @param string|array $data to escape
967
+ * @return string|array escaped as query safe string
968
+ */
969
+ function escape( $data ) {
970
+ if ( is_array( $data ) ) {
971
+ foreach ( (array) $data as $k => $v ) {
972
+ if ( is_array( $v ) )
973
+ $data[$k] = $this->escape( $v );
974
+ else
975
+ $data[$k] = $this->_weak_escape( $v );
976
+ }
977
+ } else {
978
+ $data = $this->_weak_escape( $data );
979
+ }
980
+
981
+ return $data;
982
+ }
983
+
984
+ /**
985
+ * Escapes content by reference for insertion into the database, for security
986
+ *
987
+ * @uses wpdb::_real_escape()
988
+ * @since 2.3.0
989
+ * @param string $string to escape
990
+ * @return void
991
+ */
992
+ function escape_by_ref( &$string ) {
993
+ $string = $this->_real_escape( $string );
994
+ }
995
+
996
+ /**
997
+ * Prepares a SQL query for safe execution. Uses sprintf()-like syntax.
998
+ *
999
+ * The following directives can be used in the query format string:
1000
+ * %d (decimal number)
1001
+ * %s (string)
1002
+ * %% (literal percentage sign - no argument needed)
1003
+ *
1004
+ * Both %d and %s are to be left unquoted in the query string and they need an argument passed for them.
1005
+ * Literals (%) as parts of the query must be properly written as %%.
1006
+ *
1007
+ * This function only supports a small subset of the sprintf syntax; it only supports %d (decimal number), %s (string).
1008
+ * Does not support sign, padding, alignment, width or precision specifiers.
1009
+ * Does not support argument numbering/swapping.
1010
+ *
1011
+ * May be called like {@link http://php.net/sprintf sprintf()} or like {@link http://php.net/vsprintf vsprintf()}.
1012
+ *
1013
+ * Both %d and %s should be left unquoted in the query string.
1014
+ *
1015
+ * <code>
1016
+ * wpdb::prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d", 'foo', 1337 )
1017
+ * wpdb::prepare( "SELECT DATE_FORMAT(`field`, '%%c') FROM `table` WHERE `column` = %s", 'foo' );
1018
+ * </code>
1019
+ *
1020
+ * @link http://php.net/sprintf Description of syntax.
1021
+ * @since 2.3.0
1022
+ *
1023
+ * @param string $query Query statement with sprintf()-like placeholders
1024
+ * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called like
1025
+ * {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
1026
+ * being called like {@link http://php.net/sprintf sprintf()}.
1027
+ * @param mixed $args,... further variables to substitute into the query's placeholders if being called like
1028
+ * {@link http://php.net/sprintf sprintf()}.
1029
+ * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
1030
+ * if there was something to prepare
1031
+ */
1032
+ function prepare( $query = null ) { // ( $query, *$args )
1033
+ if ( is_null( $query ) )
1034
+ return;
1035
+
1036
+ $args = func_get_args();
1037
+ array_shift( $args );
1038
+ // If args were passed as an array (as in vsprintf), move them up
1039
+ if ( isset( $args[0] ) && is_array($args[0]) )
1040
+ $args = $args[0];
1041
+ $query = str_replace( "'%s'", '%s', $query ); // in case someone mistakenly already singlequoted it
1042
+ $query = str_replace( '"%s"', '%s', $query ); // doublequote unquoting
1043
+ $query = preg_replace( '|(?<!%)%s|', "'%s'", $query ); // quote the strings, avoiding escaped strings like %%s
1044
+ array_walk( $args, array( &$this, 'escape_by_ref' ) );
1045
+ return @vsprintf( $query, $args );
1046
+ }
1047
+
1048
+ /**
1049
+ * Print SQL/DB error.
1050
+ *
1051
+ * @since 0.71
1052
+ * @global array $EZSQL_ERROR Stores error information of query and error string
1053
+ *
1054
+ * @param string $str The error to display
1055
+ * @return bool False if the showing of errors is disabled.
1056
+ */
1057
+ function print_error( $str = '' ) {
1058
+ global $EZSQL_ERROR;
1059
+
1060
+ if ( !$str )
1061
+ $str = mysql_error( $this->dbh );
1062
+ $EZSQL_ERROR[] = array( 'query' => $this->last_query, 'error_str' => $str );
1063
+
1064
+ if ( $this->suppress_errors )
1065
+ return false;
1066
+
1067
+ if ( $caller = $this->get_caller() )
1068
+ $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR_FULL*/'WordPress database error %1$s for query %2$s made by %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller );
1069
+ else
1070
+ $error_str = sprintf( /*WP_I18N_DB_QUERY_ERROR*/'WordPress database error %1$s for query %2$s'/*/WP_I18N_DB_QUERY_ERROR*/, $str, $this->last_query );
1071
+
1072
+ if ( function_exists( 'error_log' )
1073
+ && ( $log_file = @ini_get( 'error_log' ) )
1074
+ && ( 'syslog' == $log_file || @is_writable( $log_file ) )
1075
+ )
1076
+ @error_log( $error_str );
1077
+
1078
+ // Are we showing errors?
1079
+ if ( ! $this->show_errors )
1080
+ return false;
1081
+
1082
+ // If there is an error then take note of it
1083
+ if ( is_multisite() ) {
1084
+ $msg = "WordPress database error: [$str]\n{$this->last_query}\n";
1085
+ if ( defined( 'ERRORLOGFILE' ) )
1086
+ error_log( $msg, 3, ERRORLOGFILE );
1087
+ if ( defined( 'DIEONDBERROR' ) )
1088
+ wp_die( $msg );
1089
+ } else {
1090
+ $str = htmlspecialchars( $str, ENT_QUOTES );
1091
+ $query = htmlspecialchars( $this->last_query, ENT_QUOTES );
1092
+
1093
+ print "<div id='error'>
1094
+ <p class='wpdberror'><strong>WordPress database error:</strong> [$str]<br />
1095
+ <code>$query</code></p>
1096
+ </div>";
1097
+ }
1098
+ }
1099
+
1100
+ /**
1101
+ * Enables showing of database errors.
1102
+ *
1103
+ * This function should be used only to enable showing of errors.
1104
+ * wpdb::hide_errors() should be used instead for hiding of errors. However,
1105
+ * this function can be used to enable and disable showing of database
1106
+ * errors.
1107
+ *
1108
+ * @since 0.71
1109
+ * @see wpdb::hide_errors()
1110
+ *
1111
+ * @param bool $show Whether to show or hide errors
1112
+ * @return bool Old value for showing errors.
1113
+ */
1114
+ function show_errors( $show = true ) {
1115
+ $errors = $this->show_errors;
1116
+ $this->show_errors = $show;
1117
+ return $errors;
1118
+ }
1119
+
1120
+ /**
1121
+ * Disables showing of database errors.
1122
+ *
1123
+ * By default database errors are not shown.
1124
+ *
1125
+ * @since 0.71
1126
+ * @see wpdb::show_errors()
1127
+ *
1128
+ * @return bool Whether showing of errors was active
1129
+ */
1130
+ function hide_errors() {
1131
+ $show = $this->show_errors;
1132
+ $this->show_errors = false;
1133
+ return $show;
1134
+ }
1135
+
1136
+ /**
1137
+ * Whether to suppress database errors.
1138
+ *
1139
+ * By default database errors are suppressed, with a simple
1140
+ * call to this function they can be enabled.
1141
+ *
1142
+ * @since 2.5
1143
+ * @see wpdb::hide_errors()
1144
+ * @param bool $suppress Optional. New value. Defaults to true.
1145
+ * @return bool Old value
1146
+ */
1147
+ function suppress_errors( $suppress = true ) {
1148
+ $errors = $this->suppress_errors;
1149
+ $this->suppress_errors = (bool) $suppress;
1150
+ return $errors;
1151
+ }
1152
+
1153
+ /**
1154
+ * Kill cached query results.
1155
+ *
1156
+ * @since 0.71
1157
+ * @return void
1158
+ */
1159
+ function flush() {
1160
+ $this->last_result = array();
1161
+ $this->col_info = null;
1162
+ $this->last_query = null;
1163
+ }
1164
+
1165
+ function db_connect( $query = "SELECT" ) {
1166
+ global $db_list, $global_db_list;
1167
+ if ( ! is_array( $db_list ) )
1168
+ return true;
1169
+
1170
+ if ( $this->blogs != '' && preg_match("/(" . $this->blogs . "|" . $this->users . "|" . $this->usermeta . "|" . $this->site . "|" . $this->sitemeta . "|" . $this->sitecategories . ")/i",$query) ) {
1171
+ $action = 'global';
1172
+ $details = $global_db_list[ mt_rand( 0, count( $global_db_list ) -1 ) ];
1173
+ $this->db_global = $details;
1174
+ } elseif ( preg_match("/^\\s*(alter table|create|insert|delete|update|replace) /i",$query) ) {
1175
+ $action = 'write';
1176
+ $details = $db_list[ 'write' ][ mt_rand( 0, count( $db_list[ 'write' ] ) -1 ) ];
1177
+ $this->db_write = $details;
1178
+ } else {
1179
+ $action = '';
1180
+ $details = $db_list[ 'read' ][ mt_rand( 0, count( $db_list[ 'read' ] ) -1 ) ];
1181
+ $this->db_read = $details;
1182
+ }
1183
+
1184
+ $dbhname = "dbh" . $action;
1185
+ $this->$dbhname = @mysql_connect( $details[ 'db_host' ], $details[ 'db_user' ], $details[ 'db_password' ] );
1186
+ if (!$this->$dbhname ) {
1187
+ $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/"
1188
+ <h1>Error establishing a database connection</h1>
1189
+ <p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
1190
+ <ul>
1191
+ <li>Are you sure you have the correct username and password?</li>
1192
+ <li>Are you sure that you have typed the correct hostname?</li>
1193
+ <li>Are you sure that the database server is running?</li>
1194
+ </ul>
1195
+ <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>
1196
+ "/*/WP_I18N_DB_CONN_ERROR*/, $details['db_host'] ), 'db_connect_fail' );
1197
+ }
1198
+ $this->select( $details[ 'db_name' ], $this->$dbhname );
1199
+ }
1200
+
1201
+ /**
1202
+ * Perform a MySQL database query, using current database connection.
1203
+ *
1204
+ * More information can be found on the codex page.
1205
+ *
1206
+ * @since 0.71
1207
+ *
1208
+ * @param string $query Database query
1209
+ * @return int|false Number of rows affected/selected or false on error
1210
+ */
1211
+ function query( $query ) {
1212
+ return $this->dbcr_query( $query, true );
1213
+ }
1214
+
1215
+ function dbcr_query( $query, $maybe_cache = true ) {
1216
+ if ( ! $this->ready )
1217
+ return false;
1218
+
1219
+ // some queries are made before the plugins have been loaded, and thus cannot be filtered with this method
1220
+ if ( function_exists( 'apply_filters' ) )
1221
+ $query = apply_filters( 'query', $query );
1222
+
1223
+ $return_val = 0;
1224
+ $this->flush();
1225
+
1226
+ // Log how the function was called
1227
+ $this->func_call = "\$db->query(\"$query\")";
1228
+
1229
+ // Keep track of the last query for debug..
1230
+ $this->last_query = $query;
1231
+
1232
+ // Perform the query via std mysql_query function..
1233
+ if ( ( defined('SAVEQUERIES') && SAVEQUERIES ) || ( defined('DBCR_SAVEQUERIES') && DBCR_SAVEQUERIES ) )
1234
+ $this->timer_start();
1235
+
1236
+ // --- DB Cache Start ---
1237
+ $dbcr_db = 'local';
1238
+ // --- DB Cache End ---
1239
+
1240
+ // use $this->dbh for read ops, and $this->dbhwrite for write ops
1241
+ // use $this->dbhglobal for gloal table ops
1242
+ unset( $dbh );
1243
+ if( defined( 'WP_USE_MULTIPLE_DB' ) && WP_USE_MULTIPLE_DB ) {
1244
+ if( $this->blogs != '' && preg_match("/(" . $this->blogs . "|" . $this->users . "|" . $this->usermeta . "|" . $this->site . "|" . $this->sitemeta . "|" . $this->sitecategories . ")/i",$query) ) {
1245
+ if( false == isset( $this->dbhglobal ) ) {
1246
+ $this->db_connect( $query );
1247
+ }
1248
+ $dbh =& $this->dbhglobal;
1249
+ $this->last_db_used = "global";
1250
+ // --- DB Cache Start ---
1251
+ $dbcr_db = 'global';
1252
+ // --- DB Cache End ---
1253
+ } elseif ( preg_match("/^\\s*(alter table|create|insert|delete|update|replace) /i",$query) ) {
1254
+ if( false == isset( $this->dbhwrite ) ) {
1255
+ $this->db_connect( $query );
1256
+ }
1257
+ $dbh =& $this->dbhwrite;
1258
+ $this->last_db_used = "write";
1259
+ } else {
1260
+ $dbh =& $this->dbh;
1261
+ $this->last_db_used = "read";
1262
+ }
1263
+ } else {
1264
+ $dbh =& $this->dbh;
1265
+ $this->last_db_used = "other/read";
1266
+ // DB Cache Start
1267
+ if( $this->blogs != '' && preg_match("/(" . $this->blogs . "|" . $this->users . "|" . $this->usermeta . "|" . $this->site . "|" . $this->sitemeta . "|" . $this->sitecategories . ")/i",$query) ) {
1268
+ $dbcr_db = 'global';
1269
+ }
1270
+ // DB Cache End
1271
+ }
1272
+
1273
+ // Caching
1274
+ $dbcr_cacheable = false;
1275
+ // check if pcache object is in place
1276
+ if ( !is_null( $this->dbcr_cache ) ) {
1277
+ $dbcr_cacheable = $this->dbcr_cacheable && $maybe_cache;
1278
+
1279
+ if ( $dbcr_cacheable ) {
1280
+ // do not cache non-select queries
1281
+ if ( preg_match( "/\\s*(insert|delete|update|replace|alter|SET NAMES|FOUND_ROWS|RAND)\\b/si", $query ) ) {
1282
+ $dbcr_cacheable = false;
1283
+ } elseif ( // For hard queries - skip them
1284
+ !preg_match( "/\\s*(JOIN | \* |\*\,)/si", $query ) ||
1285
+ // User-defined cache filters
1286
+ ( isset( $config['filter'] ) && ( $config['filter'] != '' ) &&
1287
+ preg_match( "/\\s*(".$config['filter'].")/si", $query ) ) ) {
1288
+ $dbcr_cacheable = false;
1289
+ }
1290
+ }
1291
+
1292
+ if ( $dbcr_cacheable ) {
1293
+ $dbcr_queryid = md5( $query );
1294
+
1295
+ if ( strpos( $query, '_options' ) ) {
1296
+ $this->dbcr_cache->set_storage( $dbcr_db, 'options' );
1297
+ } elseif ( strpos( $query, '_links' ) ) {
1298
+ $this->dbcr_cache->set_storage( $dbcr_db, 'links' );
1299
+ } elseif ( strpos( $query, '_terms' ) ) {
1300
+ $this->dbcr_cache->set_storage( $dbcr_db, 'terms' );
1301
+ } elseif ( strpos( $query, '_user' ) ) {
1302
+ $this->dbcr_cache->set_storage( $dbcr_db, 'users' );
1303
+ } elseif ( strpos( $query, '_post' ) ) {
1304
+ $this->dbcr_cache->set_storage( $dbcr_db, 'posts' );
1305
+ } else {
1306
+ $this->dbcr_cache->set_storage( $dbcr_db, '' );
1307
+ }
1308
+ }
1309
+
1310
+ /* Debug part */
1311
+ if ( isset( $config['debug'] ) && $config['debug'] ) {
1312
+ if ( $dbcr_cacheable ) {
1313
+ echo "\n<!-- cache: $query -->\n\n";
1314
+ } else {
1315
+ echo "\n<!-- mysql: $query -->\n\n";
1316
+ }
1317
+ }
1318
+ } elseif ( $this->dbcr_show_error ) {
1319
+ $this->dbcr_show_error = false;
1320
+ add_action( 'admin_notices', array( &$this, '_dbcr_admin_notice' ) );
1321
+ }
1322
+
1323
+ $dbcr_cached = false;
1324
+ if ( $dbcr_cacheable ) {
1325
+ // Try to load cached query
1326
+ $dbcr_cached = $this->dbcr_cache->load( $dbcr_queryid );
1327
+ }
1328
+
1329
+ if ( $dbcr_cached !== false ) {
1330
+ // Extract cached query
1331
+ ++$this->num_cachequeries;
1332
+
1333
+ $dbcr_cached = unserialize( $dbcr_cached );
1334
+ $this->last_error = '';
1335
+ $this->last_query = $dbcr_cached['last_query'];
1336
+ $this->last_result = $dbcr_cached['last_result'];
1337
+ $this->col_info = $dbcr_cached['col_info'];
1338
+ $this->num_rows = $dbcr_cached['num_rows'];
1339
+
1340
+ $return_val = $this->num_rows;
1341
+
1342
+ if ( defined('DBCR_SAVEQUERIES') && DBCR_SAVEQUERIES ) {
1343
+ $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller(), true );
1344
+ }
1345
+ } else {
1346
+ // Cache not found or query is not cacheable, perform query as usual
1347
+ // --- DB Cache End ---
1348
+ $this->result = @mysql_query( $query, $dbh );
1349
+ $this->num_queries++;
1350
+
1351
+ if ( defined( 'DBCR_SAVEQUERIES' ) && DBCR_SAVEQUERIES )
1352
+ $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller(), false );
1353
+ elseif ( defined( 'SAVEQUERIES' ) && SAVEQUERIES )
1354
+ $this->queries[] = array( $query, $this->timer_stop(), $this->get_caller() );
1355
+ }
1356
+
1357
+ // If there is an error then take note of it..
1358
+ if ( $this->last_error = mysql_error( $dbh ) ) {
1359
+ $this->print_error();
1360
+ return false;
1361
+ }
1362
+
1363
+ if ( preg_match( "/^\\s*(insert|delete|update|replace|alter) /i", $query ) ) {
1364
+ $this->rows_affected = mysql_affected_rows( $dbh );
1365
+ // Take note of the insert_id
1366
+ if ( preg_match( "/^\\s*(insert|replace) /i", $query ) ) {
1367
+ $this->insert_id = mysql_insert_id($dbh);
1368
+ }
1369
+ // Return number of rows affected
1370
+ $return_val = $this->rows_affected;
1371
+
1372
+ // --- DB Cache Start ---
1373
+ ++$this->dbcr_num_dml_queries;
1374
+ // --- DB Cache End ---
1375
+ } else {
1376
+ $i = 0;
1377
+ while ( $i < @mysql_num_fields( $this->result ) ) {
1378
+ $this->col_info[$i] = @mysql_fetch_field( $this->result );
1379
+ $i++;
1380
+ }
1381
+ $num_rows = 0;
1382
+ while ( $row = @mysql_fetch_object( $this->result ) ) {
1383
+ $this->last_result[$num_rows] = $row;
1384
+ $num_rows++;
1385
+ }
1386
+
1387
+ @mysql_free_result( $this->result );
1388
+
1389
+ // Log number of rows the query returned
1390
+ // and return number of rows selected
1391
+ $this->num_rows = $num_rows;
1392
+ $return_val = $num_rows;
1393
+
1394
+ // --- DB Cache Start ---
1395
+ if ( $dbcr_cacheable && ( $dbcr_cached === false ) ) {
1396
+ $dbcr_cached = serialize( array(
1397
+ 'last_query' => $this->last_query,
1398
+ 'last_result' => $this->last_result,
1399
+ 'col_info' => $this->col_info,
1400
+ 'num_rows' => $this->num_rows,
1401
+ ) );
1402
+ $this->dbcr_cache->save( $dbcr_cached, $dbcr_queryid );
1403
+ }
1404
+ // --- DB Cache End ---
1405
+ }
1406
+
1407
+ return $return_val;
1408
+ }
1409
+
1410
+ /**
1411
+ * Insert a row into a table.
1412
+ *
1413
+ * <code>
1414
+ * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
1415
+ * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
1416
+ * </code>
1417
+ *
1418
+ * @since 2.5.0
1419
+ * @see wpdb::prepare()
1420
+ * @see wpdb::$field_types
1421
+ * @see wp_set_wpdb_vars()
1422
+ *
1423
+ * @param string $table table name
1424
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1425
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1426
+ * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1427
+ * @return int|false The number of rows inserted, or false on error.
1428
+ */
1429
+ function insert( $table, $data, $format = null ) {
1430
+ return $this->_insert_replace_helper( $table, $data, $format, 'INSERT' );
1431
+ }
1432
+
1433
+ /**
1434
+ * Replace a row into a table.
1435
+ *
1436
+ * <code>
1437
+ * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) )
1438
+ * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) )
1439
+ * </code>
1440
+ *
1441
+ * @since 3.0.0
1442
+ * @see wpdb::prepare()
1443
+ * @see wpdb::$field_types
1444
+ * @see wp_set_wpdb_vars()
1445
+ *
1446
+ * @param string $table table name
1447
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1448
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1449
+ * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1450
+ * @return int|false The number of rows affected, or false on error.
1451
+ */
1452
+ function replace( $table, $data, $format = null ) {
1453
+ return $this->_insert_replace_helper( $table, $data, $format, 'REPLACE' );
1454
+ }
1455
+
1456
+ /**
1457
+ * Helper function for insert and replace.
1458
+ *
1459
+ * Runs an insert or replace query based on $type argument.
1460
+ *
1461
+ * @access private
1462
+ * @since 3.0.0
1463
+ * @see wpdb::prepare()
1464
+ * @see wpdb::$field_types
1465
+ * @see wp_set_wpdb_vars()
1466
+ *
1467
+ * @param string $table table name
1468
+ * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1469
+ * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
1470
+ * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1471
+ * @return int|false The number of rows affected, or false on error.
1472
+ */
1473
+ function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
1474
+ if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) )
1475
+ return false;
1476
+ $formats = $format = (array) $format;
1477
+ $fields = array_keys( $data );
1478
+ $formatted_fields = array();
1479
+ foreach ( $fields as $field ) {
1480
+ if ( !empty( $format ) )
1481
+ $form = ( $form = array_shift( $formats ) ) ? $form : $format[0];
1482
+ elseif ( isset( $this->field_types[$field] ) )
1483
+ $form = $this->field_types[$field];
1484
+ else
1485
+ $form = '%s';
1486
+ $formatted_fields[] = $form;
1487
+ }
1488
+ $sql = "{$type} INTO `$table` (`" . implode( '`,`', $fields ) . "`) VALUES ('" . implode( "','", $formatted_fields ) . "')";
1489
+ return $this->dbcr_query( $this->prepare( $sql, $data ), false );
1490
+ }
1491
+
1492
+ /**
1493
+ * Update a row in the table
1494
+ *
1495
+ * <code>
1496
+ * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) )
1497
+ * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) )
1498
+ * </code>
1499
+ *
1500
+ * @since 2.5.0
1501
+ * @see wpdb::prepare()
1502
+ * @see wpdb::$field_types
1503
+ * @see wp_set_wpdb_vars()
1504
+ *
1505
+ * @param string $table table name
1506
+ * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
1507
+ * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
1508
+ * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data.
1509
+ * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
1510
+ * @param array|string $format_where Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $where will be treated as strings.
1511
+ * @return int|false The number of rows updated, or false on error.
1512
+ */
1513
+ function update( $table, $data, $where, $format = null, $where_format = null ) {
1514
+ if ( ! is_array( $data ) || ! is_array( $where ) )
1515
+ return false;
1516
+
1517
+ $formats = $format = (array) $format;
1518
+ $bits = $wheres = array();
1519
+ foreach ( (array) array_keys( $data ) as $field ) {
1520
+ if ( !empty( $format ) )
1521
+ $form = ( $form = array_shift( $formats ) ) ? $form : $format[0];
1522
+ elseif ( isset($this->field_types[$field]) )
1523
+ $form = $this->field_types[$field];
1524
+ else
1525
+ $form = '%s';
1526
+ $bits[] = "`$field` = {$form}";
1527
+ }
1528
+
1529
+ $where_formats = $where_format = (array) $where_format;
1530
+ foreach ( (array) array_keys( $where ) as $field ) {
1531
+ if ( !empty( $where_format ) )
1532
+ $form = ( $form = array_shift( $where_formats ) ) ? $form : $where_format[0];
1533
+ elseif ( isset( $this->field_types[$field] ) )
1534
+ $form = $this->field_types[$field];
1535
+ else
1536
+ $form = '%s';
1537
+ $wheres[] = "`$field` = {$form}";
1538
+ }
1539
+
1540
+ $sql = "UPDATE `$table` SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );
1541
+ return $this->dbcr_query( $this->prepare( $sql, array_merge( array_values( $data ), array_values( $where ) ) ), false );
1542
+ }
1543
+
1544
+ /**
1545
+ * Retrieve one variable from the database.
1546
+ *
1547
+ * Executes a SQL query and returns the value from the SQL result.
1548
+ * If the SQL result contains more than one column and/or more than one row, this function returns the value in the column and row specified.
1549
+ * If $query is null, this function returns the value in the specified column and row from the previous SQL result.
1550
+ *
1551
+ * @since 0.71
1552
+ *
1553
+ * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query.
1554
+ * @param int $x Optional. Column of value to return. Indexed from 0.
1555
+ * @param int $y Optional. Row of value to return. Indexed from 0.
1556
+ * @return string|null Database query result (as string), or null on failure
1557
+ */
1558
+ function get_var( $query = null, $x = 0, $y = 0 ) {
1559
+ $this->func_call = "\$db->get_var(\"$query\", $x, $y)";
1560
+ if ( $query )
1561
+ $this->dbcr_query( $query );
1562
+
1563
+ // Extract var out of cached results based x,y vals
1564
+ if ( !empty( $this->last_result[$y] ) ) {
1565
+ $values = array_values( get_object_vars( $this->last_result[$y] ) );
1566
+ }
1567
+
1568
+ // If there is a value return it else return null
1569
+ return ( isset( $values[$x] ) && $values[$x] !== '' ) ? $values[$x] : null;
1570
+ }
1571
+
1572
+ /**
1573
+ * Retrieve one row from the database.
1574
+ *
1575
+ * Executes a SQL query and returns the row from the SQL result.
1576
+ *
1577
+ * @since 0.71
1578
+ *
1579
+ * @param string|null $query SQL query.
1580
+ * @param string $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants. Return an associative array (column => value, ...),
1581
+ * a numerically indexed array (0 => value, ...) or an object ( ->column = value ), respectively.
1582
+ * @param int $y Optional. Row to return. Indexed from 0.
1583
+ * @return mixed Database query result in format specifed by $output or null on failure
1584
+ */
1585
+ function get_row( $query = null, $output = OBJECT, $y = 0 ) {
1586
+ $this->func_call = "\$db->get_row(\"$query\",$output,$y)";
1587
+ if ( $query )
1588
+ $this->dbcr_query( $query );
1589
+ else
1590
+ return null;
1591
+
1592
+ if ( !isset( $this->last_result[$y] ) )
1593
+ return null;
1594
+
1595
+ if ( $output == OBJECT ) {
1596
+ return $this->last_result[$y] ? $this->last_result[$y] : null;
1597
+ } elseif ( $output == ARRAY_A ) {
1598
+ return $this->last_result[$y] ? get_object_vars( $this->last_result[$y] ) : null;
1599
+ } elseif ( $output == ARRAY_N ) {
1600
+ return $this->last_result[$y] ? array_values( get_object_vars( $this->last_result[$y] ) ) : null;
1601
+ } else {
1602
+ $this->print_error(/*WP_I18N_DB_GETROW_ERROR*/" \$db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"/*/WP_I18N_DB_GETROW_ERROR*/);
1603
+ }
1604
+ }
1605
+
1606
+ /**
1607
+ * Retrieve one column from the database.
1608
+ *
1609
+ * Executes a SQL query and returns the column from the SQL result.
1610
+ * If the SQL result contains more than one column, this function returns the column specified.
1611
+ * If $query is null, this function returns the specified column from the previous SQL result.
1612
+ *
1613
+ * @since 0.71
1614
+ *
1615
+ * @param string|null $query Optional. SQL query. Defaults to previous query.
1616
+ * @param int $x Optional. Column to return. Indexed from 0.
1617
+ * @return array Database query result. Array indexed from 0 by SQL result row number.
1618
+ */
1619
+ function get_col( $query = null , $x = 0 ) {
1620
+ if ( $query )
1621
+ $this->dbcr_query( $query );
1622
+
1623
+ $new_array = array();
1624
+ // Extract the column values
1625
+ for ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ ) {
1626
+ $new_array[$i] = $this->get_var( null, $x, $i );
1627
+ }
1628
+ return $new_array;
1629
+ }
1630
+
1631
+ /**
1632
+ * Retrieve an entire SQL result set from the database (i.e., many rows)
1633
+ *
1634
+ * Executes a SQL query and returns the entire SQL result.
1635
+ *
1636
+ * @since 0.71
1637
+ *
1638
+ * @param string $query SQL query.
1639
+ * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number.
1640
+ * Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively.
1641
+ * With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded.
1642
+ * @return mixed Database query results
1643
+ */
1644
+ function get_results( $query = null, $output = OBJECT ) {
1645
+ $this->func_call = "\$db->get_results(\"$query\", $output)";
1646
+
1647
+ if ( $query )
1648
+ $this->dbcr_query( $query );
1649
+ else
1650
+ return null;
1651
+
1652
+ $new_array = array();
1653
+ if ( $output == OBJECT ) {
1654
+ // Return an integer-keyed array of row objects
1655
+ return $this->last_result;
1656
+ } elseif ( $output == OBJECT_K ) {
1657
+ // Return an array of row objects with keys from column 1
1658
+ // (Duplicates are discarded)
1659
+ foreach ( $this->last_result as $row ) {
1660
+ $key = array_shift( get_object_vars( $row ) );
1661
+ if ( ! isset( $new_array[ $key ] ) )
1662
+ $new_array[ $key ] = $row;
1663
+ }
1664
+ return $new_array;
1665
+ } elseif ( $output == ARRAY_A || $output == ARRAY_N ) {
1666
+ // Return an integer-keyed array of...
1667
+ if ( $this->last_result ) {
1668
+ foreach( (array) $this->last_result as $row ) {
1669
+ if ( $output == ARRAY_N ) {
1670
+ // ...integer-keyed row arrays
1671
+ $new_array[] = array_values( get_object_vars( $row ) );
1672
+ } else {
1673
+ // ...column name-keyed row arrays
1674
+ $new_array[] = get_object_vars( $row );
1675
+ }
1676
+ }
1677
+ }
1678
+ return $new_array;
1679
+ }
1680
+ return null;
1681
+ }
1682
+
1683
+ /**
1684
+ * Retrieve column metadata from the last query.
1685
+ *
1686
+ * @since 0.71
1687
+ *
1688
+ * @param string $info_type Optional. Type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill
1689
+ * @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type
1690
+ * @return mixed Column Results
1691
+ */
1692
+ function get_col_info( $info_type = 'name', $col_offset = -1 ) {
1693
+ if ( $this->col_info ) {
1694
+ if ( $col_offset == -1 ) {
1695
+ $i = 0;
1696
+ $new_array = array();
1697
+ foreach( (array) $this->col_info as $col ) {
1698
+ $new_array[$i] = $col->{$info_type};
1699
+ $i++;
1700
+ }
1701
+ return $new_array;
1702
+ } else {
1703
+ return $this->col_info[$col_offset]->{$info_type};
1704
+ }
1705
+ }
1706
+ }
1707
+
1708
+ /**
1709
+ * Starts the timer, for debugging purposes.
1710
+ *
1711
+ * @since 1.5.0
1712
+ *
1713
+ * @return true
1714
+ */
1715
+ function timer_start() {
1716
+ $mtime = explode( ' ', microtime() );
1717
+ $this->time_start = $mtime[1] + $mtime[0];
1718
+ return true;
1719
+ }
1720
+
1721
+ /**
1722
+ * Stops the debugging timer.
1723
+ *
1724
+ * @since 1.5.0
1725
+ *
1726
+ * @return int Total time spent on the query, in milliseconds
1727
+ */
1728
+ function timer_stop() {
1729
+ $mtime = explode( ' ', microtime() );
1730
+ $time_end = $mtime[1] + $mtime[0];
1731
+ $time_total = $time_end - $this->time_start;
1732
+ return $time_total;
1733
+ }
1734
+
1735
+ /**
1736
+ * Wraps errors in a nice header and footer and dies.
1737
+ *
1738
+ * Will not die if wpdb::$show_errors is true
1739
+ *
1740
+ * @since 1.5.0
1741
+ *
1742
+ * @param string $message The Error message
1743
+ * @param string $error_code Optional. A Computer readable string to identify the error.
1744
+ * @return false|void
1745
+ */
1746
+ function bail( $message, $error_code = '500' ) {
1747
+ if ( !$this->show_errors ) {
1748
+ if ( class_exists( 'WP_Error' ) )
1749
+ $this->error = new WP_Error($error_code, $message);
1750
+ else
1751
+ $this->error = $message;
1752
+ return false;
1753
+ }
1754
+ wp_die($message);
1755
+ }
1756
+
1757
+ /**
1758
+ * Whether MySQL database is at least the required minimum version.
1759
+ *
1760
+ * @since 2.5.0
1761
+ * @uses $wp_version
1762
+ * @uses $required_mysql_version
1763
+ *
1764
+ * @return WP_Error
1765
+ */
1766
+ function check_database_version() {
1767
+ global $wp_version, $required_mysql_version;
1768
+ // Make sure the server has the required MySQL version
1769
+ if ( isset( $required_mysql_version ) ) {
1770
+ if ( version_compare($this->db_version(), $required_mysql_version, '<') )
1771
+ return new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
1772
+ } elseif ( version_compare( $wp_version, '2.9', '<' ) ) { // WP 2.8 requires MySQL 4.0.0
1773
+ // Make sure the server has MySQL 4.0
1774
+ if ( version_compare($this->db_version(), '4.0.0', '<') )
1775
+ return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
1776
+ } else { // WP 2.9 requires MySQL 4.1.2
1777
+ // Make sure the server has MySQL 4.1.2
1778
+ if ( version_compare($this->db_version(), '4.1.2', '<') )
1779
+ return new WP_Error('database_version',sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.1.2 or higher'), $wp_version));
1780
+ }
1781
+ }
1782
+
1783
+ /**
1784
+ * Whether the database supports collation.
1785
+ *
1786
+ * Called when WordPress is generating the table scheme.
1787
+ *
1788
+ * @since 2.5.0
1789
+ *
1790
+ * @return bool True if collation is supported, false if version does not
1791
+ */
1792
+ function supports_collation() {
1793
+ return $this->has_cap( 'collation' );
1794
+ }
1795
+
1796
+ /**
1797
+ * Determine if a database supports a particular feature
1798
+ *
1799
+ * @since 2.7
1800
+ * @see wpdb::db_version()
1801
+ *
1802
+ * @param string $db_cap the feature
1803
+ * @return bool
1804
+ */
1805
+ function has_cap( $db_cap ) {
1806
+ $version = $this->db_version();
1807
+
1808
+ switch ( strtolower( $db_cap ) ) {
1809
+ case 'collation' : // @since 2.5.0
1810
+ case 'group_concat' : // @since 2.7
1811
+ case 'subqueries' : // @since 2.7
1812
+ return version_compare( $version, '4.1', '>=' );
1813
+ };
1814
+
1815
+ return false;
1816
+ }
1817
+
1818
+ /**
1819
+ * Retrieve the name of the function that called wpdb.
1820
+ *
1821
+ * Searches up the list of functions until it reaches
1822
+ * the one that would most logically had called this method.
1823
+ *
1824
+ * @since 2.5.0
1825
+ *
1826
+ * @return string The name of the calling function
1827
+ */
1828
+ function get_caller() {
1829
+ // requires PHP 4.3+
1830
+ if ( !is_callable('debug_backtrace') )
1831
+ return '';
1832
+
1833
+ $trace = array_reverse( debug_backtrace() );
1834
+ $caller = array();
1835
+
1836
+ foreach ( $trace as $call ) {
1837
+ if ( isset( $call['class'] ) && __CLASS__ == $call['class'] )
1838
+ continue; // Filter out wpdb calls.
1839
+ $caller[] = isset( $call['class'] ) ? "{$call['class']}->{$call['function']}" : $call['function'];
1840
+ }
1841
+
1842
+ return join( ', ', $caller );
1843
+ }
1844
+
1845
+ /**
1846
+ * The database version number.
1847
+ *
1848
+ * @return false|string false on failure, version number on success
1849
+ */
1850
+ function db_version() {
1851
+ return preg_replace( '/[^0-9.].*/', '', mysql_get_server_info( $this->dbh ) );
1852
+ }
1853
+
1854
+ // Show error message when something is messed with DB Cache Reloaded plugin
1855
+ function _dbcr_admin_notice() {
1856
+ // Display error message
1857
+ echo '<div id="notice" class="error"><p>';
1858
+ printf( __('<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file.', 'db-cache-reloaded'), WP_CONTENT_DIR.'/db.php' );
1859
+ echo '</p></div>', "\n";
1860
+ }
1861
+ }
1862
+
1863
+ }else { // class_exists( 'dbrc_wpdb' )
1864
+ // This should not happen, but I got few error reports regarding this issue
1865
+ if ( class_exists( 'ReflectionClass' ) ) {
1866
+ // We have Reflection classes - display detailed information
1867
+ $ref_class = new ReflectionClass( 'dbrc_wpdb' );
1868
+ define( 'DBCR_WPDB_EXISTED', $ref_class->getFileName().':'.$ref_class->getStartLine() );
1869
+ } else {
1870
+ // No Reflection - just display general info
1871
+ define( 'DBCR_WPDB_EXISTED', true );
1872
+ }
1873
+ }
1874
+
1875
+ //if ( ! isset( $wpdb ) ) {
1876
+ /**
1877
+ * WordPress Database Object, if it isn't set already in wp-content/db.php
1878
+ * @global object $wpdb Creates a new wpdb object based on wp-config.php Constants for the database
1879
+ * @since 0.71
1880
+ */
1881
+ // $wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
1882
+ //}
1883
+ ?>
db.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin URI: http://www.ivankristianto.com/web-development/programming/db-cache-reloaded-fix-for-wordpress-3-1/1784/
4
+ Description: Database Caching Module provided by DB Cache Reloaded plugin With WordPress 3.1 compatibility.
5
+ Author: Ivan Kristianto
6
+ Version: 1.6.0 (bundled with DB Cache Reloaded 2.2.1)
7
+ Author URI: http://www.ivankristianto.com
8
+ Text Domain: db-cache-reloaded-fix
9
+ */
10
+
11
+
12
+ /**
13
+ * WordPress DB Class
14
+ *
15
+ * Original code from {@link http://www.poradnik-webmastera.com/ Daniel Fruzynski (daniel@poradnik-webmastera.com)}
16
+ * Original code from {@link http://php.justinvincent.com Justin Vincent (justin@visunet.ie)}
17
+ *
18
+ * @package WordPress
19
+ * @subpackage Database
20
+ * @since 0.71
21
+ */
22
+
23
+ /* Modifications Copyright 2011 Ivan Kristianto (email : ivan@ivankristianto.com)
24
+
25
+ This program is free software; you can redistribute it and/or modify
26
+ it under the terms of the GNU General Public License as published by
27
+ the Free Software Foundation; either version 2 of the License, or
28
+ (at your option) any later version.
29
+
30
+ This program is distributed in the hope that it will be useful,
31
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33
+ GNU General Public License for more details.
34
+
35
+ You should have received a copy of the GNU General Public License
36
+ along with this program; if not, write to the Free Software
37
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
38
+ */
39
+
40
+ /**
41
+ * @since 0.71
42
+ */
43
+ define( 'EZSQL_VERSION', 'WP1.25' );
44
+
45
+ /**
46
+ * @since 0.71
47
+ */
48
+ define( 'OBJECT', 'OBJECT', true );
49
+
50
+ /**
51
+ * @since 2.5.0
52
+ */
53
+ define( 'OBJECT_K', 'OBJECT_K' );
54
+
55
+ /**
56
+ * @since 0.71
57
+ */
58
+ define( 'ARRAY_A', 'ARRAY_A' );
59
+
60
+ /**
61
+ * @since 0.71
62
+ */
63
+ define( 'ARRAY_N', 'ARRAY_N' );
64
+
65
+
66
+ // --- DB Cache Start ---
67
+ // wp-settings.php defines this after loading this file, so have to add it here too
68
+ if ( !defined( 'WP_PLUGIN_DIR' ) ) {
69
+ define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR.'/plugins' ); // full path, no trailing slash
70
+ }
71
+ // Path to plugin
72
+ if ( !defined( 'DBCR_PATH' ) ) {
73
+ define( 'DBCR_PATH', WP_PLUGIN_DIR.'/db-cache-reloaded-fix' );
74
+ }
75
+ // Cache directory
76
+ if ( !defined( 'DBCR_CACHE_DIR' ) ) {
77
+ define( 'DBCR_CACHE_DIR', WP_CONTENT_DIR.'/tmp' );
78
+ }
79
+
80
+ // DB Module version (one or more digits for major, two digits for minor and revision numbers)
81
+ if ( !defined( 'DBCR_DB_MODULE_VER' ) ) {
82
+ define( 'DBCR_DB_MODULE_VER', 10600 );
83
+ }
84
+
85
+ // Check if we have required functions
86
+ if ( !function_exists( 'is_multisite' ) ) { // Added in WP 3.0
87
+ function is_multisite() {
88
+ return false;
89
+ }
90
+ }
91
+
92
+ // --- DB Cache End ---
93
+
94
+ require_once DBCR_PATH . '/db-module.php';
95
+
96
+ $GLOBALS['wpdb'] = new dbrc_wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
97
+
98
+
dbcache-icon.png ADDED
Binary file
htaccess ADDED
@@ -0,0 +1,2 @@
 
 
1
+ Order deny,allow
2
+ Deny from all
icon.png ADDED
Binary file
lang/db-cache-reloaded-be_BY.mo ADDED
Binary file
lang/db-cache-reloaded-be_BY.po ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: DCR\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-10-22 20:48+0000\n"
11
+ "PO-Revision-Date: 2009-11-15 11:26+0200\n"
12
+ "Last-Translator: Fat Cow <zhr@tut.by>\n"
13
+ "Language-Team: Fat Cow <zhr@tut.by>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=utf-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Poedit-Language: Belarusian\n"
18
+ "X-Poedit-Country: BELARUS\n"
19
+
20
+ #: db-cache-reloaded.php:119
21
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
22
+ msgstr "<b>DB Cache Reloaded ошибка:</b> <code>wpdb</code> класс переопределяется, плагин не может работать!"
23
+
24
+ #: db-cache-reloaded.php:122
25
+ #, php-format
26
+ msgid "Previous definition is at %s."
27
+ msgstr "Предыдущий определению на%s."
28
+
29
+ #: db-cache-reloaded.php:131
30
+ #, php-format
31
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
32
+ msgstr "<b>DB кэш Reloaded информация:</b> кэширование не включено. Пожалуйста, перейдите на <a href=\"%s\">страницу Функции</a> чтобы включить его."
33
+
34
+ #: db-cache-reloaded.php:135
35
+ #, php-format
36
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
37
+ msgstr "<b>DB Reloaded кэша ошибка:</b> DB Module <code>wpdb</code> класс) не загружен. Пожалуйста, откройте <a href=\"%1$s\">страницу Функции,</a> отключить кэширование (не забудьте сохранить параметры) и включить его снова. Если это не поможет, обратитесь <a href=\"%2$s\">Вопросы и ответы</a> Как сделать обновление руководства."
38
+
39
+ #: db-cache-reloaded.php:148
40
+ #, php-format
41
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
42
+ msgstr "<b>DB Reloaded кэша ошибка:</b> DB модуль не в курсе (обнаружена версия %1$s вместо %2$s). Для того чтобы исправить это, откройте <a href=\"%3$s\">страницу Функции,</a> отключить кэширование (не забудьте сохранить параметры) и включить его снова."
43
+
44
+ #: db-cache-reloaded.php:200
45
+ msgid "Caching activated."
46
+ msgstr "Кэширование включено."
47
+
48
+ #: db-cache-reloaded.php:205
49
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
50
+ msgstr "Кэширование не может быть активировано. Пожалуйста, <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">CHMOD 755</a> <u>WP-содержимого</u> папки"
51
+
52
+ #: db-cache-reloaded.php:215
53
+ msgid "Caching deactivated. Cache files deleted."
54
+ msgstr "Отключить кэширование. Кэш-файлы удалены."
55
+
56
+ #: db-cache-reloaded.php:270
57
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
58
+ msgstr "<!-- Сгенерирована в () секунд таймер. Сделано () запросы запросы к базе данных и () Cached кэшированных запросов. Используемой памяти - память () -->"
59
+
60
+ #: db-cache-reloaded.php:289
61
+ msgid "Cache files deleted."
62
+ msgstr "Кэш-файлы удалены."
63
+
64
+ #: db-cache-reloaded.php:297
65
+ msgid "Expired cache files deleted."
66
+ msgstr "Expired кэш-файлы удалены."
67
+
68
+ #: db-cache-reloaded.php:335
69
+ msgid "Settings saved."
70
+ msgstr "Настройки сохранены"
71
+
72
+ #: db-cache-reloaded.php:339
73
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
74
+ msgstr "Настройки не могут быть сохранены. Пожалуйста, <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> файл <u>config.ini</u>"
75
+
76
+ #: db-cache-reloaded.php:347
77
+ msgid "DB Cache Reloaded - Options"
78
+ msgstr "DB Cache Reloaded - Настройки"
79
+
80
+ #: db-cache-reloaded.php:349
81
+ msgid "Configuration"
82
+ msgstr "Концфигурация"
83
+
84
+ #: db-cache-reloaded.php:352
85
+ msgid "Enable"
86
+ msgstr "Включить"
87
+
88
+ #: db-cache-reloaded.php:355
89
+ msgid "Expire a cached query after"
90
+ msgstr "Кэш истекает после"
91
+
92
+ #: db-cache-reloaded.php:356
93
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
94
+ msgstr "минут. <em>(истекшие файлы удаляются автоматически)</em>"
95
+
96
+ #: db-cache-reloaded.php:360
97
+ msgid "Additional options"
98
+ msgstr "Дополнительные опции"
99
+
100
+ #: db-cache-reloaded.php:363
101
+ msgid "Cache filter"
102
+ msgstr "Фильтр кэша"
103
+
104
+ #: db-cache-reloaded.php:364
105
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
106
+ msgstr "Не кэшировать запросы, которые содержат этот ввод содержания. Разделите различные фильтры с &#39;|&#39; (вертикальная линия, например, &#39;_posts | _postmeta&#39;)"
107
+
108
+ #: db-cache-reloaded.php:367
109
+ msgid "Load stats template"
110
+ msgstr "Загрузка стат. шаблона"
111
+
112
+ #: db-cache-reloaded.php:368
113
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
114
+ msgstr "Он показывает статистику использования ресурсов в шаблоне подвала. Чтобы отключить мнение, только это поле пустым.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
115
+
116
+ #: db-cache-reloaded.php:373
117
+ msgid "Save"
118
+ msgstr "Сохранить"
119
+
120
+ #: db-cache-reloaded.php:374
121
+ msgid "Clear the cache"
122
+ msgstr "Очистить кэш"
123
+
124
+ #: db-cache-reloaded.php:375
125
+ msgid "Clear the expired cache"
126
+ msgstr "Очистить истекший кэш"
127
+
128
+ #: db-module.php:1272
129
+ #, php-format
130
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
131
+ msgstr "<strong>ОШИБКА</strong>: WordPress %s требует MySQL 4.0.0 или выше"
132
+
133
+ #: db-module.php:1354
134
+ #, php-format
135
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
136
+ msgstr "<b>DB Cache Reloaded ошибка:</b> нет включения <code>db-functions.php</code> файл. Пожалуйста, переустановите плагин или удалите <code>%s</code> файл."
137
+
138
+ #. Plugin Name of an extension
139
+ msgid "DB Cache Reloaded"
140
+ msgstr "DB Cache Reloaded"
141
+
142
+ #. Plugin URI of an extension
143
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
144
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
145
+
146
+ #. Description of an extension
147
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
148
+ msgstr "Быстрый кэш двигатель для WordPress, который производит кэша запросов к базе данных с легкой настройки. (Отключить и включить кэширование после обновления)"
149
+
150
+ #. Author of an extension
151
+ msgid "Daniel Fruyski"
152
+ msgstr "Daniel Fruyski"
153
+
154
+ #. Author URI of an extension
155
+ msgid "http://www.poradnik-webmastera.com/"
156
+ msgstr "http://www.poradnik-webmastera.com/"
157
+
lang/db-cache-reloaded-de_DE.mo ADDED
Binary file
lang/db-cache-reloaded-de_DE.po ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: DB Cache Reloaded v2.0.2\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2010-06-05 21:03+0100\n"
7
+ "Last-Translator: Carsten Tauber <carsten.tauber@greatsolution.de>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: German\n"
14
+ "X-Poedit-Country: GERMANY\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
+ "X-Textdomain-Support: yes\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+
20
+ #@ db-cache-reloaded
21
+ #: db-cache-reloaded.php:157
22
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
23
+ msgstr "<b>DB Reloaded Cache-Fehler:</b> <code>wpdb</code> Klasse wurde erneut definiert, Plugin funktioniert nicht!"
24
+
25
+ #@ db-cache-reloaded
26
+ #: db-cache-reloaded.php:160
27
+ #, php-format
28
+ msgid "Previous definition is at %s."
29
+ msgstr "Zurück Definition ist bei% s."
30
+
31
+ #@ db-cache-reloaded
32
+ #: db-cache-reloaded.php:169
33
+ #, php-format
34
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
35
+ msgstr "<b>DB Cache Reloaded Info:</b> Caching ist inaktiv. Bitte in den <a href=\"%s\">Optionen</a> aktivieren."
36
+
37
+ #@ db-cache-reloaded
38
+ #: db-cache-reloaded.php:173
39
+ #, php-format
40
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
41
+ msgstr "<b>DB Cache Reloaded Fehler:</b> DB-Modul (<code>wpdb</code> Klasse) ist nicht geladen. Bitte Caching abschalten und anschliessend erneut aktivieren <a href=\"%1$s\">Optionen</a>. Sofern dies den Fehler nicht beseitigt, bitte ein Plugin-Upgrade in Erwägung ziehen <a href=\"%2$s\">FAQ</a>."
42
+
43
+ #@ db-cache-reloaded
44
+ #: db-cache-reloaded.php:186
45
+ #, php-format
46
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
47
+ msgstr "<b>DB Cache Reloaded Error:</b> DB-Modul ist nicht aktuell (erkannte Version %1$s anstelle von%2$s). Um dies zu beheben, bitte Caching abschalten, anschliessend wieder aktivieren. <a href=\"%3$s\">Optionen</a>."
48
+
49
+ #@ db-cache-reloaded
50
+ #: db-cache-reloaded.php:247
51
+ msgid "Caching activated."
52
+ msgstr "Caching aktiviert."
53
+
54
+ #@ db-cache-reloaded
55
+ #: db-cache-reloaded.php:251
56
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
57
+ msgstr "Caching konnte nicht aktiviert werden. Bitte <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"_blank\">chmod 755</a> für das Verzeichnis <u>wp-content</u>"
58
+
59
+ #@ db-cache-reloaded
60
+ #: db-cache-reloaded.php:268
61
+ msgid "Caching deactivated. Cache files deleted."
62
+ msgstr "Caching deaktiviert. Cachedateien erfolgreich gelöscht."
63
+
64
+ #@ db-cache-reloaded
65
+ #: db-cache-reloaded.php:326
66
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
67
+ msgstr "<!-- Generiert in {timer} Sekunden. {queries} Quer8es direkt an die Datenbank gestellt und {cached} zwischengespeicherte Queries. Verwendeter Speicher: {memory} -->"
68
+
69
+ #@ db-cache-reloaded
70
+ #: db-cache-reloaded.php:348
71
+ msgid "Cache files deleted."
72
+ msgstr "Cachedateien erfolgreich gelöscht."
73
+
74
+ #@ db-cache-reloaded
75
+ #: db-cache-reloaded.php:356
76
+ msgid "Expired cache files deleted."
77
+ msgstr "Veraltete Cachedateien erfolgreich gelöscht."
78
+
79
+ #@ db-cache-reloaded
80
+ #: db-cache-reloaded.php:395
81
+ msgid "Settings saved."
82
+ msgstr "Einstellungen gespeichert"
83
+
84
+ #@ db-cache-reloaded
85
+ #: db-cache-reloaded.php:399
86
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
87
+ msgstr "Einstellungen konnten nicht gespeichert werden. Bitte <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> für die Datei <u>config.ini</u>"
88
+
89
+ #@ db-cache-reloaded
90
+ #: db-cache-reloaded.php:407
91
+ msgid "DB Cache Reloaded - Options"
92
+ msgstr "DB Cache Reloaded - Optionen"
93
+
94
+ #@ db-cache-reloaded
95
+ #: db-cache-reloaded.php:409
96
+ msgid "Configuration"
97
+ msgstr "Einstellungen"
98
+
99
+ #@ db-cache-reloaded
100
+ #: db-cache-reloaded.php:412
101
+ msgid "Enable"
102
+ msgstr "Aktivieren"
103
+
104
+ #@ db-cache-reloaded
105
+ #: db-cache-reloaded.php:415
106
+ msgid "Expire a cached query after"
107
+ msgstr "Cache soll ablaufen nach"
108
+
109
+ #@ db-cache-reloaded
110
+ #: db-cache-reloaded.php:416
111
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
112
+ msgstr "Minuten. <em>(Abgelaufen Dateien werden automatisch gelöscht)</em>"
113
+
114
+ #@ db-cache-reloaded
115
+ #: db-cache-reloaded.php:420
116
+ msgid "Additional options"
117
+ msgstr "Zusätzliche Einstellungen"
118
+
119
+ #@ db-cache-reloaded
120
+ #: db-cache-reloaded.php:423
121
+ msgid "Cache filter"
122
+ msgstr "Cache-Filter"
123
+
124
+ #@ db-cache-reloaded
125
+ #: db-cache-reloaded.php:424
126
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
127
+ msgstr "Cachen von Seiten verhindern, welche diesen Inhalt haben. Trenne verschiedene Filter mit '|' (vertikale Linie, z.B. '_posts|_postmeta')"
128
+
129
+ #@ db-cache-reloaded
130
+ #: db-cache-reloaded.php:427
131
+ msgid "Load stats template"
132
+ msgstr "Lade Statistik Vorlage"
133
+
134
+ #@ db-cache-reloaded
135
+ #: db-cache-reloaded.php:428
136
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
137
+ msgstr "Statistik der Ressourcenauslastung in der Fusszeile (als Kommentar im Quellcode)"
138
+
139
+ #@ db-cache-reloaded
140
+ #: db-cache-reloaded.php:432
141
+ msgid "Advanced"
142
+ msgstr "Erweitert"
143
+
144
+ #@ db-cache-reloaded
145
+ #: db-cache-reloaded.php:436
146
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
147
+ msgstr "Wrapper-Modus verwendet verschiedene Verfahren um das DB Modul zu laden. Dieser Modus ist weniger effizient (mindestens eine Abfrage wird nicht zwischengespeichert, einige Plugins können diese Zahl zusätzlich erhöhen). Der Modus erlaubt, den DB-Cache auch für sonst unkompatible Plugins zu verwenden, das diese ein eigenes DB-Modul laden. "
148
+
149
+ #@ db-cache-reloaded
150
+ #: db-cache-reloaded.php:439
151
+ #, php-format
152
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
153
+ msgstr "Wrapper-Modus benötigt mindestens PHP 5, aktuell steht PHP% s zur Verfüugn. Bitte lesen Sie die <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Umstellung auf PHP5</a> Artikel um weitere Informationen zu erhalten."
154
+
155
+ #@ db-cache-reloaded
156
+ #: db-cache-reloaded.php:445
157
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
158
+ msgstr "Wrapper-Modus <strong>aktiviert</strong>. Um diesen zu deaktivieren, bitte erst das Caching abschalten!"
159
+
160
+ #@ db-cache-reloaded
161
+ #: db-cache-reloaded.php:447
162
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
163
+ msgstr "Wrapper-Modus <strong>deaktiviert.</strong> Um diesen zu aktivieren, bitte zuerst den Cache abschalten."
164
+
165
+ #@ db-cache-reloaded
166
+ #: db-cache-reloaded.php:451
167
+ msgid "Enable Wrapper Mode"
168
+ msgstr "Wrapper Mode aktivieren"
169
+
170
+ #@ db-cache-reloaded
171
+ #: db-cache-reloaded.php:457
172
+ msgid "Save"
173
+ msgstr "Sichern"
174
+
175
+ #@ db-cache-reloaded
176
+ #: db-cache-reloaded.php:458
177
+ msgid "Clear the cache"
178
+ msgstr "Cache leeren"
179
+
180
+ #@ db-cache-reloaded
181
+ #: db-cache-reloaded.php:459
182
+ msgid "Clear the expired cache"
183
+ msgstr "abgelaufenen Cache löschen"
184
+
185
+ #@ db-cache-reloaded
186
+ #: db-module-wrapper.php:265
187
+ #: db-module.php:1389
188
+ #, php-format
189
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
190
+ msgstr "<b>DB Reloaded Cache-Fehler:</b> kann <code>db-functions.php</code> nicht einbinden. Bitte reinstallieren Sie das Plugin oder entfernen Sie die <code>%s</code> Datei."
191
+
192
+ #@ {php-code}
193
+ #. Not gettexted string WP_I18N_DB_GETROW_ERROR
194
+ #: db-module-wrapper.php:326
195
+ #: db-module.php:1135
196
+ msgid " $db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"
197
+ msgstr " $db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N"
198
+
199
+ #: db-module.php:1303
200
+ #, php-format
201
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
202
+ msgstr "<strong>FEHLER:</strong> WordPress% s benötigt MySQL 4.0.0 oder höher"
203
+
204
+ #: db-module.php:1307
205
+ #, php-format
206
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.1.2 or higher"
207
+ msgstr "<strong>FEHLER:</strong> WordPress% s benötigt MySQL 4.1.2 oder höher"
208
+
209
+ #@ {php-code}
210
+ #. Not gettexted string WP_I18N_DB_CONN_ERROR
211
+ #: db-module.php:456
212
+ msgid ""
213
+ "\n"
214
+ "<h1>Error establishing a database connection</h1>\n"
215
+ "<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>\n"
216
+ "<ul>\n"
217
+ "\t<li>Are you sure you have the correct username and password?</li>\n"
218
+ "\t<li>Are you sure that you have typed the correct hostname?</li>\n"
219
+ "\t<li>Are you sure that the database server is running?</li>\n"
220
+ "</ul>\n"
221
+ "<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>\n"
222
+ msgstr ""
223
+ "\n"
224
+ "<h1>Error establishing a database connection</h1>\n"
225
+ "<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>\n"
226
+ "<ul>\n"
227
+ "\t<li>Are you sure you have the correct username and password?</li>\n"
228
+ "\t<li>Are you sure that you have typed the correct hostname?</li>\n"
229
+ "\t<li>Are you sure that the database server is running?</li>\n"
230
+ "</ul>\n"
231
+ "<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>\n"
232
+
233
+ #@ {php-code}
234
+ #. Not gettexted string WP_I18N_DB_BAD_PREFIX
235
+ #: db-module.php:556
236
+ msgid "Invalid database prefix"
237
+ msgstr "Invalid database prefix"
238
+
239
+ #@ {php-code}
240
+ #. Not gettexted string WP_I18N_DB_SELECT_DB
241
+ #: db-module.php:587
242
+ msgid ""
243
+ "\n"
244
+ "<h1>Can&#8217;t select database</h1>\n"
245
+ "<p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>\n"
246
+ "<ul>\n"
247
+ "<li>Are you sure it exists?</li>\n"
248
+ "<li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>\n"
249
+ "<li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>\n"
250
+ "</ul>\n"
251
+ "<p>If you don't know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href=\"http://wordpress.org/support/\">WordPress Support Forums</a>.</p>"
252
+ msgstr ""
253
+ "\n"
254
+ "<h1>Can&#8217;t select database</h1>\n"
255
+ "<p>We were able to connect to the database server (which means your username and password is okay) but not able to select the <code>%1$s</code> database.</p>\n"
256
+ "<ul>\n"
257
+ "<li>Are you sure it exists?</li>\n"
258
+ "<li>Does the user <code>%2$s</code> have permission to use the <code>%1$s</code> database?</li>\n"
259
+ "<li>On some systems the name of your database is prefixed with your username, so it would be like <code>username_%1$s</code>. Could that be the problem?</li>\n"
260
+ "</ul>\n"
261
+ "<p>If you don't know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href=\"http://wordpress.org/support/\">WordPress Support Forums</a>.</p>"
262
+
263
+ #@ {php-code}
264
+ #. Not gettexted string WP_I18N_DB_QUERY_ERROR_FULL
265
+ #: db-module.php:717
266
+ msgid "WordPress database error %1$s for query %2$s made by %3$s"
267
+ msgstr "WordPress database error %1$s for query %2$s made by %3$s"
268
+
269
+ #@ {php-code}
270
+ #. Not gettexted string WP_I18N_DB_QUERY_ERROR
271
+ #: db-module.php:719
272
+ msgid "WordPress database error %1$s for query %2$s"
273
+ msgstr "WordPress database error %1$s for query %2$s"
274
+
lang/db-cache-reloaded-es_ES.mo ADDED
Binary file
lang/db-cache-reloaded-es_ES.po ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
5
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Dasumo <dasumo(at)dasumo.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: Español\n"
13
+ "X-Poedit-Country: México\n"
14
+
15
+ #: db-cache-reloaded.php:157
16
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
17
+ msgstr "<b>Error de DB Cache Reloaded:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
18
+
19
+ #: db-cache-reloaded.php:160
20
+ #, php-format
21
+ msgid "Previous definition is at %s."
22
+ msgstr "Definido previamente en %s."
23
+
24
+ #: db-cache-reloaded.php:169
25
+ #, php-format
26
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
27
+ msgstr "<b>DB Cache Reloaded Info:</b> El caché no está habilitado. Visita la <a href=\"%s\">Página de Configuración</a> para activarlo."
28
+
29
+ #: db-cache-reloaded.php:173
30
+ #, php-format
31
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
32
+ msgstr "<b>Error de DB Cache Reloaded:</b> El Módulo (<code>wpdb</code> class) no se ha cargado. Visita la <a href=\"%1$s\">Página de Configuración</a>, desactiva el cache (recuerda guardar las opciones) y actívalo de nuevo. Si esto no funciona, revisa la <a href=\"%2$s\">Ayuda</a> e intenta reparar manualmente."
33
+
34
+ #: db-cache-reloaded.php:186
35
+ #, php-format
36
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
37
+ msgstr "<b>Error de DB Cache Reloaded:</b>El Módulo no está actualizado (la versión detectada es %1$s en lugar de %2$s). Para solucionarlo, ve a la <a href=\"%3$s\">Página de Configuración</a>, desactiva el cache (recuerda guardar las opciones) y actí­valo de nuevo."
38
+
39
+ #: db-cache-reloaded.php:251
40
+ msgid "Caching activated."
41
+ msgstr "Cache Activado."
42
+
43
+ #: db-cache-reloaded.php:255
44
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
45
+ msgstr "El cache no se activó. El directorio <u>wp-content</u> no tiene permisos de escritura (chmod 777). <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">Visita la ayuda</a>."
46
+
47
+ #: db-cache-reloaded.php:272
48
+ msgid "Caching deactivated. Cache files deleted."
49
+ msgstr "Cache Desativado. Los archivos en cache se han eliminado."
50
+
51
+ #: db-cache-reloaded.php:330
52
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
53
+ msgstr "<!-- Gerado en {timer} segundos. {queries} consultas a la Base de Datos. {cached} consultas cacheadas. Memoria usada - {memory} -->"
54
+
55
+ #: db-cache-reloaded.php:352
56
+ msgid "Cache files deleted."
57
+ msgstr "Los archivos en cache se han eliminado."
58
+
59
+ #: db-cache-reloaded.php:360
60
+ msgid "Expired cache files deleted."
61
+ msgstr "Los archivos Expirados se han eliminado."
62
+
63
+ #: db-cache-reloaded.php:399
64
+ msgid "Settings saved."
65
+ msgstr "Configuración guardada."
66
+
67
+ #: db-cache-reloaded.php:403
68
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
69
+ msgstr "La configuración no fue guardada. Otorgue permisos de escritura (chmod 666) al archivo <u>db-config.ini</u>. <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">Visitar la Ayuda</a>."
70
+
71
+ #: db-cache-reloaded.php:411
72
+ msgid "DB Cache Reloaded - Options"
73
+ msgstr "DB Cache Reloaded - Opciones"
74
+
75
+ #: db-cache-reloaded.php:413
76
+ msgid "Configuration"
77
+ msgstr "Confirguración"
78
+
79
+ #: db-cache-reloaded.php:416
80
+ msgid "Enable"
81
+ msgstr "Activar"
82
+
83
+ #: db-cache-reloaded.php:419
84
+ msgid "Expire a cached query after"
85
+ msgstr "Expiración del cache"
86
+
87
+ #: db-cache-reloaded.php:420
88
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
89
+ msgstr "minutos. <em>(Los archivos expirados se eliminan automáticamente)</em>"
90
+
91
+ #: db-cache-reloaded.php:424
92
+ msgid "Additional options"
93
+ msgstr "Opciones Adicionales"
94
+
95
+ #: db-cache-reloaded.php:427
96
+ msgid "Cache filter"
97
+ msgstr "Filtrar Cache"
98
+
99
+ #: db-cache-reloaded.php:428
100
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
101
+ msgstr "Las consultas con el siguiente contenido no serán cacheadas. Separar filtros con el caracter '|' (línea vertical), ejemplo: '_posts|_postmeta'"
102
+
103
+ #: db-cache-reloaded.php:431
104
+ msgid "Load stats template"
105
+ msgstr "Ver estadísticas en la plantilla"
106
+
107
+ #: db-cache-reloaded.php:432
108
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
109
+ msgstr "Muestra la cantidad de recursos usados al final de la plantilla (footer). Deje en blanco para no usar esta opción.<br/>{timer}: Tiempo de carga. {queries}: Número de consultas a la DB. {cached}: Consultas en caché. {memory}: Memoria usada por PHP"
110
+
111
+ #: db-cache-reloaded.php:436
112
+ msgid "Advanced"
113
+ msgstr "Avanzado"
114
+
115
+ #: db-cache-reloaded.php:440
116
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
117
+ msgstr "El modo Wrapper usa un método diferente para cargar la DB. Es menos eficiente y un poco más lento (al menos 1 consulta no se cachea pero algunos plugins pueden aumentar este número). Usa este método sólo si tienes errores con algunos plugins o si las estadí­sticas de consultas cacheadas muestran 0 o -1."
118
+
119
+ #: db-cache-reloaded.php:443
120
+ #, php-format
121
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
122
+ msgstr "El modo Wrapper requiere PHP 5 y tu versión de PHP es %s. Por favor, revisa la documentación sobre <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Cómo migrar a PHP 5</a>."
123
+
124
+ #: db-cache-reloaded.php:449
125
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
126
+ msgstr "El modo Wrapper está <strong>Activado</strong>. Para desactivarlo, antes debes deshabilitar el cache."
127
+
128
+ #: db-cache-reloaded.php:451
129
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
130
+ msgstr "El modo Wrapper está <strong>Desactivado</strong>. Para habilitarlo, primero deshabilita el cache."
131
+
132
+ #: db-cache-reloaded.php:455
133
+ msgid "Enable Wrapper Mode"
134
+ msgstr "Habilitar modo Wrapper"
135
+
136
+ #: db-cache-reloaded.php:461
137
+ msgid "Save"
138
+ msgstr "Guardar"
139
+
140
+ #: db-cache-reloaded.php:462
141
+ msgid "Clear the cache"
142
+ msgstr "Borrar Cache"
143
+
144
+ #: db-cache-reloaded.php:463
145
+ msgid "Clear the expired cache"
146
+ msgstr "Borrar cache expirado"
147
+
148
+ #: db-module-wrapper.php:265
149
+ #: db-module.php:1383
150
+ #, php-format
151
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
152
+ msgstr "<b>Error de DB Cache Reloaded:</b> La inclusión del archivo <code>db-functions.php</code> falló. Reinstala el plugin o elimina el archivo <code>%s</code>."
153
+
154
+ #: db-module.php:1302
155
+ #, php-format
156
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
157
+ msgstr "<strong>ERROR</strong>: WordPress %s requiere MySQL 4.0.0 o superior"
158
+
159
+ #. Plugin Name of an extension
160
+ msgid "DB Cache Reloaded"
161
+ msgstr "DB Cache Reloaded"
162
+
163
+ #. Plugin URI of an extension
164
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
165
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
166
+
167
+ #. Description of an extension
168
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
169
+ msgstr "El más rápido sistema de cache para WordPress, cachea consultas a la base de datos y es fácil de configurar. (Desative/Active el cache antes/depués de actualizar)"
170
+
171
+ #. Author of an extension
172
+ msgid "Daniel Fruyski"
173
+ msgstr "Daniel Fruyski"
174
+
175
+ #. Author URI of an extension
176
+ msgid "http://www.poradnik-webmastera.com/"
177
+ msgstr "http://www.poradnik-webmastera.com/"
178
+
lang/db-cache-reloaded-it_IT.mo ADDED
Binary file
lang/db-cache-reloaded-it_IT.po ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-09-04 16:48+0000\n"
11
+ "PO-Revision-Date: 2009-09-10 10:24+0100\n"
12
+ "Last-Translator: Iacopo Benesperi <iacchi@iacchi.org>\n"
13
+ "Language-Team: \n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=utf-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-Language: Italian\n"
19
+ "X-Poedit-Country: ITALY\n"
20
+ "X-Poedit-Basepath: /home/iacopo/\n"
21
+ "X-Poedit-SourceCharset: utf-8\n"
22
+
23
+ #: db-cache-reloaded.php:109
24
+ msgid "Caching activated."
25
+ msgstr "Cache attivata."
26
+
27
+ #: db-cache-reloaded.php:114
28
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
29
+ msgstr "La cache non può essere attivata. Impostare i permessi per la cartella <u>wp-content</u> a <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">755</a>"
30
+
31
+ #: db-cache-reloaded.php:124
32
+ msgid "Caching deactivated. Cache files deleted."
33
+ msgstr "Cache disattivata. File nella cache cancellati."
34
+
35
+ #: db-cache-reloaded.php:170
36
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
37
+ msgstr "<!-- Generata in {timer} secondi. Effettuate {queries} query al database e {cached} query nella cache. Memoria usata - {memory} -->"
38
+
39
+ #: db-cache-reloaded.php:189
40
+ msgid "Cache files deleted."
41
+ msgstr "File nella cache cancellati."
42
+
43
+ #: db-cache-reloaded.php:197
44
+ msgid "Expired cache files deleted."
45
+ msgstr "File della cache scaduti cancellati."
46
+
47
+ #: db-cache-reloaded.php:233
48
+ msgid "Settings saved."
49
+ msgstr "Impostazioni salvate."
50
+
51
+ #: db-cache-reloaded.php:237
52
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
53
+ msgstr "Le impostazioni non possono essere salvate. Impostare i permessi del file <u>config.ini</u> a <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">755</a>"
54
+
55
+ #: db-cache-reloaded.php:245
56
+ msgid "DB Cache Reloaded - Options"
57
+ msgstr "DB Cache Reloaded - Opzioni"
58
+
59
+ #: db-cache-reloaded.php:247
60
+ msgid "Configuration"
61
+ msgstr "Configurazione"
62
+
63
+ #: db-cache-reloaded.php:250
64
+ msgid "Enable"
65
+ msgstr "Abilita"
66
+
67
+ #: db-cache-reloaded.php:253
68
+ msgid "Expire a cached query after"
69
+ msgstr "Fai scadere una query nella cache dopo"
70
+
71
+ #: db-cache-reloaded.php:254
72
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
73
+ msgstr "minuti. <em>(I file scaduti vengono eliminati automaticamente)</em>"
74
+
75
+ #: db-cache-reloaded.php:258
76
+ msgid "Additional options"
77
+ msgstr "Opzioni aggiuntive"
78
+
79
+ #: db-cache-reloaded.php:261
80
+ msgid "Cache filter"
81
+ msgstr "Filtro cache"
82
+
83
+ #: db-cache-reloaded.php:262
84
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
85
+ msgstr "Non salva nella cache le query alle tabelle che hanno questo testo nel nome. Dividere filtri diversi con '|' (linea verticale, per es. '_posts|_postmeta')"
86
+
87
+ #: db-cache-reloaded.php:265
88
+ msgid "Load stats template"
89
+ msgstr "Carica il template delle statistiche"
90
+
91
+ #: db-cache-reloaded.php:266
92
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
93
+ msgstr "Mostra delle statistiche sull'uso dell risorse nel template del piè di pagina. Per disabilitare le statistiche lascia questo campo vuoto.<br/>{timer} - tempo di generazione, {queries} - conteggio delle query al DB, {cached} - query nella cache, {memory} - memoria"
94
+
95
+ #: db-cache-reloaded.php:271
96
+ msgid "Save"
97
+ msgstr "Salva"
98
+
99
+ #: db-cache-reloaded.php:272
100
+ msgid "Clear the cache"
101
+ msgstr "Svuota la cache"
102
+
103
+ #: db-cache-reloaded.php:273
104
+ msgid "Clear the expired cache"
105
+ msgstr "Svuota la cache scaduta"
106
+
107
+ #: db-module.php:1197
108
+ #, php-format
109
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
110
+ msgstr "<strong>ERRORE</strong>: WordPress %s richiede MySQL 4.0.0 o superiore"
111
+
112
+ #. Plugin Name of an extension
113
+ msgid "DB Cache Reloaded"
114
+ msgstr "DB Cache Reloaded"
115
+
116
+ #. Plugin URI of an extension
117
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
118
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
119
+
120
+ #. Description of an extension
121
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
122
+ msgstr "Il motore di cache piĂš veloce per WordPress, che produce la cache delle query al database con una semplice configurazione. (Disabilitare e abilitare la cache dopo l'aggiornamento)"
123
+
124
+ #. Author of an extension
125
+ msgid "Daniel Fruyski"
126
+ msgstr "Daniel Fruyski"
127
+
128
+ #. Author URI of an extension
129
+ msgid "http://www.poradnik-webmastera.com/"
130
+ msgstr "http://www.poradnik-webmastera.com/"
131
+
lang/db-cache-reloaded-ja.mo ADDED
Binary file
lang/db-cache-reloaded-ja.po ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: PACKAGE VERSION\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
11
+ "PO-Revision-Date: 2010-04-07 18:19+0900\n"
12
+ "Last-Translator: wokamoto <wokamoto1973@gmail.com>\n"
13
+ "Language-Team: JAPANESE <http://wppluginsj.sourceforge.jp/>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Poedit-Language: Japanese\n"
18
+ "X-Poedit-Country: JAPAN\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+ "X-Poedit-KeywordsList: __;_e\n"
21
+ "X-Poedit-Basepath: .\n"
22
+
23
+ #: db-cache-reloaded.php:157
24
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
25
+ msgstr "<strong>DB Cache Reloaded エラー:</strong> <code>wpdb</code> クラスが再定義されているため、プラグインが動作できません!"
26
+
27
+ #: db-cache-reloaded.php:160
28
+ #, php-format
29
+ msgid "Previous definition is at %s."
30
+ msgstr "以前の定義は、%sです。"
31
+
32
+ #: db-cache-reloaded.php:169
33
+ #, php-format
34
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
35
+ msgstr "<strong>DB Cache Reloaded 情報:</strong> キャッシュは無効です。<a href=\"%s\">オプションページ</a>で有効にしてください。"
36
+
37
+ #: db-cache-reloaded.php:173
38
+ #, php-format
39
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
40
+ msgstr "<strong>DB Cache Reloaded エラー:</strong> DBモジュール(<code>wpdb</code>クラス)はロードされませんでした。<a href=\"%1$s\">オプションページ</a>でキャッシュを無効にし (忘れずに設定を保存してください)、ふたたび有効にしてみてください。それでも解決しない場合は、手動アップグレードするために<a href=\"%2$s\">FAQ</a>をチェックしてみてください。"
41
+
42
+ #: db-cache-reloaded.php:186
43
+ #, php-format
44
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
45
+ msgstr "<strong>DB Cache Reloaded エラー:</strong> DBモジュールが最新ではありません(検出されたバージョン %1$s 、要求されるバージョン %2$s)。修復するには<a href=\"%1$s\">オプションページ</a>でキャッシュを無効にし (忘れずに設定を保存してください)、ふたたび有効にしてみてください。"
46
+
47
+ #: db-cache-reloaded.php:251
48
+ msgid "Caching activated."
49
+ msgstr "キャッシュは動作しています。"
50
+
51
+ #: db-cache-reloaded.php:255
52
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
53
+ msgstr "キャッシュは動作していません。<u>wp-content</u> フォルダのパーミッションを <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">755</a> に変更してください。"
54
+
55
+ #: db-cache-reloaded.php:272
56
+ msgid "Caching deactivated. Cache files deleted."
57
+ msgstr "キャッシュを無効にし、キャッシュファイルを削除しました。"
58
+
59
+ #: db-cache-reloaded.php:330
60
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
61
+ msgstr ""
62
+
63
+ #: db-cache-reloaded.php:352
64
+ msgid "Cache files deleted."
65
+ msgstr "キャッシュファイルを削除しました。"
66
+
67
+ #: db-cache-reloaded.php:360
68
+ msgid "Expired cache files deleted."
69
+ msgstr "期限切れになったキャッシュファイルを削除しました。"
70
+
71
+ #: db-cache-reloaded.php:399
72
+ msgid "Settings saved."
73
+ msgstr "設定を保存しました。"
74
+
75
+ #: db-cache-reloaded.php:403
76
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
77
+ msgstr "設定を保存できませんでした。<u>config.ini</u> ファイルのパーミッションを <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">755</a> に変更してください。"
78
+
79
+ #: db-cache-reloaded.php:411
80
+ msgid "DB Cache Reloaded - Options"
81
+ msgstr "DB Cache Reloaded - オプション"
82
+
83
+ #: db-cache-reloaded.php:413
84
+ msgid "Configuration"
85
+ msgstr "基本オプション"
86
+
87
+ #: db-cache-reloaded.php:416
88
+ msgid "Enable"
89
+ msgstr "有効"
90
+
91
+ #: db-cache-reloaded.php:419
92
+ msgid "Expire a cached query after"
93
+ msgstr "キャッシュの有効期限"
94
+
95
+ #: db-cache-reloaded.php:420
96
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
97
+ msgstr "分 <em>(期限が切れたキャッシュファイルは自動的に削除されます)</em>"
98
+
99
+ #: db-cache-reloaded.php:424
100
+ msgid "Additional options"
101
+ msgstr "追加オプション"
102
+
103
+ #: db-cache-reloaded.php:427
104
+ msgid "Cache filter"
105
+ msgstr "キャッシュフィルタ"
106
+
107
+ #: db-cache-reloaded.php:428
108
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
109
+ msgstr "キャッシュ対象にしたくないクエリを含む文字列を入力してください。複数指定したい場合は '|' によって列挙してください。(例: '_posts|_postmeta' )"
110
+
111
+ #: db-cache-reloaded.php:431
112
+ msgid "Load stats template"
113
+ msgstr "リソース使用統計テンプレート"
114
+
115
+ #: db-cache-reloaded.php:432
116
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
117
+ msgstr "フッタにリソース使用統計を表示するためのテンプレートです。フッタに何も表示したくなければ、このフィールドを空にしておいてください。<br />{timer} - キャッシュ生成にかかった時間, {queries} - DBに対するクエリ数, {cached} - キャッシュされたクエリ数, {memory} - メモリー"
118
+
119
+ #: db-cache-reloaded.php:436
120
+ msgid "Advanced"
121
+ msgstr "詳細"
122
+
123
+ #: db-cache-reloaded.php:440
124
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
125
+ msgstr "ラッパーモードは、通常とは異なる方法でDBモジュールをロードします。通常の方法よりも効率的ではなく(少なくとも1つのクエリがキャッシュされません; いくつかのプラグインでは、さらにキャッシュできないクエリ数が増えるでしょう)、少し遅いです。DB Cache Reloaded と互換性の無いプラグインを使用する際、このモードを選択してください。また、クエリがキャッシュされない(キャッシュされたクエリ数が0か-1)場合にも、このモードを試してみてください。"
126
+
127
+ #: db-cache-reloaded.php:443
128
+ #, php-format
129
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
130
+ msgstr "ラッパーモードは少なくとも PHP 5 を必要としますが、現在 PHP %s を使っています。ラッパーモードを使用するためには PHP 5 に切り替えてください。PHP 5 に切り替えるには <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> というエントリが役に立つでしょう。"
131
+
132
+ #: db-cache-reloaded.php:449
133
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
134
+ msgstr "ラッパーモードは<strong>有効</strong>です。無効にするためには、一度キャッシュを無効にしてから、設定してください。"
135
+
136
+ #: db-cache-reloaded.php:451
137
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
138
+ msgstr "ラッパーモードは<strong>無効</strong>です。有効にするためには、一度キャッシュを無効にしてから、設定してください。"
139
+
140
+ #: db-cache-reloaded.php:455
141
+ msgid "Enable Wrapper Mode"
142
+ msgstr "ラッパーモードを有効にします"
143
+
144
+ #: db-cache-reloaded.php:461
145
+ msgid "Save"
146
+ msgstr "保存"
147
+
148
+ #: db-cache-reloaded.php:462
149
+ msgid "Clear the cache"
150
+ msgstr "キャッシュファイルを削除する"
151
+
152
+ #: db-cache-reloaded.php:463
153
+ msgid "Clear the expired cache"
154
+ msgstr "期限切れのキャッシュファイルを削除する"
155
+
156
+ #: db-module-wrapper.php:265
157
+ #: db-module.php:1383
158
+ #, php-format
159
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
160
+ msgstr "<strong>DB Cache Reloaded エラー:</strong> <code>db-functions.php</code> をインクルードできませんでした。プラグインを再インストールするか、<code>%s</code> ファイルを削除してください。"
161
+
162
+ #: db-module.php:1302
163
+ #, php-format
164
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
165
+ msgstr "<strong>エラー</strong>: WordPress %s には MySQL 4.0.0 以上が必要です。"
166
+
167
+ #. Plugin Name of an extension
168
+ msgid "DB Cache Reloaded"
169
+ msgstr ""
170
+
171
+ #. Plugin URI of an extension
172
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
173
+ msgstr ""
174
+
175
+ #. Description of an extension
176
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
177
+ msgstr "簡単な設定で、データベースクエリをキャッシングする WordPress 用のキャッシュエンジンです。 (アップデートする際は無効にしてから、アップデート後に有効にしてください)"
178
+
179
+ #. Author of an extension
180
+ msgid "Daniel Fruyski"
181
+ msgstr ""
182
+
183
+ #. Author URI of an extension
184
+ msgid "http://www.poradnik-webmastera.com/"
185
+ msgstr ""
186
+
lang/db-cache-reloaded-nl_NL.mo ADDED
Binary file
lang/db-cache-reloaded-nl_NL.po ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: DB Cache Reloaded v2.0.2\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
5
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Rene - WordPressPluginGuide.com <info@wppg.me>\n"
8
+ "Language-Team: WordPressPluginGuide.com <info@wppg.me>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: Dutch\n"
14
+ "X-Poedit-Country: NETHERLANDS\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: db-cache-reloaded.php:157
18
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
19
+ msgstr "<b>DB Cache Reloaded Fout:</b> <code>wpdb</code> klasse is opnieuw gedefinieerd, de plugin kan niet werken !"
20
+
21
+ #: db-cache-reloaded.php:160
22
+ #, php-format
23
+ msgid "Previous definition is at %s."
24
+ msgstr "Vorige definitie is op %s."
25
+
26
+ #: db-cache-reloaded.php:169
27
+ #, php-format
28
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
29
+ msgstr "<b>DB Cache Reloaded Info:</b> caching is niet ingeschakeld. Ga naar de pagina <a href=\"%s\">Instellingen</a> om dit te activeren."
30
+
31
+ #: db-cache-reloaded.php:173
32
+ #, php-format
33
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
34
+ msgstr "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> klasse) is niet geladen. Open de pagina <a href=\"%1$s\">Instellingen</a>, zet de optie caching uit (vergeet niet om de instellingen op te slaan) en activeer het opnieuw. Wanneer dit niet helpt raadpleeg <a href=\"%2$s\">Veelgestelde Vragen</a> hoe je handmatig kunt upgraden."
35
+
36
+ #: db-cache-reloaded.php:186
37
+ #, php-format
38
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
39
+ msgstr "<b>DB Cache Reloaded Error:</b> DB Module is niet recent (gedetecteerde versie %1$s in plaats van %2$s). Om dit op te lossen open de pagina <a href=\"%3$s\">Instellingen</a>, schakel caching uit (vergeet niet om de instellingen op te slaan) en activeer het opnieuw."
40
+
41
+ #: db-cache-reloaded.php:251
42
+ msgid "Caching activated."
43
+ msgstr "Caching geactiveerd."
44
+
45
+ #: db-cache-reloaded.php:255
46
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
47
+ msgstr "Caching kan niet geactiveerd worden. Wijzig de permissies voor de <u>wp-content</u> folder met behulp van het <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> commando."
48
+
49
+ #: db-cache-reloaded.php:272
50
+ msgid "Caching deactivated. Cache files deleted."
51
+ msgstr "Caching gedeactiveerd. Cache bestanden zijn verwijderd."
52
+
53
+ #: db-cache-reloaded.php:330
54
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
55
+ msgstr "<!-- Gegenereerd in {timer} seconden. {queries} database zoekopdrachten en {cached} zoekopdrachten in de cache. Gebruikt geheugen - {memory} -->"
56
+
57
+ #: db-cache-reloaded.php:352
58
+ msgid "Cache files deleted."
59
+ msgstr "Cache bestanden verwijderd."
60
+
61
+ #: db-cache-reloaded.php:360
62
+ msgid "Expired cache files deleted."
63
+ msgstr "Verlopen cache bestanden verwijderd."
64
+
65
+ #: db-cache-reloaded.php:399
66
+ msgid "Settings saved."
67
+ msgstr "Instellingen opgeslagen."
68
+
69
+ #: db-cache-reloaded.php:403
70
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
71
+ msgstr "Instellingen kunnen niet bewaard worden. Wijzig de permissies voor het bestand <u>config.ini</u> met behulp van het <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> commando."
72
+
73
+ #: db-cache-reloaded.php:411
74
+ msgid "DB Cache Reloaded - Options"
75
+ msgstr "DB Cache Reloaded - Opties"
76
+
77
+ #: db-cache-reloaded.php:413
78
+ msgid "Configuration"
79
+ msgstr "Configuratie"
80
+
81
+ #: db-cache-reloaded.php:416
82
+ msgid "Enable"
83
+ msgstr "Activeren"
84
+
85
+ #: db-cache-reloaded.php:419
86
+ msgid "Expire a cached query after"
87
+ msgstr "Cache zoekopdracht verloopt na"
88
+
89
+ #: db-cache-reloaded.php:420
90
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
91
+ msgstr "minuten. <em>(verlopen bestanden worden automatisch verwijderd)</em>"
92
+
93
+ #: db-cache-reloaded.php:424
94
+ msgid "Additional options"
95
+ msgstr "Extra opties"
96
+
97
+ #: db-cache-reloaded.php:427
98
+ msgid "Cache filter"
99
+ msgstr "Cache filter"
100
+
101
+ #: db-cache-reloaded.php:428
102
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
103
+ msgstr "Cache geen zoekopdrachten welke deze inhoud bevat. Verdeel verschillende filters met '|' (verticale lijn, bijvoorbeeld '_posts|_postmeta')"
104
+
105
+ #: db-cache-reloaded.php:431
106
+ msgid "Load stats template"
107
+ msgstr "Laad de statistieken template"
108
+
109
+ #: db-cache-reloaded.php:432
110
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
111
+ msgstr "Het laat de gebruiksstatistieken van de hulpbronnen zien in de voetnoot van de template. Laat het veld leeg voor weergave uitschakeling.<br/>{timer} - generatie tijd, {queries} - telling van database zoekopdrachten, {cached} - zoekopdrachten in de cache, {memory} - geheugen"
112
+
113
+ #: db-cache-reloaded.php:436
114
+ msgid "Advanced"
115
+ msgstr "Geavanceerd"
116
+
117
+ #: db-cache-reloaded.php:440
118
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
119
+ msgstr "De Wrapper modus gebruikt een andere methode om de DB module te laden. Het is minder efficient (minstens 1 zoekopdracht is niet gecached, door sommige plugins kan dit aantal oplopen) en iets langzamer. Het staat het gebruik van DB Cache Reloaded toe tesamen met plugins die incompatibel zijn, welke proberen hun eigen DB module te laden. Je kan dit proberen wanneer het aantal cache zoekopdrachten nul of -1 is."
120
+
121
+ #: db-cache-reloaded.php:443
122
+ #, php-format
123
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
124
+ msgstr "De Wrapper modus vereist tenminste PHP 5, en je gebruikt op dit moment PHP %s. Lees het artikel <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Omschakelen naar PHP5</a> voor informatie hoe om te schakelen naar PHP 5."
125
+
126
+ #: db-cache-reloaded.php:449
127
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
128
+ msgstr "De Wrapper Modus is <strong>Ingeschakeld</strong>. Om deze uit te schakelen moet eerst de cache uitgeschakeld zijn."
129
+
130
+ #: db-cache-reloaded.php:451
131
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
132
+ msgstr "De Wrapper Modus is <strong>Uitgeschakeld</strong>. Om deze in te schakelen moet eerst de cache uitgeschakeld zijn."
133
+
134
+ #: db-cache-reloaded.php:455
135
+ msgid "Enable Wrapper Mode"
136
+ msgstr "Inschakelen Wrapper modus"
137
+
138
+ #: db-cache-reloaded.php:461
139
+ msgid "Save"
140
+ msgstr "Opslaan"
141
+
142
+ #: db-cache-reloaded.php:462
143
+ msgid "Clear the cache"
144
+ msgstr "Cache schoonmaken"
145
+
146
+ #: db-cache-reloaded.php:463
147
+ msgid "Clear the expired cache"
148
+ msgstr "Schoonmaken van de verlopen cache"
149
+
150
+ #: db-module-wrapper.php:265
151
+ #: db-module.php:1383
152
+ #, php-format
153
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
154
+ msgstr "<b>DB Cache Reloaded fout:</b> kan niet het bestand <code>db-functions.php</code> toevoegen. Herinstalleer de plugin of verwijder het <code>%s</code> bestand."
155
+
156
+ #: db-module.php:1302
157
+ #, php-format
158
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
159
+ msgstr "<strong>FOUT</strong>: WordPress %s vereist MySQL 4.0.0 of hoger"
160
+
161
+ #. Plugin Name of an extension
162
+ msgid "DB Cache Reloaded"
163
+ msgstr "DB Cache Reloaded"
164
+
165
+ #. Plugin URI of an extension
166
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
167
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
168
+
169
+ #. Description of an extension
170
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
171
+ msgstr "Het snelste cache systeem voor WordPress, wat cache zoekopdrachten produceert met een eenvoudige configuratie. (Uitschakelen en inschakelen van caching na bijwerking)"
172
+
173
+ #. Author of an extension
174
+ msgid "Daniel Fruyski"
175
+ msgstr "Daniel Fruyski"
176
+
177
+ #. Author URI of an extension
178
+ msgid "http://www.poradnik-webmastera.com/"
179
+ msgstr "http://www.poradnik-webmastera.com/"
180
+
lang/db-cache-reloaded-pl_PL.mo ADDED
Binary file
lang/db-cache-reloaded-pl_PL.po ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: DB Cache Reloaded\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
11
+ "PO-Revision-Date: 2009-12-31 16:04+0100\n"
12
+ "Last-Translator: Daniel Frużyński <daniel [A-T] poradnik-webmastera.com>\n"
13
+ "Language-Team: Daniel Fruzysnki <LL@li.org>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Poedit-Language: Polish\n"
18
+ "X-Poedit-Country: POLAND\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+
21
+ #: db-cache-reloaded.php:157
22
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
23
+ msgstr "<b>DB Cache Reloaded - Błąd:</b> klasa <code>wpdb</code> class jest przedefiniowana, plugin nie może pracować!"
24
+
25
+ #: db-cache-reloaded.php:160
26
+ #, php-format
27
+ msgid "Previous definition is at %s."
28
+ msgstr "Poprzednia definicja w %s."
29
+
30
+ #: db-cache-reloaded.php:169
31
+ #, php-format
32
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
33
+ msgstr "<b>DB Cache Reloaded - Informacja:</b> cache nie nie jest włączone. Proszę przejść na <a href=\"%s\">stronę opcji</a> aby je włączyć."
34
+
35
+ #: db-cache-reloaded.php:173
36
+ #, php-format
37
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
38
+ msgstr "<b>DB Cache Reloaded - Błąd:</b> Moduł DB (klasa <code>wpdb</code>) nie jest załadowana. Proszę otwórz <a href=\"%1$s\">stronę opcji</a>, wyłącz cache (pamiętaj aby zapisać opcje) i włącz je ponownie. Jeżeli to nie pomoże, sprawdź proszę w <a href=\"%2$s\">FAQ</a> jak ręcznie można dokonać aktualizacji."
39
+
40
+ #: db-cache-reloaded.php:186
41
+ #, php-format
42
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
43
+ msgstr "<b>DB Cache Reloaded - Błąd:</b> Moduł DB jest nieaktualny (wykryta wersja to %1$s zamiast %2$s). Aby to naprawić, przejdź na <a href=\"%3$s\">stronę opcji</a>, wyłącz cache (pamiętaj aby zapisać opcje) i włącz je ponownie."
44
+
45
+ #: db-cache-reloaded.php:251
46
+ msgid "Caching activated."
47
+ msgstr "Cache włączone."
48
+
49
+ #: db-cache-reloaded.php:255
50
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
51
+ msgstr "Cache nie może być włączone. Proszę ustawić <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> na katalogu <u>wp-content</u>"
52
+
53
+ #: db-cache-reloaded.php:272
54
+ msgid "Caching deactivated. Cache files deleted."
55
+ msgstr "Cache wyłączone. Zapisane pliki zostały usunięte."
56
+
57
+ #: db-cache-reloaded.php:330
58
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
59
+ msgstr "<!-- Wygenerowano w {timer} sekund. Wykonano {queries} zapytań do bazy danych i {cached} zapisanych zapytań. Używana pamięć - {memory} -->"
60
+
61
+ #: db-cache-reloaded.php:352
62
+ msgid "Cache files deleted."
63
+ msgstr "Pliki cache zostały usunięte."
64
+
65
+ #: db-cache-reloaded.php:360
66
+ msgid "Expired cache files deleted."
67
+ msgstr "Wygasłe pliki cache zostałe usunięte."
68
+
69
+ #: db-cache-reloaded.php:399
70
+ msgid "Settings saved."
71
+ msgstr "Ustawienia zapisane."
72
+
73
+ #: db-cache-reloaded.php:403
74
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
75
+ msgstr "Ustawienia nie mogą zostać zapisane. Proszę ustawić <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> dla pliku <u>config.ini</u>"
76
+
77
+ #: db-cache-reloaded.php:411
78
+ msgid "DB Cache Reloaded - Options"
79
+ msgstr "DB Cache Reloaded - Opcje"
80
+
81
+ #: db-cache-reloaded.php:413
82
+ msgid "Configuration"
83
+ msgstr "Konfiguracja"
84
+
85
+ #: db-cache-reloaded.php:416
86
+ msgid "Enable"
87
+ msgstr "Włącz"
88
+
89
+ #: db-cache-reloaded.php:419
90
+ msgid "Expire a cached query after"
91
+ msgstr "Zapisane zapytania wygasają po"
92
+
93
+ #: db-cache-reloaded.php:420
94
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
95
+ msgstr "minutach. <em>(Wygasłe pliki są usuwane automatycznie)</em>"
96
+
97
+ #: db-cache-reloaded.php:424
98
+ msgid "Additional options"
99
+ msgstr "Dodatkowe opcje"
100
+
101
+ #: db-cache-reloaded.php:427
102
+ msgid "Cache filter"
103
+ msgstr "Filtr cache"
104
+
105
+ #: db-cache-reloaded.php:428
106
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
107
+ msgstr "Nie zapisuj zapytań które zawierają wpisane frazy. Rozdziel różne filtry za pomocą '|' (pionowa kreska, np. '_posts|_postmeta')"
108
+
109
+ #: db-cache-reloaded.php:431
110
+ msgid "Load stats template"
111
+ msgstr "Załaduj szablon statystyk"
112
+
113
+ #: db-cache-reloaded.php:432
114
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
115
+ msgstr "Pokazuje statystyki wykorzystania zasobów w stopce strony. Aby to wyłączyć, pozostaw to pole puste.<br/>{timer} - czas generowania strony, {queries} - ilość zapytań do bazy danych, {cached} - ilość zapisanych zapytań, {memory} - pamięć"
116
+
117
+ #: db-cache-reloaded.php:436
118
+ msgid "Advanced"
119
+ msgstr "Zaawansowane"
120
+
121
+ #: db-cache-reloaded.php:440
122
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
123
+ msgstr "Tryb Wrappera używa innej metody ładowania Modułu DB. Jest ona mniej efektywna (co najmniej jedno zapytanie nie będzie cachowane; niektóre pluginy mogą zwiększyć tą liczbę) i nieco wolniejszy. Pozwala on na użycie pluginu DB Cache Reloaded razem z niekompatybilnymi pluginami, które próbują ładować własny Moduł DB. Możesz go wypróbować jeżeli Twoja ilość cachowanych zapytań to zero albo -1."
124
+
125
+ #: db-cache-reloaded.php:443
126
+ #, php-format
127
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
128
+ msgstr "Tryb Wrappera wymaga co najmniej PHP 5, a ty używasz PHP %s now. Proszę przeczytaj artykuł <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> aby dowiedzieć się jak przełączyć się na PHP 5."
129
+
130
+ #: db-cache-reloaded.php:449
131
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
132
+ msgstr "Tryb Wrappera jest <strong>włączony</strong>. Aby go wyłączyć, proszę wyłącz najpierw cacheowanie."
133
+
134
+ #: db-cache-reloaded.php:451
135
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
136
+ msgstr "Tryb Wrappera jest <strong>wyłączony</strong>. Aby go włączyć, proszę wyłącz najpierw cacheowanie."
137
+
138
+ #: db-cache-reloaded.php:455
139
+ msgid "Enable Wrapper Mode"
140
+ msgstr "Włącz tryb Wrappera"
141
+
142
+ #: db-cache-reloaded.php:461
143
+ msgid "Save"
144
+ msgstr "Zapisz"
145
+
146
+ #: db-cache-reloaded.php:462
147
+ msgid "Clear the cache"
148
+ msgstr "Wyczyść cache"
149
+
150
+ #: db-cache-reloaded.php:463
151
+ msgid "Clear the expired cache"
152
+ msgstr "Wyczyść wygasłe cache"
153
+
154
+ #: db-module-wrapper.php:265
155
+ #: db-module.php:1383
156
+ #, php-format
157
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
158
+ msgstr "<b>DB Cache Reloaded - Błąd:</b> nie mogę dołączyć pliku<code>db-functions.php</code>. Proszę zainstaluj plugin ponownie albo usuń plik <code>%s</code>."
159
+
160
+ #: db-module.php:1302
161
+ #, php-format
162
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
163
+ msgstr "<strong>BŁĄD</strong>: WordPress %s wymaga MySQL 4.0.0 lub nowszego"
164
+
165
+ #. Plugin Name of an extension
166
+ msgid "DB Cache Reloaded"
167
+ msgstr "DB Cache Reloaded"
168
+
169
+ #. Plugin URI of an extension
170
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
171
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
172
+
173
+ #. Description of an extension
174
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
175
+ msgstr "Najszybsze cache dla WordPress, które buforuje zapytania do bazy danych, z prostą konfiguracją. (Wyłącz i włącz cacheowanie po aktualizacji)"
176
+
177
+ #. Author of an extension
178
+ msgid "Daniel Fruyski"
179
+ msgstr "Daniel Fruyski"
180
+
181
+ #. Author URI of an extension
182
+ msgid "http://www.poradnik-webmastera.com/"
183
+ msgstr "http://www.poradnik-webmastera.com/"
184
+
lang/db-cache-reloaded-pt_BR.mo ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-10-22 16:48+0000\n"
11
+ "PO-Revision-Date: 2009-10-22 10:24+0100\n"
12
+ "Last-Translator: calebeaires@gmail.com <calebeaires@gmail.com>\n"
13
+ "Language-Team: \n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=utf-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-Language: Português Brazil\n"
19
+ "X-Poedit-Country: BRAZIL\n"
20
+ "X-Poedit-Basepath: /home/iacopo/\n"
21
+ "X-Poedit-SourceCharset: utf-8\n"
22
+
23
+ #: db-cache-reloaded.php:109
24
+ msgid "Caching activated."
25
+ msgstr "Cache Ativado."
26
+
27
+ #: db-cache-reloaded.php:114
28
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
29
+ msgstr "O Cache não pode ser ativado, por favor, dê a permissão: <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> à pasta <u>wp-content</u>"
30
+
31
+ #: db-cache-reloaded.php:124
32
+ msgid "Caching deactivated. Cache files deleted."
33
+ msgstr "Cache Desativado. Arquivos do cache apagados."
34
+
35
+ #: db-cache-reloaded.php:170
36
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
37
+ msgstr "<!-- Gerado em {timer} segundos. Feito {queries} queries no banco de dados e {cached} queries cacheadas. Memória usada - {memory} -->"
38
+
39
+ #: db-cache-reloaded.php:189
40
+ msgid "Cache files deleted."
41
+ msgstr "Arquivos do cache apagados."
42
+
43
+ #: db-cache-reloaded.php:197
44
+ msgid "Expired cache files deleted."
45
+ msgstr "Arquivo de Cache Expirados Foram Apagados."
46
+
47
+ #: db-cache-reloaded.php:233
48
+ msgid "Settings saved."
49
+ msgstr "Configurações Salvas."
50
+
51
+ #: db-cache-reloaded.php:237
52
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
53
+ msgstr "Erro ao salvar configurações. Por favro, confira permissão <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> ao arquivo <u>config.ini</u>"
54
+
55
+ #: db-cache-reloaded.php:245
56
+ msgid "DB Cache Reloaded - Options"
57
+ msgstr "DB Cache Reloaded - Opções"
58
+
59
+ #: db-cache-reloaded.php:247
60
+ msgid "Configuration"
61
+ msgstr "Confirguração"
62
+
63
+ #: db-cache-reloaded.php:250
64
+ msgid "Enable"
65
+ msgstr "Ativado"
66
+
67
+ #: db-cache-reloaded.php:253
68
+ msgid "Expire a cached query after"
69
+ msgstr "Expirar as queries de cache posteriormente"
70
+
71
+ #: db-cache-reloaded.php:254
72
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
73
+ msgstr "minuti. <em>(Arquivos expirados são deletados automaticamente)</em>"
74
+
75
+ #: db-cache-reloaded.php:258
76
+ msgid "Additional options"
77
+ msgstr "Opções Adicionais"
78
+
79
+ #: db-cache-reloaded.php:261
80
+ msgid "Cache filter"
81
+ msgstr "Filtro de Cache"
82
+
83
+ #: db-cache-reloaded.php:262
84
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
85
+ msgstr "Não gere cache que contenha as seguintes entradas de conteúdo. Dividir filtros diferentes com '|' (Uma linha vertical, ex.: '_posts|_postmeta')"
86
+
87
+ #: db-cache-reloaded.php:265
88
+ msgid "Load stats template"
89
+ msgstr "Carregar estatística do template"
90
+
91
+ #: db-cache-reloaded.php:266
92
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
93
+ msgstr "Mostrar estatística de uso no rodapé do seu template. Para desativar esta opção, deixe-a em branco.<br/>{timer} - tempo de geração, {queries} - quantidade de querires para DB, {cached} - queries cacheadas, {memory} - memória" "
94
+
95
+ #: db-cache-reloaded.php:271
96
+ msgid "Save"
97
+ msgstr "Salvar"
98
+
99
+ #: db-cache-reloaded.php:272
100
+ msgid "Clear the cache"
101
+ msgstr "Limpar Cache"
102
+
103
+ #: db-cache-reloaded.php:273
104
+ msgid "Clear the expired cache"
105
+ msgstr "Limpar cache expirado"
106
+
107
+ #: db-module.php:1197
108
+ #, php-format
109
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
110
+ msgstr "<strong>ERRO</strong>: WordPress %s requer MySQL 4.0.0 ou superior"
111
+
112
+ #. Plugin Name of an extension
113
+ msgid "DB Cache Reloaded"
114
+ msgstr "DB Cache Reloaded"
115
+
116
+ #. Plugin URI of an extension
117
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
118
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
119
+
120
+ #. Description of an extension
121
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
122
+ msgstr "O mais rápido gerenciador de cache para Wordpress. Sistema de produção de cache com fácil configuração. (Desative e ative o cache antes/depois de atualizar)"
123
+
124
+ #. Author of an extension
125
+ msgid "Daniel Fruyski"
126
+ msgstr "Daniel Fruyski"
127
+
128
+ #. Author URI of an extension
129
+ msgid "http://www.poradnik-webmastera.com/"
130
+ msgstr "http://www.poradnik-webmastera.com/"
131
+
lang/db-cache-reloaded-pt_BR.po ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: \n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-10-22 16:48+0000\n"
11
+ "PO-Revision-Date: 2009-10-22 10:24+0100\n"
12
+ "Last-Translator: calebeaires@gmail.com <calebeaires@gmail.com>\n"
13
+ "Language-Team: \n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=utf-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-Language: Português Brazil\n"
19
+ "X-Poedit-Country: BRAZIL\n"
20
+ "X-Poedit-Basepath: /home/iacopo/\n"
21
+ "X-Poedit-SourceCharset: utf-8\n"
22
+
23
+ #: db-cache-reloaded.php:109
24
+ msgid "Caching activated."
25
+ msgstr "Cache Ativado."
26
+
27
+ #: db-cache-reloaded.php:114
28
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
29
+ msgstr "O Cache não pode ser ativado, por favor, dê a permissão: <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> à pasta <u>wp-content</u>"
30
+
31
+ #: db-cache-reloaded.php:124
32
+ msgid "Caching deactivated. Cache files deleted."
33
+ msgstr "Cache Desativado. Arquivos do cache apagados."
34
+
35
+ #: db-cache-reloaded.php:170
36
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
37
+ msgstr "<!-- Gerado em {timer} segundos. Feito {queries} queries no banco de dados e {cached} queries cacheadas. Memória usada - {memory} -->"
38
+
39
+ #: db-cache-reloaded.php:189
40
+ msgid "Cache files deleted."
41
+ msgstr "Arquivos do cache apagados."
42
+
43
+ #: db-cache-reloaded.php:197
44
+ msgid "Expired cache files deleted."
45
+ msgstr "Arquivo de Cache Expirados Foram Apagados."
46
+
47
+ #: db-cache-reloaded.php:233
48
+ msgid "Settings saved."
49
+ msgstr "Configurações Salvas."
50
+
51
+ #: db-cache-reloaded.php:237
52
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
53
+ msgstr "Erro ao salvar configurações. Por favro, confira permissão <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> ao arquivo <u>config.ini</u>"
54
+
55
+ #: db-cache-reloaded.php:245
56
+ msgid "DB Cache Reloaded - Options"
57
+ msgstr "DB Cache Reloaded - Opções"
58
+
59
+ #: db-cache-reloaded.php:247
60
+ msgid "Configuration"
61
+ msgstr "Confirguração"
62
+
63
+ #: db-cache-reloaded.php:250
64
+ msgid "Enable"
65
+ msgstr "Ativado"
66
+
67
+ #: db-cache-reloaded.php:253
68
+ msgid "Expire a cached query after"
69
+ msgstr "Expirar as queries de cache posteriormente"
70
+
71
+ #: db-cache-reloaded.php:254
72
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
73
+ msgstr "minuti. <em>(Arquivos expirados são deletados automaticamente)</em>"
74
+
75
+ #: db-cache-reloaded.php:258
76
+ msgid "Additional options"
77
+ msgstr "Opções Adicionais"
78
+
79
+ #: db-cache-reloaded.php:261
80
+ msgid "Cache filter"
81
+ msgstr "Filtro de Cache"
82
+
83
+ #: db-cache-reloaded.php:262
84
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
85
+ msgstr "Não gere cache que contenha as seguintes entradas de conteúdo. Dividir filtros diferentes com '|' (Uma linha vertical, ex.: '_posts|_postmeta')"
86
+
87
+ #: db-cache-reloaded.php:265
88
+ msgid "Load stats template"
89
+ msgstr "Carregar estatística do template"
90
+
91
+ #: db-cache-reloaded.php:266
92
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
93
+ msgstr "Mostrar estatística de uso no rodapé do seu template. Para desativar esta opção, deixe-a em branco.<br/>{timer} - tempo de geração, {queries} - quantidade de querires para DB, {cached} - queries cacheadas, {memory} - memória" "
94
+
95
+ #: db-cache-reloaded.php:271
96
+ msgid "Save"
97
+ msgstr "Salvar"
98
+
99
+ #: db-cache-reloaded.php:272
100
+ msgid "Clear the cache"
101
+ msgstr "Limpar Cache"
102
+
103
+ #: db-cache-reloaded.php:273
104
+ msgid "Clear the expired cache"
105
+ msgstr "Limpar cache expirado"
106
+
107
+ #: db-module.php:1197
108
+ #, php-format
109
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
110
+ msgstr "<strong>ERRO</strong>: WordPress %s requer MySQL 4.0.0 ou superior"
111
+
112
+ #. Plugin Name of an extension
113
+ msgid "DB Cache Reloaded"
114
+ msgstr "DB Cache Reloaded"
115
+
116
+ #. Plugin URI of an extension
117
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
118
+ msgstr "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
119
+
120
+ #. Description of an extension
121
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
122
+ msgstr "O mais rápido gerenciador de cache para Wordpress. Sistema de produção de cache com fácil configuração. (Desative e ative o cache antes/depois de atualizar)"
123
+
124
+ #. Author of an extension
125
+ msgid "Daniel Fruyski"
126
+ msgstr "Daniel Fruyski"
127
+
128
+ #. Author URI of an extension
129
+ msgid "http://www.poradnik-webmastera.com/"
130
+ msgstr "http://www.poradnik-webmastera.com/"
131
+
lang/db-cache-reloaded-tr_TR.mo ADDED
Binary file
lang/db-cache-reloaded-tr_TR.po ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: DB Cache Reloaded\n"
9
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
10
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
11
+ "PO-Revision-Date: 2010-03-27 00:11+0200\n"
12
+ "Last-Translator: Volkan <wolkanca@gmail.com>\n"
13
+ "Language-Team: Volkan YILMAZ <wolkanca@gmail.com>\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "X-Poedit-Language: Turkish\n"
18
+ "X-Poedit-Country: TURKEY\n"
19
+ "X-Poedit-SourceCharset: utf-8\n"
20
+
21
+ #: db-cache-reloaded.php:157
22
+ msgid "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin cannot work!"
23
+ msgstr "<b>DB Cache Reloaded Hata:</b> <code>wpdb</code> class yeniden tanımlanmalı, eklenti çalışmaz!"
24
+
25
+ #: db-cache-reloaded.php:160
26
+ #, php-format
27
+ msgid "Previous definition is at %s."
28
+ msgstr "Önceki tanım %s."
29
+
30
+ #: db-cache-reloaded.php:169
31
+ #, php-format
32
+ msgid "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a href=\"%s\">Options Page</a> to enable it."
33
+ msgstr "<b>DB Cache Reloaded Bilgi:</b> etkin değil. Lütfen <a href=\"%s\">Seçenekler sayfasından</a>etkinleştirin."
34
+
35
+ #: db-cache-reloaded.php:173
36
+ #, php-format
37
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching (remember to save options) and enable it again. If this will not help, please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
38
+ msgstr "<b>DB Cache Reloaded Hata:</b> DB Module (<code>wpdb</code> class) yüklenmiyor. Lütfen <a href=\"%1$s\">Ayarlar Sayfasından</a>, önbelleklemeyi kapatın (ayarları kaydetmeyi unutmayın) ve ardından tekrar etkinleştirin. Eğer işe yaramazsa manuel yükseltmeyi deneyin <a href=\"%2$s\">SSS</a>yardım alabilirsiniz."
39
+
40
+ #: db-cache-reloaded.php:186
41
+ #, php-format
42
+ msgid "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
43
+ msgstr "<b>DB Cache Reloaded Hata:</b> DB Module is not up to date (detected version %1$s instead of %2$s). In order to fix this, please open the <a href=\"%3$s\">Options Page</a>, disable caching (remember to save options) and enable it again."
44
+
45
+ #: db-cache-reloaded.php:251
46
+ msgid "Caching activated."
47
+ msgstr "Önbellek aktif."
48
+
49
+ #: db-cache-reloaded.php:255
50
+ msgid "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> folder"
51
+ msgstr "Önbellekleme aktif edilemezi. Lütfen <u>wp-content</u> klasörünün yazma izinlerini kontrol edin <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a>"
52
+
53
+ #: db-cache-reloaded.php:272
54
+ msgid "Caching deactivated. Cache files deleted."
55
+ msgstr "Önbellek devredışı. Önbelek dosyaları silindi."
56
+
57
+ #: db-cache-reloaded.php:330
58
+ msgid "<!-- Generated in {timer} seconds. Made {queries} queries to database and {cached} cached queries. Memory used - {memory} -->"
59
+ msgstr "<!-- {timer} saniyede oluşturuldu. {queries} sorgu veritabanından, {cached} sorgu önbelleğe alındı. {memory} hafıza kullanıldı -->"
60
+
61
+ #: db-cache-reloaded.php:352
62
+ msgid "Cache files deleted."
63
+ msgstr "Önbellek dosyaları temizlendi."
64
+
65
+ #: db-cache-reloaded.php:360
66
+ msgid "Expired cache files deleted."
67
+ msgstr "Süresi dolan önbellek dosyaları silindi."
68
+
69
+ #: db-cache-reloaded.php:399
70
+ msgid "Settings saved."
71
+ msgstr "Ayarlar kaydedildi."
72
+
73
+ #: db-cache-reloaded.php:403
74
+ msgid "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config.ini</u>"
75
+ msgstr "Seçenekler kaydedilemedi. Lütfen <u>config.ini</u> dosyasının yazma izinlerini kontrol edin <a href=\"http://codex.wordpress.org/Changing_File_Permissions\" target=\"blank\">chmod 755</a>"
76
+
77
+ #: db-cache-reloaded.php:411
78
+ msgid "DB Cache Reloaded - Options"
79
+ msgstr "DB Cache Reloaded - Ayarlar"
80
+
81
+ #: db-cache-reloaded.php:413
82
+ msgid "Configuration"
83
+ msgstr "Yapılandırma"
84
+
85
+ #: db-cache-reloaded.php:416
86
+ msgid "Enable"
87
+ msgstr "Etkin"
88
+
89
+ #: db-cache-reloaded.php:419
90
+ msgid "Expire a cached query after"
91
+ msgstr "Önbelleklenenin sonra süresi dolsun"
92
+
93
+ #: db-cache-reloaded.php:420
94
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
95
+ msgstr "dakika. <em>(Süresi dolan dosyaları otomatik olarak silinecek)</em>"
96
+
97
+ #: db-cache-reloaded.php:424
98
+ msgid "Additional options"
99
+ msgstr "Ek seçenekler"
100
+
101
+ #: db-cache-reloaded.php:427
102
+ msgid "Cache filter"
103
+ msgstr "Cache filitresi"
104
+
105
+ #: db-cache-reloaded.php:428
106
+ msgid "Do not cache queries that contains this input contents. Divide different filters with '|' (vertical line, e.g. '_posts|_postmeta')"
107
+ msgstr "Buradaki girişler önbelleğe alınmayacak. Farklı filitreleri '|' işareti ile bölün (dikey çizgi, örn. '_posts|_postmeta')"
108
+
109
+ #: db-cache-reloaded.php:431
110
+ msgid "Load stats template"
111
+ msgstr "İstatistik şablonu"
112
+
113
+ #: db-cache-reloaded.php:432
114
+ msgid "It shows resources usage statistics in your template footer. To disable view just leave this field empty.<br/>{timer} - generation time, {queries} - count of queries to DB, {cached} - cached queries, {memory} - memory"
115
+ msgstr "Bu istatistikleri altbilgi olarak gösterir. Devre dışı bırakmak için şablonu boş bırakın. <br/>{timer} - oluşturma süresi, {queries} - DB de yapılan sorgu, {cached} - önbelleklenen sorgu, {memory} - hafıza"
116
+
117
+ #: db-cache-reloaded.php:436
118
+ msgid "Advanced"
119
+ msgstr "İleri düzey"
120
+
121
+ #: db-cache-reloaded.php:440
122
+ msgid "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
123
+ msgstr "Wrapper Mode uses different method to load DB Module. It is less efficient (at least one query is not cached; some plugins may increase this number) and a bit slower. It allows to use DB Cache Reloaded along with incompatible plugins, which tries to load its own DB Module. You can try it if your cached query count is zero or -1."
124
+
125
+ #: db-cache-reloaded.php:443
126
+ #, php-format
127
+ msgid "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching to PHP5</a> article for information how to switch to PHP 5."
128
+ msgstr "Wrapper Modu PHP 5 sürümü ister, ve siz şu an PHP %s sürümü kullanıyorsunuz. Lütfen <a href=\"http://codex.wordpress.org/Switching_to_PHP5\" PHP5 sürümüne geçmek</a> konusuna bakarak PHP 5 sürümüne geçin."
129
+
130
+ #: db-cache-reloaded.php:449
131
+ msgid "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please disable cache first."
132
+ msgstr "Wrapper Modu <strong>Etkin</strong>. Etkinsizleştirmek çin lütfen öncelikle önbelleği etkinleştirin."
133
+
134
+ #: db-cache-reloaded.php:451
135
+ msgid "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please disable cache first."
136
+ msgstr "Wrapper Modu <strong>etkin değil</strong>. Etkinleştirmek için öncelikle önbelleği etkinsizleştirin."
137
+
138
+ #: db-cache-reloaded.php:455
139
+ msgid "Enable Wrapper Mode"
140
+ msgstr "Wrapper Modu etkin"
141
+
142
+ #: db-cache-reloaded.php:461
143
+ msgid "Save"
144
+ msgstr "Kaydet"
145
+
146
+ #: db-cache-reloaded.php:462
147
+ msgid "Clear the cache"
148
+ msgstr "Önbelleği temizle"
149
+
150
+ #: db-cache-reloaded.php:463
151
+ msgid "Clear the expired cache"
152
+ msgstr "Süresi dolan önbelleği temizle"
153
+
154
+ #: db-module-wrapper.php:265
155
+ #: db-module.php:1383
156
+ #, php-format
157
+ msgid "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> file. Please either reinstall plugin or remove <code>%s</code> file."
158
+ msgstr "<b>DB Cache Reloaded HATA:</b> <code>db-functions.php</code>dosyası içeremez. Lütfen eklentiyi kaldırın ve yeniden etkinleştirin <code>%s</code> dosyası var."
159
+
160
+ #: db-module.php:1302
161
+ #, php-format
162
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
163
+ msgstr "<strong>HATA</strong>: WordPress %s MySQL 4.0.0 ve yukarısı bir sürüm gerektirir."
164
+
165
+ #. Plugin Name of an extension
166
+ msgid "DB Cache Reloaded"
167
+ msgstr "DB Cache Reloaded"
168
+
169
+ #. Plugin URI of an extension
170
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
171
+ msgstr "http://wolkanca.com/db_cache_reloaded/"
172
+
173
+ #. Description of an extension
174
+ msgid "The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. (Disable and enable caching after update)"
175
+ msgstr "WordPress için basit yapılandırma ile veritabanı sorguları önbelleğe alan ve siteyi hızlandıran önbellek motoru. (Devre dışı bırakılabilir ve yeniden etkinleştirilebilir)"
176
+
177
+ #. Author of an extension
178
+ msgid "Daniel Fruyski"
179
+ msgstr "Volkan YILMAZ"
180
+
181
+ #. Author URI of an extension
182
+ msgid "http://www.poradnik-webmastera.com/"
183
+ msgstr "http://wolkanca.com/"
184
+
lang/db-cache-reloaded.pot ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SOME DESCRIPTIVE TITLE.
2
+ # Copyright (C) YEAR Daniel Fruyski
3
+ # This file is distributed under the same license as the PACKAGE package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
+ #
6
+ #, fuzzy
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: PACKAGE VERSION\n"
10
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/db-cache-reloaded\n"
11
+ "POT-Creation-Date: 2009-12-06 15:40+0000\n"
12
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=CHARSET\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+
19
+ #: db-cache-reloaded.php:157
20
+ msgid ""
21
+ "<b>DB Cache Reloaded Error:</b> <code>wpdb</code> class is redefined, plugin "
22
+ "cannot work!"
23
+ msgstr ""
24
+
25
+ #: db-cache-reloaded.php:160
26
+ #, php-format
27
+ msgid "Previous definition is at %s."
28
+ msgstr ""
29
+
30
+ #: db-cache-reloaded.php:169
31
+ #, php-format
32
+ msgid ""
33
+ "<b>DB Cache Reloaded Info:</b> caching is not enabled. Please go to the <a "
34
+ "href=\"%s\">Options Page</a> to enable it."
35
+ msgstr ""
36
+
37
+ #: db-cache-reloaded.php:173
38
+ #, php-format
39
+ msgid ""
40
+ "<b>DB Cache Reloaded Error:</b> DB Module (<code>wpdb</code> class) is not "
41
+ "loaded. Please open the <a href=\"%1$s\">Options Page</a>, disable caching "
42
+ "(remember to save options) and enable it again. If this will not help, "
43
+ "please check <a href=\"%2$s\">FAQ</a> how to do manual upgrade."
44
+ msgstr ""
45
+
46
+ #: db-cache-reloaded.php:186
47
+ #, php-format
48
+ msgid ""
49
+ "<b>DB Cache Reloaded Error:</b> DB Module is not up to date (detected "
50
+ "version %1$s instead of %2$s). In order to fix this, please open the <a href="
51
+ "\"%3$s\">Options Page</a>, disable caching (remember to save options) and "
52
+ "enable it again."
53
+ msgstr ""
54
+
55
+ #: db-cache-reloaded.php:251
56
+ msgid "Caching activated."
57
+ msgstr ""
58
+
59
+ #: db-cache-reloaded.php:255
60
+ msgid ""
61
+ "Caching can't be activated. Please <a href=\"http://codex.wordpress.org/"
62
+ "Changing_File_Permissions\" target=\"blank\">chmod 755</a> <u>wp-content</u> "
63
+ "folder"
64
+ msgstr ""
65
+
66
+ #: db-cache-reloaded.php:272
67
+ msgid "Caching deactivated. Cache files deleted."
68
+ msgstr ""
69
+
70
+ #: db-cache-reloaded.php:330
71
+ msgid ""
72
+ "<!-- Generated in {timer} seconds. Made {queries} queries to database and "
73
+ "{cached} cached queries. Memory used - {memory} -->"
74
+ msgstr ""
75
+
76
+ #: db-cache-reloaded.php:352
77
+ msgid "Cache files deleted."
78
+ msgstr ""
79
+
80
+ #: db-cache-reloaded.php:360
81
+ msgid "Expired cache files deleted."
82
+ msgstr ""
83
+
84
+ #: db-cache-reloaded.php:399
85
+ msgid "Settings saved."
86
+ msgstr ""
87
+
88
+ #: db-cache-reloaded.php:403
89
+ msgid ""
90
+ "Settings can't be saved. Please <a href=\"http://codex.wordpress.org/"
91
+ "Changing_File_Permissions\" target=\"blank\">chmod 755</a> file <u>config."
92
+ "ini</u>"
93
+ msgstr ""
94
+
95
+ #: db-cache-reloaded.php:411
96
+ msgid "DB Cache Reloaded - Options"
97
+ msgstr ""
98
+
99
+ #: db-cache-reloaded.php:413
100
+ msgid "Configuration"
101
+ msgstr ""
102
+
103
+ #: db-cache-reloaded.php:416
104
+ msgid "Enable"
105
+ msgstr ""
106
+
107
+ #: db-cache-reloaded.php:419
108
+ msgid "Expire a cached query after"
109
+ msgstr ""
110
+
111
+ #: db-cache-reloaded.php:420
112
+ msgid "minutes. <em>(Expired files are deleted automatically)</em>"
113
+ msgstr ""
114
+
115
+ #: db-cache-reloaded.php:424
116
+ msgid "Additional options"
117
+ msgstr ""
118
+
119
+ #: db-cache-reloaded.php:427
120
+ msgid "Cache filter"
121
+ msgstr ""
122
+
123
+ #: db-cache-reloaded.php:428
124
+ msgid ""
125
+ "Do not cache queries that contains this input contents. Divide different "
126
+ "filters with '|' (vertical line, e.g. '_posts|_postmeta')"
127
+ msgstr ""
128
+
129
+ #: db-cache-reloaded.php:431
130
+ msgid "Load stats template"
131
+ msgstr ""
132
+
133
+ #: db-cache-reloaded.php:432
134
+ msgid ""
135
+ "It shows resources usage statistics in your template footer. To disable view "
136
+ "just leave this field empty.<br/>{timer} - generation time, {queries} - "
137
+ "count of queries to DB, {cached} - cached queries, {memory} - memory"
138
+ msgstr ""
139
+
140
+ #: db-cache-reloaded.php:436
141
+ msgid "Advanced"
142
+ msgstr ""
143
+
144
+ #: db-cache-reloaded.php:440
145
+ msgid ""
146
+ "Wrapper Mode uses different method to load DB Module. It is less efficient "
147
+ "(at least one query is not cached; some plugins may increase this number) "
148
+ "and a bit slower. It allows to use DB Cache Reloaded along with incompatible "
149
+ "plugins, which tries to load its own DB Module. You can try it if your "
150
+ "cached query count is zero or -1."
151
+ msgstr ""
152
+
153
+ #: db-cache-reloaded.php:443
154
+ #, php-format
155
+ msgid ""
156
+ "Wrapper Mode requires at least PHP 5, and you are using PHP %s now. Please "
157
+ "read the <a href=\"http://codex.wordpress.org/Switching_to_PHP5\">Switching "
158
+ "to PHP5</a> article for information how to switch to PHP 5."
159
+ msgstr ""
160
+
161
+ #: db-cache-reloaded.php:449
162
+ msgid ""
163
+ "Wrapper Mode is <strong>Enabled</strong>. In order to disable it, please "
164
+ "disable cache first."
165
+ msgstr ""
166
+
167
+ #: db-cache-reloaded.php:451
168
+ msgid ""
169
+ "Wrapper Mode is <strong>Disabled</strong>. In order to enable it, please "
170
+ "disable cache first."
171
+ msgstr ""
172
+
173
+ #: db-cache-reloaded.php:455
174
+ msgid "Enable Wrapper Mode"
175
+ msgstr ""
176
+
177
+ #: db-cache-reloaded.php:461
178
+ msgid "Save"
179
+ msgstr ""
180
+
181
+ #: db-cache-reloaded.php:462
182
+ msgid "Clear the cache"
183
+ msgstr ""
184
+
185
+ #: db-cache-reloaded.php:463
186
+ msgid "Clear the expired cache"
187
+ msgstr ""
188
+
189
+ #: db-module-wrapper.php:265 db-module.php:1383
190
+ #, php-format
191
+ msgid ""
192
+ "<b>DB Cache Reloaded Error:</b> cannot include <code>db-functions.php</code> "
193
+ "file. Please either reinstall plugin or remove <code>%s</code> file."
194
+ msgstr ""
195
+
196
+ #: db-module.php:1302
197
+ #, php-format
198
+ msgid "<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher"
199
+ msgstr ""
200
+
201
+ #. Plugin Name of an extension
202
+ msgid "DB Cache Reloaded"
203
+ msgstr ""
204
+
205
+ #. Plugin URI of an extension
206
+ msgid "http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/"
207
+ msgstr ""
208
+
209
+ #. Description of an extension
210
+ msgid ""
211
+ "The fastest cache engine for WordPress, that produces cache of database "
212
+ "queries with easy configuration. (Disable and enable caching after update)"
213
+ msgstr ""
214
+
215
+ #. Author of an extension
216
+ msgid "Daniel Fruyski"
217
+ msgstr ""
218
+
219
+ #. Author URI of an extension
220
+ msgid "http://www.poradnik-webmastera.com/"
221
+ msgstr ""
readme.html ADDED
@@ -0,0 +1,188 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
5
+ <title>DB Cache Reloaded 2.2 Fix Readme</title>
6
+ </head>
7
+ <body>
8
+ <h1>DB Cache Reloaded 2.2 Fix Readme</h1>
9
+ <p>The fastest cache engine for WordPress, that produces cache of database queries with easy configuration - now with bugs fixed. And WordPress 3.1 Compatible</p>
10
+ <p><b>Plugin Homepage:</b> <a href="http://www.ivankristianto.com/web-development/programming/db-cache-reloaded-fix-for-wordpress-3-1/1784/">DB Cache Reloaded Fix</a></p>
11
+ <p><b>Plugin Homepage on WordPress.org:</b> <a href="http://wordpress.org/extend/plugins/db-cache-reloaded-fix/">DB Cache Reloaded</a></p>
12
+ <p><b>Author Homepage:</b> <a href="http://www.ivankristianto.com/">Poradnik Webmastera</a></p>
13
+ <p><b>Author:</b> Ivan Kristianto</p>
14
+ <p>&nbsp;</p>
15
+ <p><b>Original Plugin Homepage:</b> <a href="http://www.poradnik-webmastera.com/projekty/db_cache_reloaded/">DB Cache Reloaded</a></p>
16
+ <p><b>Original Plugin Homepage on WordPress.org:</b> <a href="http://wordpress.org/extend/plugins/db-cache-reloaded/">DB Cache Reloaded</a></p>
17
+ <p><b>Original Author Homepage:</b> <a href="http://www.poradnik-webmastera.com/">Poradnik Webmastera</a></p>
18
+ <p><b>Original Author:</b> Daniel Frużyński</p>
19
+
20
+ <h2>Description</h2>
21
+ <p>This plugin caches every database query with given lifetime. It is much faster than other html caching plugins and uses less disk space for caching.</p>
22
+ <p>I think you've heard of WP-Cache or WP Super Cache, they are both top plugins for WordPress, which make your site faster and responsive. Forget about them - with DB Cache Reloaded your site will work much faster and will use less disk space for cached files. Your visitors will always get actual information in sidebars and server CPU loads will be as low as possible.</p>
23
+ <p>This plugin is a fork of a DB Cache plugin. Because his author did not updated its plugin to WordPress 2.8, I finally (after almost three months since release of WP 2.8) took his plugin and updated it so now it works with newest WordPress version. Additionally I fixed few bugs, cleaned up the code and make it more secure.</p>
24
+ <p>This plugin was tested with WordPress 2.8. It may work with earlier versions too - I have not tested. If you perform such tests, let me know of the results.</p>
25
+ <p>If you are using WordPress 2.9, please use DB Cache Reloaded version 2.0 or never - versions 1.x are not compatible with WordPress 2.9.</p>
26
+ <p>If you are using WordPress 3.0, please use DB Cache Reloaded version 2.1 or never - earlier versions are not compatible with WordPress 3.0.</p>
27
+ <p>Available translations:</p>
28
+ <ul>
29
+ <li>English</li>
30
+ <li>Polish (pl_PL) - done by me</li>
31
+ <li>Italian (it_IT) - thanks Iacopo</li>
32
+ <li>Portuguese Brazilian (pt_BR) - thanks Calebe Aires</li>
33
+ <li>Belorussian (be_BY) - thanks FatCow</li>
34
+ <li>Spanish (es_ES) - thanks Dasumo</li>
35
+ <li>Dutch (nl_NL) - thanks Rene</li>
36
+ <li>Turkish (tr_TR) - thanks wolkanca</li>
37
+ <li>Japanese (jp) - thanks wokamoto</li>
38
+ <li>German (de_DE) - thanks Carsten Tauber</li>
39
+ </ul>
40
+
41
+ <h2>Installation</h2>
42
+ <ol>
43
+ <li>Upload <code>db-cache-reloaded</code> directory to the <code>/wp-content/plugins/</code> directory</li>
44
+ <li>Activate the plugin through the 'Plugins' menu in WordPress</li>
45
+ <li>Configure and enjoy :)</li>
46
+ </ol>
47
+
48
+ <h2>Frequently Asked Questions</h2>
49
+
50
+ <h3>How do I know my blog is being cached?</h3>
51
+ <p>Check your cache directory wp-content/tmp/ for cache files. Check the load statistics in footer.
52
+ Also you can set <code>DBCR_DEBUG</code> to true in wp-config.php file to display as hidden comments on your html page, what queries were loaded from cache and what from mysql.</p>
53
+ <p>You can also define <code>DBCR_SAVEQUERIES</code> in wp-config.php file - it works similarly as defining <code>SAVEQUERIES</code>, but DB Cache Reloaded adds one extra field to the <code>$wpdb->queries</code> array - boolean value indicating if query was executed directly (<code>false</code>) or loaded from cache (<code>true</code>). Of course you can also use some extra code (e.g. some plugin) do display this data.</p>
54
+
55
+ <h3>What does this plugin do?</h3>
56
+ <p>This plugin decreases count of queries to DB, which means that CPU load of your web-server decreases and your blog can serve much more visitors in one moment.</p>
57
+
58
+ <h3>What is page generation time?</h3>
59
+ <p>It is time from request to server (start of generation) and the generated page sent (end of generation). This time depends on server parameters: CPU speed, RAM size and the server load (how much requests it operates at the moment, popularity of sites hosted on the server) and of course it depends on how much program code it needs to operate for page generation.</p>
60
+ <p>Let set the fourth parameter as constant (we can't change the program code). So we have only 3: CPU, RAM and popularity.</p>
61
+ <p>If you have a powerful server (costs more) it means that will be as low as possible and it can serve for example 100 visitors in one moment without slowing down. And another server (low cost) with less CPU speed and RAM size, which can operate for example 10 visitors in one moment. So if the popularity of your site grows it is needed more time to generate the page. That's why you need to use any caching plugins to decrease the generation time.</p>
62
+
63
+ <h3>How can I ensure of reducing server usage?</h3>
64
+ <p>You can show usage statistics with your custom template in your footer.</p>
65
+ <p>Checking count of queries, ensure that other cache plugins are disabled, because you can see cached number.</p>
66
+ <p>View the source of your site page, there maybe some code like this at the foot:</p>
67
+ <p><code>&lt;!-- 00 queries. 00 seconds. --&gt;</code></p>
68
+ <p>If not, please put these codes in your footer template:</p>
69
+ <p><code>&lt;!-- &lt;?php echo get_num_queries(); ?&gt; queries. &lt;?php timer_stop(1); ?&gt; seconds. --&gt;</code></p>
70
+ <p>After using the DB Cache Reloaded, I think you'll find the number of queries reducing a lot.</p>
71
+
72
+ <h3>Why is DB Cache Reloaded better than WP Super Cache?</h3>
73
+ <p>This plugin is based on a fundamentally different principle of caching queries to database instead of full pages, which optimises WordPress from the very beginning and uses less disk space for cache files because it saves only useful information.
74
+ It saves information separately and also caches hidden requests to database.</p>
75
+ <p>Dmitry Svarytsevych analysed server load graphs of his sites and he can say that the peaks of server load are caused of search engines bots indexing your site (they load much pages practically in one moment). He has tried WP Super Cache to decrease the server loads but it was no help from it. Simply saying WP Super Cache saves any loaded page and much of these pages that are opened only once by bots. His original plugin (DB Cache) roughly saves parts of web-page (configuration, widgets, comments, content) separately, which means that once configuration is cached it will be loaded on every page.</p>
76
+ <p>Here is the Google translation of <a href="http://translate.google.com/translate?prev=&hl=uk&u=http%3A%2F%2Fwordpress.net.ua%2Fmaster%2Foptimizaciya-wordpress.html&sl=uk&tl=en">Dmitry Svarytsevych's article</a> on it.</p>
77
+
78
+ <h3>Troubleshooting</h3>
79
+ <p>Make sure wp-content is writeable by the web server. If not you'll need to chmod wp-content folder for writing.</p>
80
+
81
+ <h3>How do I uninstall DB Cache Reloaded?</h3>
82
+ <ul>
83
+ <li>Disable it at Settings-&gt;DB Cache Reloaded page. The plugin will automatically delete all cache files. If something went wrong - delete /wp-content/db.php, /wp-content/db-config.ini and /wp-content/tmp folder. While db.php file exists WordPress will use our optimised DB class instead of own.</li>
84
+ <li> Deactivate it at plugins page.</li>
85
+ </ul>
86
+
87
+ <h3>Why plugin shows -1 as number of cached queries?</h3>
88
+ <p>By default DB Cache Reloaded shows number of cached queries in hidden HTML comment in page footer. When you see -1 as a cached queries count, this means that caching is not active. Please make sure that you have enabled caching on settings page (DB Cache Reloaded also shows message in admin backend when caching is not enabled). If caching is enabled and you still see -1, this is a result of conflict with other plugin, which wants to replace default <code>wpdb</code> class with its own too. You have to disable plugins one by one until you find one which causes this conflict. If you have added custom code to your wp-config.php (or other file) in order to install plugin, please remove (or comment out) it too. When you find conflicting plugin, please notify its author about this problem.</p>
89
+ <p>You can also try to enable Wrapper Mode - it may help.</p>
90
+
91
+ <h3>Why plugin shows 0 as number of cached queries?</h3>
92
+ <p>Please check if you have enabled caching. If yes, this may indicate some problems with your plugins - check previous question (Why plugin shows -1 as number of cached queries?) for more details.</p>
93
+
94
+ <h3>What is the Wrapper Mode?</h3>
95
+ <p>When DB Cache Reloaded works in Wrapper Mode, it uses different method to load DB Module. By default plugin assumes that WordPress will be able to load wp-content/db.php. However sometimes other plugin may load wp-includes/wp-db.php file directly, or replace value of <code>$wpdb</code> variable. This usually does not allow DB Cache Reloaded to work. When you enable Wrapper Mode, DB Cache Reloaded will load a bit different DB Module, which adds caching and works as a proxy for DB Module loaded by other plugin. Depending on your plugin, everything may work smoothly, or there may be some issues.</p>
96
+ <p>Wrapper is also a bit slower then normal method, and does not cache all queries (usually one, but some plugins may increase this number). It also requires at least PHP 5 to work.</p>
97
+
98
+ <h3>I am a plugin developer. How can I make my plugin compatible with DB Cache Reloaded?</h3>
99
+ <p>DB Cache Reloaded uses default WordPress mechanism to load custom version of <code>wpdb</code> class - it creates custom wp-content/db.php file. WordPress checks if this file exists, and loads it instead of wp-includes/wp-db.php.</p>
100
+ <p>When your plugin includes this class using custom code added to wp-config.php (or any other file), please use <code>require_wp_db()</code> to do this, or use similar code to this function body.</p>
101
+ <p>When you need to modify <code>wpdb</code> class (e.g. by adding or replacing methods), consider deriving your class from the default one (using the <code>extends</code> keyword). Another option is to use aggregation - save value of <code>$wpdb</code> variable, create object of your class and assign to <code>$wpdb</code>. Your class should call methods and access member variables of this saved object, in order to keeps its functionality. Your class should also implement magic methods <code>__get</code>, <code>__set</code>, <code>__isset</code>, <code>__unset</code> and <code>__call</code> in order to forward calls for non-standard methods and properties to the aggregated class.</p>
102
+ <p>Note: when you use derivation, make sure you create object of your class very early, before queries are done. Otherwise number of queries shown in stats will be incorrect.</p>
103
+
104
+ <h3>How to move default cache directory elsewhere?</h3>
105
+ <p>By default DB Cache Reloaded saves cached queries in <code>wp-content/tmp</code> dir (or another, if you changed value of <code>WP_CONTENT_DIR</code> constant). If you want to change this location, please define <code>DBCR_CACHE_DIR</code> constant in your <code>wp-config.php</code> file - it should point to existing directory. DB Cache Reloaded will use it instead of default location.</p>
106
+
107
+ <h2>Changelog</h2>
108
+ <p>2.1</p>
109
+ <ul>
110
+ <li>Make plugin compatible with WordPress 3.0 (single site mode; multisite mode requires additional work);</li>
111
+ <li>Added Dutch translation (thanks Rene);</li>
112
+ <li>Added Turkish translation (thanks wolkanca);</li>
113
+ <li>Added Japanese translation (thanks wokamoto);</li>
114
+ <li>Added German translation (thanks Carsten Tauber);</li>
115
+ <li>Do not cache queries which use `RAND()`;</li>
116
+ <li>Fixed table filter not working all times (thanks poer for pointing this);</li>
117
+ <li>Code cleanup</li>
118
+ </ul>
119
+ <p>2.0.2</p>
120
+ <ul>
121
+ <li>Merged last WP 2.9 changes: bump required MySQL version to 4.1.2 for WP 2.9;</li>
122
+ <li>Added Spanish translation (thanks Dasumo)</li>
123
+ </ul>
124
+ <p>2.0.1</p>
125
+ <ul>
126
+ <li>Fix: WordPress plugin repository does not add hidden (.name) files to release archives - added workaround</li>
127
+ </ul>
128
+ <p>2.0</p>
129
+ <ul>
130
+ <li>Merged changes introduced in WordPress 2.9 (make sure you upgrade DB Cache Reloaded to version 2.0 before upgrading WordPress to version 2.9 - earlier plugin versions are not compatible with WP 2.9!);</li>
131
+ <li>Marked plugin as compatible with WP 2.9;</li>
132
+ <li>Added Wrapper Mode - with it DB Cache Reloaded can work with some incompatible plugins, like WP Tuner;</li>
133
+ <li>Added Belorussian translation (thanks FatCow);</li>
134
+ <li>Fix: added missing .htaccess file;</li>
135
+ <li>Fix: remove created files if plugin cannot be activated successfully</li>
136
+ </ul>
137
+ <p>1.4.2</p>
138
+ <ul>
139
+ <li>Marked as compatible with WP 2.8.5</li>
140
+ </ul>
141
+ <p>1.4.1</p>
142
+ <ul>
143
+ <li>Added Portuguese Brazilian translation (thanks Calebe Aires)</li>
144
+ </ul>
145
+ <p>1.4</p>
146
+ <ul>
147
+ <li>Show -1 as cached queries count when plugin's DB Module is not in use (e.g. because of conflict with other plugin);</li>
148
+ <li>Added check if DB Module version is in sync with plugin version (may not be if someone will upgrade plugin manually without deactivating it or disabling cache);</li>
149
+ <li>Allow to use <code>DBCR_CACHE_DIR</code> define to change default cache directory;</li>
150
+ <li>Fix: uninstall function was not executed</li>
151
+ </ul>
152
+ <p>1.3</p>
153
+ <ul>
154
+ <li>Further performance improvement;</li>
155
+ <li>Fix: changes done in admin section were not visible in frontend;</li>
156
+ <li>Added icon to use by Ozh' Admin Drop Down Menu plugin</li>
157
+ </ul>
158
+ <p>1.2</p>
159
+ <ul>
160
+ <li>Fix: queries were not cached starting from first not cached query;</li>
161
+ <li>Fix: all queries were cached in the same directory instead of dedicated subdirectories;</li>
162
+ <li>Fix: total row count calculation did not work for complex queries (usually observed as no pagination problem);</li>
163
+ <li>Added support for <code>DBCR_SAVEQUERIES</code> define to enable extended query logging (as compared to default <code>SAVEQUERIES</code> support)</li>
164
+ </ul>
165
+ <p>1.1</p>
166
+ <ul>
167
+ <li>Added Polish translation;</li>
168
+ <li>Added Italian translation (thanks Iacopo);</li>
169
+ <li>Show error in admin section when wpdb class already exists (this should not happen, but I got few reports about this);</li>
170
+ <li>Fix: do not cause fatal error when plugin is deleted manually without deactivating it first (in this case wp-content/db.php is left). Instead display error in admin section;</li>
171
+ <li>Added support for custom plugin directory;</li>
172
+ <li>Some performance improvements;</li>
173
+ <li>Show message in admin section when plugin is activated but caching is not enabled</li>
174
+ </ul>
175
+ <p>1.0.1</p>
176
+ <ul>
177
+ <li>Fix: statistics are not working</li>
178
+ </ul>
179
+ <p>1.0</p>
180
+ <ul>
181
+ <li>Took DB Cache 0.6 as a baseline;</li>
182
+ <li>Merged changes done in WordPress 2.9 for the wpdb class (this fixes annoying tags bug);</li>
183
+ <li>Cleaned up code, moved almost everything from global scope to class;</li>
184
+ <li>Secured settings page with nonces;</li>
185
+ <li>Switched to po/mo files for internationalisation</li>
186
+ </ul>
187
+ </body>
188
+ </html>
readme.txt ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === DB Cache Reloaded Fix ===
2
+ Contributors: ivankristianto
3
+ Donate link: http://www.ivankristianto.com/portfolio/
4
+ Tags: performance, caching, wp-cache, db-cache, cache
5
+ Requires at least: 2.8
6
+ Tested up to: 3.1
7
+ Stable tag: 2.2.1
8
+
9
+ The fastest cache engine for WordPress, that produces cache of database queries with easy configuration. Compatible with WordPress 3.1
10
+
11
+ == Description ==
12
+
13
+ This plugin caches every database query with given lifetime. It is much faster than other html caching plugins and uses less disk space for caching. Now compatible with WordPress 3.1.
14
+
15
+ This plugin is based on [DB Cache Reloaded](http://wordpress.org/extend/plugins/db-cache-reloaded/) by sirzooro. I patch it so it have WordPress 3.1 compatibility.
16
+
17
+ I think you've heard of [WP-Cache](http://wordpress.org/extend/plugins/wp-cache/) or [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/), they are both top plugins for WordPress, which make your site faster and responsive. Forget about them - with DB Cache Reloaded your site will work much faster and will use less disk space for cached files. Your visitors will always get actual information in sidebars and server CPU loads will be as low as possible.
18
+
19
+ This plugin is a fork of a [DB Cache](http://wordpress.org/extend/plugins/db-cache/) plugin. Because his author did not updated its plugin to WordPress 2.8, I finally (after almost three months since release of WP 2.8) took his plugin and updated it so now it works with newest WordPress version. Additionally I fixed few bugs, cleaned up the code and make it more secure.
20
+
21
+ This plugin was tested with WordPress 2.8 and never. It may work with earlier versions too - I have not tested. If you perform such tests, let me know of the results.
22
+
23
+ If you are using WordPress 2.9, please use DB Cache Reloaded version 2.0 or never - versions 1.x are not compatible with WordPress 2.9.
24
+
25
+ If you are using WordPress 3.0, please use DB Cache Reloaded version 2.1 or never - earlier versions are not compatible with WordPress 3.0.
26
+
27
+ Available translations:
28
+
29
+ * English
30
+ * Polish (pl_PL) - done by me
31
+ * Italian (it_IT) - thanks [Iacopo](http://www.iacchi.org/)
32
+ * Portuguese Brazilian (pt_BR) - thanks [Calebe Aires](http://gattune.blog.br/)
33
+ * Belorussian (be_BY) - thanks [FatCow](http://www.fatcow.com/)
34
+ * Spanish (es_ES) - thanks [Dasumo](http://www.dasumo.com/)
35
+ * Dutch (nl_NL) - thanks [Rene](http://wordpresspluginguide.com/)
36
+ * Turkish (tr_TR) - thanks [wolkanca](http://wolkanca.com/)
37
+ * Japanese (jp) - thanks wokamoto
38
+ * German (de_DE) - thanks [Carsten Tauber](http://greatsolution.de/)
39
+
40
+ [Changelog](http://wordpress.org/extend/plugins/db-cache-reloaded-fix/changelog/)
41
+
42
+ Other interesting stuff:
43
+
44
+ * Check out the my other WordPress plugins or web development [My Portfolio](http://goo.gl/OHQNc)
45
+ * Want to optimize your WordPress blog? Check out the [WordPress Optimization Article](http://goo.gl/QedtH) Guide!
46
+
47
+ == Installation ==
48
+
49
+ 1. Upload `db-cache-reloaded-fix` directory to the `/wp-content/plugins/` directory
50
+ 1. Activate the plugin through the 'Plugins' menu in WordPress
51
+ 1. Configure and enjoy :)
52
+
53
+ == Frequently Asked Questions ==
54
+
55
+ = How do I know my blog is being cached? =
56
+
57
+ Check your cache directory wp-content/tmp/ for cache files. Check the load statistics in footer.
58
+ Also you can set `DBCR_DEBUG` to true in db-cache-reloaded.php file to display as hidden comments on your html page, what queries were loaded from cache and what from mysql.
59
+
60
+ You can also define `DBCR_SAVEQUERIES` in wp-config.php file - it works similarly as defining `SAVEQUERIES`, but DB Cache Reloaded adds one extra field to the `$wpdb->queries` array - boolean value indicating if query was executed directly (`false`) or loaded from cache (`true`). Of course you can also use some extra code (e.g. some plugin) do display this data.
61
+
62
+ = What does this plugin do? =
63
+
64
+ This plugin decreases count of queries to DB, which means that CPU load of your web-server decreases and your blog can serve much more visitors in one moment.
65
+
66
+ = What is page generation time? =
67
+
68
+ It is time from request to server (start of generation) and the generated page sent (end of generation). This time depends on server parameters: CPU speed, RAM size and the server load (how much requests it operates at the moment, popularity of sites hosted on the server) and of course it depends on how much program code it needs to operate for page generation.
69
+
70
+ Let set the fourth parameter as constant (we can't change the program code). So we have only 3: CPU, RAM and popularity.
71
+
72
+ If you have a powerful server (costs more) it means that will be as low as possible and it can serve for example 100 visitors in one moment without slowing down. And another server (low cost) with less CPU speed and RAM size, which can operate for example 10 visitors in one moment. So if the popularity of your site grows it is needed more time to generate the page. That's why you need to use any caching plugins to decrease the generation time.
73
+
74
+ = How can I ensure of reducing server usage? =
75
+
76
+ You can show usage statistics with your custom template in your footer.
77
+
78
+ Checking count of queries, ensure that other cache plugins are disabled, because you can see cached number.
79
+
80
+ View the source of your site page, there maybe some code like this at the foot:
81
+
82
+ `<!-- 00 queries. 00 seconds. -->`
83
+
84
+ If not, please put these codes in your footer template:
85
+
86
+ `<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->`
87
+
88
+ After using the DB Cache Reloaded, I think you'll find the number of queries reducing a lot.
89
+
90
+ = Why is DB Cache Reloaded better than WP Super Cache? =
91
+
92
+ This plugin is based on a fundamentally different principle of caching queries to database instead of full pages, which optimises WordPress from the very beginning and uses less disk space for cache files because it saves only useful information.
93
+ It saves information separately and also caches hidden requests to database.
94
+
95
+ Dmitry Svarytsevych analysed server load graphs of his sites and he can say that the peaks of server load are caused of search engines bots indexing your site (they load much pages practically in one moment). He has tried WP Super Cache to decrease the server loads but it was no help from it. Simply saying WP Super Cache saves any loaded page and much of these pages that are opened only once by bots. His original plugin (DB Cache) roughly saves parts of web-page (configuration, widgets, comments, content) separately, which means that once configuration is cached it will be loaded on every page.
96
+
97
+ Here is the Google translation of [Dmitry Svarytsevych's article](http://translate.google.com/translate?prev=&hl=uk&u=http%3A%2F%2Fwordpress.net.ua%2Fmaster%2Foptimizaciya-wordpress.html&sl=uk&tl=en) on it.
98
+
99
+ = Troubleshooting =
100
+
101
+ Make sure wp-content is writeable by the web server. If not you'll need to [chmod](http://codex.wordpress.org/Changing_File_Permissions) wp-content folder for writing.
102
+
103
+ = How do I uninstall DB Cache Reloaded? =
104
+
105
+ 1. Disable it at Settings->DB Cache Reloaded page. The plugin will automatically delete all cache files. If something went wrong - delete /wp-content/db.php, /wp-content/db-config.ini and /wp-content/tmp folder manually. When wp-content/db.php file exists, WordPress will use our optimised DB class instead of its own.
106
+ 1. Deactivate it at plugins page.
107
+
108
+ = Why plugin shows -1 as number of cached queries? =
109
+
110
+ By default DB Cache Reloaded shows number of cached queries in hidden HTML comment in page footer. When you see -1 as a cached queries count, this means that caching is not active. Please make sure that you have enabled caching on settings page (DB Cache Reloaded also shows message in admin backend when caching is not enabled). If caching is enabled and you still see -1, this is a result of conflict with other plugin, which wants to replace default `wpdb` class with its own too. You have to disable plugins one by one until you find one which causes this conflict. If you have added custom code to your wp-config.php (or other file) in order to install plugin, please remove (or comment out) it too. When you find conflicting plugin, please notify its author about this problem.
111
+
112
+ You can also try to enable Wrapper Mode - it may help.
113
+
114
+ = Why plugin shows 0 as number of cached queries? =
115
+
116
+ Please check if you have enabled caching. If yes, this may indicate some problems with your plugins - check previous question (Why plugin shows -1 as number of cached queries?) for more details.
117
+
118
+ = What is the Wrapper Mode? =
119
+
120
+ When DB Cache Reloaded works in Wrapper Mode, it uses different method to load DB Module. By default plugin assumes that WordPress will be able to load wp-content/db.php. However sometimes other plugin may load wp-includes/wp-db.php file directly, or replace value of `$wpdb` variable. This usually does not allow DB Cache Reloaded to work. When you enable Wrapper Mode, DB Cache Reloaded will load a bit different DB Module, which adds caching and works as a proxy for DB Module loaded by other plugin. Depending on your plugin, everything may work smoothly, or there may be some issues.
121
+
122
+ Wrapper is also a bit slower then normal method, and does not cache all queries (usually one, but some plugins may increase this number). It also requires at least PHP 5 to work.
123
+
124
+ = I am a plugin developer. How can I make my plugin compatible with DB Cache Reloaded? =
125
+
126
+ DB Cache Reloaded uses default WordPress mechanism to load custom version of `wpdb` class - it creates custom wp-content/db.php file. WordPress checks if this file exists, and loads it instead of wp-includes/wp-db.php.
127
+
128
+ When your plugin includes this class using custom code added to wp-config.php (or any other file), please use `require_wp_db()` to do this, or use similar code to this function body.
129
+
130
+ When you need to modify `wpdb` class (e.g. by adding or replacing methods), consider deriving your class from the default one (using the `extends` keyword). Another option is to use aggregation - save value of `$wpdb` variable, create object of your class and assign to `$wpdb`. Your class should call methods and access member variables of this saved object, in order to keeps its functionality. Your class should also implement magic methods `__get`, `__set`, `__isset`, `__unset` and `__call`.
131
+
132
+ Note: when you use derivation, make sure you create object of your class very early, before queries are done. Otherwise number of queries shown in stats will be incorrect.
133
+
134
+ = How to move default cache directory elsewhere? =
135
+
136
+ By default DB Cache Reloaded saves cached queries in `wp-content/tmp dir` (or another, if you changed value of `WP_CONTENT_DIR` constant). If you want to change this location, please define `DBCR_CACHE_DIR` constant in your `wp-config.php` file - it should point to existing directory. DB Cache Reloaded will use it instead of default location.
137
+
138
+ == Changelog ==
139
+
140
+ = 2.2.1 =
141
+ * Fix an error in db.php wrong path in DBCR_PATH thanks to Christian for remind me.
142
+
143
+ = 2.2 =
144
+ * Now compatible with WordPress 3.1
145
+
146
+ = 2.1 =
147
+ * Make plugin compatible with WordPress 3.0 (single site mode; multisite mode requires additional work);
148
+ * Added Dutch translation (thanks Rene);
149
+ * Added Turkish translation (thanks wolkanca);
150
+ * Added Japanese translation (thanks wokamoto);
151
+ * Added German translation (thanks Carsten Tauber);
152
+ * Do not cache queries which use `RAND()`;
153
+ * Fixed table filter not working all times (thanks poer for pointing this);
154
+ * Code cleanup
155
+
156
+ = 2.0.2 =
157
+ * Merged last WP 2.9 changes: bump required MySQL version to 4.1.2 for WP 2.9;
158
+ * Added Spanish translation (thanks Dasumo)
159
+
160
+ = 2.0.1 =
161
+ * Fix: WordPress plugin repository does not add hidden (.name) files to release archives - added workaround
162
+
163
+ = 2.0 =
164
+ * Merged changes introduced in WordPress 2.9 (make sure you upgrade DB Cache Reloaded to version 2.0 before upgrading WordPress to version 2.9 - earlier plugin versions are not compatible with WP 2.9!);
165
+ * Marked plugin as compatible with WP 2.9;
166
+ * Added Wrapper Mode - with it DB Cache Reloaded can work with some incompatible plugins, like WP Tuner;
167
+ * Added Belorussian translation (thanks FatCow);
168
+ * Fix: added missing .htaccess file;
169
+ * Fix: remove created files if plugin cannot be activated successfully
170
+
171
+ = 1.4.2 =
172
+ * Marked as compatible with WP 2.8.5
173
+
174
+ = 1.4.1 =
175
+ * Added Portuguese Brazilian translation (thanks Calebe Aires)
176
+
177
+ = 1.4 =
178
+ * Show -1 as cached queries count when plugin's DB Module is not in use (e.g. because of conflict with other plugin);
179
+ * Added check if DB Module version is in sync with plugin version (may not be if someone will upgrade plugin manually without deactivating it or disabling cache);
180
+ * Allow to use `DBCR_CACHE_DIR` define to change default cache directory;
181
+ * Fix: uninstall function was not executed
182
+
183
+ = 1.3 =
184
+ * Further performance improvement;
185
+ * Fix: changes done in admin section were not visible in frontend;
186
+ * Added icon to use by Ozh' Admin Drop Down Menu plugin
187
+
188
+ = 1.2 =
189
+ * Fix: queries were not cached starting from first not cached query;
190
+ * Fix: all queries were cached in the same directory instead of dedicated subdirectories;
191
+ * Fix: total row count calculation did not work for complex queries (usually observed as no pagination problem);
192
+ * Added support for `DBCR_SAVEQUERIES` define to enable extended query logging (as compared to default `SAVEQUERIES` support)
193
+
194
+ = 1.1 =
195
+ * Added Polish translation;
196
+ * Added Italian translation (thanks Iacopo);
197
+ * Show error in admin section when wpdb class already exists (this should not happen, but I got few reports about this);
198
+ * Fix: do not cause fatal error when plugin is deleted manually without deactivating it first (in this case wp-content/db.php is left). Instead display error in admin section;
199
+ * Added support for custom plugin directory;
200
+ * Some performance improvements;
201
+ * Show message in admin section when plugin is activated but caching is not enabled
202
+
203
+ = 1.0.1 =
204
+ * Fix: statistics are not working
205
+
206
+ = 1.0 =
207
+ * Took [DB Cache 0.6](http://wordpress.org/extend/plugins/db-cache/) as a baseline;
208
+ * Merged changes done in WordPress 2.9 for the wpdb class (this fixes annoying tags bug);
209
+ * Cleaned up code, moved almost everything from global scope to class;
210
+ * Secured settings page with nonces;
211
+ * Switched to po/mo files for internationalisation
212
+
213
+ == Upgrade Notice ==
214
+
215
+ Upgrade to this plugin to make your DB cache reloaded working with WordPress 3.1