WP-DB-Backup - Version 2.4

Version Description

  • Compatibility with PHP 8 and WordPress 5.7
  • Fix email backup functionality
  • Fix for bug where backup file would be gzipped twice
  • Fixes for several PHP notices
  • Add DBBWP_ prefix to global constants
Download this release

Release Info

Developer deliciousbrains
Plugin Icon 128x128 WP-DB-Backup
Version 2.4
Comparing to
See all releases

Code changes from version 2.3.3 to 2.4

Files changed (37) hide show
  1. README.markdown → README.md +26 -24
  2. assets/css/style.css +45 -0
  3. wp-db-backup-ar.mo → languages/wp-db-backup-ar.mo +0 -0
  4. wp-db-backup-ar.po → languages/wp-db-backup-ar.po +0 -0
  5. wp-db-backup-ca.mo → languages/wp-db-backup-ca.mo +0 -0
  6. wp-db-backup-ca.po → languages/wp-db-backup-ca.po +412 -412
  7. wp-db-backup-de_DE.mo → languages/wp-db-backup-de_DE.mo +0 -0
  8. wp-db-backup-de_DE.po → languages/wp-db-backup-de_DE.po +0 -0
  9. wp-db-backup-el.mo → languages/wp-db-backup-el.mo +0 -0
  10. wp-db-backup-el.po → languages/wp-db-backup-el.po +0 -0
  11. wp-db-backup-es_ES.mo → languages/wp-db-backup-es_ES.mo +0 -0
  12. wp-db-backup-es_ES.po → languages/wp-db-backup-es_ES.po +411 -411
  13. wp-db-backup-fa_IR.mo → languages/wp-db-backup-fa_IR.mo +0 -0
  14. wp-db-backup-fa_IR.po → languages/wp-db-backup-fa_IR.po +395 -395
  15. wp-db-backup-fr_FR.mo → languages/wp-db-backup-fr_FR.mo +0 -0
  16. wp-db-backup-fr_FR.po → languages/wp-db-backup-fr_FR.po +0 -0
  17. wp-db-backup-it_IT.mo → languages/wp-db-backup-it_IT.mo +0 -0
  18. wp-db-backup-it_IT.po → languages/wp-db-backup-it_IT.po +0 -0
  19. wp-db-backup-ja.mo → languages/wp-db-backup-ja.mo +0 -0
  20. wp-db-backup-ja.po → languages/wp-db-backup-ja.po +0 -0
  21. wp-db-backup-ko_KR.mo → languages/wp-db-backup-ko_KR.mo +0 -0
  22. wp-db-backup-ko_KR.po → languages/wp-db-backup-ko_KR.po +0 -0
  23. wp-db-backup-nb_NO.mo → languages/wp-db-backup-nb_NO.mo +0 -0
  24. wp-db-backup-nb_NO.po → languages/wp-db-backup-nb_NO.po +0 -0
  25. wp-db-backup-pt_BR.mo → languages/wp-db-backup-pt_BR.mo +0 -0
  26. wp-db-backup-pt_BR.po → languages/wp-db-backup-pt_BR.po +0 -0
  27. wp-db-backup-ru_RU.mo → languages/wp-db-backup-ru_RU.mo +0 -0
  28. wp-db-backup-ru_RU.po → languages/wp-db-backup-ru_RU.po +0 -0
  29. wp-db-backup-sv_SE.mo → languages/wp-db-backup-sv_SE.mo +0 -0
  30. wp-db-backup-sv_SE.po → languages/wp-db-backup-sv_SE.po +0 -0
  31. wp-db-backup-tr_TR.mo → languages/wp-db-backup-tr_TR.mo +0 -0
  32. wp-db-backup-tr_TR.po → languages/wp-db-backup-tr_TR.po +0 -0
  33. wp-db-backup-zh_CN.mo → languages/wp-db-backup-zh_CN.mo +0 -0
  34. wp-db-backup-zh_CN.po → languages/wp-db-backup-zh_CN.po +397 -397
  35. wp-db-backup.pot → languages/wp-db-backup.pot +0 -0
  36. readme.txt +27 -26
  37. wp-db-backup.php +910 -775
README.markdown → README.md RENAMED
@@ -1,12 +1,12 @@
1
- WP-DB-Backup
2
  ============
3
 
4
- Contributors: filosofo
5
- Donate link: http://austinmatzko.com/wordpress-plugins/wp-db-backup/
6
  Tags: mysql, database, backup, cron
7
  Requires at least: 3.6.0
8
- Tested up to: 4.9.2
9
- Stable tag: 2.3.3
 
10
 
11
  On-demand backup of your WordPress database.
12
 
@@ -16,13 +16,8 @@ Description
16
  WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
17
 
18
  Released under the terms of the GNU GPL, version 2.
19
- http://www.fsf.org/licensing/licenses/gpl.html
20
 
21
- NO WARRANTY.
22
-
23
- Copyright (c) 2018 Austin Matzko
24
-
25
- [Source Code on GitHub](https://github.com/matzko/wp-db-backup)
26
 
27
  Installation
28
  ------------
@@ -50,32 +45,31 @@ My backup stops or hangs without completing.
50
  If you edit the text of wp-db-backup.php in a text editor like Notepad, you’ll see around line 50 the following:
51
 
52
  `/**
53
- * Set MOD_EVASIVE_OVERRIDE to true
54
- * and increase MOD_EVASIVE_DELAY
55
  * if the backup stops prematurely.
56
  */
57
- // define('MOD_EVASIVE_OVERRIDE', false);
58
- define('MOD_EVASIVE_DELAY', '500');`
59
 
60
- Do what it says: un-comment MOD_EVASIVE_OVERRIDE and set it to true like so:
61
 
62
- `define('MOD_EVASIVE_OVERRIDE', true);`
63
 
64
- That will slow down the plugin, and you can slow it even further by increasing the MOD_EVASIVE_DELAY number from 500.
65
 
66
- Better yet, put the lines that define the `MOD_EVASIVE_OVERRIDE` and `MOD_EVASIVE_DELAY` constants in your wp-config.php file, so your settings don't get erased when you upgrade the plugin.
67
 
68
  What is wp-db-backup.pot for?
69
  -----------------------------
70
 
71
- This files is used by non-English users to translate the display into their native language. Translators are encouraged to send me translated files, which will be made available to others here:
72
- http://austinmatzko.com/wordpress-plugins/wp-db-backup/i18n/
73
  http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/
74
 
75
  Why are only the core database files backed up by default?
76
  ----------------------------------------------------------
77
 
78
- Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
79
 
80
  Usage
81
  -----
@@ -107,7 +101,15 @@ When having the database backup emailed or sent to your browser for immediate do
107
  Changelog
108
  ---------
109
 
110
- 2.3.0
 
 
 
 
 
 
 
 
111
  -----
112
  * Remove backup directory use
113
 
@@ -179,4 +181,4 @@ Thanks to following people for providing translation files for WP-DB-Backup:
179
 
180
  Past Contributors
181
  -----------------
182
- skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
1
+ Database Backup for WordPress
2
  ============
3
 
4
+ Contributors: deliciousbrains
 
5
  Tags: mysql, database, backup, cron
6
  Requires at least: 3.6.0
7
+ Tested up to: 5.7
8
+ Stable tag: 2.4
9
+ Requires PHP: 5.3
10
 
11
  On-demand backup of your WordPress database.
12
 
16
  WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
17
 
18
  Released under the terms of the GNU GPL, version 2.
 
19
 
20
+ [Source Code on GitHub](https://github.com/deliciousbrains/wp-db-backup)
 
 
 
 
21
 
22
  Installation
23
  ------------
45
  If you edit the text of wp-db-backup.php in a text editor like Notepad, you’ll see around line 50 the following:
46
 
47
  `/**
48
+ * Set DBBWP_MOD_EVASIVE_OVERRIDE to true
49
+ * and increase DBBWP_MOD_EVASIVE_DELAY
50
  * if the backup stops prematurely.
51
  */
52
+ // define('DBBWP_MOD_EVASIVE_OVERRIDE', false);
53
+ define('DBBWP_MOD_EVASIVE_DELAY', '500');`
54
 
55
+ Do what it says: un-comment DBBWP_MOD_EVASIVE_OVERRIDE and set it to true like so:
56
 
57
+ `define('DBBWP_MOD_EVASIVE_OVERRIDE', true);`
58
 
59
+ That will slow down the plugin, and you can slow it even further by increasing the DBBWP_MOD_EVASIVE_DELAY number from 500.
60
 
61
+ Better yet, put the lines that define the `DBBWP_MOD_EVASIVE_OVERRIDE` and `DBBWP_MOD_EVASIVE_DELAY` constants in your wp-config.php file, so your settings don't get erased when you upgrade the plugin.
62
 
63
  What is wp-db-backup.pot for?
64
  -----------------------------
65
 
66
+ This files is used by non-English users to translate the display into their native language. Translators are encouraged to submit translated files, which will be made available to others here:
 
67
  http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/
68
 
69
  Why are only the core database files backed up by default?
70
  ----------------------------------------------------------
71
 
72
+ Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
73
 
74
  Usage
75
  -----
101
  Changelog
102
  ---------
103
 
104
+ 2.4
105
+ -----
106
+ * Compatibility with PHP 8 and WordPress 5.7
107
+ * Fix email backup functionality
108
+ * Fix for bug where backup file would be gzipped twice
109
+ * Fixes for several PHP notices
110
+ * Add `DBBWP_` prefix to global constants
111
+
112
+ 2.3
113
  -----
114
  * Remove backup directory use
115
 
181
 
182
  Past Contributors
183
  -----------------
184
+ filosofo, skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
assets/css/style.css ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wp-db-backup-updated {
2
+ margin-top: 1em;
3
+ }
4
+
5
+ fieldset.options {
6
+ border: 1px solid;
7
+ margin-top: 1em;
8
+ padding: 1em;
9
+ -moz-border-radius: 8px;
10
+ -khtml-border-radius: 8px;
11
+ -webkit-border-top-left-radius: 8px;
12
+ -webkit-border-top-right-radius: 8px;
13
+ -webkit-border-bottom-left-radius: 8px;
14
+ -webkit-border-bottom-right-radius: 8px;
15
+ border-radius: 8px;
16
+ }
17
+ fieldset.options div.tables-list {
18
+ float: left;
19
+ padding: 1em;
20
+ }
21
+
22
+ fieldset.options input {
23
+ }
24
+
25
+ fieldset.options legend {
26
+ font-size: larger;
27
+ font-weight: bold;
28
+ margin-bottom: .5em;
29
+ padding: 1em;
30
+ }
31
+
32
+ fieldset.options .instructions {
33
+ font-size: smaller;
34
+ }
35
+
36
+ fieldset.options ul {
37
+ list-style-type: none;
38
+ }
39
+ fieldset.options li {
40
+ text-align: left;
41
+ }
42
+
43
+ fieldset.options .submit {
44
+ border-top: none;
45
+ }
wp-db-backup-ar.mo → languages/wp-db-backup-ar.mo RENAMED
File without changes
wp-db-backup-ar.po → languages/wp-db-backup-ar.po RENAMED
File without changes
wp-db-backup-ca.mo → languages/wp-db-backup-ca.mo RENAMED
File without changes
wp-db-backup-ca.po → languages/wp-db-backup-ca.po RENAMED
@@ -1,412 +1,412 @@
1
- # WP-DB-Backup
2
- # Copyright (C) 2009 Austin Matzko
3
- # This file is distributed under the GPL 2 license.
4
- #
5
- msgid ""
6
- msgstr ""
7
- "Project-Id-Version: wp-db-backup 2.2.2\n"
8
- "Report-Msgid-Bugs-To: \n"
9
- "POT-Creation-Date: 2008-08-15 11:00-0500\n"
10
- "PO-Revision-Date: 2009-03-13 13:41+0100\n"
11
- "Last-Translator: Robert Buj <rbuj@wanadoo.es>\n"
12
- "Language-Team: GrumpyWolf <daniel@grumpywolf.net>\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "X-Poedit-Language: Catalan\n"
17
- "X-Poedit-Country: SPAIN\n"
18
- "X-Poedit-SourceCharset: utf-8\n"
19
-
20
- #: wp-db-backup.php:181
21
- msgid "Backup Complete!"
22
- msgstr "Còpia de seguretat completada"
23
-
24
- #: wp-db-backup.php:211
25
- msgid "Progress"
26
- msgstr "Procrés"
27
-
28
- #: wp-db-backup.php:213
29
- msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
30
- msgstr "NO FAGI RES D'AIXÓ DOCNS INTERROMPRÀ LA CÒPIA DE SEGURETAT:"
31
-
32
- #: wp-db-backup.php:216
33
- msgid "Close this browser"
34
- msgstr "Tancar aquest navegador"
35
-
36
- #: wp-db-backup.php:217
37
- msgid "Reload this page"
38
- msgstr "Recarregar aquesta pàgina"
39
-
40
- #: wp-db-backup.php:218
41
- msgid "Click the Stop or Back buttons in your browser"
42
- msgstr "Premer els botons Detindre o Enrera en el navegador"
43
-
44
- #: wp-db-backup.php:220
45
- msgid "Progress:"
46
- msgstr "Procés:"
47
-
48
- #: wp-db-backup.php:229
49
- msgid "Navigating away from this page will cause your backup to fail."
50
- msgstr "Sortir d'aquesta pàgina pot produïr un error en la teva còpia de seguretat."
51
-
52
- #: wp-db-backup.php:266
53
- #, php-format
54
- msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
55
- msgstr "Còpia de seguretat acabada, preparant la <a href=\\\"%s\\\">còpia de seguretat</a> per a descarregar-la..."
56
-
57
- #: wp-db-backup.php:273
58
- #, php-format
59
- msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
60
- msgstr "Còpia de seguretat acabada, enviant <a href=\\\"%s\\\">còpia de seguretat</a> per e-mail..."
61
-
62
- #: wp-db-backup.php:280
63
- #, php-format
64
- msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
65
- msgstr "Còpia de seguretat acabada. descarregueu-la <a href=\\\"%s\\\">aquí</a>."
66
-
67
- #: wp-db-backup.php:340
68
- msgid "Creating backup file..."
69
- msgstr "Creant còpia de seguretat..."
70
-
71
- #: wp-db-backup.php:343
72
- #, php-format
73
- msgid "Finished backing up table \\\"%s\\\"."
74
- msgstr "Ha finalitzat la còpia de la taula \\\"%s\\\"."
75
-
76
- #: wp-db-backup.php:345
77
- #, php-format
78
- msgid "Backing up table \\\"%s\\\"..."
79
- msgstr "Creant còpia de seguretat de la taula \\\"%s\\\"..."
80
-
81
- #: wp-db-backup.php:352
82
- #: wp-db-backup.php:835
83
- msgid "Could not open the backup file for writing!"
84
- msgstr "No s'ha pogut escriure al ftxer de còpia de seguretat!"
85
-
86
- #: wp-db-backup.php:353
87
- msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
88
- msgstr "El fitxer de còpia de seguretat no es pot desar. Si us plau, comproveu els permisos d'escriptura al directori de còpies de seguretat i torneu-ho a provar."
89
-
90
- #: wp-db-backup.php:358
91
- #: wp-db-backup.php:844
92
- msgid "WordPress MySQL database backup"
93
- msgstr "Còpia de seguretat de la base de dades MySQL de WordPress"
94
-
95
- #: wp-db-backup.php:360
96
- #: wp-db-backup.php:846
97
- #, php-format
98
- msgid "Generated: %s"
99
- msgstr "Generat: %s"
100
-
101
- #: wp-db-backup.php:361
102
- #: wp-db-backup.php:847
103
- #, php-format
104
- msgid "Hostname: %s"
105
- msgstr "Nom d'equip: %s"
106
-
107
- #: wp-db-backup.php:362
108
- #: wp-db-backup.php:848
109
- #, php-format
110
- msgid "Database: %s"
111
- msgstr "Base de dades: %s"
112
-
113
- #: wp-db-backup.php:370
114
- #: wp-db-backup.php:861
115
- #, php-format
116
- msgid "Table: %s"
117
- msgstr "Taula: %s"
118
-
119
- #: wp-db-backup.php:377
120
- msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
121
- msgstr "No se pot escriure al directori de còpies de seguretat. Si us plau, comprova els permisos corresponents i torna-ho a provar."
122
-
123
- #: wp-db-backup.php:434
124
- msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
125
- msgstr "Cliqueu i tingueu presionat <code>[SHIFT]</code> per a múltiples seleccions"
126
-
127
- #: wp-db-backup.php:474
128
- msgid "Change"
129
- msgstr "Canviar"
130
-
131
- #: wp-db-backup.php:483
132
- msgid "Save"
133
- msgstr "Desar"
134
-
135
- #: wp-db-backup.php:566
136
- #: wp-db-backup.php:571
137
- #: wp-db-backup.php:1126
138
- msgid "Backup"
139
- msgstr "Còpia de seguretat"
140
-
141
- #: wp-db-backup.php:646
142
- #: wp-db-backup.php:649
143
- msgid "There was an error writing a line to the backup script:"
144
- msgstr "S'ha produït un error a l'escriure una línia al script de còpies de seguretat:"
145
-
146
- #: wp-db-backup.php:681
147
- msgid "Subsequent errors have been omitted from this log."
148
- msgstr "Els següents errors s'han omès en aquest log."
149
-
150
- #: wp-db-backup.php:715
151
- msgid "Error getting table details"
152
- msgstr "Error a l'obtindre els detalls de la taula"
153
-
154
- #: wp-db-backup.php:723
155
- #, php-format
156
- msgid "Delete any existing table %s"
157
- msgstr "Esborrar qualsevol taula existent %s"
158
-
159
- #: wp-db-backup.php:732
160
- #, php-format
161
- msgid "Table structure of table %s"
162
- msgstr "Taula d'estructura de la taula %s"
163
-
164
- #: wp-db-backup.php:738
165
- #, php-format
166
- msgid "Error with SHOW CREATE TABLE for %s."
167
- msgstr "Error amb SHOW CREATE TABLE per a %s."
168
-
169
- #: wp-db-backup.php:745
170
- #, php-format
171
- msgid "Error getting table structure of %s"
172
- msgstr "Error a l'obtindre l'estructura de la taula de %s"
173
-
174
- #: wp-db-backup.php:753
175
- #, php-format
176
- msgid "Data contents of table %s"
177
- msgstr "Dades contingudes a la taula %s"
178
-
179
- #: wp-db-backup.php:823
180
- #, php-format
181
- msgid "End of data contents of table %s"
182
- msgstr "Fí de dades contingudes a la taula %s"
183
-
184
- #: wp-db-backup.php:839
185
- msgid "The backup directory is not writeable!"
186
- msgstr "No es pot escriure al directori de còpies de seguretat!"
187
-
188
- #: wp-db-backup.php:974
189
- #, php-format
190
- msgid "File not found:%s"
191
- msgstr "Fitxer no trobat: %s"
192
-
193
- #: wp-db-backup.php:974
194
- msgid "Return to Backup"
195
- msgstr "Tornar a la còpia de seguretat"
196
-
197
- #: wp-db-backup.php:983
198
- #, php-format
199
- msgid "File %s does not exist!"
200
- msgstr "El fictxer %s no existeix!"
201
-
202
- #: wp-db-backup.php:990
203
- #, php-format
204
- msgid ""
205
- "Attached to this email is\n"
206
- " %1s\n"
207
- " Size:%2s kilobytes\n"
208
- msgstr ""
209
- "Aquest e-mail porta un adjunt\n"
210
- " %1s\n"
211
- " Tamay:%2s kilobytes\n"
212
-
213
- #: wp-db-backup.php:991
214
- msgid "Database Backup"
215
- msgstr "Còpia de seguretat de la base de dades"
216
-
217
- #: wp-db-backup.php:994
218
- #: wp-db-backup.php:1041
219
- msgid "The following errors were reported:"
220
- msgstr "S'han detectat els següents errors:"
221
-
222
- #: wp-db-backup.php:999
223
- msgid "ERROR: The mail application has failed to deliver the backup."
224
- msgstr "ERROR: El programa d'enviament del correo amb la còpia de seguretat ha fallat."
225
-
226
- #: wp-db-backup.php:1016
227
- msgid "Backup Successful"
228
- msgstr "Còpia de seguretat finalitzada"
229
-
230
- #: wp-db-backup.php:1020
231
- #, php-format
232
- msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
233
- msgstr "La vostra còpia de seguretat: <a href=\"%1s\">%2s</a> començarà a descarregar-se en un moment."
234
-
235
- #: wp-db-backup.php:1028
236
- #, php-format
237
- msgid "Your backup has been emailed to %s"
238
- msgstr "S'ha enviat la còpia de seguretat a la direcció %s"
239
-
240
- #: wp-db-backup.php:1031
241
- msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
242
- msgstr "S'ha desat al servidor la vostra còpia de seguretat. Si voleu descarregar-la ara, cliqueu amb el botó dret i seleccioneu \"Desar com\""
243
-
244
- #: wp-db-backup.php:1032
245
- #, php-format
246
- msgid "%s bytes"
247
- msgstr "%s bytes"
248
-
249
- #: wp-db-backup.php:1068
250
- msgid "Scheduled Backup Options Saved!"
251
- msgstr "S'han desat les opcions de còpia de seguretat programada."
252
-
253
- #: wp-db-backup.php:1095
254
- msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
255
- msgstr "AVÍS: El vostre directori de còpies de seguretat <strong>NO</strong> existeix, i no puc crear-lo."
256
-
257
- #: wp-db-backup.php:1096
258
- #, php-format
259
- msgid "Using your FTP client, try to create the backup directory yourself: %s"
260
- msgstr "Utilitzant el vostre client FTP, intenti crear vosté mateix el directori de còpies de seguretat: %s"
261
-
262
- #: wp-db-backup.php:1100
263
- #: wp-db-backup.php:1111
264
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
265
- msgstr "AVÍS: <strong>NO</strong> es pot escriure al vostre directori de còpies de seguretat! No s'ha pogut crear els fitxers de còpia de seguretat."
266
-
267
- #: wp-db-backup.php:1101
268
- #, php-format
269
- msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
270
- msgstr "Utilitzant el vostre client FTP, intenteu donar permisos d'escriptura al directori&rsquo;s a %1$s o %2$s: %3$s"
271
-
272
- #: wp-db-backup.php:1113
273
- msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
274
- msgstr "Aquest problema sembla esta provocat pel vostre servidor&rsquo;s <code>safe_mode</code> file owner restrictions, que limita els fitxers que poden crear aplicacions web com per exemple WordPress."
275
-
276
- #: wp-db-backup.php:1115
277
- #, php-format
278
- msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
279
- msgstr "Po intentar de corretgir aquest problema utilitzant el cliente FTP per eliminar i tornar a crear el directori de còpia de seguretat: %s"
280
-
281
- #: wp-db-backup.php:1129
282
- msgid "Tables"
283
- msgstr "Taules"
284
-
285
- #: wp-db-backup.php:1131
286
- msgid "These core WordPress tables will always be backed up:"
287
- msgstr "Sempre es copiaran aquestes taules bàsiques de WordPress:"
288
-
289
- #: wp-db-backup.php:1136
290
- msgid "Exclude spam comments"
291
- msgstr "Excluir comentaris SPAM"
292
-
293
- #: wp-db-backup.php:1139
294
- msgid "Exclude post revisions"
295
- msgstr "Excluir revisions d'entrades"
296
-
297
- #: wp-db-backup.php:1150
298
- msgid "You may choose to include any of the following tables:"
299
- msgstr "Ademés podeu incluir qualsevol de les següents taules:"
300
-
301
- #: wp-db-backup.php:1164
302
- msgid "Backup Options"
303
- msgstr "Opcions de la còpia de seguretat"
304
-
305
- #: wp-db-backup.php:1165
306
- msgid "What to do with the backup file:"
307
- msgstr "Que voleu fer amb el fitxer de còpies de seguretat:"
308
-
309
- #: wp-db-backup.php:1169
310
- msgid "Save to server"
311
- msgstr "Desar al servidor"
312
-
313
- #: wp-db-backup.php:1174
314
- msgid "Download to your computer"
315
- msgstr "Descarregar al vostre ordinador"
316
-
317
- #: wp-db-backup.php:1178
318
- #: wp-db-backup.php:1235
319
- msgid "Email backup to:"
320
- msgstr "Enviar còpia de seguretat per e-mail a:"
321
-
322
- #: wp-db-backup.php:1185
323
- msgid "Backup now!"
324
- msgstr "fer ara una còpia de seguretat!"
325
-
326
- #: wp-db-backup.php:1188
327
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
328
- msgstr "AVÍS: ¡<strong>NO</strong> es pot escriure al directori de còpies de seguretat!"
329
-
330
- #: wp-db-backup.php:1199
331
- msgid "Scheduled Backup"
332
- msgstr "Còpia de seguretat programada"
333
-
334
- #: wp-db-backup.php:1206
335
- #, php-format
336
- msgid "Next Backup: %s"
337
- msgstr "Pròxima còpia de seguretat: %s"
338
-
339
- #: wp-db-backup.php:1211
340
- #, php-format
341
- msgid "Last WP-Cron Daily Execution: %s"
342
- msgstr "Última execució diaria de WP-Cron: %s"
343
-
344
- #: wp-db-backup.php:1212
345
- #, php-format
346
- msgid "Next WP-Cron Daily Execution: %s"
347
- msgstr "Próxima execució diaria de WP-Cron: %s"
348
-
349
- #: wp-db-backup.php:1217
350
- msgid "Schedule: "
351
- msgstr "Programar:"
352
-
353
- #: wp-db-backup.php:1220
354
- msgid "None"
355
- msgstr "Cap"
356
-
357
- #: wp-db-backup.php:1220
358
- msgid "Daily"
359
- msgstr "Diaria"
360
-
361
- #: wp-db-backup.php:1243
362
- msgid "Tables to include in the scheduled backup:"
363
- msgstr "Taules a incloure en la còpia de seguretat programada:"
364
-
365
- #: wp-db-backup.php:1253
366
- msgid "Schedule backup"
367
- msgstr "Còpia de seguretat programada"
368
-
369
- #: wp-db-backup.php:1278
370
- msgid "Never"
371
- msgstr "Mai"
372
-
373
- #: wp-db-backup.php:1283
374
- #, php-format
375
- msgid "%s seconds"
376
- msgstr "%s segons"
377
-
378
- #: wp-db-backup.php:1316
379
- msgid "Once Weekly"
380
- msgstr "Una cop per setmana"
381
-
382
- #: wp-db-backup.php:1329
383
- #, php-format
384
- msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
385
- msgstr "La vostra versió de WordPress, %1s, careix d'importants característiques de seguretat sense les quals no és segur l'ús del plugin WP-DB-Backup. Per aixó, aquest plugin ha estat automáticament deshabilitatat. Si us plau, considereu <a href=\"%2s\">actualitzar WordPress</a> a una versió més recent."
386
-
387
- #: wp-db-backup.php:1347
388
- msgid "You are not allowed to perform backups."
389
- msgstr "No teniu permisos per a realitzar còpies de seguretat."
390
-
391
- #: wp-db-backup.php:1362
392
- #, php-format
393
- msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
394
- msgstr "Sembla se que hi ha hagut un intent no autoritzat des d'aquest lloc per accedir a la vostra base de dades localitzada a %1s. Aquest intent ha estat neutralitzat."
395
-
396
- #: wp-db-backup.php:1373
397
- msgid "Cheatin' uh ?"
398
- msgstr "Trampes eh?"
399
-
400
- #~ msgid ""
401
- #~ "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We "
402
- #~ "can not create the backup directory."
403
- #~ msgstr ""
404
- #~ "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio wp-"
405
- #~ "content! No se ha podido crear el directorio para las copias de respaldo."
406
- #~ msgid "Select all"
407
- #~ msgstr "Seleccionar todas"
408
- #~ msgid "Select none"
409
- #~ msgstr "No seleccionar ninguna"
410
- #~ msgid "Submit"
411
- #~ msgstr "Enviar"
412
-
1
+ # WP-DB-Backup
2
+ # Copyright (C) 2009 Austin Matzko
3
+ # This file is distributed under the GPL 2 license.
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: wp-db-backup 2.2.2\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2008-08-15 11:00-0500\n"
10
+ "PO-Revision-Date: 2009-03-13 13:41+0100\n"
11
+ "Last-Translator: Robert Buj <rbuj@wanadoo.es>\n"
12
+ "Language-Team: GrumpyWolf <daniel@grumpywolf.net>\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Poedit-Language: Catalan\n"
17
+ "X-Poedit-Country: SPAIN\n"
18
+ "X-Poedit-SourceCharset: utf-8\n"
19
+
20
+ #: wp-db-backup.php:181
21
+ msgid "Backup Complete!"
22
+ msgstr "Còpia de seguretat completada"
23
+
24
+ #: wp-db-backup.php:211
25
+ msgid "Progress"
26
+ msgstr "Procrés"
27
+
28
+ #: wp-db-backup.php:213
29
+ msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
30
+ msgstr "NO FAGI RES D'AIXÓ DOCNS INTERROMPRÀ LA CÒPIA DE SEGURETAT:"
31
+
32
+ #: wp-db-backup.php:216
33
+ msgid "Close this browser"
34
+ msgstr "Tancar aquest navegador"
35
+
36
+ #: wp-db-backup.php:217
37
+ msgid "Reload this page"
38
+ msgstr "Recarregar aquesta pàgina"
39
+
40
+ #: wp-db-backup.php:218
41
+ msgid "Click the Stop or Back buttons in your browser"
42
+ msgstr "Premer els botons Detindre o Enrera en el navegador"
43
+
44
+ #: wp-db-backup.php:220
45
+ msgid "Progress:"
46
+ msgstr "Procés:"
47
+
48
+ #: wp-db-backup.php:229
49
+ msgid "Navigating away from this page will cause your backup to fail."
50
+ msgstr "Sortir d'aquesta pàgina pot produïr un error en la teva còpia de seguretat."
51
+
52
+ #: wp-db-backup.php:266
53
+ #, php-format
54
+ msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
55
+ msgstr "Còpia de seguretat acabada, preparant la <a href=\\\"%s\\\">còpia de seguretat</a> per a descarregar-la..."
56
+
57
+ #: wp-db-backup.php:273
58
+ #, php-format
59
+ msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
60
+ msgstr "Còpia de seguretat acabada, enviant <a href=\\\"%s\\\">còpia de seguretat</a> per e-mail..."
61
+
62
+ #: wp-db-backup.php:280
63
+ #, php-format
64
+ msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
65
+ msgstr "Còpia de seguretat acabada. descarregueu-la <a href=\\\"%s\\\">aquí</a>."
66
+
67
+ #: wp-db-backup.php:340
68
+ msgid "Creating backup file..."
69
+ msgstr "Creant còpia de seguretat..."
70
+
71
+ #: wp-db-backup.php:343
72
+ #, php-format
73
+ msgid "Finished backing up table \\\"%s\\\"."
74
+ msgstr "Ha finalitzat la còpia de la taula \\\"%s\\\"."
75
+
76
+ #: wp-db-backup.php:345
77
+ #, php-format
78
+ msgid "Backing up table \\\"%s\\\"..."
79
+ msgstr "Creant còpia de seguretat de la taula \\\"%s\\\"..."
80
+
81
+ #: wp-db-backup.php:352
82
+ #: wp-db-backup.php:835
83
+ msgid "Could not open the backup file for writing!"
84
+ msgstr "No s'ha pogut escriure al ftxer de còpia de seguretat!"
85
+
86
+ #: wp-db-backup.php:353
87
+ msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
88
+ msgstr "El fitxer de còpia de seguretat no es pot desar. Si us plau, comproveu els permisos d'escriptura al directori de còpies de seguretat i torneu-ho a provar."
89
+
90
+ #: wp-db-backup.php:358
91
+ #: wp-db-backup.php:844
92
+ msgid "WordPress MySQL database backup"
93
+ msgstr "Còpia de seguretat de la base de dades MySQL de WordPress"
94
+
95
+ #: wp-db-backup.php:360
96
+ #: wp-db-backup.php:846
97
+ #, php-format
98
+ msgid "Generated: %s"
99
+ msgstr "Generat: %s"
100
+
101
+ #: wp-db-backup.php:361
102
+ #: wp-db-backup.php:847
103
+ #, php-format
104
+ msgid "Hostname: %s"
105
+ msgstr "Nom d'equip: %s"
106
+
107
+ #: wp-db-backup.php:362
108
+ #: wp-db-backup.php:848
109
+ #, php-format
110
+ msgid "Database: %s"
111
+ msgstr "Base de dades: %s"
112
+
113
+ #: wp-db-backup.php:370
114
+ #: wp-db-backup.php:861
115
+ #, php-format
116
+ msgid "Table: %s"
117
+ msgstr "Taula: %s"
118
+
119
+ #: wp-db-backup.php:377
120
+ msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
121
+ msgstr "No se pot escriure al directori de còpies de seguretat. Si us plau, comprova els permisos corresponents i torna-ho a provar."
122
+
123
+ #: wp-db-backup.php:434
124
+ msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
125
+ msgstr "Cliqueu i tingueu presionat <code>[SHIFT]</code> per a múltiples seleccions"
126
+
127
+ #: wp-db-backup.php:474
128
+ msgid "Change"
129
+ msgstr "Canviar"
130
+
131
+ #: wp-db-backup.php:483
132
+ msgid "Save"
133
+ msgstr "Desar"
134
+
135
+ #: wp-db-backup.php:566
136
+ #: wp-db-backup.php:571
137
+ #: wp-db-backup.php:1126
138
+ msgid "Backup"
139
+ msgstr "Còpia de seguretat"
140
+
141
+ #: wp-db-backup.php:646
142
+ #: wp-db-backup.php:649
143
+ msgid "There was an error writing a line to the backup script:"
144
+ msgstr "S'ha produït un error a l'escriure una línia al script de còpies de seguretat:"
145
+
146
+ #: wp-db-backup.php:681
147
+ msgid "Subsequent errors have been omitted from this log."
148
+ msgstr "Els següents errors s'han omès en aquest log."
149
+
150
+ #: wp-db-backup.php:715
151
+ msgid "Error getting table details"
152
+ msgstr "Error a l'obtindre els detalls de la taula"
153
+
154
+ #: wp-db-backup.php:723
155
+ #, php-format
156
+ msgid "Delete any existing table %s"
157
+ msgstr "Esborrar qualsevol taula existent %s"
158
+
159
+ #: wp-db-backup.php:732
160
+ #, php-format
161
+ msgid "Table structure of table %s"
162
+ msgstr "Taula d'estructura de la taula %s"
163
+
164
+ #: wp-db-backup.php:738
165
+ #, php-format
166
+ msgid "Error with SHOW CREATE TABLE for %s."
167
+ msgstr "Error amb SHOW CREATE TABLE per a %s."
168
+
169
+ #: wp-db-backup.php:745
170
+ #, php-format
171
+ msgid "Error getting table structure of %s"
172
+ msgstr "Error a l'obtindre l'estructura de la taula de %s"
173
+
174
+ #: wp-db-backup.php:753
175
+ #, php-format
176
+ msgid "Data contents of table %s"
177
+ msgstr "Dades contingudes a la taula %s"
178
+
179
+ #: wp-db-backup.php:823
180
+ #, php-format
181
+ msgid "End of data contents of table %s"
182
+ msgstr "Fí de dades contingudes a la taula %s"
183
+
184
+ #: wp-db-backup.php:839
185
+ msgid "The backup directory is not writeable!"
186
+ msgstr "No es pot escriure al directori de còpies de seguretat!"
187
+
188
+ #: wp-db-backup.php:974
189
+ #, php-format
190
+ msgid "File not found:%s"
191
+ msgstr "Fitxer no trobat: %s"
192
+
193
+ #: wp-db-backup.php:974
194
+ msgid "Return to Backup"
195
+ msgstr "Tornar a la còpia de seguretat"
196
+
197
+ #: wp-db-backup.php:983
198
+ #, php-format
199
+ msgid "File %s does not exist!"
200
+ msgstr "El fictxer %s no existeix!"
201
+
202
+ #: wp-db-backup.php:990
203
+ #, php-format
204
+ msgid ""
205
+ "Attached to this email is\n"
206
+ " %1s\n"
207
+ " Size:%2s kilobytes\n"
208
+ msgstr ""
209
+ "Aquest e-mail porta un adjunt\n"
210
+ " %1s\n"
211
+ " Tamay:%2s kilobytes\n"
212
+
213
+ #: wp-db-backup.php:991
214
+ msgid "Database Backup"
215
+ msgstr "Còpia de seguretat de la base de dades"
216
+
217
+ #: wp-db-backup.php:994
218
+ #: wp-db-backup.php:1041
219
+ msgid "The following errors were reported:"
220
+ msgstr "S'han detectat els següents errors:"
221
+
222
+ #: wp-db-backup.php:999
223
+ msgid "ERROR: The mail application has failed to deliver the backup."
224
+ msgstr "ERROR: El programa d'enviament del correo amb la còpia de seguretat ha fallat."
225
+
226
+ #: wp-db-backup.php:1016
227
+ msgid "Backup Successful"
228
+ msgstr "Còpia de seguretat finalitzada"
229
+
230
+ #: wp-db-backup.php:1020
231
+ #, php-format
232
+ msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
233
+ msgstr "La vostra còpia de seguretat: <a href=\"%1s\">%2s</a> començarà a descarregar-se en un moment."
234
+
235
+ #: wp-db-backup.php:1028
236
+ #, php-format
237
+ msgid "Your backup has been emailed to %s"
238
+ msgstr "S'ha enviat la còpia de seguretat a la direcció %s"
239
+
240
+ #: wp-db-backup.php:1031
241
+ msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
242
+ msgstr "S'ha desat al servidor la vostra còpia de seguretat. Si voleu descarregar-la ara, cliqueu amb el botó dret i seleccioneu \"Desar com\""
243
+
244
+ #: wp-db-backup.php:1032
245
+ #, php-format
246
+ msgid "%s bytes"
247
+ msgstr "%s bytes"
248
+
249
+ #: wp-db-backup.php:1068
250
+ msgid "Scheduled Backup Options Saved!"
251
+ msgstr "S'han desat les opcions de còpia de seguretat programada."
252
+
253
+ #: wp-db-backup.php:1095
254
+ msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
255
+ msgstr "AVÍS: El vostre directori de còpies de seguretat <strong>NO</strong> existeix, i no puc crear-lo."
256
+
257
+ #: wp-db-backup.php:1096
258
+ #, php-format
259
+ msgid "Using your FTP client, try to create the backup directory yourself: %s"
260
+ msgstr "Utilitzant el vostre client FTP, intenti crear vosté mateix el directori de còpies de seguretat: %s"
261
+
262
+ #: wp-db-backup.php:1100
263
+ #: wp-db-backup.php:1111
264
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
265
+ msgstr "AVÍS: <strong>NO</strong> es pot escriure al vostre directori de còpies de seguretat! No s'ha pogut crear els fitxers de còpia de seguretat."
266
+
267
+ #: wp-db-backup.php:1101
268
+ #, php-format
269
+ msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
270
+ msgstr "Utilitzant el vostre client FTP, intenteu donar permisos d'escriptura al directori&rsquo;s a %1$s o %2$s: %3$s"
271
+
272
+ #: wp-db-backup.php:1113
273
+ msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
274
+ msgstr "Aquest problema sembla esta provocat pel vostre servidor&rsquo;s <code>safe_mode</code> file owner restrictions, que limita els fitxers que poden crear aplicacions web com per exemple WordPress."
275
+
276
+ #: wp-db-backup.php:1115
277
+ #, php-format
278
+ msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
279
+ msgstr "Po intentar de corretgir aquest problema utilitzant el cliente FTP per eliminar i tornar a crear el directori de còpia de seguretat: %s"
280
+
281
+ #: wp-db-backup.php:1129
282
+ msgid "Tables"
283
+ msgstr "Taules"
284
+
285
+ #: wp-db-backup.php:1131
286
+ msgid "These core WordPress tables will always be backed up:"
287
+ msgstr "Sempre es copiaran aquestes taules bàsiques de WordPress:"
288
+
289
+ #: wp-db-backup.php:1136
290
+ msgid "Exclude spam comments"
291
+ msgstr "Excluir comentaris SPAM"
292
+
293
+ #: wp-db-backup.php:1139
294
+ msgid "Exclude post revisions"
295
+ msgstr "Excluir revisions d'entrades"
296
+
297
+ #: wp-db-backup.php:1150
298
+ msgid "You may choose to include any of the following tables:"
299
+ msgstr "Ademés podeu incluir qualsevol de les següents taules:"
300
+
301
+ #: wp-db-backup.php:1164
302
+ msgid "Backup Options"
303
+ msgstr "Opcions de la còpia de seguretat"
304
+
305
+ #: wp-db-backup.php:1165
306
+ msgid "What to do with the backup file:"
307
+ msgstr "Que voleu fer amb el fitxer de còpies de seguretat:"
308
+
309
+ #: wp-db-backup.php:1169
310
+ msgid "Save to server"
311
+ msgstr "Desar al servidor"
312
+
313
+ #: wp-db-backup.php:1174
314
+ msgid "Download to your computer"
315
+ msgstr "Descarregar al vostre ordinador"
316
+
317
+ #: wp-db-backup.php:1178
318
+ #: wp-db-backup.php:1235
319
+ msgid "Email backup to:"
320
+ msgstr "Enviar còpia de seguretat per e-mail a:"
321
+
322
+ #: wp-db-backup.php:1185
323
+ msgid "Backup now!"
324
+ msgstr "fer ara una còpia de seguretat!"
325
+
326
+ #: wp-db-backup.php:1188
327
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
328
+ msgstr "AVÍS: ¡<strong>NO</strong> es pot escriure al directori de còpies de seguretat!"
329
+
330
+ #: wp-db-backup.php:1199
331
+ msgid "Scheduled Backup"
332
+ msgstr "Còpia de seguretat programada"
333
+
334
+ #: wp-db-backup.php:1206
335
+ #, php-format
336
+ msgid "Next Backup: %s"
337
+ msgstr "Pròxima còpia de seguretat: %s"
338
+
339
+ #: wp-db-backup.php:1211
340
+ #, php-format
341
+ msgid "Last WP-Cron Daily Execution: %s"
342
+ msgstr "Última execució diaria de WP-Cron: %s"
343
+
344
+ #: wp-db-backup.php:1212
345
+ #, php-format
346
+ msgid "Next WP-Cron Daily Execution: %s"
347
+ msgstr "Próxima execució diaria de WP-Cron: %s"
348
+
349
+ #: wp-db-backup.php:1217
350
+ msgid "Schedule: "
351
+ msgstr "Programar:"
352
+
353
+ #: wp-db-backup.php:1220
354
+ msgid "None"
355
+ msgstr "Cap"
356
+
357
+ #: wp-db-backup.php:1220
358
+ msgid "Daily"
359
+ msgstr "Diaria"
360
+
361
+ #: wp-db-backup.php:1243
362
+ msgid "Tables to include in the scheduled backup:"
363
+ msgstr "Taules a incloure en la còpia de seguretat programada:"
364
+
365
+ #: wp-db-backup.php:1253
366
+ msgid "Schedule backup"
367
+ msgstr "Còpia de seguretat programada"
368
+
369
+ #: wp-db-backup.php:1278
370
+ msgid "Never"
371
+ msgstr "Mai"
372
+
373
+ #: wp-db-backup.php:1283
374
+ #, php-format
375
+ msgid "%s seconds"
376
+ msgstr "%s segons"
377
+
378
+ #: wp-db-backup.php:1316
379
+ msgid "Once Weekly"
380
+ msgstr "Una cop per setmana"
381
+
382
+ #: wp-db-backup.php:1329
383
+ #, php-format
384
+ msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
385
+ msgstr "La vostra versió de WordPress, %1s, careix d'importants característiques de seguretat sense les quals no és segur l'ús del plugin WP-DB-Backup. Per aixó, aquest plugin ha estat automáticament deshabilitatat. Si us plau, considereu <a href=\"%2s\">actualitzar WordPress</a> a una versió més recent."
386
+
387
+ #: wp-db-backup.php:1347
388
+ msgid "You are not allowed to perform backups."
389
+ msgstr "No teniu permisos per a realitzar còpies de seguretat."
390
+
391
+ #: wp-db-backup.php:1362
392
+ #, php-format
393
+ msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
394
+ msgstr "Sembla se que hi ha hagut un intent no autoritzat des d'aquest lloc per accedir a la vostra base de dades localitzada a %1s. Aquest intent ha estat neutralitzat."
395
+
396
+ #: wp-db-backup.php:1373
397
+ msgid "Cheatin' uh ?"
398
+ msgstr "Trampes eh?"
399
+
400
+ #~ msgid ""
401
+ #~ "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We "
402
+ #~ "can not create the backup directory."
403
+ #~ msgstr ""
404
+ #~ "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio wp-"
405
+ #~ "content! No se ha podido crear el directorio para las copias de respaldo."
406
+ #~ msgid "Select all"
407
+ #~ msgstr "Seleccionar todas"
408
+ #~ msgid "Select none"
409
+ #~ msgstr "No seleccionar ninguna"
410
+ #~ msgid "Submit"
411
+ #~ msgstr "Enviar"
412
+
wp-db-backup-de_DE.mo → languages/wp-db-backup-de_DE.mo RENAMED
File without changes
wp-db-backup-de_DE.po → languages/wp-db-backup-de_DE.po RENAMED
File without changes
wp-db-backup-el.mo → languages/wp-db-backup-el.mo RENAMED
File without changes
wp-db-backup-el.po → languages/wp-db-backup-el.po RENAMED
File without changes
wp-db-backup-es_ES.mo → languages/wp-db-backup-es_ES.mo RENAMED
File without changes
wp-db-backup-es_ES.po → languages/wp-db-backup-es_ES.po RENAMED
@@ -1,411 +1,411 @@
1
- # WP-DB-Backup
2
- # Copyright (C) 2009 Austin Matzko
3
- # This file is distributed under the GPL 2 license.
4
- #
5
- msgid ""
6
- msgstr ""
7
- "Project-Id-Version: wp-db-backup 2.2.2\n"
8
- "Report-Msgid-Bugs-To: \n"
9
- "POT-Creation-Date: 2008-08-15 11:00-0500\n"
10
- "PO-Revision-Date: 2009-01-19 12:52+0100\n"
11
- "Last-Translator: Alejandro Urrutia <alejandro@theindependentproject.com>\n"
12
- "Language-Team: GrumpyWolf <daniel@grumpywolf.net>\n"
13
- "MIME-Version: 1.0\n"
14
- "Content-Type: text/plain; charset=UTF-8\n"
15
- "Content-Transfer-Encoding: 8bit\n"
16
- "X-Poedit-Language: Spanish\n"
17
- "X-Poedit-Country: SPAIN\n"
18
-
19
- #: wp-db-backup.php:181
20
- msgid "Backup Complete!"
21
- msgstr "Copia de respaldo completada"
22
-
23
- #: wp-db-backup.php:211
24
- msgid "Progress"
25
- msgstr "Progreso"
26
-
27
- #: wp-db-backup.php:213
28
- msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
29
- msgstr "NO HAGA NADA DE ESTO, PUES INTERRUMPIRÁ LA COPIA DE RESPALDO:"
30
-
31
- #: wp-db-backup.php:216
32
- msgid "Close this browser"
33
- msgstr "Cerrar este navegador"
34
-
35
- #: wp-db-backup.php:217
36
- msgid "Reload this page"
37
- msgstr "Recargar/actualizar esta página"
38
-
39
- #: wp-db-backup.php:218
40
- msgid "Click the Stop or Back buttons in your browser"
41
- msgstr "Pulsar los botones Detener o Atrás en el navegador"
42
-
43
- #: wp-db-backup.php:220
44
- msgid "Progress:"
45
- msgstr "Progreso:"
46
-
47
- #: wp-db-backup.php:229
48
- msgid "Navigating away from this page will cause your backup to fail."
49
- msgstr "Salir de esta página puede causar un fallo en tu respaldo."
50
-
51
- #: wp-db-backup.php:266
52
- #, php-format
53
- msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
54
- msgstr "Copia terminada, preparando la <a href=\\\"%s\\\">copia de respaldo</a> para descargar..."
55
-
56
- #: wp-db-backup.php:273
57
- #, php-format
58
- msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
59
- msgstr "Copia terminada, enviando <a href=\\\"%s\\\">copia de respaldo</a> por e-mail..."
60
-
61
- #: wp-db-backup.php:280
62
- #, php-format
63
- msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
64
- msgstr "Copia terminada, descárguela <a href=\\\"%s\\\">aquí</a>."
65
-
66
- #: wp-db-backup.php:340
67
- msgid "Creating backup file..."
68
- msgstr "eando copia de respaldo..."
69
-
70
- #: wp-db-backup.php:343
71
- #, php-format
72
- msgid "Finished backing up table \\\"%s\\\"."
73
- msgstr "Se terminó de copiar la tabla \\\"%s\\\"."
74
-
75
- #: wp-db-backup.php:345
76
- #, php-format
77
- msgid "Backing up table \\\"%s\\\"..."
78
- msgstr "Copiando tabla \\\"%s\\\"..."
79
-
80
- #: wp-db-backup.php:352
81
- #: wp-db-backup.php:835
82
- msgid "Could not open the backup file for writing!"
83
- msgstr "No se pudo escribir en el archivo de respaldo"
84
-
85
- #: wp-db-backup.php:353
86
- msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
87
- msgstr "El archivo de respaldo no se puede grabar. Por favor, revisa los permisos de escritura el en el directorio de copias de respaldo e inténtalo de nuevo."
88
-
89
- #: wp-db-backup.php:358
90
- #: wp-db-backup.php:844
91
- msgid "WordPress MySQL database backup"
92
- msgstr "Copia de respaldo de la base de datos MySQL de WordPress"
93
-
94
- #: wp-db-backup.php:360
95
- #: wp-db-backup.php:846
96
- #, php-format
97
- msgid "Generated: %s"
98
- msgstr "Generated: %s"
99
-
100
- #: wp-db-backup.php:361
101
- #: wp-db-backup.php:847
102
- #, php-format
103
- msgid "Hostname: %s"
104
- msgstr "Hostname: %s"
105
-
106
- #: wp-db-backup.php:362
107
- #: wp-db-backup.php:848
108
- #, php-format
109
- msgid "Database: %s"
110
- msgstr "Base de datos: %s"
111
-
112
- #: wp-db-backup.php:370
113
- #: wp-db-backup.php:861
114
- #, php-format
115
- msgid "Table: %s"
116
- msgstr "Tabla: %s"
117
-
118
- #: wp-db-backup.php:377
119
- msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
120
- msgstr "No se puede escribir en el directorio de copias de respaldo. Por favor, revisa los permisos correspondientes e inténtalo de nuevo."
121
-
122
- #: wp-db-backup.php:434
123
- msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
124
- msgstr "haz clic y mantiene <code>[SHIFT]</code> para múltiples selecciones"
125
-
126
- #: wp-db-backup.php:474
127
- msgid "Change"
128
- msgstr "Cambiar"
129
-
130
- #: wp-db-backup.php:483
131
- msgid "Save"
132
- msgstr "Salvar"
133
-
134
- #: wp-db-backup.php:566
135
- #: wp-db-backup.php:571
136
- #: wp-db-backup.php:1126
137
- msgid "Backup"
138
- msgstr "Copia de respaldo"
139
-
140
- #: wp-db-backup.php:646
141
- #: wp-db-backup.php:649
142
- msgid "There was an error writing a line to the backup script:"
143
- msgstr "Hubo un error al escribir una línea en el script de respaldo:"
144
-
145
- #: wp-db-backup.php:681
146
- msgid "Subsequent errors have been omitted from this log."
147
- msgstr "Los errores posteriores se han omitido en este log."
148
-
149
- #: wp-db-backup.php:715
150
- msgid "Error getting table details"
151
- msgstr "Error al obtener los detalles de la tabla"
152
-
153
- #: wp-db-backup.php:723
154
- #, php-format
155
- msgid "Delete any existing table %s"
156
- msgstr "Delete any existing table %s"
157
-
158
- #: wp-db-backup.php:732
159
- #, php-format
160
- msgid "Table structure of table %s"
161
- msgstr "Estructura de la tabla %s"
162
-
163
- #: wp-db-backup.php:738
164
- #, php-format
165
- msgid "Error with SHOW CREATE TABLE for %s."
166
- msgstr "Error con SHOW CREATE TABLE para %s."
167
-
168
- #: wp-db-backup.php:745
169
- #, php-format
170
- msgid "Error getting table structure of %s"
171
- msgstr "Error al obtener la estructura de tabla de %s"
172
-
173
- #: wp-db-backup.php:753
174
- #, php-format
175
- msgid "Data contents of table %s"
176
- msgstr "Datos contenidos en la tabla %s"
177
-
178
- #: wp-db-backup.php:823
179
- #, php-format
180
- msgid "End of data contents of table %s"
181
- msgstr "Fin de datos contenidos en la tabla %s"
182
-
183
- #: wp-db-backup.php:839
184
- msgid "The backup directory is not writeable!"
185
- msgstr "¡No se puede escribir en el directorio de copias de respaldo!"
186
-
187
- #: wp-db-backup.php:974
188
- #, php-format
189
- msgid "File not found:%s"
190
- msgstr "No se encontró el archivo: %s"
191
-
192
- #: wp-db-backup.php:974
193
- msgid "Return to Backup"
194
- msgstr "Volver a Copia de respaldo"
195
-
196
- #: wp-db-backup.php:983
197
- #, php-format
198
- msgid "File %s does not exist!"
199
- msgstr "¡El fichero %s no existe!"
200
-
201
- #: wp-db-backup.php:990
202
- #, php-format
203
- msgid ""
204
- "Attached to this email is\n"
205
- " %1s\n"
206
- " Size:%2s kilobytes\n"
207
- msgstr ""
208
- "Este e-mail lleva adjunto el archivo\n"
209
- " %1s\n"
210
- " Tamaño:%2s kilobytes\n"
211
-
212
- #: wp-db-backup.php:991
213
- msgid "Database Backup"
214
- msgstr "Respaldo de base de datos"
215
-
216
- #: wp-db-backup.php:994
217
- #: wp-db-backup.php:1041
218
- msgid "The following errors were reported:"
219
- msgstr "Se han detectado los siguientes errores:"
220
-
221
- #: wp-db-backup.php:999
222
- msgid "ERROR: The mail application has failed to deliver the backup."
223
- msgstr "ERROR: el programa de correo ha fallado al enviar la copia de respaldo."
224
-
225
- #: wp-db-backup.php:1016
226
- msgid "Backup Successful"
227
- msgstr "Copia de respaldo completada"
228
-
229
- #: wp-db-backup.php:1020
230
- #, php-format
231
- msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
232
- msgstr "Su copia de respaldo: <a href=\"%1s\">%2s</a> comenzará a descargarse en un momento."
233
-
234
- #: wp-db-backup.php:1028
235
- #, php-format
236
- msgid "Your backup has been emailed to %s"
237
- msgstr "Se ha enviado la copia de respaldo a la dirección %s"
238
-
239
- #: wp-db-backup.php:1031
240
- msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
241
- msgstr "Se ha guardado en el servidor su copia de respaldo. Si desea descargarla ahora, haga clic con el botón derecho y seleccione \"Guardar como\""
242
-
243
- #: wp-db-backup.php:1032
244
- #, php-format
245
- msgid "%s bytes"
246
- msgstr "%s bytes"
247
-
248
- #: wp-db-backup.php:1068
249
- msgid "Scheduled Backup Options Saved!"
250
- msgstr "Se han guardado las opciones de Respaldo programado."
251
-
252
- #: wp-db-backup.php:1095
253
- msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
254
- msgstr "AVISO: ¡Tu directorio de respaldo <strong>NO</strong> existe, y no podemos crearlo."
255
-
256
- #: wp-db-backup.php:1096
257
- #, php-format
258
- msgid "Using your FTP client, try to create the backup directory yourself: %s"
259
- msgstr "Usando tu cliente FTP, intenta crear tu directorio de respaldo: %s"
260
-
261
- #: wp-db-backup.php:1100
262
- #: wp-db-backup.php:1111
263
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
264
- msgstr "AVISO: ¡Tu directorio de respaldo <strong>NO</strong> puede ser escrito! No podemos crear los ficheros de respaldo."
265
-
266
- #: wp-db-backup.php:1101
267
- #, php-format
268
- msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
269
- msgstr "Usando tu cliente FTP, intenta crear permisos de escritura para directorio&rsquo;s a %1$s or %2$s: %3$s"
270
-
271
- #: wp-db-backup.php:1113
272
- msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
273
- msgstr "Este problema parece ser causado por tu servidor&rsquo;s <code>safe_mode</code> file owner restrictions, que limita lo que pueden hacer aplicaciones web como WordPress."
274
-
275
- #: wp-db-backup.php:1115
276
- #, php-format
277
- msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
278
- msgstr "Puede tratar de corregir este problema utilizando el cliente FTP para borrar y volver a crear el directorio de copia de seguridad: %s"
279
-
280
- #: wp-db-backup.php:1129
281
- msgid "Tables"
282
- msgstr "Tablas"
283
-
284
- #: wp-db-backup.php:1131
285
- msgid "These core WordPress tables will always be backed up:"
286
- msgstr "Siempre se copiarán estas tablas básicas de WordPress:"
287
-
288
- #: wp-db-backup.php:1136
289
- msgid "Exclude spam comments"
290
- msgstr "Excluir comentarios de SPAM"
291
-
292
- #: wp-db-backup.php:1139
293
- msgid "Exclude post revisions"
294
- msgstr "Excluir revisiones de entradas"
295
-
296
- #: wp-db-backup.php:1150
297
- msgid "You may choose to include any of the following tables:"
298
- msgstr "Además puede incluir cualquiera de las siguientes tablas:"
299
-
300
- #: wp-db-backup.php:1164
301
- msgid "Backup Options"
302
- msgstr "Opciones de respaldo"
303
-
304
- #: wp-db-backup.php:1165
305
- msgid "What to do with the backup file:"
306
- msgstr "Qué hacer con el archivo de copia de respaldo:"
307
-
308
- #: wp-db-backup.php:1169
309
- msgid "Save to server"
310
- msgstr "Guardar en el servidor"
311
-
312
- #: wp-db-backup.php:1174
313
- msgid "Download to your computer"
314
- msgstr "Descargar en su ordenador"
315
-
316
- #: wp-db-backup.php:1178
317
- #: wp-db-backup.php:1235
318
- msgid "Email backup to:"
319
- msgstr "Enviar por e-mail a:"
320
-
321
- #: wp-db-backup.php:1185
322
- msgid "Backup now!"
323
- msgstr "¡Respaldar ahora!"
324
-
325
- #: wp-db-backup.php:1188
326
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
327
- msgstr "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio de copias de respaldo!"
328
-
329
- #: wp-db-backup.php:1199
330
- msgid "Scheduled Backup"
331
- msgstr "Respaldo programado"
332
-
333
- #: wp-db-backup.php:1206
334
- #, php-format
335
- msgid "Next Backup: %s"
336
- msgstr "Siguiente copia de respaldo: %s"
337
-
338
- #: wp-db-backup.php:1211
339
- #, php-format
340
- msgid "Last WP-Cron Daily Execution: %s"
341
- msgstr "Última ejecución diaria de WP-Cron: %s"
342
-
343
- #: wp-db-backup.php:1212
344
- #, php-format
345
- msgid "Next WP-Cron Daily Execution: %s"
346
- msgstr "Próxima ejecución diaria de WP-Cron: %s"
347
-
348
- #: wp-db-backup.php:1217
349
- msgid "Schedule: "
350
- msgstr "Programar:"
351
-
352
- #: wp-db-backup.php:1220
353
- msgid "None"
354
- msgstr "Ninguna"
355
-
356
- #: wp-db-backup.php:1220
357
- msgid "Daily"
358
- msgstr "Diaria"
359
-
360
- #: wp-db-backup.php:1243
361
- msgid "Tables to include in the scheduled backup:"
362
- msgstr "Tablas a incluir en el respaldo programado:"
363
-
364
- #: wp-db-backup.php:1253
365
- msgid "Schedule backup"
366
- msgstr "Respaldo programado"
367
-
368
- #: wp-db-backup.php:1278
369
- msgid "Never"
370
- msgstr "Nunca"
371
-
372
- #: wp-db-backup.php:1283
373
- #, php-format
374
- msgid "%s seconds"
375
- msgstr "%s segundos"
376
-
377
- #: wp-db-backup.php:1316
378
- msgid "Once Weekly"
379
- msgstr "Una vez a la semana"
380
-
381
- #: wp-db-backup.php:1329
382
- #, php-format
383
- msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
384
- msgstr "Su versión de WordPress, %1s, adolece de importantes características de seguridad sin las cuales es inseguro el uso del plugin WP-DB-Backup. Por ello, este plugin ha sido automáticamente deshabilitado. Por favor, considere <a href=\"%2s\">actualizar WordPress</a> a una versión más reciente."
385
-
386
- #: wp-db-backup.php:1347
387
- msgid "You are not allowed to perform backups."
388
- msgstr "No tiene permisos para realizar copias de respaldo."
389
-
390
- #: wp-db-backup.php:1362
391
- #, php-format
392
- msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
393
- msgstr "Parece que ha habido un intento no autorizado desde este sitio de acceder a su base de datos localizada en %1s. Dicho intento ha sido neutralizado."
394
-
395
- #: wp-db-backup.php:1373
396
- msgid "Cheatin' uh ?"
397
- msgstr "Cheatin' uh ?"
398
-
399
- #~ msgid ""
400
- #~ "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We "
401
- #~ "can not create the backup directory."
402
- #~ msgstr ""
403
- #~ "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio wp-"
404
- #~ "content! No se ha podido crear el directorio para las copias de respaldo."
405
- #~ msgid "Select all"
406
- #~ msgstr "Seleccionar todas"
407
- #~ msgid "Select none"
408
- #~ msgstr "No seleccionar ninguna"
409
- #~ msgid "Submit"
410
- #~ msgstr "Enviar"
411
-
1
+ # WP-DB-Backup
2
+ # Copyright (C) 2009 Austin Matzko
3
+ # This file is distributed under the GPL 2 license.
4
+ #
5
+ msgid ""
6
+ msgstr ""
7
+ "Project-Id-Version: wp-db-backup 2.2.2\n"
8
+ "Report-Msgid-Bugs-To: \n"
9
+ "POT-Creation-Date: 2008-08-15 11:00-0500\n"
10
+ "PO-Revision-Date: 2009-01-19 12:52+0100\n"
11
+ "Last-Translator: Alejandro Urrutia <alejandro@theindependentproject.com>\n"
12
+ "Language-Team: GrumpyWolf <daniel@grumpywolf.net>\n"
13
+ "MIME-Version: 1.0\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Poedit-Language: Spanish\n"
17
+ "X-Poedit-Country: SPAIN\n"
18
+
19
+ #: wp-db-backup.php:181
20
+ msgid "Backup Complete!"
21
+ msgstr "Copia de respaldo completada"
22
+
23
+ #: wp-db-backup.php:211
24
+ msgid "Progress"
25
+ msgstr "Progreso"
26
+
27
+ #: wp-db-backup.php:213
28
+ msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
29
+ msgstr "NO HAGA NADA DE ESTO, PUES INTERRUMPIRÁ LA COPIA DE RESPALDO:"
30
+
31
+ #: wp-db-backup.php:216
32
+ msgid "Close this browser"
33
+ msgstr "Cerrar este navegador"
34
+
35
+ #: wp-db-backup.php:217
36
+ msgid "Reload this page"
37
+ msgstr "Recargar/actualizar esta página"
38
+
39
+ #: wp-db-backup.php:218
40
+ msgid "Click the Stop or Back buttons in your browser"
41
+ msgstr "Pulsar los botones Detener o Atrás en el navegador"
42
+
43
+ #: wp-db-backup.php:220
44
+ msgid "Progress:"
45
+ msgstr "Progreso:"
46
+
47
+ #: wp-db-backup.php:229
48
+ msgid "Navigating away from this page will cause your backup to fail."
49
+ msgstr "Salir de esta página puede causar un fallo en tu respaldo."
50
+
51
+ #: wp-db-backup.php:266
52
+ #, php-format
53
+ msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
54
+ msgstr "Copia terminada, preparando la <a href=\\\"%s\\\">copia de respaldo</a> para descargar..."
55
+
56
+ #: wp-db-backup.php:273
57
+ #, php-format
58
+ msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
59
+ msgstr "Copia terminada, enviando <a href=\\\"%s\\\">copia de respaldo</a> por e-mail..."
60
+
61
+ #: wp-db-backup.php:280
62
+ #, php-format
63
+ msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
64
+ msgstr "Copia terminada, descárguela <a href=\\\"%s\\\">aquí</a>."
65
+
66
+ #: wp-db-backup.php:340
67
+ msgid "Creating backup file..."
68
+ msgstr "eando copia de respaldo..."
69
+
70
+ #: wp-db-backup.php:343
71
+ #, php-format
72
+ msgid "Finished backing up table \\\"%s\\\"."
73
+ msgstr "Se terminó de copiar la tabla \\\"%s\\\"."
74
+
75
+ #: wp-db-backup.php:345
76
+ #, php-format
77
+ msgid "Backing up table \\\"%s\\\"..."
78
+ msgstr "Copiando tabla \\\"%s\\\"..."
79
+
80
+ #: wp-db-backup.php:352
81
+ #: wp-db-backup.php:835
82
+ msgid "Could not open the backup file for writing!"
83
+ msgstr "No se pudo escribir en el archivo de respaldo"
84
+
85
+ #: wp-db-backup.php:353
86
+ msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
87
+ msgstr "El archivo de respaldo no se puede grabar. Por favor, revisa los permisos de escritura el en el directorio de copias de respaldo e inténtalo de nuevo."
88
+
89
+ #: wp-db-backup.php:358
90
+ #: wp-db-backup.php:844
91
+ msgid "WordPress MySQL database backup"
92
+ msgstr "Copia de respaldo de la base de datos MySQL de WordPress"
93
+
94
+ #: wp-db-backup.php:360
95
+ #: wp-db-backup.php:846
96
+ #, php-format
97
+ msgid "Generated: %s"
98
+ msgstr "Generated: %s"
99
+
100
+ #: wp-db-backup.php:361
101
+ #: wp-db-backup.php:847
102
+ #, php-format
103
+ msgid "Hostname: %s"
104
+ msgstr "Hostname: %s"
105
+
106
+ #: wp-db-backup.php:362
107
+ #: wp-db-backup.php:848
108
+ #, php-format
109
+ msgid "Database: %s"
110
+ msgstr "Base de datos: %s"
111
+
112
+ #: wp-db-backup.php:370
113
+ #: wp-db-backup.php:861
114
+ #, php-format
115
+ msgid "Table: %s"
116
+ msgstr "Tabla: %s"
117
+
118
+ #: wp-db-backup.php:377
119
+ msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
120
+ msgstr "No se puede escribir en el directorio de copias de respaldo. Por favor, revisa los permisos correspondientes e inténtalo de nuevo."
121
+
122
+ #: wp-db-backup.php:434
123
+ msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
124
+ msgstr "haz clic y mantiene <code>[SHIFT]</code> para múltiples selecciones"
125
+
126
+ #: wp-db-backup.php:474
127
+ msgid "Change"
128
+ msgstr "Cambiar"
129
+
130
+ #: wp-db-backup.php:483
131
+ msgid "Save"
132
+ msgstr "Salvar"
133
+
134
+ #: wp-db-backup.php:566
135
+ #: wp-db-backup.php:571
136
+ #: wp-db-backup.php:1126
137
+ msgid "Backup"
138
+ msgstr "Copia de respaldo"
139
+
140
+ #: wp-db-backup.php:646
141
+ #: wp-db-backup.php:649
142
+ msgid "There was an error writing a line to the backup script:"
143
+ msgstr "Hubo un error al escribir una línea en el script de respaldo:"
144
+
145
+ #: wp-db-backup.php:681
146
+ msgid "Subsequent errors have been omitted from this log."
147
+ msgstr "Los errores posteriores se han omitido en este log."
148
+
149
+ #: wp-db-backup.php:715
150
+ msgid "Error getting table details"
151
+ msgstr "Error al obtener los detalles de la tabla"
152
+
153
+ #: wp-db-backup.php:723
154
+ #, php-format
155
+ msgid "Delete any existing table %s"
156
+ msgstr "Delete any existing table %s"
157
+
158
+ #: wp-db-backup.php:732
159
+ #, php-format
160
+ msgid "Table structure of table %s"
161
+ msgstr "Estructura de la tabla %s"
162
+
163
+ #: wp-db-backup.php:738
164
+ #, php-format
165
+ msgid "Error with SHOW CREATE TABLE for %s."
166
+ msgstr "Error con SHOW CREATE TABLE para %s."
167
+
168
+ #: wp-db-backup.php:745
169
+ #, php-format
170
+ msgid "Error getting table structure of %s"
171
+ msgstr "Error al obtener la estructura de tabla de %s"
172
+
173
+ #: wp-db-backup.php:753
174
+ #, php-format
175
+ msgid "Data contents of table %s"
176
+ msgstr "Datos contenidos en la tabla %s"
177
+
178
+ #: wp-db-backup.php:823
179
+ #, php-format
180
+ msgid "End of data contents of table %s"
181
+ msgstr "Fin de datos contenidos en la tabla %s"
182
+
183
+ #: wp-db-backup.php:839
184
+ msgid "The backup directory is not writeable!"
185
+ msgstr "¡No se puede escribir en el directorio de copias de respaldo!"
186
+
187
+ #: wp-db-backup.php:974
188
+ #, php-format
189
+ msgid "File not found:%s"
190
+ msgstr "No se encontró el archivo: %s"
191
+
192
+ #: wp-db-backup.php:974
193
+ msgid "Return to Backup"
194
+ msgstr "Volver a Copia de respaldo"
195
+
196
+ #: wp-db-backup.php:983
197
+ #, php-format
198
+ msgid "File %s does not exist!"
199
+ msgstr "¡El fichero %s no existe!"
200
+
201
+ #: wp-db-backup.php:990
202
+ #, php-format
203
+ msgid ""
204
+ "Attached to this email is\n"
205
+ " %1s\n"
206
+ " Size:%2s kilobytes\n"
207
+ msgstr ""
208
+ "Este e-mail lleva adjunto el archivo\n"
209
+ " %1s\n"
210
+ " Tamaño:%2s kilobytes\n"
211
+
212
+ #: wp-db-backup.php:991
213
+ msgid "Database Backup"
214
+ msgstr "Respaldo de base de datos"
215
+
216
+ #: wp-db-backup.php:994
217
+ #: wp-db-backup.php:1041
218
+ msgid "The following errors were reported:"
219
+ msgstr "Se han detectado los siguientes errores:"
220
+
221
+ #: wp-db-backup.php:999
222
+ msgid "ERROR: The mail application has failed to deliver the backup."
223
+ msgstr "ERROR: el programa de correo ha fallado al enviar la copia de respaldo."
224
+
225
+ #: wp-db-backup.php:1016
226
+ msgid "Backup Successful"
227
+ msgstr "Copia de respaldo completada"
228
+
229
+ #: wp-db-backup.php:1020
230
+ #, php-format
231
+ msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
232
+ msgstr "Su copia de respaldo: <a href=\"%1s\">%2s</a> comenzará a descargarse en un momento."
233
+
234
+ #: wp-db-backup.php:1028
235
+ #, php-format
236
+ msgid "Your backup has been emailed to %s"
237
+ msgstr "Se ha enviado la copia de respaldo a la dirección %s"
238
+
239
+ #: wp-db-backup.php:1031
240
+ msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
241
+ msgstr "Se ha guardado en el servidor su copia de respaldo. Si desea descargarla ahora, haga clic con el botón derecho y seleccione \"Guardar como\""
242
+
243
+ #: wp-db-backup.php:1032
244
+ #, php-format
245
+ msgid "%s bytes"
246
+ msgstr "%s bytes"
247
+
248
+ #: wp-db-backup.php:1068
249
+ msgid "Scheduled Backup Options Saved!"
250
+ msgstr "Se han guardado las opciones de Respaldo programado."
251
+
252
+ #: wp-db-backup.php:1095
253
+ msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
254
+ msgstr "AVISO: ¡Tu directorio de respaldo <strong>NO</strong> existe, y no podemos crearlo."
255
+
256
+ #: wp-db-backup.php:1096
257
+ #, php-format
258
+ msgid "Using your FTP client, try to create the backup directory yourself: %s"
259
+ msgstr "Usando tu cliente FTP, intenta crear tu directorio de respaldo: %s"
260
+
261
+ #: wp-db-backup.php:1100
262
+ #: wp-db-backup.php:1111
263
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
264
+ msgstr "AVISO: ¡Tu directorio de respaldo <strong>NO</strong> puede ser escrito! No podemos crear los ficheros de respaldo."
265
+
266
+ #: wp-db-backup.php:1101
267
+ #, php-format
268
+ msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
269
+ msgstr "Usando tu cliente FTP, intenta crear permisos de escritura para directorio&rsquo;s a %1$s or %2$s: %3$s"
270
+
271
+ #: wp-db-backup.php:1113
272
+ msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
273
+ msgstr "Este problema parece ser causado por tu servidor&rsquo;s <code>safe_mode</code> file owner restrictions, que limita lo que pueden hacer aplicaciones web como WordPress."
274
+
275
+ #: wp-db-backup.php:1115
276
+ #, php-format
277
+ msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
278
+ msgstr "Puede tratar de corregir este problema utilizando el cliente FTP para borrar y volver a crear el directorio de copia de seguridad: %s"
279
+
280
+ #: wp-db-backup.php:1129
281
+ msgid "Tables"
282
+ msgstr "Tablas"
283
+
284
+ #: wp-db-backup.php:1131
285
+ msgid "These core WordPress tables will always be backed up:"
286
+ msgstr "Siempre se copiarán estas tablas básicas de WordPress:"
287
+
288
+ #: wp-db-backup.php:1136
289
+ msgid "Exclude spam comments"
290
+ msgstr "Excluir comentarios de SPAM"
291
+
292
+ #: wp-db-backup.php:1139
293
+ msgid "Exclude post revisions"
294
+ msgstr "Excluir revisiones de entradas"
295
+
296
+ #: wp-db-backup.php:1150
297
+ msgid "You may choose to include any of the following tables:"
298
+ msgstr "Además puede incluir cualquiera de las siguientes tablas:"
299
+
300
+ #: wp-db-backup.php:1164
301
+ msgid "Backup Options"
302
+ msgstr "Opciones de respaldo"
303
+
304
+ #: wp-db-backup.php:1165
305
+ msgid "What to do with the backup file:"
306
+ msgstr "Qué hacer con el archivo de copia de respaldo:"
307
+
308
+ #: wp-db-backup.php:1169
309
+ msgid "Save to server"
310
+ msgstr "Guardar en el servidor"
311
+
312
+ #: wp-db-backup.php:1174
313
+ msgid "Download to your computer"
314
+ msgstr "Descargar en su ordenador"
315
+
316
+ #: wp-db-backup.php:1178
317
+ #: wp-db-backup.php:1235
318
+ msgid "Email backup to:"
319
+ msgstr "Enviar por e-mail a:"
320
+
321
+ #: wp-db-backup.php:1185
322
+ msgid "Backup now!"
323
+ msgstr "¡Respaldar ahora!"
324
+
325
+ #: wp-db-backup.php:1188
326
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
327
+ msgstr "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio de copias de respaldo!"
328
+
329
+ #: wp-db-backup.php:1199
330
+ msgid "Scheduled Backup"
331
+ msgstr "Respaldo programado"
332
+
333
+ #: wp-db-backup.php:1206
334
+ #, php-format
335
+ msgid "Next Backup: %s"
336
+ msgstr "Siguiente copia de respaldo: %s"
337
+
338
+ #: wp-db-backup.php:1211
339
+ #, php-format
340
+ msgid "Last WP-Cron Daily Execution: %s"
341
+ msgstr "Última ejecución diaria de WP-Cron: %s"
342
+
343
+ #: wp-db-backup.php:1212
344
+ #, php-format
345
+ msgid "Next WP-Cron Daily Execution: %s"
346
+ msgstr "Próxima ejecución diaria de WP-Cron: %s"
347
+
348
+ #: wp-db-backup.php:1217
349
+ msgid "Schedule: "
350
+ msgstr "Programar:"
351
+
352
+ #: wp-db-backup.php:1220
353
+ msgid "None"
354
+ msgstr "Ninguna"
355
+
356
+ #: wp-db-backup.php:1220
357
+ msgid "Daily"
358
+ msgstr "Diaria"
359
+
360
+ #: wp-db-backup.php:1243
361
+ msgid "Tables to include in the scheduled backup:"
362
+ msgstr "Tablas a incluir en el respaldo programado:"
363
+
364
+ #: wp-db-backup.php:1253
365
+ msgid "Schedule backup"
366
+ msgstr "Respaldo programado"
367
+
368
+ #: wp-db-backup.php:1278
369
+ msgid "Never"
370
+ msgstr "Nunca"
371
+
372
+ #: wp-db-backup.php:1283
373
+ #, php-format
374
+ msgid "%s seconds"
375
+ msgstr "%s segundos"
376
+
377
+ #: wp-db-backup.php:1316
378
+ msgid "Once Weekly"
379
+ msgstr "Una vez a la semana"
380
+
381
+ #: wp-db-backup.php:1329
382
+ #, php-format
383
+ msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
384
+ msgstr "Su versión de WordPress, %1s, adolece de importantes características de seguridad sin las cuales es inseguro el uso del plugin WP-DB-Backup. Por ello, este plugin ha sido automáticamente deshabilitado. Por favor, considere <a href=\"%2s\">actualizar WordPress</a> a una versión más reciente."
385
+
386
+ #: wp-db-backup.php:1347
387
+ msgid "You are not allowed to perform backups."
388
+ msgstr "No tiene permisos para realizar copias de respaldo."
389
+
390
+ #: wp-db-backup.php:1362
391
+ #, php-format
392
+ msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
393
+ msgstr "Parece que ha habido un intento no autorizado desde este sitio de acceder a su base de datos localizada en %1s. Dicho intento ha sido neutralizado."
394
+
395
+ #: wp-db-backup.php:1373
396
+ msgid "Cheatin' uh ?"
397
+ msgstr "Cheatin' uh ?"
398
+
399
+ #~ msgid ""
400
+ #~ "WARNING: Your wp-content directory is <strong>NOT</strong> writable! We "
401
+ #~ "can not create the backup directory."
402
+ #~ msgstr ""
403
+ #~ "AVISO: ¡<strong>NO</strong> se puede escribir en el directorio wp-"
404
+ #~ "content! No se ha podido crear el directorio para las copias de respaldo."
405
+ #~ msgid "Select all"
406
+ #~ msgstr "Seleccionar todas"
407
+ #~ msgid "Select none"
408
+ #~ msgstr "No seleccionar ninguna"
409
+ #~ msgid "Submit"
410
+ #~ msgstr "Enviar"
411
+
wp-db-backup-fa_IR.mo → languages/wp-db-backup-fa_IR.mo RENAMED
File without changes
wp-db-backup-fa_IR.po → languages/wp-db-backup-fa_IR.po RENAMED
@@ -1,395 +1,395 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: wp-db-backup\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2008-08-15 11:00-0500\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: \n"
8
- "Language-Team: KAVEH Ali akbari | www.Barnameha.com <KAVEH at Barnameha dot com>\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: Persian\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "X-Poedit-KeywordsList: persian, Farsi, فارسی\n"
15
-
16
- #: wp-db-backup.php:181
17
- msgid "Backup Complete!"
18
- msgstr "پشتیبان گیری کامل شد"
19
-
20
- #: wp-db-backup.php:211
21
- msgid "Progress"
22
- msgstr "پیشرفت"
23
-
24
- #: wp-db-backup.php:213
25
- msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
26
- msgstr "کارهاي روبرو را انجام ندهيد زيرا موجب بروز لغو عمليات ميشود:"
27
-
28
- #: wp-db-backup.php:216
29
- msgid "Close this browser"
30
- msgstr "از مرورگر خود خارج شوید"
31
-
32
- #: wp-db-backup.php:217
33
- msgid "Reload this page"
34
- msgstr "این صفحه را دوباره بارگزاری کنید"
35
-
36
- #: wp-db-backup.php:218
37
- msgid "Click the Stop or Back buttons in your browser"
38
- msgstr "بر روی ایست یا بازگشت در مرورگر خود کلیک کنید"
39
-
40
- #: wp-db-backup.php:220
41
- msgid "Progress:"
42
- msgstr "پیشرفتها"
43
-
44
- #: wp-db-backup.php:229
45
- msgid "Navigating away from this page will cause your backup to fail."
46
- msgstr "هدایت به بیرون از این صفحه موجب رخ دادن خطا در ایجاد پشتیبان شده است"
47
-
48
- #: wp-db-backup.php:266
49
- #, php-format
50
- msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
51
- msgstr "پشتیبان گیری کامل شد ,فایل آماده <a href=\\\"%s\\\">دریافت</a> است."
52
-
53
- #: wp-db-backup.php:273
54
- #, php-format
55
- msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
56
- msgstr "پشتیان گیری کامل شد؛ در حال ارسال به پست الکترونیک..."
57
-
58
- #: wp-db-backup.php:280
59
- #, php-format
60
- msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
61
- msgstr "<a href=\\\"%s\\\">دریافت فایل</a>.<br>پشتیبان گیری با موفقیت انجام شد."
62
-
63
- #: wp-db-backup.php:340
64
- msgid "Creating backup file..."
65
- msgstr "در حال ساختن فایل پشتیبان..."
66
-
67
- #: wp-db-backup.php:343
68
- #, php-format
69
- msgid "Finished backing up table \\\"%s\\\"."
70
- msgstr "تکمیل شد %s"
71
-
72
- #: wp-db-backup.php:345
73
- #, php-format
74
- msgid "Backing up table \\\"%s\\\"..."
75
- msgstr "در حال پشتیبان گیری از %s"
76
-
77
- #: wp-db-backup.php:352
78
- #: wp-db-backup.php:835
79
- msgid "Could not open the backup file for writing!"
80
- msgstr "امکان باز کردن فایل پشتیبان جهت نوشتن وجود ندارد"
81
-
82
- #: wp-db-backup.php:353
83
- msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
84
- msgstr "پوشه پشتیان گیری قابل نوشتن نیست.لطفا مجوز لازم را به آن پوشه داده و دویاره امتحان کنید"
85
-
86
- #: wp-db-backup.php:358
87
- #: wp-db-backup.php:844
88
- msgid "WordPress MySQL database backup"
89
- msgstr "WordPress MySQL database backup"
90
-
91
- #: wp-db-backup.php:360
92
- #: wp-db-backup.php:846
93
- #, php-format
94
- msgid "Generated: %s"
95
- msgstr "تولید شده ها: %s"
96
-
97
- #: wp-db-backup.php:361
98
- #: wp-db-backup.php:847
99
- #, php-format
100
- msgid "Hostname: %s"
101
- msgstr "Hostname: %s"
102
-
103
- #: wp-db-backup.php:362
104
- #: wp-db-backup.php:848
105
- #, php-format
106
- msgid "Database: %s"
107
- msgstr "بانک اطلاعاتی: %s"
108
-
109
- #: wp-db-backup.php:370
110
- #: wp-db-backup.php:861
111
- #, php-format
112
- msgid "Table: %s"
113
- msgstr "%s جدول ها:"
114
-
115
- #: wp-db-backup.php:377
116
- msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
117
- msgstr "پوشه پشتیان گیری قابل نوشتن نیست.لطفا مجوز لازم را به آن پوشه داده و دویاره امتحان کنید"
118
-
119
- #: wp-db-backup.php:434
120
- msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
121
- msgstr " "
122
-
123
- #: wp-db-backup.php:474
124
- msgid "Change"
125
- msgstr "تغییر"
126
-
127
- #: wp-db-backup.php:483
128
- msgid "Save"
129
- msgstr "ذخیره"
130
-
131
- #: wp-db-backup.php:566
132
- #: wp-db-backup.php:571
133
- #: wp-db-backup.php:1126
134
- msgid "Backup"
135
- msgstr "پشتیبان گیری"
136
-
137
- #: wp-db-backup.php:646
138
- #: wp-db-backup.php:649
139
- msgid "There was an error writing a line to the backup script:"
140
- msgstr "خطایی که در نوشتن یک خط در فایل پشتیبان رخ داده است:"
141
-
142
- #: wp-db-backup.php:681
143
- msgid "Subsequent errors have been omitted from this log."
144
- msgstr "خطاهای بعدی درون این این گزارش از قلم خواهند افتاد"
145
-
146
- #: wp-db-backup.php:715
147
- msgid "Error getting table details"
148
- msgstr "بروز خطا در دریافت مشخصات جدول"
149
-
150
- #: wp-db-backup.php:723
151
- #, php-format
152
- msgid "Delete any existing table %s"
153
- msgstr "حذف تمامی جدول های موجود %s"
154
-
155
- #: wp-db-backup.php:732
156
- #, php-format
157
- msgid "Table structure of table %s"
158
- msgstr "ساختار جدول %s"
159
-
160
- #: wp-db-backup.php:738
161
- #, php-format
162
- msgid "Error with SHOW CREATE TABLE for %s."
163
- msgstr "خطا به وسیله نمایش ساختن جدول %s"
164
-
165
- #: wp-db-backup.php:745
166
- #, php-format
167
- msgid "Error getting table structure of %s"
168
- msgstr "خطا در دریافت ساختار جدول %s"
169
-
170
- #: wp-db-backup.php:753
171
- #, php-format
172
- msgid "Data contents of table %s"
173
- msgstr "محتویات جدول %s"
174
-
175
- #: wp-db-backup.php:823
176
- #, php-format
177
- msgid "End of data contents of table %s"
178
- msgstr "پایان محتویات جدول %s"
179
-
180
- #: wp-db-backup.php:839
181
- msgid "The backup directory is not writeable!"
182
- msgstr "پوشه پشتیبان گیری قابل نوشتن نیست"
183
-
184
- #: wp-db-backup.php:974
185
- #, php-format
186
- msgid "File not found:%s"
187
- msgstr "فایل وجود ندارد:"
188
-
189
- #: wp-db-backup.php:974
190
- msgid "Return to Backup"
191
- msgstr "بازگشت به پشتیبان گیری"
192
-
193
- #: wp-db-backup.php:983
194
- #, php-format
195
- msgid "File %s does not exist!"
196
- msgstr "%s این فایل وجود ندارد:"
197
-
198
- #: wp-db-backup.php:990
199
- #, php-format
200
- msgid ""
201
- "Attached to this email is\n"
202
- " %1s\n"
203
- " Size:%2s kilobytes\n"
204
- msgstr ""
205
- "فایل چسبیده به پست الکترونیک\n"
206
- " %1s\n"
207
- " سایز:%2s kilobytes\n"
208
-
209
- #: wp-db-backup.php:991
210
- msgid "Database Backup"
211
- msgstr "پشتیان گیری بانک اطلاعاتی"
212
-
213
- #: wp-db-backup.php:994
214
- #: wp-db-backup.php:1041
215
- msgid "The following errors were reported:"
216
- msgstr "خطاهای رخ داده:"
217
-
218
- #: wp-db-backup.php:999
219
- msgid "ERROR: The mail application has failed to deliver the backup."
220
- msgstr "خطا: برنامه پست الکترونیک قادر به دریافت پشتیبان نیست"
221
-
222
- #: wp-db-backup.php:1016
223
- msgid "Backup Successful"
224
- msgstr "پشتیبان گیری با موفقیت انجام شد"
225
-
226
- #: wp-db-backup.php:1020
227
- #, php-format
228
- msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
229
- msgstr "فایل پشتیبان شما <a href=\"%1s\">%2s</a> باید زودتر دریافت شود."
230
-
231
- #: wp-db-backup.php:1028
232
- #, php-format
233
- msgid "Your backup has been emailed to %s"
234
- msgstr "این فایل پشتیبان به ایمیل ارسال شد: %s"
235
-
236
- #: wp-db-backup.php:1031
237
- msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
238
- msgstr "فایل پشتیبان بر روی فضای سایت ذخیره شد.برای دریافت آن کلیک راست کرده و Save As را انتخاب کنید"
239
-
240
- #: wp-db-backup.php:1032
241
- #, php-format
242
- msgid "%s bytes"
243
- msgstr "%s bytes"
244
-
245
- #: wp-db-backup.php:1068
246
- msgid "Scheduled Backup Options Saved!"
247
- msgstr "تنظیمات زمان بندی پشتیبان گیری ذخیره شد"
248
-
249
- #: wp-db-backup.php:1095
250
- msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
251
- msgstr "پوشه پشتیبان گیری وجود ندارد و ما نمیتوانیم که آن را بسازیم"
252
-
253
- #: wp-db-backup.php:1096
254
- #, php-format
255
- msgid "Using your FTP client, try to create the backup directory yourself: %s"
256
- msgstr "از طریق پروتکل FTP سعی کنید پوشه پشتیبان گیری را بسازید"
257
-
258
- #: wp-db-backup.php:1100
259
- #: wp-db-backup.php:1111
260
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
261
- msgstr "پوشه پشتیبان گیری قابل نوشتن نیست و ما نمیتوانیم فایل پشتیبان را بسازیم"
262
-
263
- #: wp-db-backup.php:1101
264
- #, php-format
265
- msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
266
- msgstr "از طريق پروتکل FTP به پوشه پشتيبان دسترسي مجاز بدهيد"
267
-
268
- #: wp-db-backup.php:1113
269
- msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
270
- msgstr ""
271
-
272
- #: wp-db-backup.php:1115
273
- #, php-format
274
- msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
275
- msgstr "برای حل این مشکل از پروتکل FTP استفاده کرده و پوشه پشتیبان را حذف کرده و مجددا بسازید: %s"
276
-
277
- #: wp-db-backup.php:1129
278
- msgid "Tables"
279
- msgstr "جدول ها"
280
-
281
- #: wp-db-backup.php:1131
282
- msgid "These core WordPress tables will always be backed up:"
283
- msgstr "جدولهای اصلی و هسته وردپرس که همیشه پشتیبان گیری میشوند:"
284
-
285
- #: wp-db-backup.php:1136
286
- msgid "Exclude spam comments"
287
- msgstr "به غیر از نظرات جفنگ"
288
-
289
- #: wp-db-backup.php:1139
290
- msgid "Exclude post revisions"
291
- msgstr "به جز تجدید نظر پست ها"
292
-
293
- #: wp-db-backup.php:1150
294
- msgid "You may choose to include any of the following tables:"
295
- msgstr "شما میتوانید جدولهای دیگر را انتخاب کنید:"
296
-
297
- #: wp-db-backup.php:1164
298
- msgid "Backup Options"
299
- msgstr "تنظیمات پشتیبان گیری"
300
-
301
- #: wp-db-backup.php:1165
302
- msgid "What to do with the backup file:"
303
- msgstr "نوع پشتیبان گیری را انتخاب کنید:"
304
-
305
- #: wp-db-backup.php:1169
306
- msgid "Save to server"
307
- msgstr "ذخیره روی فضای سایت"
308
-
309
- #: wp-db-backup.php:1174
310
- msgid "Download to your computer"
311
- msgstr "ذخیره درون رایانه"
312
-
313
- #: wp-db-backup.php:1178
314
- #: wp-db-backup.php:1235
315
- msgid "Email backup to:"
316
- msgstr "ارسال به ایمیل"
317
-
318
- #: wp-db-backup.php:1185
319
- msgid "Backup now!"
320
- msgstr "پشتیبان بگیر!"
321
-
322
- #: wp-db-backup.php:1188
323
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
324
- msgstr "هشدار: پوشه پشتیبان گیری شما قابل نوشتن نیست"
325
-
326
- #: wp-db-backup.php:1199
327
- msgid "Scheduled Backup"
328
- msgstr "زمان بندی پشتیبان گیری"
329
-
330
- #: wp-db-backup.php:1206
331
- #, php-format
332
- msgid "Next Backup: %s"
333
- msgstr "پشتیان گیری بعدی: %s"
334
-
335
- #: wp-db-backup.php:1211
336
- #, php-format
337
- msgid "Last WP-Cron Daily Execution: %s"
338
- msgstr ""
339
-
340
- #: wp-db-backup.php:1212
341
- #, php-format
342
- msgid "Next WP-Cron Daily Execution: %s"
343
- msgstr ""
344
-
345
- #: wp-db-backup.php:1217
346
- msgid "Schedule: "
347
- msgstr "زمان بندی"
348
-
349
- #: wp-db-backup.php:1220
350
- msgid "None"
351
- msgstr "هیچ"
352
-
353
- #: wp-db-backup.php:1220
354
- msgid "Daily"
355
- msgstr "روزانه"
356
-
357
- #: wp-db-backup.php:1243
358
- msgid "Tables to include in the scheduled backup:"
359
- msgstr "جدول هایی که در زمان بندی پشتیبان گیری میشوند:"
360
-
361
- #: wp-db-backup.php:1253
362
- msgid "Schedule backup"
363
- msgstr "زمان بندی پشتیبان گیری"
364
-
365
- #: wp-db-backup.php:1278
366
- msgid "Never"
367
- msgstr "هرگز"
368
-
369
- #: wp-db-backup.php:1283
370
- #, php-format
371
- msgid "%s seconds"
372
- msgstr "%s ثانیه"
373
-
374
- #: wp-db-backup.php:1316
375
- msgid "Once Weekly"
376
- msgstr "هفته ای یکبار"
377
-
378
- #: wp-db-backup.php:1329
379
- #, php-format
380
- msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
381
- msgstr "نسخه وردپرس خود را بروز کنید.این افزونه به دلیل مسایل امنیتی با این نسخه از وردپرس سازگاری ندارد"
382
-
383
- #: wp-db-backup.php:1347
384
- msgid "You are not allowed to perform backups."
385
- msgstr "شما اجازه تولید پشتیبان را ندارید"
386
-
387
- #: wp-db-backup.php:1362
388
- #, php-format
389
- msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
390
- msgstr "این ظاهر شدن از کوشش غیر مجاز این سایت برای دستیابی به بانک اطلاعاتی واقع شده در %1s هست.این کوشش دچار ایست شد."
391
-
392
- #: wp-db-backup.php:1373
393
- msgid "Cheatin' uh ?"
394
- msgstr "تقلب میکنی؟"
395
-
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: wp-db-backup\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-08-15 11:00-0500\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language-Team: KAVEH Ali akbari | www.Barnameha.com <KAVEH at Barnameha dot com>\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: Persian\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "X-Poedit-KeywordsList: persian, Farsi, فارسی\n"
15
+
16
+ #: wp-db-backup.php:181
17
+ msgid "Backup Complete!"
18
+ msgstr "پشتیبان گیری کامل شد"
19
+
20
+ #: wp-db-backup.php:211
21
+ msgid "Progress"
22
+ msgstr "پیشرفت"
23
+
24
+ #: wp-db-backup.php:213
25
+ msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
26
+ msgstr "کارهاي روبرو را انجام ندهيد زيرا موجب بروز لغو عمليات ميشود:"
27
+
28
+ #: wp-db-backup.php:216
29
+ msgid "Close this browser"
30
+ msgstr "از مرورگر خود خارج شوید"
31
+
32
+ #: wp-db-backup.php:217
33
+ msgid "Reload this page"
34
+ msgstr "این صفحه را دوباره بارگزاری کنید"
35
+
36
+ #: wp-db-backup.php:218
37
+ msgid "Click the Stop or Back buttons in your browser"
38
+ msgstr "بر روی ایست یا بازگشت در مرورگر خود کلیک کنید"
39
+
40
+ #: wp-db-backup.php:220
41
+ msgid "Progress:"
42
+ msgstr "پیشرفتها"
43
+
44
+ #: wp-db-backup.php:229
45
+ msgid "Navigating away from this page will cause your backup to fail."
46
+ msgstr "هدایت به بیرون از این صفحه موجب رخ دادن خطا در ایجاد پشتیبان شده است"
47
+
48
+ #: wp-db-backup.php:266
49
+ #, php-format
50
+ msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
51
+ msgstr "پشتیبان گیری کامل شد ,فایل آماده <a href=\\\"%s\\\">دریافت</a> است."
52
+
53
+ #: wp-db-backup.php:273
54
+ #, php-format
55
+ msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
56
+ msgstr "پشتیان گیری کامل شد؛ در حال ارسال به پست الکترونیک..."
57
+
58
+ #: wp-db-backup.php:280
59
+ #, php-format
60
+ msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
61
+ msgstr "<a href=\\\"%s\\\">دریافت فایل</a>.<br>پشتیبان گیری با موفقیت انجام شد."
62
+
63
+ #: wp-db-backup.php:340
64
+ msgid "Creating backup file..."
65
+ msgstr "در حال ساختن فایل پشتیبان..."
66
+
67
+ #: wp-db-backup.php:343
68
+ #, php-format
69
+ msgid "Finished backing up table \\\"%s\\\"."
70
+ msgstr "تکمیل شد %s"
71
+
72
+ #: wp-db-backup.php:345
73
+ #, php-format
74
+ msgid "Backing up table \\\"%s\\\"..."
75
+ msgstr "در حال پشتیبان گیری از %s"
76
+
77
+ #: wp-db-backup.php:352
78
+ #: wp-db-backup.php:835
79
+ msgid "Could not open the backup file for writing!"
80
+ msgstr "امکان باز کردن فایل پشتیبان جهت نوشتن وجود ندارد"
81
+
82
+ #: wp-db-backup.php:353
83
+ msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
84
+ msgstr "پوشه پشتیان گیری قابل نوشتن نیست.لطفا مجوز لازم را به آن پوشه داده و دویاره امتحان کنید"
85
+
86
+ #: wp-db-backup.php:358
87
+ #: wp-db-backup.php:844
88
+ msgid "WordPress MySQL database backup"
89
+ msgstr "WordPress MySQL database backup"
90
+
91
+ #: wp-db-backup.php:360
92
+ #: wp-db-backup.php:846
93
+ #, php-format
94
+ msgid "Generated: %s"
95
+ msgstr "تولید شده ها: %s"
96
+
97
+ #: wp-db-backup.php:361
98
+ #: wp-db-backup.php:847
99
+ #, php-format
100
+ msgid "Hostname: %s"
101
+ msgstr "Hostname: %s"
102
+
103
+ #: wp-db-backup.php:362
104
+ #: wp-db-backup.php:848
105
+ #, php-format
106
+ msgid "Database: %s"
107
+ msgstr "بانک اطلاعاتی: %s"
108
+
109
+ #: wp-db-backup.php:370
110
+ #: wp-db-backup.php:861
111
+ #, php-format
112
+ msgid "Table: %s"
113
+ msgstr "%s جدول ها:"
114
+
115
+ #: wp-db-backup.php:377
116
+ msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
117
+ msgstr "پوشه پشتیان گیری قابل نوشتن نیست.لطفا مجوز لازم را به آن پوشه داده و دویاره امتحان کنید"
118
+
119
+ #: wp-db-backup.php:434
120
+ msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
121
+ msgstr " "
122
+
123
+ #: wp-db-backup.php:474
124
+ msgid "Change"
125
+ msgstr "تغییر"
126
+
127
+ #: wp-db-backup.php:483
128
+ msgid "Save"
129
+ msgstr "ذخیره"
130
+
131
+ #: wp-db-backup.php:566
132
+ #: wp-db-backup.php:571
133
+ #: wp-db-backup.php:1126
134
+ msgid "Backup"
135
+ msgstr "پشتیبان گیری"
136
+
137
+ #: wp-db-backup.php:646
138
+ #: wp-db-backup.php:649
139
+ msgid "There was an error writing a line to the backup script:"
140
+ msgstr "خطایی که در نوشتن یک خط در فایل پشتیبان رخ داده است:"
141
+
142
+ #: wp-db-backup.php:681
143
+ msgid "Subsequent errors have been omitted from this log."
144
+ msgstr "خطاهای بعدی درون این این گزارش از قلم خواهند افتاد"
145
+
146
+ #: wp-db-backup.php:715
147
+ msgid "Error getting table details"
148
+ msgstr "بروز خطا در دریافت مشخصات جدول"
149
+
150
+ #: wp-db-backup.php:723
151
+ #, php-format
152
+ msgid "Delete any existing table %s"
153
+ msgstr "حذف تمامی جدول های موجود %s"
154
+
155
+ #: wp-db-backup.php:732
156
+ #, php-format
157
+ msgid "Table structure of table %s"
158
+ msgstr "ساختار جدول %s"
159
+
160
+ #: wp-db-backup.php:738
161
+ #, php-format
162
+ msgid "Error with SHOW CREATE TABLE for %s."
163
+ msgstr "خطا به وسیله نمایش ساختن جدول %s"
164
+
165
+ #: wp-db-backup.php:745
166
+ #, php-format
167
+ msgid "Error getting table structure of %s"
168
+ msgstr "خطا در دریافت ساختار جدول %s"
169
+
170
+ #: wp-db-backup.php:753
171
+ #, php-format
172
+ msgid "Data contents of table %s"
173
+ msgstr "محتویات جدول %s"
174
+
175
+ #: wp-db-backup.php:823
176
+ #, php-format
177
+ msgid "End of data contents of table %s"
178
+ msgstr "پایان محتویات جدول %s"
179
+
180
+ #: wp-db-backup.php:839
181
+ msgid "The backup directory is not writeable!"
182
+ msgstr "پوشه پشتیبان گیری قابل نوشتن نیست"
183
+
184
+ #: wp-db-backup.php:974
185
+ #, php-format
186
+ msgid "File not found:%s"
187
+ msgstr "فایل وجود ندارد:"
188
+
189
+ #: wp-db-backup.php:974
190
+ msgid "Return to Backup"
191
+ msgstr "بازگشت به پشتیبان گیری"
192
+
193
+ #: wp-db-backup.php:983
194
+ #, php-format
195
+ msgid "File %s does not exist!"
196
+ msgstr "%s این فایل وجود ندارد:"
197
+
198
+ #: wp-db-backup.php:990
199
+ #, php-format
200
+ msgid ""
201
+ "Attached to this email is\n"
202
+ " %1s\n"
203
+ " Size:%2s kilobytes\n"
204
+ msgstr ""
205
+ "فایل چسبیده به پست الکترونیک\n"
206
+ " %1s\n"
207
+ " سایز:%2s kilobytes\n"
208
+
209
+ #: wp-db-backup.php:991
210
+ msgid "Database Backup"
211
+ msgstr "پشتیان گیری بانک اطلاعاتی"
212
+
213
+ #: wp-db-backup.php:994
214
+ #: wp-db-backup.php:1041
215
+ msgid "The following errors were reported:"
216
+ msgstr "خطاهای رخ داده:"
217
+
218
+ #: wp-db-backup.php:999
219
+ msgid "ERROR: The mail application has failed to deliver the backup."
220
+ msgstr "خطا: برنامه پست الکترونیک قادر به دریافت پشتیبان نیست"
221
+
222
+ #: wp-db-backup.php:1016
223
+ msgid "Backup Successful"
224
+ msgstr "پشتیبان گیری با موفقیت انجام شد"
225
+
226
+ #: wp-db-backup.php:1020
227
+ #, php-format
228
+ msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
229
+ msgstr "فایل پشتیبان شما <a href=\"%1s\">%2s</a> باید زودتر دریافت شود."
230
+
231
+ #: wp-db-backup.php:1028
232
+ #, php-format
233
+ msgid "Your backup has been emailed to %s"
234
+ msgstr "این فایل پشتیبان به ایمیل ارسال شد: %s"
235
+
236
+ #: wp-db-backup.php:1031
237
+ msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
238
+ msgstr "فایل پشتیبان بر روی فضای سایت ذخیره شد.برای دریافت آن کلیک راست کرده و Save As را انتخاب کنید"
239
+
240
+ #: wp-db-backup.php:1032
241
+ #, php-format
242
+ msgid "%s bytes"
243
+ msgstr "%s bytes"
244
+
245
+ #: wp-db-backup.php:1068
246
+ msgid "Scheduled Backup Options Saved!"
247
+ msgstr "تنظیمات زمان بندی پشتیبان گیری ذخیره شد"
248
+
249
+ #: wp-db-backup.php:1095
250
+ msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
251
+ msgstr "پوشه پشتیبان گیری وجود ندارد و ما نمیتوانیم که آن را بسازیم"
252
+
253
+ #: wp-db-backup.php:1096
254
+ #, php-format
255
+ msgid "Using your FTP client, try to create the backup directory yourself: %s"
256
+ msgstr "از طریق پروتکل FTP سعی کنید پوشه پشتیبان گیری را بسازید"
257
+
258
+ #: wp-db-backup.php:1100
259
+ #: wp-db-backup.php:1111
260
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
261
+ msgstr "پوشه پشتیبان گیری قابل نوشتن نیست و ما نمیتوانیم فایل پشتیبان را بسازیم"
262
+
263
+ #: wp-db-backup.php:1101
264
+ #, php-format
265
+ msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
266
+ msgstr "از طريق پروتکل FTP به پوشه پشتيبان دسترسي مجاز بدهيد"
267
+
268
+ #: wp-db-backup.php:1113
269
+ msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
270
+ msgstr ""
271
+
272
+ #: wp-db-backup.php:1115
273
+ #, php-format
274
+ msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
275
+ msgstr "برای حل این مشکل از پروتکل FTP استفاده کرده و پوشه پشتیبان را حذف کرده و مجددا بسازید: %s"
276
+
277
+ #: wp-db-backup.php:1129
278
+ msgid "Tables"
279
+ msgstr "جدول ها"
280
+
281
+ #: wp-db-backup.php:1131
282
+ msgid "These core WordPress tables will always be backed up:"
283
+ msgstr "جدولهای اصلی و هسته وردپرس که همیشه پشتیبان گیری میشوند:"
284
+
285
+ #: wp-db-backup.php:1136
286
+ msgid "Exclude spam comments"
287
+ msgstr "به غیر از نظرات جفنگ"
288
+
289
+ #: wp-db-backup.php:1139
290
+ msgid "Exclude post revisions"
291
+ msgstr "به جز تجدید نظر پست ها"
292
+
293
+ #: wp-db-backup.php:1150
294
+ msgid "You may choose to include any of the following tables:"
295
+ msgstr "شما میتوانید جدولهای دیگر را انتخاب کنید:"
296
+
297
+ #: wp-db-backup.php:1164
298
+ msgid "Backup Options"
299
+ msgstr "تنظیمات پشتیبان گیری"
300
+
301
+ #: wp-db-backup.php:1165
302
+ msgid "What to do with the backup file:"
303
+ msgstr "نوع پشتیبان گیری را انتخاب کنید:"
304
+
305
+ #: wp-db-backup.php:1169
306
+ msgid "Save to server"
307
+ msgstr "ذخیره روی فضای سایت"
308
+
309
+ #: wp-db-backup.php:1174
310
+ msgid "Download to your computer"
311
+ msgstr "ذخیره درون رایانه"
312
+
313
+ #: wp-db-backup.php:1178
314
+ #: wp-db-backup.php:1235
315
+ msgid "Email backup to:"
316
+ msgstr "ارسال به ایمیل"
317
+
318
+ #: wp-db-backup.php:1185
319
+ msgid "Backup now!"
320
+ msgstr "پشتیبان بگیر!"
321
+
322
+ #: wp-db-backup.php:1188
323
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
324
+ msgstr "هشدار: پوشه پشتیبان گیری شما قابل نوشتن نیست"
325
+
326
+ #: wp-db-backup.php:1199
327
+ msgid "Scheduled Backup"
328
+ msgstr "زمان بندی پشتیبان گیری"
329
+
330
+ #: wp-db-backup.php:1206
331
+ #, php-format
332
+ msgid "Next Backup: %s"
333
+ msgstr "پشتیان گیری بعدی: %s"
334
+
335
+ #: wp-db-backup.php:1211
336
+ #, php-format
337
+ msgid "Last WP-Cron Daily Execution: %s"
338
+ msgstr ""
339
+
340
+ #: wp-db-backup.php:1212
341
+ #, php-format
342
+ msgid "Next WP-Cron Daily Execution: %s"
343
+ msgstr ""
344
+
345
+ #: wp-db-backup.php:1217
346
+ msgid "Schedule: "
347
+ msgstr "زمان بندی"
348
+
349
+ #: wp-db-backup.php:1220
350
+ msgid "None"
351
+ msgstr "هیچ"
352
+
353
+ #: wp-db-backup.php:1220
354
+ msgid "Daily"
355
+ msgstr "روزانه"
356
+
357
+ #: wp-db-backup.php:1243
358
+ msgid "Tables to include in the scheduled backup:"
359
+ msgstr "جدول هایی که در زمان بندی پشتیبان گیری میشوند:"
360
+
361
+ #: wp-db-backup.php:1253
362
+ msgid "Schedule backup"
363
+ msgstr "زمان بندی پشتیبان گیری"
364
+
365
+ #: wp-db-backup.php:1278
366
+ msgid "Never"
367
+ msgstr "هرگز"
368
+
369
+ #: wp-db-backup.php:1283
370
+ #, php-format
371
+ msgid "%s seconds"
372
+ msgstr "%s ثانیه"
373
+
374
+ #: wp-db-backup.php:1316
375
+ msgid "Once Weekly"
376
+ msgstr "هفته ای یکبار"
377
+
378
+ #: wp-db-backup.php:1329
379
+ #, php-format
380
+ msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
381
+ msgstr "نسخه وردپرس خود را بروز کنید.این افزونه به دلیل مسایل امنیتی با این نسخه از وردپرس سازگاری ندارد"
382
+
383
+ #: wp-db-backup.php:1347
384
+ msgid "You are not allowed to perform backups."
385
+ msgstr "شما اجازه تولید پشتیبان را ندارید"
386
+
387
+ #: wp-db-backup.php:1362
388
+ #, php-format
389
+ msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
390
+ msgstr "این ظاهر شدن از کوشش غیر مجاز این سایت برای دستیابی به بانک اطلاعاتی واقع شده در %1s هست.این کوشش دچار ایست شد."
391
+
392
+ #: wp-db-backup.php:1373
393
+ msgid "Cheatin' uh ?"
394
+ msgstr "تقلب میکنی؟"
395
+
wp-db-backup-fr_FR.mo → languages/wp-db-backup-fr_FR.mo RENAMED
File without changes
wp-db-backup-fr_FR.po → languages/wp-db-backup-fr_FR.po RENAMED
File without changes
wp-db-backup-it_IT.mo → languages/wp-db-backup-it_IT.mo RENAMED
File without changes
wp-db-backup-it_IT.po → languages/wp-db-backup-it_IT.po RENAMED
File without changes
wp-db-backup-ja.mo → languages/wp-db-backup-ja.mo RENAMED
File without changes
wp-db-backup-ja.po → languages/wp-db-backup-ja.po RENAMED
File without changes
wp-db-backup-ko_KR.mo → languages/wp-db-backup-ko_KR.mo RENAMED
File without changes
wp-db-backup-ko_KR.po → languages/wp-db-backup-ko_KR.po RENAMED
File without changes
wp-db-backup-nb_NO.mo → languages/wp-db-backup-nb_NO.mo RENAMED
File without changes
wp-db-backup-nb_NO.po → languages/wp-db-backup-nb_NO.po RENAMED
File without changes
wp-db-backup-pt_BR.mo → languages/wp-db-backup-pt_BR.mo RENAMED
File without changes
wp-db-backup-pt_BR.po → languages/wp-db-backup-pt_BR.po RENAMED
File without changes
wp-db-backup-ru_RU.mo → languages/wp-db-backup-ru_RU.mo RENAMED
File without changes
wp-db-backup-ru_RU.po → languages/wp-db-backup-ru_RU.po RENAMED
File without changes
wp-db-backup-sv_SE.mo → languages/wp-db-backup-sv_SE.mo RENAMED
File without changes
wp-db-backup-sv_SE.po → languages/wp-db-backup-sv_SE.po RENAMED
File without changes
wp-db-backup-tr_TR.mo → languages/wp-db-backup-tr_TR.mo RENAMED
File without changes
wp-db-backup-tr_TR.po → languages/wp-db-backup-tr_TR.po RENAMED
File without changes
wp-db-backup-zh_CN.mo → languages/wp-db-backup-zh_CN.mo RENAMED
File without changes
wp-db-backup-zh_CN.po → languages/wp-db-backup-zh_CN.po RENAMED
@@ -1,397 +1,397 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: wp-db-backup 2.1.7\n"
4
- "POT-Creation-Date: \n"
5
- "PO-Revision-Date: 2008-08-17 00:50+0800\n"
6
- "Last-Translator: paopao <wuxipaopao@gmail.com>\n"
7
- "Language-Team: WordPress 中文团队 - paopao (site: www.paopao.name, mail:wuxipaopao@gmail.com) <team@wp-cn.com>\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=utf-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "X-Poedit-KeywordsList: _e;__\n"
12
- "X-Poedit-Basepath: .\n"
13
- "X-Poedit-Language: Chinese\n"
14
- "X-Poedit-Country: CHINA\n"
15
- "X-Poedit-SearchPath-0: .\n"
16
-
17
- #: wp-db-backup.php:181
18
- msgid "Backup Complete!"
19
- msgstr "备份成功!"
20
-
21
- #: wp-db-backup.php:211
22
- msgid "Progress"
23
- msgstr "备份中"
24
-
25
- #: wp-db-backup.php:213
26
- msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
27
- msgstr "请不要进行以下操作,否则会导致备份失败:"
28
-
29
- #: wp-db-backup.php:216
30
- msgid "Close this browser"
31
- msgstr "关闭这个页面"
32
-
33
- #: wp-db-backup.php:217
34
- msgid "Reload this page"
35
- msgstr "刷新这个页面"
36
-
37
- #: wp-db-backup.php:218
38
- msgid "Click the Stop or Back buttons in your browser"
39
- msgstr "点击浏览器的停止或者后退按钮"
40
-
41
- #: wp-db-backup.php:220
42
- msgid "Progress:"
43
- msgstr "备份进度:"
44
-
45
- #: wp-db-backup.php:229
46
- msgid "Navigating away from this page will cause your backup to fail."
47
- msgstr "关闭本页面会导致数据库备份失败。"
48
-
49
- #: wp-db-backup.php:266
50
- #, php-format
51
- msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
52
- msgstr "备份成功,正在准备<a href=\\\"%s\\\">备份文件</a>以供下载……"
53
-
54
- #: wp-db-backup.php:273
55
- #, php-format
56
- msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
57
- msgstr "备份成功,正在通过电子邮件发送<a href=\\\"%s\\\">备份文件</a>……"
58
-
59
- #: wp-db-backup.php:280
60
- #, php-format
61
- msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
62
- msgstr "备份成功,在<a href=\\\"%s\\\">此处</a>下载。"
63
-
64
- #: wp-db-backup.php:340
65
- msgid "Creating backup file..."
66
- msgstr "创建备份文件……"
67
-
68
- #: wp-db-backup.php:343
69
- #, php-format
70
- msgid "Finished backing up table \\\"%s\\\"."
71
- msgstr "数据表\\\"%s\\\"备份完成。"
72
-
73
- #: wp-db-backup.php:345
74
- #, php-format
75
- msgid "Backing up table \\\"%s\\\"..."
76
- msgstr "正在备份数据表\\\"%s\\\"……"
77
-
78
- #: wp-db-backup.php:352
79
- #: wp-db-backup.php:835
80
- msgid "Could not open the backup file for writing!"
81
- msgstr "无法以写方式打开备份文件!"
82
-
83
- #: wp-db-backup.php:353
84
- msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
85
- msgstr "无法保存备份文件。请检查你的备份文件夹的写权限设置并重试。"
86
-
87
- #: wp-db-backup.php:358
88
- #: wp-db-backup.php:844
89
- msgid "WordPress MySQL database backup"
90
- msgstr "WordPress MySQL 数据库备份"
91
-
92
- #: wp-db-backup.php:360
93
- #: wp-db-backup.php:846
94
- #, php-format
95
- msgid "Generated: %s"
96
- msgstr "创建于:%s"
97
-
98
- #: wp-db-backup.php:361
99
- #: wp-db-backup.php:847
100
- #, php-format
101
- msgid "Hostname: %s"
102
- msgstr "主机名:%s"
103
-
104
- #: wp-db-backup.php:362
105
- #: wp-db-backup.php:848
106
- #, php-format
107
- msgid "Database: %s"
108
- msgstr "数据库:%s"
109
-
110
- #: wp-db-backup.php:370
111
- #: wp-db-backup.php:861
112
- #, php-format
113
- msgid "Table: %s"
114
- msgstr "数据表:%s"
115
-
116
- #: wp-db-backup.php:377
117
- msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
118
- msgstr "备份文件夹无法写入!请检查你的备份文件夹的写权限设置并重试。"
119
-
120
- #: wp-db-backup.php:434
121
- msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
122
- msgstr "按住 <code>[SHIFT]</code> 的同时点击可以选中多个复选框"
123
-
124
- #: wp-db-backup.php:474
125
- msgid "Change"
126
- msgstr "更改"
127
-
128
- #: wp-db-backup.php:483
129
- msgid "Save"
130
- msgstr "保存"
131
-
132
- #: wp-db-backup.php:566
133
- #: wp-db-backup.php:571
134
- #: wp-db-backup.php:1126
135
- msgid "Backup"
136
- msgstr "备份"
137
-
138
- #: wp-db-backup.php:646
139
- #: wp-db-backup.php:649
140
- msgid "There was an error writing a line to the backup script:"
141
- msgstr "在向备份脚本写入一行时发生错误:"
142
-
143
- #: wp-db-backup.php:681
144
- msgid "Subsequent errors have been omitted from this log."
145
- msgstr "之后的错误已经被省略。"
146
-
147
- #: wp-db-backup.php:715
148
- msgid "Error getting table details"
149
- msgstr "无法获取数据表的详细信息"
150
-
151
- #: wp-db-backup.php:723
152
- #, php-format
153
- msgid "Delete any existing table %s"
154
- msgstr "删除任何存在的 %s 数据表"
155
-
156
- #: wp-db-backup.php:732
157
- #, php-format
158
- msgid "Table structure of table %s"
159
- msgstr " %s 数据表的结构"
160
-
161
- #: wp-db-backup.php:738
162
- #, php-format
163
- msgid "Error with SHOW CREATE TABLE for %s."
164
- msgstr "无法显示创建的 %s 数据表"
165
-
166
- #: wp-db-backup.php:745
167
- #, php-format
168
- msgid "Error getting table structure of %s"
169
- msgstr "无法获取 %s 的数据表结构"
170
-
171
- #: wp-db-backup.php:753
172
- #, php-format
173
- msgid "Data contents of table %s"
174
- msgstr " %s 数据表的内容"
175
-
176
- #: wp-db-backup.php:823
177
- #, php-format
178
- msgid "End of data contents of table %s"
179
- msgstr " %s 数据表的内容结束"
180
-
181
- #: wp-db-backup.php:839
182
- msgid "The backup directory is not writeable!"
183
- msgstr "无法写入备份文件夹!"
184
-
185
- #: wp-db-backup.php:974
186
- #, php-format
187
- msgid "File not found:%s"
188
- msgstr "无法找到文件:%s"
189
-
190
- #: wp-db-backup.php:974
191
- msgid "Return to Backup"
192
- msgstr "返回备份页面"
193
-
194
- #: wp-db-backup.php:983
195
- #, php-format
196
- msgid "File %s does not exist!"
197
- msgstr "文件 %s 不存在!"
198
-
199
- #: wp-db-backup.php:990
200
- #, php-format
201
- msgid ""
202
- "Attached to this email is\n"
203
- " %1s\n"
204
- " Size:%2s kilobytes\n"
205
- msgstr ""
206
- "该电子邮件的附件\n"
207
- " %1s\n"
208
- " 大小:%2s KB\n"
209
-
210
- #: wp-db-backup.php:991
211
- msgid "Database Backup"
212
- msgstr "数据库备份"
213
-
214
- #: wp-db-backup.php:994
215
- #: wp-db-backup.php:1041
216
- msgid "The following errors were reported:"
217
- msgstr "发现以下错误:"
218
-
219
- #: wp-db-backup.php:999
220
- msgid "ERROR: The mail application has failed to deliver the backup."
221
- msgstr "错误:通过电子邮件发送备份文件失败。"
222
-
223
- #: wp-db-backup.php:1016
224
- msgid "Backup Successful"
225
- msgstr "备份成功"
226
-
227
- #: wp-db-backup.php:1020
228
- #, php-format
229
- msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
230
- msgstr "即将开始下载备份文件: <a href=\"%1s\">%2s</a> 。"
231
-
232
- #: wp-db-backup.php:1028
233
- #, php-format
234
- msgid "Your backup has been emailed to %s"
235
- msgstr "你的备份文件已经通过电子邮件发送至 %s"
236
-
237
- #: wp-db-backup.php:1031
238
- msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
239
- msgstr "你的备份文件已经被保存至服务器。如果希望现在下载,请右击并选择 \"另存为\""
240
-
241
- #: wp-db-backup.php:1032
242
- #, php-format
243
- msgid "%s bytes"
244
- msgstr "%s 字节"
245
-
246
- #: wp-db-backup.php:1068
247
- msgid "Scheduled Backup Options Saved!"
248
- msgstr "定时备份设置已保存!"
249
-
250
- #: wp-db-backup.php:1095
251
- msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
252
- msgstr "警告: 备份文件夹<strong>不存在</strong>,而且无法自动创建。"
253
-
254
- #: wp-db-backup.php:1096
255
- #, php-format
256
- msgid "Using your FTP client, try to create the backup directory yourself: %s"
257
- msgstr "请使用你的FTP客户端来自行创建如下的备份目录:%s"
258
-
259
- #: wp-db-backup.php:1100
260
- #: wp-db-backup.php:1111
261
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
262
- msgstr "警告: 备份文件夹<strong>无法</strong>写入!无法创建备份文件。"
263
-
264
- #: wp-db-backup.php:1101
265
- #, php-format
266
- msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
267
- msgstr "请使用你的FTP客户端来设置备份目录的权限为 %1$s 或者 %2$s: %3$s"
268
-
269
- #: wp-db-backup.php:1113
270
- msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
271
- msgstr "这个问题可能是由于当前服务器的 <code>safe_mode</code> 文件的所有权限制引起的,这个文件限制了WordPress之类的网络应用程序创建文件的权限。"
272
-
273
- #: wp-db-backup.php:1115
274
- #, php-format
275
- msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
276
- msgstr "请使用你的FTP客户端来删除并重新创建如下的备份目录:%s ,这样可能有助于解决当前的问题"
277
-
278
- #: wp-db-backup.php:1129
279
- msgid "Tables"
280
- msgstr "数据表"
281
-
282
- #: wp-db-backup.php:1131
283
- msgid "These core WordPress tables will always be backed up:"
284
- msgstr "以下 WordPress 核心数据表会默认备份:"
285
-
286
- #: wp-db-backup.php:1136
287
- msgid "Exclude spam comments"
288
- msgstr "不包括垃圾评论"
289
-
290
- #: wp-db-backup.php:1139
291
- msgid "Exclude post revisions"
292
- msgstr "不包括日志修订"
293
-
294
- #: wp-db-backup.php:1150
295
- msgid "You may choose to include any of the following tables:"
296
- msgstr "你可以选择备份以下的任何数据表:"
297
-
298
- #: wp-db-backup.php:1164
299
- msgid "Backup Options"
300
- msgstr "备份选项"
301
-
302
- #: wp-db-backup.php:1165
303
- msgid "What to do with the backup file:"
304
- msgstr "怎样处理备份文件:"
305
-
306
- #: wp-db-backup.php:1169
307
- msgid "Save to server"
308
- msgstr "保存至服务器"
309
-
310
- #: wp-db-backup.php:1174
311
- msgid "Download to your computer"
312
- msgstr "下载至本地电脑"
313
-
314
- #: wp-db-backup.php:1178
315
- #: wp-db-backup.php:1235
316
- msgid "Email backup to:"
317
- msgstr "通过电子邮件发送备份至:"
318
-
319
- #: wp-db-backup.php:1185
320
- msgid "Backup now!"
321
- msgstr "立即备份!"
322
-
323
- #: wp-db-backup.php:1188
324
- msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
325
- msgstr "警告:备份文件夹<strong>无法</strong>写入!"
326
-
327
- #: wp-db-backup.php:1199
328
- msgid "Scheduled Backup"
329
- msgstr "定时备份"
330
-
331
- #: wp-db-backup.php:1206
332
- #, php-format
333
- msgid "Next Backup: %s"
334
- msgstr "下一次备份时间:%s"
335
-
336
- #: wp-db-backup.php:1211
337
- #, php-format
338
- msgid "Last WP-Cron Daily Execution: %s"
339
- msgstr "上一次 WP-Cron 每日执行时间:%s"
340
-
341
- #: wp-db-backup.php:1212
342
- #, php-format
343
- msgid "Next WP-Cron Daily Execution: %s"
344
- msgstr "下一次 WP-Cron 每日备份时间:%s"
345
-
346
- #: wp-db-backup.php:1217
347
- msgid "Schedule: "
348
- msgstr "定时任务:"
349
-
350
- #: wp-db-backup.php:1220
351
- msgid "None"
352
- msgstr "无"
353
-
354
- #: wp-db-backup.php:1220
355
- msgid "Daily"
356
- msgstr "每日"
357
-
358
- #: wp-db-backup.php:1243
359
- msgid "Tables to include in the scheduled backup:"
360
- msgstr "定时备份包含的数据表:"
361
-
362
- #: wp-db-backup.php:1253
363
- #, fuzzy
364
- msgid "Schedule backup"
365
- msgstr "定时备份"
366
-
367
- #: wp-db-backup.php:1278
368
- msgid "Never"
369
- msgstr "从不"
370
-
371
- #: wp-db-backup.php:1283
372
- #, php-format
373
- msgid "%s seconds"
374
- msgstr "%s 秒"
375
-
376
- #: wp-db-backup.php:1316
377
- msgid "Once Weekly"
378
- msgstr "每周"
379
-
380
- #: wp-db-backup.php:1329
381
- #, php-format
382
- msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
383
- msgstr "你的 %1s 版 WordPress 缺少一些重要的安全特性,由于在该版本上运行 WP-DB-Backup 插件极不安全,我们已经自动禁用了该插件。请<a href=\"%2s\">升级 WordPress </a>至较新的版本。"
384
-
385
- #: wp-db-backup.php:1347
386
- msgid "You are not allowed to perform backups."
387
- msgstr "你没有进行备份的权限。"
388
-
389
- #: wp-db-backup.php:1362
390
- #, php-format
391
- msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
392
- msgstr "该站点尝试未授权地访问位于 %1s 的你的数据库。访问已经被终止。"
393
-
394
- #: wp-db-backup.php:1373
395
- msgid "Cheatin' uh ?"
396
- msgstr "想骗我吗?"
397
-
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: wp-db-backup 2.1.7\n"
4
+ "POT-Creation-Date: \n"
5
+ "PO-Revision-Date: 2008-08-17 00:50+0800\n"
6
+ "Last-Translator: paopao <wuxipaopao@gmail.com>\n"
7
+ "Language-Team: WordPress 中文团队 - paopao (site: www.paopao.name, mail:wuxipaopao@gmail.com) <team@wp-cn.com>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-KeywordsList: _e;__\n"
12
+ "X-Poedit-Basepath: .\n"
13
+ "X-Poedit-Language: Chinese\n"
14
+ "X-Poedit-Country: CHINA\n"
15
+ "X-Poedit-SearchPath-0: .\n"
16
+
17
+ #: wp-db-backup.php:181
18
+ msgid "Backup Complete!"
19
+ msgstr "备份成功!"
20
+
21
+ #: wp-db-backup.php:211
22
+ msgid "Progress"
23
+ msgstr "备份中"
24
+
25
+ #: wp-db-backup.php:213
26
+ msgid "DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:"
27
+ msgstr "请不要进行以下操作,否则会导致备份失败:"
28
+
29
+ #: wp-db-backup.php:216
30
+ msgid "Close this browser"
31
+ msgstr "关闭这个页面"
32
+
33
+ #: wp-db-backup.php:217
34
+ msgid "Reload this page"
35
+ msgstr "刷新这个页面"
36
+
37
+ #: wp-db-backup.php:218
38
+ msgid "Click the Stop or Back buttons in your browser"
39
+ msgstr "点击浏览器的停止或者后退按钮"
40
+
41
+ #: wp-db-backup.php:220
42
+ msgid "Progress:"
43
+ msgstr "备份进度:"
44
+
45
+ #: wp-db-backup.php:229
46
+ msgid "Navigating away from this page will cause your backup to fail."
47
+ msgstr "关闭本页面会导致数据库备份失败。"
48
+
49
+ #: wp-db-backup.php:266
50
+ #, php-format
51
+ msgid "Backup complete, preparing <a href=\\\"%s\\\">backup</a> for download..."
52
+ msgstr "备份成功,正在准备<a href=\\\"%s\\\">备份文件</a>以供下载……"
53
+
54
+ #: wp-db-backup.php:273
55
+ #, php-format
56
+ msgid "Backup complete, sending <a href=\\\"%s\\\">backup</a> via email..."
57
+ msgstr "备份成功,正在通过电子邮件发送<a href=\\\"%s\\\">备份文件</a>……"
58
+
59
+ #: wp-db-backup.php:280
60
+ #, php-format
61
+ msgid "Backup complete, download <a href=\\\"%s\\\">here</a>."
62
+ msgstr "备份成功,在<a href=\\\"%s\\\">此处</a>下载。"
63
+
64
+ #: wp-db-backup.php:340
65
+ msgid "Creating backup file..."
66
+ msgstr "创建备份文件……"
67
+
68
+ #: wp-db-backup.php:343
69
+ #, php-format
70
+ msgid "Finished backing up table \\\"%s\\\"."
71
+ msgstr "数据表\\\"%s\\\"备份完成。"
72
+
73
+ #: wp-db-backup.php:345
74
+ #, php-format
75
+ msgid "Backing up table \\\"%s\\\"..."
76
+ msgstr "正在备份数据表\\\"%s\\\"……"
77
+
78
+ #: wp-db-backup.php:352
79
+ #: wp-db-backup.php:835
80
+ msgid "Could not open the backup file for writing!"
81
+ msgstr "无法以写方式打开备份文件!"
82
+
83
+ #: wp-db-backup.php:353
84
+ msgid "The backup file could not be saved. Please check the permissions for writing to your backup directory and try again."
85
+ msgstr "无法保存备份文件。请检查你的备份文件夹的写权限设置并重试。"
86
+
87
+ #: wp-db-backup.php:358
88
+ #: wp-db-backup.php:844
89
+ msgid "WordPress MySQL database backup"
90
+ msgstr "WordPress MySQL 数据库备份"
91
+
92
+ #: wp-db-backup.php:360
93
+ #: wp-db-backup.php:846
94
+ #, php-format
95
+ msgid "Generated: %s"
96
+ msgstr "创建于:%s"
97
+
98
+ #: wp-db-backup.php:361
99
+ #: wp-db-backup.php:847
100
+ #, php-format
101
+ msgid "Hostname: %s"
102
+ msgstr "主机名:%s"
103
+
104
+ #: wp-db-backup.php:362
105
+ #: wp-db-backup.php:848
106
+ #, php-format
107
+ msgid "Database: %s"
108
+ msgstr "数据库:%s"
109
+
110
+ #: wp-db-backup.php:370
111
+ #: wp-db-backup.php:861
112
+ #, php-format
113
+ msgid "Table: %s"
114
+ msgstr "数据表:%s"
115
+
116
+ #: wp-db-backup.php:377
117
+ msgid "The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again."
118
+ msgstr "备份文件夹无法写入!请检查你的备份文件夹的写权限设置并重试。"
119
+
120
+ #: wp-db-backup.php:434
121
+ msgid "Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes"
122
+ msgstr "按住 <code>[SHIFT]</code> 的同时点击可以选中多个复选框"
123
+
124
+ #: wp-db-backup.php:474
125
+ msgid "Change"
126
+ msgstr "更改"
127
+
128
+ #: wp-db-backup.php:483
129
+ msgid "Save"
130
+ msgstr "保存"
131
+
132
+ #: wp-db-backup.php:566
133
+ #: wp-db-backup.php:571
134
+ #: wp-db-backup.php:1126
135
+ msgid "Backup"
136
+ msgstr "备份"
137
+
138
+ #: wp-db-backup.php:646
139
+ #: wp-db-backup.php:649
140
+ msgid "There was an error writing a line to the backup script:"
141
+ msgstr "在向备份脚本写入一行时发生错误:"
142
+
143
+ #: wp-db-backup.php:681
144
+ msgid "Subsequent errors have been omitted from this log."
145
+ msgstr "之后的错误已经被省略。"
146
+
147
+ #: wp-db-backup.php:715
148
+ msgid "Error getting table details"
149
+ msgstr "无法获取数据表的详细信息"
150
+
151
+ #: wp-db-backup.php:723
152
+ #, php-format
153
+ msgid "Delete any existing table %s"
154
+ msgstr "删除任何存在的 %s 数据表"
155
+
156
+ #: wp-db-backup.php:732
157
+ #, php-format
158
+ msgid "Table structure of table %s"
159
+ msgstr " %s 数据表的结构"
160
+
161
+ #: wp-db-backup.php:738
162
+ #, php-format
163
+ msgid "Error with SHOW CREATE TABLE for %s."
164
+ msgstr "无法显示创建的 %s 数据表"
165
+
166
+ #: wp-db-backup.php:745
167
+ #, php-format
168
+ msgid "Error getting table structure of %s"
169
+ msgstr "无法获取 %s 的数据表结构"
170
+
171
+ #: wp-db-backup.php:753
172
+ #, php-format
173
+ msgid "Data contents of table %s"
174
+ msgstr " %s 数据表的内容"
175
+
176
+ #: wp-db-backup.php:823
177
+ #, php-format
178
+ msgid "End of data contents of table %s"
179
+ msgstr " %s 数据表的内容结束"
180
+
181
+ #: wp-db-backup.php:839
182
+ msgid "The backup directory is not writeable!"
183
+ msgstr "无法写入备份文件夹!"
184
+
185
+ #: wp-db-backup.php:974
186
+ #, php-format
187
+ msgid "File not found:%s"
188
+ msgstr "无法找到文件:%s"
189
+
190
+ #: wp-db-backup.php:974
191
+ msgid "Return to Backup"
192
+ msgstr "返回备份页面"
193
+
194
+ #: wp-db-backup.php:983
195
+ #, php-format
196
+ msgid "File %s does not exist!"
197
+ msgstr "文件 %s 不存在!"
198
+
199
+ #: wp-db-backup.php:990
200
+ #, php-format
201
+ msgid ""
202
+ "Attached to this email is\n"
203
+ " %1s\n"
204
+ " Size:%2s kilobytes\n"
205
+ msgstr ""
206
+ "该电子邮件的附件\n"
207
+ " %1s\n"
208
+ " 大小:%2s KB\n"
209
+
210
+ #: wp-db-backup.php:991
211
+ msgid "Database Backup"
212
+ msgstr "数据库备份"
213
+
214
+ #: wp-db-backup.php:994
215
+ #: wp-db-backup.php:1041
216
+ msgid "The following errors were reported:"
217
+ msgstr "发现以下错误:"
218
+
219
+ #: wp-db-backup.php:999
220
+ msgid "ERROR: The mail application has failed to deliver the backup."
221
+ msgstr "错误:通过电子邮件发送备份文件失败。"
222
+
223
+ #: wp-db-backup.php:1016
224
+ msgid "Backup Successful"
225
+ msgstr "备份成功"
226
+
227
+ #: wp-db-backup.php:1020
228
+ #, php-format
229
+ msgid "Your backup file: <a href=\"%1s\">%2s</a> should begin downloading shortly."
230
+ msgstr "即将开始下载备份文件: <a href=\"%1s\">%2s</a> 。"
231
+
232
+ #: wp-db-backup.php:1028
233
+ #, php-format
234
+ msgid "Your backup has been emailed to %s"
235
+ msgstr "你的备份文件已经通过电子邮件发送至 %s"
236
+
237
+ #: wp-db-backup.php:1031
238
+ msgid "Your backup file has been saved on the server. If you would like to download it now, right click and select \"Save As\""
239
+ msgstr "你的备份文件已经被保存至服务器。如果希望现在下载,请右击并选择 \"另存为\""
240
+
241
+ #: wp-db-backup.php:1032
242
+ #, php-format
243
+ msgid "%s bytes"
244
+ msgstr "%s 字节"
245
+
246
+ #: wp-db-backup.php:1068
247
+ msgid "Scheduled Backup Options Saved!"
248
+ msgstr "定时备份设置已保存!"
249
+
250
+ #: wp-db-backup.php:1095
251
+ msgid "WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it."
252
+ msgstr "警告: 备份文件夹<strong>不存在</strong>,而且无法自动创建。"
253
+
254
+ #: wp-db-backup.php:1096
255
+ #, php-format
256
+ msgid "Using your FTP client, try to create the backup directory yourself: %s"
257
+ msgstr "请使用你的FTP客户端来自行创建如下的备份目录:%s"
258
+
259
+ #: wp-db-backup.php:1100
260
+ #: wp-db-backup.php:1111
261
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files."
262
+ msgstr "警告: 备份文件夹<strong>无法</strong>写入!无法创建备份文件。"
263
+
264
+ #: wp-db-backup.php:1101
265
+ #, php-format
266
+ msgid "Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s"
267
+ msgstr "请使用你的FTP客户端来设置备份目录的权限为 %1$s 或者 %2$s: %3$s"
268
+
269
+ #: wp-db-backup.php:1113
270
+ msgid "This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create."
271
+ msgstr "这个问题可能是由于当前服务器的 <code>safe_mode</code> 文件的所有权限制引起的,这个文件限制了WordPress之类的网络应用程序创建文件的权限。"
272
+
273
+ #: wp-db-backup.php:1115
274
+ #, php-format
275
+ msgid "You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s"
276
+ msgstr "请使用你的FTP客户端来删除并重新创建如下的备份目录:%s ,这样可能有助于解决当前的问题"
277
+
278
+ #: wp-db-backup.php:1129
279
+ msgid "Tables"
280
+ msgstr "数据表"
281
+
282
+ #: wp-db-backup.php:1131
283
+ msgid "These core WordPress tables will always be backed up:"
284
+ msgstr "以下 WordPress 核心数据表会默认备份:"
285
+
286
+ #: wp-db-backup.php:1136
287
+ msgid "Exclude spam comments"
288
+ msgstr "不包括垃圾评论"
289
+
290
+ #: wp-db-backup.php:1139
291
+ msgid "Exclude post revisions"
292
+ msgstr "不包括日志修订"
293
+
294
+ #: wp-db-backup.php:1150
295
+ msgid "You may choose to include any of the following tables:"
296
+ msgstr "你可以选择备份以下的任何数据表:"
297
+
298
+ #: wp-db-backup.php:1164
299
+ msgid "Backup Options"
300
+ msgstr "备份选项"
301
+
302
+ #: wp-db-backup.php:1165
303
+ msgid "What to do with the backup file:"
304
+ msgstr "怎样处理备份文件:"
305
+
306
+ #: wp-db-backup.php:1169
307
+ msgid "Save to server"
308
+ msgstr "保存至服务器"
309
+
310
+ #: wp-db-backup.php:1174
311
+ msgid "Download to your computer"
312
+ msgstr "下载至本地电脑"
313
+
314
+ #: wp-db-backup.php:1178
315
+ #: wp-db-backup.php:1235
316
+ msgid "Email backup to:"
317
+ msgstr "通过电子邮件发送备份至:"
318
+
319
+ #: wp-db-backup.php:1185
320
+ msgid "Backup now!"
321
+ msgstr "立即备份!"
322
+
323
+ #: wp-db-backup.php:1188
324
+ msgid "WARNING: Your backup directory is <strong>NOT</strong> writable!"
325
+ msgstr "警告:备份文件夹<strong>无法</strong>写入!"
326
+
327
+ #: wp-db-backup.php:1199
328
+ msgid "Scheduled Backup"
329
+ msgstr "定时备份"
330
+
331
+ #: wp-db-backup.php:1206
332
+ #, php-format
333
+ msgid "Next Backup: %s"
334
+ msgstr "下一次备份时间:%s"
335
+
336
+ #: wp-db-backup.php:1211
337
+ #, php-format
338
+ msgid "Last WP-Cron Daily Execution: %s"
339
+ msgstr "上一次 WP-Cron 每日执行时间:%s"
340
+
341
+ #: wp-db-backup.php:1212
342
+ #, php-format
343
+ msgid "Next WP-Cron Daily Execution: %s"
344
+ msgstr "下一次 WP-Cron 每日备份时间:%s"
345
+
346
+ #: wp-db-backup.php:1217
347
+ msgid "Schedule: "
348
+ msgstr "定时任务:"
349
+
350
+ #: wp-db-backup.php:1220
351
+ msgid "None"
352
+ msgstr "无"
353
+
354
+ #: wp-db-backup.php:1220
355
+ msgid "Daily"
356
+ msgstr "每日"
357
+
358
+ #: wp-db-backup.php:1243
359
+ msgid "Tables to include in the scheduled backup:"
360
+ msgstr "定时备份包含的数据表:"
361
+
362
+ #: wp-db-backup.php:1253
363
+ #, fuzzy
364
+ msgid "Schedule backup"
365
+ msgstr "定时备份"
366
+
367
+ #: wp-db-backup.php:1278
368
+ msgid "Never"
369
+ msgstr "从不"
370
+
371
+ #: wp-db-backup.php:1283
372
+ #, php-format
373
+ msgid "%s seconds"
374
+ msgstr "%s 秒"
375
+
376
+ #: wp-db-backup.php:1316
377
+ msgid "Once Weekly"
378
+ msgstr "每周"
379
+
380
+ #: wp-db-backup.php:1329
381
+ #, php-format
382
+ msgid "Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href=\"%2s\">upgrading WordPress</a> to a more recent version."
383
+ msgstr "你的 %1s 版 WordPress 缺少一些重要的安全特性,由于在该版本上运行 WP-DB-Backup 插件极不安全,我们已经自动禁用了该插件。请<a href=\"%2s\">升级 WordPress </a>至较新的版本。"
384
+
385
+ #: wp-db-backup.php:1347
386
+ msgid "You are not allowed to perform backups."
387
+ msgstr "你没有进行备份的权限。"
388
+
389
+ #: wp-db-backup.php:1362
390
+ #, php-format
391
+ msgid "There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted."
392
+ msgstr "该站点尝试未授权地访问位于 %1s 的你的数据库。访问已经被终止。"
393
+
394
+ #: wp-db-backup.php:1373
395
+ msgid "Cheatin' uh ?"
396
+ msgstr "想骗我吗?"
397
+
wp-db-backup.pot → languages/wp-db-backup.pot RENAMED
File without changes
readme.txt CHANGED
@@ -1,25 +1,20 @@
1
- === WP-DB-Backup ===
2
- Contributors: filosofo
3
- Donate link: http://austinmatzko.com/wordpress-plugins/wp-db-backup/
4
  Tags: mysql, database, backup, cron
5
  Requires at least: 3.6.0
6
- Tested up to: 4.9.2
7
- Stable tag: 2.3.3
 
8
 
9
  On-demand backup of your WordPress database.
10
 
11
  == Description ==
12
 
13
- WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
14
 
15
  Released under the terms of the GNU GPL, version 2.
16
- http://www.fsf.org/licensing/licenses/gpl.html
17
 
18
- NO WARRANTY.
19
-
20
- Copyright (c) 2018 Austin Matzko
21
-
22
- [Source Code on GitHub](https://github.com/matzko/wp-db-backup)
23
 
24
  == Installation ==
25
  1. Extract the wp-db-backup/ folder file to /wp-content/plugins/
@@ -42,30 +37,29 @@ Briefly, use phpMyAdmin, which is included with most hosting control panels. Mor
42
  If you edit the text of wp-db-backup.php in a text editor like Notepad, you’ll see around line 50 the following:
43
 
44
  `/**
45
- * Set MOD_EVASIVE_OVERRIDE to true
46
- * and increase MOD_EVASIVE_DELAY
47
  * if the backup stops prematurely.
48
  */
49
- // define('MOD_EVASIVE_OVERRIDE', false);
50
- define('MOD_EVASIVE_DELAY', '500');`
51
 
52
- Do what it says: un-comment MOD_EVASIVE_OVERRIDE and set it to true like so:
53
 
54
- `define('MOD_EVASIVE_OVERRIDE', true);`
55
 
56
- That will slow down the plugin, and you can slow it even further by increasing the MOD_EVASIVE_DELAY number from 500.
57
 
58
- Better yet, put the lines that define the `MOD_EVASIVE_OVERRIDE` and `MOD_EVASIVE_DELAY` constants in your wp-config.php file, so your settings don't get erased when you upgrade the plugin.
59
 
60
  = What is wp-db-backup.pot for? =
61
 
62
- This files is used by non-English users to translate the display into their native language. Translators are encouraged to send me translated files, which will be made available to others here:
63
- http://austinmatzko.com/wordpress-plugins/wp-db-backup/i18n/
64
  http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/
65
 
66
  = Why are only the core database files backed up by default? =
67
 
68
- Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
69
 
70
  == Usage ==
71
  1. Click the Tools or Manage menu in your WordPress admin area.
@@ -94,7 +88,14 @@ When having the database backup emailed or sent to your browser for immediate do
94
 
95
  == Changelog ==
96
 
97
- = 2.3.0 =
 
 
 
 
 
 
 
98
  * Remove backup directory use
99
 
100
  = 2.2.4 =
@@ -121,7 +122,7 @@ If you are using WordPress version 2.1 or newer, you can schedule automated back
121
  of your choice.
122
 
123
  == Translators ==
124
- Thanks to following people for providing translation files for WP-DB-Backup:
125
  * Abel Cheung
126
  * Alejandro Urrutia
127
  * Alexander Kanakaris
@@ -156,4 +157,4 @@ Thanks to following people for providing translation files for WP-DB-Backup:
156
  * 吴曦
157
 
158
  == Past Contributors ==
159
- skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
1
+ === Database Backup for WordPress ===
2
+ Contributors: deliciousbrains
 
3
  Tags: mysql, database, backup, cron
4
  Requires at least: 3.6.0
5
+ Tested up to: 5.7
6
+ Stable tag: 2.4
7
+ Requires PHP: 5.3
8
 
9
  On-demand backup of your WordPress database.
10
 
11
  == Description ==
12
 
13
+ Database Backup for WordPress allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
14
 
15
  Released under the terms of the GNU GPL, version 2.
 
16
 
17
+ [Source Code on GitHub](https://github.com/deliciousbrains/wp-db-backup)
 
 
 
 
18
 
19
  == Installation ==
20
  1. Extract the wp-db-backup/ folder file to /wp-content/plugins/
37
  If you edit the text of wp-db-backup.php in a text editor like Notepad, you’ll see around line 50 the following:
38
 
39
  `/**
40
+ * Set DBBWP_MOD_EVASIVE_OVERRIDE to true
41
+ * and increase DBBWP_MOD_EVASIVE_DELAY
42
  * if the backup stops prematurely.
43
  */
44
+ // define('DBBWP_MOD_EVASIVE_OVERRIDE', false);
45
+ define('DBBWP_MOD_EVASIVE_DELAY', '500');`
46
 
47
+ Do what it says: un-comment DBBWP_MOD_EVASIVE_OVERRIDE and set it to true like so:
48
 
49
+ `define('DBBWP_MOD_EVASIVE_OVERRIDE', true);`
50
 
51
+ That will slow down the plugin, and you can slow it even further by increasing the DBBWP_MOD_EVASIVE_DELAY number from 500.
52
 
53
+ Better yet, put the lines that define the `DBBWP_MOD_EVASIVE_OVERRIDE` and `DBBWP_MOD_EVASIVE_DELAY` constants in your wp-config.php file, so your settings don't get erased when you upgrade the plugin.
54
 
55
  = What is wp-db-backup.pot for? =
56
 
57
+ This files is used by non-English users to translate the display into their native language. Translators are encouraged to submit translated files, which will be made available to others here:
 
58
  http://plugins.trac.wordpress.org/browser/wp-db-backup/i18n/
59
 
60
  = Why are only the core database files backed up by default? =
61
 
62
+ Because it's a fairly safe bet that the core WordPress files will be successfully backed up. Plugins vary wildly in the amount of data that they store. For instance, it's not uncommon for some statistics plugins to have tens of megabytes worth of visitor statistics. These are not exactly essential items to restore after a catastrophic failure. Most poeple can reasonably live without this data in their backups.
63
 
64
  == Usage ==
65
  1. Click the Tools or Manage menu in your WordPress admin area.
88
 
89
  == Changelog ==
90
 
91
+ = 2.4 =
92
+ * Compatibility with PHP 8 and WordPress 5.7
93
+ * Fix email backup functionality
94
+ * Fix for bug where backup file would be gzipped twice
95
+ * Fixes for several PHP notices
96
+ * Add `DBBWP_` prefix to global constants
97
+
98
+ = 2.3 =
99
  * Remove backup directory use
100
 
101
  = 2.2.4 =
122
  of your choice.
123
 
124
  == Translators ==
125
+ Thanks to following people for providing translation files for Database Backup for WordPress:
126
  * Abel Cheung
127
  * Alejandro Urrutia
128
  * Alexander Kanakaris
157
  * 吴曦
158
 
159
  == Past Contributors ==
160
+ filosofo, skippy, Firas, LaughingLizard, MtDewVirus, Podz, Ringmaster
wp-db-backup.php CHANGED
@@ -1,88 +1,96 @@
1
  <?php
2
  /*
3
- Plugin Name: WordPress Database Backup
4
  Plugin URI: https://github.com/matzko/wp-db-backup
5
  Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup">Tools &rarr; Backup</a> to get started.
6
- Author: Austin Matzko
7
- Author URI: http://austinmatzko.com/
8
- Version: 2.3.3
 
9
 
10
  Copyright 2018 Austin Matzko (email : austin at pressedcode.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, USA
25
  */
26
 
27
- if ( ! defined('ABSPATH') ) {
28
- die('Please do not load this file directly.');
29
  }
30
 
31
- $rand = substr( md5( md5( DB_PASSWORD ) ), -5 );
32
- global $wpdbb_content_dir, $wpdbb_content_url;
33
- $wpdbb_content_dir = ( defined('WP_CONTENT_DIR') ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
34
- $wpdbb_content_url = ( defined('WP_CONTENT_URL') ) ? WP_CONTENT_URL : get_option('siteurl') . '/wp-content';
35
-
36
- if ( ! defined('ROWS_PER_SEGMENT') ) {
37
- define('ROWS_PER_SEGMENT', 100);
38
  }
39
 
40
  /**
41
- * Set MOD_EVASIVE_OVERRIDE to true
42
- * and increase MOD_EVASIVE_DELAY
43
  * if the backup stops prematurely.
44
  */
45
- // define('MOD_EVASIVE_OVERRIDE', false);
46
- if ( ! defined('MOD_EVASIVE_DELAY') ) {
47
- define('MOD_EVASIVE_DELAY', '500');
48
  }
49
 
50
  class wpdbBackup {
51
 
52
  var $backup_complete = false;
53
- var $backup_file = '';
54
  var $backup_filename;
55
  var $core_table_names = array();
56
- var $errors = array();
57
  var $basename;
58
  var $page_url;
59
  var $referer_check_key;
60
- var $version = '2.3.3';
61
 
62
  function module_check() {
63
  $mod_evasive = false;
64
- if ( defined( 'MOD_EVASIVE_OVERRIDE' ) && true === MOD_EVASIVE_OVERRIDE ) return true;
65
- if ( ! defined( 'MOD_EVASIVE_OVERRIDE' ) || false === MOD_EVASIVE_OVERRIDE ) return false;
66
- if ( function_exists('apache_get_modules') )
67
- foreach( (array) apache_get_modules() as $mod )
68
- if ( false !== strpos($mod,'mod_evasive') || false !== strpos($mod,'mod_dosevasive') )
 
 
 
 
 
 
 
69
  return true;
 
 
 
 
70
  return false;
71
  }
72
 
73
  function __construct() {
74
  global $table_prefix, $wpdb;
75
- add_action('wp_ajax_save_backup_time', array(&$this, 'save_backup_time'));
76
- add_action('init', array(&$this, 'init_textdomain'));
77
- add_action('init', array(&$this, 'set_page_url'));
78
- add_action('admin_init', array(&$this, 'update_notice_action'));
79
- add_action('wp_db_backup_cron', array(&$this, 'cron_backup'));
80
- add_action('wp_cron_daily', array(&$this, 'wp_cron_daily'));
81
- add_filter('cron_schedules', array(&$this, 'add_sched_options'));
82
- add_filter('wp_db_b_schedule_choices', array(&$this, 'schedule_choices'));
83
-
84
- $table_prefix = ( isset( $table_prefix ) ) ? $table_prefix : $wpdb->prefix;
85
- $datum = date("Ymd_B");
 
86
  $this->backup_filename = DB_NAME . "_$table_prefix$datum.sql";
87
 
88
  $possible_names = array(
@@ -99,150 +107,167 @@ class wpdbBackup {
99
  'terms',
100
  'term_taxonomy',
101
  'term_relationships',
 
102
  'users',
103
  'usermeta',
104
  );
105
 
106
- foreach( $possible_names as $name ) {
107
  if ( isset( $wpdb->{$name} ) ) {
108
  $this->core_table_names[] = $wpdb->{$name};
109
  }
110
  }
111
 
112
- $requested_temp_dir = sanitize_text_field($_GET['wp_db_temp_dir']);
113
- $this->backup_dir = trailingslashit(apply_filters('wp_db_b_backup_dir', (isset($requested_temp_dir) && is_writable($requested_temp_dir)) ? $requested_temp_dir : get_temp_dir()));
114
- $this->basename = 'wp-db-backup';
 
 
 
 
 
 
 
 
115
 
116
  $this->referer_check_key = $this->basename . '-download_' . DB_NAME;
117
- if (isset($_POST['do_backup'])) {
118
- $this->wp_secure('fatal');
119
- check_admin_referer($this->referer_check_key);
120
- $this->can_user_backup('main');
121
 
122
  // save exclude prefs
123
- update_option('wp_db_backup_excs', array(
124
- 'revisions' => $this->get_revisions_to_exclude(),
125
- 'spam' => $this->get_spam_to_exclude()
126
- ));
127
- switch($_POST['do_backup']) {
128
- case 'backup':
129
- add_action('init', array(&$this, 'perform_backup'));
130
- break;
131
- case 'fragments':
132
- add_action('admin_menu', array(&$this, 'fragment_menu'));
133
- break;
 
 
 
134
  }
135
- } elseif (isset($_GET['fragment'] )) {
136
- $this->can_user_backup('frame');
137
- add_action('init', array(&$this, 'init'));
138
- } elseif (isset($_GET['backup'] )) {
139
  $this->can_user_backup();
140
- add_action('init', array(&$this, 'init'));
141
  } else {
142
- add_action('admin_menu', array(&$this, 'admin_menu'));
143
  }
144
  }
145
 
146
  function init() {
147
  $this->can_user_backup();
148
- if (isset($_GET['backup'])) {
149
- $via = isset($_GET['via']) ? sanitize_text_field($_GET['via']) : 'http';
150
-
151
- $this->backup_file = sanitize_text_field($_GET['backup']);
152
- $this->validate_file($this->backup_file);
153
-
154
- switch($via) {
155
- case 'smtp':
156
- case 'email':
157
- $success = $this->deliver_backup($this->backup_file, 'smtp', sanitize_text_field($_GET['recipient']), 'frame');
158
- $this->error_display( 'frame' );
159
- if ( $success ) {
160
- echo '
161
  <!-- ' . $via . ' -->
162
  <script type="text/javascript"><!--\\
163
  ';
164
- echo '
165
- alert("' . __('Backup Complete!','wp-db-backup') . '");
166
  window.onbeforeunload = null;
167
  </script>
168
  ';
169
- }
170
- break;
171
- default:
172
- $success = $this->deliver_backup($this->backup_file, $via);
173
- echo $this->error_display( 'frame', false );
174
 
175
- if ( $success ) {
176
- echo '
177
  <script type="text/javascript">
178
- window.parent.setProgress("' . __('Backup Complete!','wp-db-backup') . '");
179
  </script>
180
  ';
181
- }
182
  }
183
  exit;
184
  }
185
- if (isset($_GET['fragment'] )) {
186
- list($table, $segment, $filename) = explode(':', sanitize_text_field($_GET['fragment']));
187
- $this->validate_file($filename);
188
- $this->backup_fragment($table, $segment, $filename);
 
189
  }
190
 
191
  die();
192
  }
193
 
194
  function init_textdomain() {
195
- load_plugin_textdomain('wp-db-backup', str_replace(ABSPATH, '', dirname(__FILE__)), dirname(plugin_basename(__FILE__)));
 
 
 
 
196
  }
197
 
198
  function set_page_url() {
199
  $query_args = array( 'page' => $this->basename );
200
- if ( function_exists('wp_create_nonce') )
201
- $query_args = array_merge( $query_args, array('_wpnonce' => wp_create_nonce($this->referer_check_key)) );
202
- $base = ( function_exists('site_url') ) ? site_url('', 'admin') : get_option('siteurl');
203
- $this->page_url = add_query_arg( $query_args, $base . '/wp-admin/edit.php');
 
 
 
204
  }
205
 
206
  /*
207
  * Add a link to back up your database when doing a core upgrade.
208
  */
209
- function update_notice_action() {
210
  global $pagenow;
211
- if (
212
- (
213
- isset($_REQUEST['action'])
214
- && ('upgrade-core' == $_REQUEST['action'])
215
- )
216
- || (
217
- !empty($pagenow) && ('update-core.php' == $pagenow)
218
- )
219
- ) :
220
- ob_start(array(&$this, 'update_notice'));
221
- add_action('admin_footer', create_function('', 'ob_end_flush();'));
222
- endif;
223
- }
224
 
225
- function update_notice($text = '') {
226
- $pattern = '#(<a href\="' . __('http://codex.wordpress.org/WordPress_Backups') . '">.*?</p>)#';
227
- $replace = '$1' . "\n<p>" . sprintf(__('Click <a href="%s" target="_blank">here</a> to back up your database using the WordPress Database Backup plugin. <strong>Note:</strong> WordPress Database Backup does <em>not</em> back up your files, just your database.', 'wp-db-backup'), 'tools.php?page=wp-db-backup') . "</p>\n";
228
- $text = preg_replace($pattern, $replace, $text);
229
- return $text;
 
 
 
 
 
 
 
 
 
 
230
  }
231
 
232
  function build_backup_script() {
233
  global $table_prefix, $wpdb;
234
 
235
  echo "<div class='wrap'>";
236
- echo '<fieldset class="options"><legend>' . __('Progress','wp-db-backup') . '</legend>
237
  <p><strong>' .
238
- __('DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:','wp-db-backup').
239
  '</strong></p>
240
  <ol>
241
- <li>'.__('Close this browser','wp-db-backup').'</li>
242
- <li>'.__('Reload this page','wp-db-backup').'</li>
243
- <li>'.__('Click the Stop or Back buttons in your browser','wp-db-backup').'</li>
244
  </ol>
245
- <p><strong>' . __('Progress:','wp-db-backup') . '</strong></p>
246
  <div id="meterbox" style="height:11px;width:80%;padding:3px;border:1px solid #659fff;"><div id="meter" style="color:#fff;height:11px;line-height:11px;background-color:#659fff;width:0%;text-align:center;font-size:6pt;">&nbsp;</div></div>
247
  <div id="progress_message"></div>
248
  <div id="errors"></div>
@@ -251,7 +276,7 @@ class wpdbBackup {
251
  <script type="text/javascript">
252
  //<![CDATA[
253
  window.onbeforeunload = function() {
254
- return "' . __('Navigating away from this page will cause your backup to fail.', 'wp-db-backup') . '";
255
  }
256
  function setMeter(pct) {
257
  var meter = document.getElementById("meter");
@@ -284,11 +309,11 @@ class wpdbBackup {
284
  setMeter(100);
285
  ';
286
 
287
- $download_uri = add_query_arg('backup', $this->backup_filename, $this->page_url);
288
- switch($_POST['deliver']) {
289
- case 'http':
290
- echo '
291
- setProgress("' . __('Preparing download.','wp-db-backup') . '");
292
  window.onbeforeunload = null;
293
  fram.src = "' . $download_uri . '";
294
 
@@ -298,21 +323,21 @@ class wpdbBackup {
298
  secondFrame.src = "' . $download_uri . '&download-retry=1";
299
  }, 30000 );
300
  ';
301
- break;
302
- case 'smtp':
303
- $email = sanitize_text_field(wp_unslash($_POST['backup_recipient']));
304
- if ( get_option('wpdb_backup_recip') != $email) {
305
- update_option('wpdb_backup_recip', $email);
306
- }
307
- echo '
308
- setProgress("' . sprintf(__('Your backup has been emailed to %s','wp-db-backup'), $email) . '");
309
  window.onbeforeunload = null;
310
  fram.src = "' . $download_uri . '&via=email&recipient=' . $email . '";
311
  ';
312
- break;
313
- default:
314
- echo '
315
- setProgress("' . __('Backup Complete!','wp-db-backup') . '");
316
  window.onbeforeunload = null;
317
  ';
318
  }
@@ -325,29 +350,30 @@ class wpdbBackup {
325
  case 0: backup("", 0); break;
326
  ';
327
 
328
- $also_backup = $this->get_post_data_array('other_tables');
329
- $core_tables = $this->get_post_data_array('core_tables');
330
- $tables = array_merge($core_tables, $also_backup);
331
- $step_count = 1;
332
- foreach ($tables as $table) {
333
- $rec_count = $wpdb->get_var("SELECT count(*) FROM {$table}");
334
- $rec_segments = ceil($rec_count / ROWS_PER_SEGMENT);
335
- $table_count = 0;
 
336
  if ( $this->module_check() ) {
337
- $delay = "setTimeout('";
338
- $delay_time = "', " . (int) MOD_EVASIVE_DELAY . ")";
339
- }
340
- else { $delay = $delay_time = ''; }
341
  do {
342
  echo "case {$step_count}: {$delay}backup(\"{$table}\", {$table_count}){$delay_time}; break;\n";
343
  $step_count++;
344
  $table_count++;
345
- } while($table_count < $rec_segments);
346
  echo "case {$step_count}: {$delay}backup(\"{$table}\", -1){$delay_time}; break;\n";
347
  $step_count++;
348
  }
 
349
  echo "case {$step_count}: finishBackup(); break;";
350
-
351
  echo '
352
  }
353
  if(step != 0) setMeter(100 * step / ' . $step_count . ');
@@ -361,55 +387,76 @@ class wpdbBackup {
361
  $this->backup_menu();
362
  }
363
 
364
- function backup_fragment($table, $segment, $filename) {
365
  global $table_prefix, $wpdb;
366
 
367
  echo "$table:$segment:$filename";
368
 
369
- if($table == '') {
370
- $msg = __('Creating backup file...','wp-db-backup');
371
  } else {
372
- if($segment == -1) {
373
- $msg = sprintf(__('Finished backing up table \\"%s\\".','wp-db-backup'), $table);
374
  } else {
375
- $msg = sprintf(__('Backing up table \\"%s\\"...','wp-db-backup'), $table);
376
  }
377
  }
378
 
379
- if (is_writable($this->backup_dir)) {
380
- $this->fp = $this->open($this->backup_dir . $filename, 'a');
381
- if(!$this->fp) {
382
- $this->error(__('Could not open the backup file for writing!','wp-db-backup'));
383
- $this->error(array('loc' => 'frame', 'kind' => 'fatal', 'msg' => __('The backup file could not be saved. Please check the permissions for writing to your backup directory and try again.','wp-db-backup')));
384
- }
385
- else {
386
- if($table == '') {
 
 
 
 
 
 
 
 
387
  //Begin new backup of MySql
388
- $this->stow("# " . __('WordPress MySQL database backup','wp-db-backup') . "\n");
389
- $this->stow("#\n");
390
- $this->stow("# " . sprintf(__('Generated: %s','wp-db-backup'),date("l j. F Y H:i T")) . "\n");
391
- $this->stow("# " . sprintf(__('Hostname: %s','wp-db-backup'),DB_HOST) . "\n");
392
- $this->stow("# " . sprintf(__('Database: %s','wp-db-backup'),$this->backquote(DB_NAME)) . "\n");
393
- $this->stow("# --------------------------------------------------------\n");
394
  } else {
395
- if($segment == 0) {
396
  // Increase script execution time-limit to 15 min for every table.
397
- if ( !ini_get('safe_mode')) @set_time_limit(15*60);
 
 
398
  // Create the SQL statements
399
- $this->stow("# --------------------------------------------------------\n");
400
- $this->stow("# " . sprintf(__('Table: %s','wp-db-backup'),$this->backquote($table)) . "\n");
401
- $this->stow("# --------------------------------------------------------\n");
402
  }
403
- $this->backup_table($table, $segment);
404
  }
405
  }
406
  } else {
407
- $this->error(array('kind' => 'fatal', 'loc' => 'frame', 'msg' => __('The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again.','wp-db-backup')));
 
 
 
 
 
 
 
 
 
408
  }
409
 
410
- if($this->fp) $this->close($this->fp);
 
 
411
 
412
- $this->error_display('frame');
413
 
414
  echo '<script type="text/javascript"><!--//
415
  var msg = "' . $msg . '";
@@ -423,23 +470,27 @@ class wpdbBackup {
423
  function perform_backup() {
424
  // are we backing up any other tables?
425
  $also_backup = array();
426
- if (isset($_POST['other_tables']))
427
- $also_backup = sanitize_text_field($_POST['other_tables']);
428
- $core_tables = sanitize_text_field($_POST['core_tables']);
429
- $this->backup_file = $this->db_backup($core_tables, $also_backup);
430
- if (false !== $this->backup_file) {
431
- if ('smtp' == $_POST['deliver']) {
432
- $email = sanitize_text_field(wp_unslash($_POST['backup_recipient']));
433
- $this->deliver_backup($this->backup_file, sanitize_text_field($_POST['deliver']), $email, 'main');
434
- if ( get_option('wpdb_backup_recip') != $email ) {
435
- update_option('wpdb_backup_recip', $email );
 
 
 
436
  }
437
- wp_redirect($this->page_url);
438
- } elseif ('http' == $_POST['deliver']) {
439
- $download_uri = add_query_arg('backup',$this->backup_file,$this->page_url);
440
- wp_redirect($download_uri);
441
  exit;
442
  }
 
443
  // we do this to say we're done.
444
  $this->backup_complete = true;
445
  }
@@ -464,7 +515,7 @@ class wpdbBackup {
464
  if ( 2 < lis.length ) {
465
  var text = document.createElement('p');
466
  text.className = 'instructions';
467
- text.innerHTML = '<?php _e('Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes', 'wp-db-backup'); ?>';
468
  ul.parentNode.insertBefore(text, ul);
469
  }
470
  }
@@ -493,7 +544,7 @@ class wpdbBackup {
493
  }
494
  }
495
 
496
- <?php if ( function_exists('wp_schedule_event') ) : // needs to be at least WP 2.1 for ajax ?>
497
  if ( 'undefined' == typeof XMLHttpRequest )
498
  var xml = new ActiveXObject( navigator.userAgent.indexOf('MSIE 5') >= 0 ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP' );
499
  else
@@ -502,13 +553,15 @@ class wpdbBackup {
502
  var initTimeChange = function() {
503
  var timeWrap = document.getElementById('backup-time-wrap');
504
  var backupTime = document.getElementById('next-backup-time');
505
- if ( !! timeWrap && !! backupTime && ( 1 == <?php
 
506
  echo (int) ( 'en' == strtolower( substr( get_locale(), 0, 2 ) ) );
507
- ?> ) ) {
 
508
  var span = document.createElement('span');
509
  span.className = 'submit';
510
  span.id = 'change-wrap';
511
- span.innerHTML = '<input type="submit" id="change-backup-time" name="change-backup-time" value="<?php _e('Change','wp-db-backup'); ?>" />';
512
  timeWrap.appendChild(span);
513
  backupTime.ondblclick = function(e) { span.parentNode.removeChild(span); clickTime(e, backupTime); };
514
  span.onclick = function(e) { span.parentNode.removeChild(span); clickTime(e, backupTime); };
@@ -517,7 +570,7 @@ class wpdbBackup {
517
 
518
  var clickTime = function(e, backupTime) {
519
  var tText = backupTime.innerHTML;
520
- backupTime.innerHTML = '<input type="text" value="' + tText + '" name="backup-time-text" id="backup-time-text" /> <span class="submit"><input type="submit" name="save-backup-time" id="save-backup-time" value="<?php _e('Save', 'wp-db-backup'); ?>" /></span>';
521
  backupTime.ondblclick = null;
522
  var mainText = document.getElementById('backup-time-text');
523
  mainText.focus();
@@ -541,7 +594,7 @@ class wpdbBackup {
541
  xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
542
  if ( xml.overrideMimeType )
543
  xml.setRequestHeader('Connection', 'close');
544
- xml.send('action=save_backup_time&_wpnonce=<?php echo wp_create_nonce($this->referer_check_key); ?>&backup-time='+tVal);
545
  xml.onreadystatechange = function() {
546
  if ( 4 == xml.readyState && '0' != xml.responseText ) {
547
  backupTime.innerHTML = xml.responseText;
@@ -556,81 +609,37 @@ class wpdbBackup {
556
  }
557
  //]]>
558
  </script>
559
- <style type="text/css">
560
- .wp-db-backup-updated {
561
- margin-top: 1em;
562
- }
563
-
564
- fieldset.options {
565
- border: 1px solid;
566
- margin-top: 1em;
567
- padding: 1em;
568
- -moz-border-radius: 8px;
569
- -khtml-border-radius: 8px;
570
- -webkit-border-top-left-radius: 8px;
571
- -webkit-border-top-right-radius: 8px;
572
- -webkit-border-bottom-left-radius: 8px;
573
- -webkit-border-bottom-right-radius: 8px;
574
- border-radius: 8px;
575
- }
576
- fieldset.options div.tables-list {
577
- float: left;
578
- padding: 1em;
579
- }
580
-
581
- fieldset.options input {
582
- }
583
-
584
- fieldset.options legend {
585
- font-size: larger;
586
- font-weight: bold;
587
- margin-bottom: .5em;
588
- padding: 1em;
589
- }
590
-
591
- fieldset.options .instructions {
592
- font-size: smaller;
593
- }
594
-
595
- fieldset.options ul {
596
- list-style-type: none;
597
- }
598
- fieldset.options li {
599
- text-align: left;
600
- }
601
-
602
- fieldset.options .submit {
603
- border-top: none;
604
- }
605
- </style>
606
  <?php
607
  }
608
 
609
  function admin_load() {
610
- add_action('admin_head', array(&$this, 'admin_header'));
 
611
  }
612
 
613
  function admin_menu() {
614
- $_page_hook = add_management_page(__('Backup','wp-db-backup'), __('Backup','wp-db-backup'), 'import', $this->basename, array(&$this, 'backup_menu'));
615
- add_action('load-' . $_page_hook, array(&$this, 'admin_load'));
616
- if (function_exists('get_current_screen')) {
617
- $screen = convert_to_screen($_page_hook);
618
- if (method_exists($screen,'add_help_tab')) {
619
- $screen->add_help_tab(array(
620
- 'title' => __('Backup','wp-db-backup'),
621
- 'id' => $_page_hook,
622
- 'content' => $this->help_menu(),
623
- ));
 
 
624
  }
625
- } elseif ( function_exists('add_contextual_help') ) {
626
  $text = $this->help_menu();
627
- add_contextual_help($_page_hook, $text);
628
  }
629
  }
630
 
631
  function fragment_menu() {
632
- $page_hook = add_management_page(__('Backup','wp-db-backup'), __('Backup','wp-db-backup'), 'import', $this->basename, array(&$this, 'build_backup_script'));
633
- add_action('load-' . $page_hook, array(&$this, 'admin_load'));
634
  }
635
 
636
  /**
@@ -638,26 +647,26 @@ class wpdbBackup {
638
  * @return string The text of the help menu.
639
  */
640
  function help_menu() {
641
- $text = "\n<a href=\"http://wordpress.org/extend/plugins/wp-db-backup/faq/\" target=\"_blank\">" . __('FAQ', 'wp-db-backup') . '</a>';
642
  return $text;
643
  }
644
 
645
  function save_backup_time() {
646
  if ( $this->can_user_backup() ) {
647
  // try to get a time from the input string
648
- $time = strtotime(strval($_POST['backup-time']));
649
  if ( ! empty( $time ) && time() < $time ) {
650
  wp_clear_scheduled_hook( 'wp_db_backup_cron' ); // unschedule previous
651
  $scheds = (array) wp_get_schedules();
652
- $name = get_option('wp_cron_backup_schedule');
653
  if ( 0 != $time ) {
654
- wp_schedule_event($time, $name, 'wp_db_backup_cron');
655
- echo gmdate(get_option('date_format') . ' ' . get_option('time_format'), $time + (get_option('gmt_offset') * 3600));
656
  exit;
657
  }
658
  }
659
  } else {
660
- die(0);
661
  }
662
  }
663
 
@@ -665,23 +674,28 @@ class wpdbBackup {
665
  * Better addslashes for SQL queries.
666
  * Taken from phpMyAdmin.
667
  */
668
- function sql_addslashes($a_string = '', $is_like = false) {
669
- if ($is_like) $a_string = str_replace('\\', '\\\\\\\\', $a_string);
670
- else $a_string = str_replace('\\', '\\\\', $a_string);
671
- return str_replace('\'', '\\\'', $a_string);
 
 
 
 
672
  }
673
 
674
  /**
675
  * Add backquotes to tables and db-names in
676
  * SQL queries. Taken from phpMyAdmin.
677
  */
678
- function backquote($a_name) {
679
- if (!empty($a_name) && $a_name != '*') {
680
- if (is_array($a_name)) {
681
  $result = array();
682
- reset($a_name);
683
- while(list($key, $val) = each($a_name))
684
- $result[$key] = '`' . $val . '`';
 
685
  return $result;
686
  } else {
687
  return '`' . $a_name . '`';
@@ -691,14 +705,16 @@ class wpdbBackup {
691
  }
692
  }
693
 
694
- function open($filename = '', $mode = 'w') {
695
- if ('' == $filename) return false;
696
- $fp = @fopen($filename, $mode);
 
 
697
  return $fp;
698
  }
699
 
700
- function close($fp) {
701
- fclose($fp);
702
  }
703
 
704
  /**
@@ -706,9 +722,10 @@ class wpdbBackup {
706
  * @param string $query_line the line to write
707
  * @return null
708
  */
709
- function stow($query_line) {
710
- if(false === @fwrite($this->fp, $query_line))
711
- $this->error(__('There was an error writing a line to the backup script:','wp-db-backup') . ' ' . $query_line . ' ' . $php_errormsg);
 
712
  }
713
 
714
  /**
@@ -716,13 +733,26 @@ class wpdbBackup {
716
  * @param array $args
717
  * @return bool
718
  */
719
- function error($args = array()) {
720
- if ( is_string( $args ) )
721
- $args = array('msg' => $args);
722
- $args = array_merge( array('loc' => 'main', 'kind' => 'warn', 'msg' => ''), $args);
723
- $this->errors[$args['kind']][] = $args['msg'];
724
- if ( 'fatal' == $args['kind'] || 'frame' == $args['loc'])
725
- $this->error_display($args['loc']);
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  return true;
727
  }
728
 
@@ -732,30 +762,46 @@ class wpdbBackup {
732
  * @param string $loc
733
  * @return string
734
  */
735
- function error_display($loc = 'main', $echo = true) {
736
  $errs = $this->errors;
737
  unset( $this->errors );
738
- if ( ! count($errs) ) return;
739
- $msg = '';
 
 
 
 
740
  $errs['fatal'] = isset( $errs['fatal'] ) ? (array) $errs['fatal'] : array();
741
- $errs['warn'] = isset( $errs['warn'] ) ? (array) $errs['warn'] : array();
742
- $err_list = array_slice( array_merge( $errs['fatal'], $errs['warn'] ), 0, 10);
743
- if ( 10 == count( $err_list ) )
744
- $err_list[9] = __('Subsequent errors have been omitted from this log.','wp-db-backup');
 
 
 
745
  $wrap = ( 'frame' == $loc ) ? "<script type=\"text/javascript\">\n var msgList = ''; \n %1\$s \n if ( msgList ) alert(msgList); \n </script>" : '%1$s';
746
  $line = ( 'frame' == $loc ) ?
747
  "try{ window.parent.addError('%1\$s'); } catch(e) { msgList += ' %1\$s';}\n" :
748
  "%1\$s<br />\n";
749
- foreach( (array) $err_list as $err )
750
- $msg .= sprintf($line,str_replace(array("\n","\r"), '', addslashes($err)));
751
- $msg = sprintf($wrap,$msg);
752
- if ( count($errs['fatal'] ) ) {
753
- if ( function_exists('wp_die') && 'frame' != $loc ) wp_die(stripslashes($msg));
754
- else die($msg);
755
  }
756
- else {
757
- if ( $echo ) echo $msg;
758
- else return $msg;
 
 
 
 
 
 
 
 
 
 
 
 
759
  }
760
  }
761
 
@@ -770,165 +816,171 @@ class wpdbBackup {
770
  * @param string $segment
771
  * @return void
772
  */
773
- function backup_table($table, $segment = 'none') {
774
  global $wpdb;
775
 
776
- $table_structure = $wpdb->get_results("DESCRIBE $table");
777
- if (! $table_structure) {
778
- $this->error(__('Error getting table details','wp-db-backup') . ": $table");
779
  return false;
780
  }
781
 
782
- if(($segment == 'none') || ($segment == 0)) {
783
  // Add SQL statement to drop existing table
784
- $this->stow("\n\n");
785
- $this->stow("#\n");
786
- $this->stow("# " . sprintf(__('Delete any existing table %s','wp-db-backup'),$this->backquote($table)) . "\n");
787
- $this->stow("#\n");
788
- $this->stow("\n");
789
- $this->stow("DROP TABLE IF EXISTS " . $this->backquote($table) . ";\n");
790
 
791
  // Table structure
792
  // Comment in SQL-file
793
- $this->stow("\n\n");
794
- $this->stow("#\n");
795
- $this->stow("# " . sprintf(__('Table structure of table %s','wp-db-backup'),$this->backquote($table)) . "\n");
796
- $this->stow("#\n");
797
- $this->stow("\n");
798
-
799
- $create_table = $wpdb->get_results("SHOW CREATE TABLE $table", ARRAY_N);
800
- if (false === $create_table) {
801
- $err_msg = sprintf(__('Error with SHOW CREATE TABLE for %s.','wp-db-backup'), $table);
802
- $this->error($err_msg);
803
- $this->stow("#\n# $err_msg\n#\n");
804
  }
805
- $this->stow($create_table[0][1] . ' ;');
806
 
807
- if (false === $table_structure) {
808
- $err_msg = sprintf(__('Error getting table structure of %s','wp-db-backup'), $table);
809
- $this->error($err_msg);
810
- $this->stow("#\n# $err_msg\n#\n");
811
  }
812
 
813
  // Comment in SQL-file
814
- $this->stow("\n\n");
815
- $this->stow("#\n");
816
- $this->stow('# ' . sprintf(__('Data contents of table %s','wp-db-backup'),$this->backquote($table)) . "\n");
817
- $this->stow("#\n");
818
  }
819
 
820
- if(($segment == 'none') || ($segment >= 0)) {
821
  $defs = array();
822
  $ints = array();
823
- foreach ($table_structure as $struct) {
824
- if ( (0 === strpos($struct->Type, 'tinyint')) ||
825
- (0 === strpos(strtolower($struct->Type), 'smallint')) ||
826
- (0 === strpos(strtolower($struct->Type), 'mediumint')) ||
827
- (0 === strpos(strtolower($struct->Type), 'int')) ||
828
- (0 === strpos(strtolower($struct->Type), 'bigint')) ) {
829
- $defs[strtolower($struct->Field)] = ( null === $struct->Default ) ? 'NULL' : $struct->Default;
830
- $ints[strtolower($struct->Field)] = "1";
831
  }
832
  }
833
 
834
-
835
  // Batch by $row_inc
836
 
837
- if($segment == 'none') {
838
  $row_start = 0;
839
- $row_inc = ROWS_PER_SEGMENT;
840
  } else {
841
- $row_start = $segment * ROWS_PER_SEGMENT;
842
- $row_inc = ROWS_PER_SEGMENT;
843
  }
844
 
845
  do {
846
  // don't include extra stuff, if so requested
847
- $excs = (array) get_option('wp_db_backup_excs');
848
  $where = '';
849
- if ( is_array($excs['spam'] ) && in_array($table, $excs['spam']) ) {
850
- $where = ' WHERE comment_approved != "spam"';
851
- } elseif ( is_array($excs['revisions'] ) && in_array($table, $excs['revisions']) ) {
852
- $where = ' WHERE post_type != "revision"';
 
853
  }
854
 
855
- if ( !ini_get('safe_mode')) @set_time_limit(15*60);
856
- $table_data = $wpdb->get_results("SELECT * FROM $table $where LIMIT {$row_start}, {$row_inc}", ARRAY_A);
 
 
857
 
858
- $entries = 'INSERT INTO ' . $this->backquote($table) . ' VALUES (';
859
  // \x08\\x09, not required
860
- $search = array("\x00", "\x0a", "\x0d", "\x1a");
861
- $replace = array('\0', '\n', '\r', '\Z');
862
- if($table_data) {
863
- foreach ($table_data as $row) {
 
864
  $values = array();
865
- foreach ($row as $key => $value) {
866
- if ( !empty($ints[strtolower($key)]) ) {
867
  // make sure there are no blank spots in the insert syntax,
868
  // yet try to avoid quotation marks around integers
869
- $value = ( null === $value || '' === $value) ? $defs[strtolower($key)] : $value;
870
  $values[] = ( '' === $value ) ? "''" : $value;
871
  } else {
872
- $values[] = "'" . str_replace($search, $replace, $this->sql_addslashes($value)) . "'";
873
  }
874
  }
875
- $this->stow(" \n" . $entries . implode(', ', $values) . ');');
876
  }
877
  $row_start += $row_inc;
878
  }
879
- } while((count($table_data) > 0) and ($segment=='none'));
880
  }
881
 
882
- if(($segment == 'none') || ($segment < 0)) {
883
  // Create footer/closing comment in SQL-file
884
- $this->stow("\n");
885
- $this->stow("#\n");
886
- $this->stow("# " . sprintf(__('End of data contents of table %s','wp-db-backup'),$this->backquote($table)) . "\n");
887
- $this->stow("# --------------------------------------------------------\n");
888
- $this->stow("\n");
889
  }
890
  } // end backup_table()
891
 
892
- function db_backup($core_tables, $other_tables) {
893
  global $table_prefix, $wpdb;
894
 
895
- if (is_writable($this->backup_dir)) {
896
- $this->fp = $this->open($this->backup_dir . $this->backup_filename);
897
- if(!$this->fp) {
898
- $this->error(__('Could not open the backup file for writing!','wp-db-backup'));
899
  return false;
900
  }
901
  } else {
902
- $this->error(__('The backup directory is not writeable!','wp-db-backup'));
903
  return false;
904
  }
905
 
906
  //Begin new backup of MySql
907
- $this->stow("# " . __('WordPress MySQL database backup','wp-db-backup') . "\n");
908
- $this->stow("#\n");
909
- $this->stow("# " . sprintf(__('Generated: %s','wp-db-backup'),date("l j. F Y H:i T")) . "\n");
910
- $this->stow("# " . sprintf(__('Hostname: %s','wp-db-backup'),DB_HOST) . "\n");
911
- $this->stow("# " . sprintf(__('Database: %s','wp-db-backup'),$this->backquote(DB_NAME)) . "\n");
912
- $this->stow("# --------------------------------------------------------\n");
913
-
914
- if ( (is_array($other_tables)) && (count($other_tables) > 0) )
915
- $tables = array_merge($core_tables, $other_tables);
916
- else
917
  $tables = $core_tables;
 
918
 
919
- foreach ($tables as $table) {
920
  // Increase script execution time-limit to 15 min for every table.
921
- if ( !ini_get('safe_mode')) @set_time_limit(15*60);
 
 
922
  // Create the SQL statements
923
- $this->stow("# --------------------------------------------------------\n");
924
- $this->stow("# " . sprintf(__('Table: %s','wp-db-backup'),$this->backquote($table)) . "\n");
925
- $this->stow("# --------------------------------------------------------\n");
926
- $this->backup_table($table);
927
  }
928
 
929
- $this->close($this->fp);
930
 
931
- if (count($this->errors)) {
932
  return false;
933
  } else {
934
  return $this->backup_filename;
@@ -938,443 +990,426 @@ class wpdbBackup {
938
 
939
  /**
940
  * Sends the backed-up file via email
 
941
  * @param string $to
942
  * @param string $subject
943
  * @param string $message
 
 
944
  * @return bool
945
  */
946
- function send_mail( $to, $subject, $message, $diskfile) {
947
- global $phpmailer;
948
-
949
- $filename = basename($diskfile);
950
-
951
- extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message' ) ) );
952
-
953
- if ( !is_object( $phpmailer ) || ( strtolower(get_class( $phpmailer )) != 'phpmailer' ) ) {
954
- if ( file_exists( ABSPATH . WPINC . '/class-phpmailer.php' ) )
955
- require_once ABSPATH . WPINC . '/class-phpmailer.php';
956
- if ( file_exists( ABSPATH . WPINC . '/class-smtp.php' ) )
957
- require_once ABSPATH . WPINC . '/class-smtp.php';
958
- if ( class_exists( 'PHPMailer') )
959
- $phpmailer = new PHPMailer();
960
- }
961
-
962
- // try to use phpmailer directly (WP 2.2+)
963
- if ( is_object( $phpmailer ) && ( strtolower(get_class( $phpmailer )) == 'phpmailer' ) ) {
964
-
965
- // Get the site domain and get rid of www.
966
- $sitename = $this->get_sitename();
967
- $from_email = 'wordpress@' . $sitename;
968
- $from_name = 'WordPress';
969
-
970
- // Empty out the values that may be set
971
- $phpmailer->ClearAddresses();
972
- $phpmailer->ClearAllRecipients();
973
- $phpmailer->ClearAttachments();
974
- $phpmailer->ClearBCCs();
975
- $phpmailer->ClearCCs();
976
- $phpmailer->ClearCustomHeaders();
977
- $phpmailer->ClearReplyTos();
978
-
979
- $phpmailer->AddAddress( $to );
980
- $phpmailer->AddAttachment($diskfile, $filename);
981
- $phpmailer->Body = $message;
982
- $phpmailer->CharSet = apply_filters( 'wp_mail_charset', get_bloginfo('charset') );
983
- $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
984
- $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
985
- $phpmailer->IsMail();
986
- $phpmailer->Subject = $subject;
987
-
988
- do_action_ref_array( 'phpmailer_init', array( &$phpmailer ) );
989
-
990
- $result = @$phpmailer->Send();
991
-
992
- // old-style: build the headers directly
993
- } else {
994
- $randomish = md5(time());
995
- $boundary = "==WPBACKUP-$randomish";
996
- $fp = fopen($diskfile,"rb");
997
- $file = fread($fp,filesize($diskfile));
998
- $this->close($fp);
999
-
1000
- $data = chunk_split(base64_encode($file));
1001
-
1002
- $headers .= "MIME-Version: 1.0\n";
1003
- $headers = 'From: wordpress@' . preg_replace('#^www\.#', '', sanitize_text_field(strtolower($_SERVER['SERVER_NAME']))) . "\n";
1004
- $headers .= "Content-Type: multipart/mixed; boundary=\"$boundary\"\n";
1005
-
1006
- // Add a multipart boundary above the plain message
1007
- $message = "This is a multi-part message in MIME format.\n\n" .
1008
- "--{$boundary}\n" .
1009
- "Content-Type: text/plain; charset=\"" . get_bloginfo('charset') . "\"\n" .
1010
- "Content-Transfer-Encoding: 7bit\n\n" .
1011
- $message . "\n\n";
1012
-
1013
- // Add file attachment to the message
1014
- $message .= "--{$boundary}\n" .
1015
- "Content-Type: application/octet-stream;\n" .
1016
- " name=\"{$filename}\"\n" .
1017
- "Content-Disposition: attachment;\n" .
1018
- " filename=\"{$filename}\"\n" .
1019
- "Content-Transfer-Encoding: base64\n\n" .
1020
- $data . "\n\n" .
1021
- "--{$boundary}--\n";
1022
-
1023
- $result = @wp_mail($to, $subject, $message, $headers);
1024
- }
1025
- return $result;
1026
-
1027
  }
1028
 
1029
- function deliver_backup($filename = '', $delivery = 'http', $recipient = '', $location = 'main') {
1030
- if ('' == $filename) { return false; }
 
1031
 
1032
- $diskfile = $this->backup_dir . $filename;
1033
  $gz_diskfile = "{$diskfile}.gz";
 
 
 
 
 
 
 
 
 
 
1034
 
1035
- /**
1036
- * Try upping the memory limit before gzipping
1037
- */
1038
- if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < 64 ) ) {
1039
- @ini_set('memory_limit', '64M' );
1040
- }
1041
-
1042
- if ( file_exists( $diskfile ) && empty( $_GET['download-retry'] ) ) {
1043
- /**
1044
- * Try gzipping with an external application
1045
- */
1046
- if ( file_exists( $diskfile ) && ! file_exists( $gz_diskfile ) ) {
1047
- @exec( "gzip $diskfile" );
1048
- }
1049
 
1050
- if ( file_exists( $gz_diskfile ) ) {
1051
- if ( file_exists( $diskfile ) ) {
1052
- unlink($diskfile);
1053
- }
1054
- $diskfile = $gz_diskfile;
1055
- $filename = "{$filename}.gz";
1056
 
1057
- /**
1058
- * Try to compress to gzip, if available
1059
- */
1060
- } else {
1061
- if ( function_exists('gzencode') ) {
1062
- if ( function_exists('file_get_contents') ) {
1063
- $text = file_get_contents($diskfile);
1064
- } else {
1065
- $text = implode("", file($diskfile));
1066
- }
1067
- $gz_text = gzencode($text, 9);
1068
- $fp = fopen($gz_diskfile, "w");
1069
- fwrite($fp, $gz_text);
1070
- if ( fclose($fp) ) {
1071
- unlink($diskfile);
1072
- $diskfile = $gz_diskfile;
1073
- $filename = "{$filename}.gz";
1074
- }
1075
  }
1076
  }
1077
- /*
1078
- *
1079
- */
1080
- } elseif ( file_exists( $gz_diskfile ) && empty( $_GET['download-retry'] ) ) {
1081
- $diskfile = $gz_diskfile;
1082
- $filename = "{$filename}.gz";
1083
  }
1084
 
1085
- if ('http' == $delivery) {
1086
- if ( ! file_exists( $diskfile ) ) {
1087
- if ( empty( $_GET['download-retry'] ) ) {
1088
- $this->error(array('kind' => 'fatal', 'msg' => sprintf(__('File not found:%s','wp-db-backup'), "&nbsp;<strong>$filename</strong><br />") . '<br /><a href="' . $this->page_url . '">' . __('Return to Backup','wp-db-backup') . '</a>'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089
  } else {
1090
  return true;
1091
  }
1092
- } elseif ( file_exists( $diskfile ) ) {
1093
- header('Content-Description: File Transfer');
1094
- header('Content-Type: application/octet-stream');
1095
- header('Content-Length: ' . filesize($diskfile));
1096
- header("Content-Disposition: attachment; filename=$filename");
1097
- $success = readfile($diskfile);
1098
  if ( $success ) {
1099
- unlink($diskfile);
1100
  }
1101
  }
1102
- } elseif ('smtp' == $delivery) {
1103
- if (! file_exists($diskfile)) {
1104
- $msg = sprintf(__('File %s does not exist!','wp-db-backup'), $diskfile);
1105
- $this->error($msg);
1106
  return false;
1107
  }
1108
- if (! is_email($recipient)) {
1109
- $recipient = get_option('admin_email');
 
1110
  }
1111
- $message = sprintf(__("Attached to this email is\n %1s\n Size:%2s kilobytes\n",'wp-db-backup'), $filename, round(filesize($diskfile)/1024));
1112
- $success = $this->send_mail($recipient, get_bloginfo('name') . ' ' . __('Database Backup','wp-db-backup'), $message, $diskfile);
 
1113
 
1114
  if ( false === $success ) {
1115
- $msg = __('The following errors were reported:','wp-db-backup') . "\n ";
1116
- if ( function_exists('error_get_last') ) {
1117
- $err = error_get_last();
1118
  $msg .= $err['message'];
1119
  } else {
1120
- $msg .= __('ERROR: The mail application has failed to deliver the backup.','wp-db-backup');
1121
  }
1122
- $this->error(array('kind' => 'fatal', 'loc' => $location, 'msg' => $msg));
 
 
 
 
 
 
1123
  } else {
1124
- if ( file_exists( $diskfile ) ) {
1125
- unlink($diskfile);
1126
  }
1127
  }
1128
  }
 
1129
  return $success;
1130
  }
1131
 
1132
  function backup_menu() {
1133
  global $table_prefix, $wpdb;
1134
  $feedback = '';
1135
- $whoops = false;
1136
 
1137
  // did we just do a backup? If so, let's report the status
1138
  if ( $this->backup_complete ) {
1139
- $feedback = '<div class="updated wp-db-backup-updated"><p>' . __('Backup Successful','wp-db-backup') . '!';
1140
- $file = $this->backup_file;
1141
- switch($_POST['deliver']) {
1142
- case 'http':
1143
- $feedback .= '<br />' . sprintf(__('Your backup file: %2s should begin downloading shortly.','wp-db-backup'), "{$this->backup_file}", $this->backup_file);
1144
- break;
1145
- case 'smtp':
1146
- $email = sanitize_text_field(wp_unslash($_POST['backup_recipient']));
1147
- if (! is_email($email)) {
1148
- $feedback .= get_option('admin_email');
1149
- } else {
1150
- $feedback .= $email;
1151
- }
1152
- $feedback = '<br />' . sprintf(__('Your backup has been emailed to %s','wp-db-backup'), $feedback);
1153
- break;
1154
  }
 
1155
  $feedback .= '</p></div>';
1156
  }
1157
 
1158
  // security check
1159
  $this->wp_secure();
1160
 
1161
- if (count($this->errors)) {
1162
- $feedback .= '<div class="updated wp-db-backup-updated error"><p><strong>' . __('The following errors were reported:','wp-db-backup') . '</strong></p>';
1163
  $feedback .= '<p>' . $this->error_display( 'main', false ) . '</p>';
1164
- $feedback .= "</p></div>";
1165
  }
1166
 
1167
  // did we just save options for wp-cron?
1168
- if ( (function_exists('wp_schedule_event') || function_exists('wp_cron_init'))
1169
- && isset($_POST['wp_cron_backup_options']) ) :
1170
- do_action('wp_db_b_update_cron_options');
1171
- if ( function_exists('wp_schedule_event') ) {
1172
  wp_clear_scheduled_hook( 'wp_db_backup_cron' ); // unschedule previous
1173
- $scheds = (array) wp_get_schedules();
1174
- $name = sanitize_text_field(strval($_POST['wp_cron_schedule']));
1175
- $interval = ( isset($scheds[$name]['interval']) ) ?
1176
- (int) $scheds[$name]['interval'] : 0;
1177
- update_option('wp_cron_backup_schedule', $name, false);
1178
  if ( 0 !== $interval ) {
1179
- wp_schedule_event(time() + $interval, $name, 'wp_db_backup_cron');
1180
  }
 
 
1181
  }
1182
- else {
1183
- update_option('wp_cron_backup_schedule', intval($_POST['cron_schedule']), false);
1184
- }
1185
- update_option('wp_cron_backup_tables', $this->get_submitted_tables_to_backup_in_cron());
1186
- if (is_email($_POST['cron_backup_recipient'])) {
1187
- update_option('wp_cron_backup_recipient', sanitize_text_field($_POST['cron_backup_recipient']), false);
1188
  }
1189
- $feedback .= '<div class="updated wp-db-backup-updated"><p>' . __('Scheduled Backup Options Saved!','wp-db-backup') . '</p></div>';
 
1190
  endif;
1191
 
1192
  $other_tables = array();
1193
- $also_backup = array();
1194
 
1195
  // Get complete db table list
1196
- $all_tables = $wpdb->get_results("SHOW TABLES", ARRAY_N);
1197
- $all_tables = array_map(create_function('$a', 'return $a[0];'), $all_tables);
 
 
 
 
 
 
1198
  // Get list of WP tables that actually exist in this DB (for 1.6 compat!)
1199
- $wp_backup_default_tables = array_intersect($all_tables, $this->core_table_names);
1200
  // Get list of non-WP tables
1201
- $other_tables = array_diff($all_tables, $wp_backup_default_tables);
1202
 
1203
- if ('' != $feedback)
1204
  echo $feedback;
 
1205
 
1206
- if ( ! $this->wp_secure() )
1207
  return;
 
1208
 
1209
  // Give the new dirs the same perms as wp-content.
1210
- // $stat = stat( ABSPATH . 'wp-content' );
1211
- // $dir_perms = $stat['mode'] & 0000777; // Get the permission bits.
1212
  $dir_perms = '0777';
1213
 
1214
  // the file doesn't exist and can't create it
1215
- if ( ! file_exists($this->backup_dir) && ! @mkdir($this->backup_dir) ) {
1216
- ?><div class="updated wp-db-backup-updated error"><p><?php _e('WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it.','wp-db-backup'); ?></p>
1217
- <p><?php printf(__('Using your FTP client, try to create the backup directory yourself: %s', 'wp-db-backup'), '<code>' . $this->backup_dir . '</code>'); ?></p></div><?php
 
 
 
 
 
1218
  $whoops = true;
1219
- // not writable due to write permissions
1220
- } elseif ( !is_writable($this->backup_dir) && ! @chmod($this->backup_dir, $dir_perms) ) {
1221
- ?><div class="updated wp-db-backup-updated error"><p><?php _e('WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files.','wp-db-backup'); ?></p>
1222
- <p><?php printf(__('Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s', 'wp-db-backup'), '<code>777</code>', '<code>a+w</code>', '<code>' . $this->backup_dir . '</code>'); ?>
1223
- </p></div><?php
 
 
1224
  $whoops = true;
1225
  } else {
1226
- $this->fp = $this->open($this->backup_dir . 'test' );
1227
- if( $this->fp ) {
1228
- $this->close($this->fp);
1229
- @unlink($this->backup_dir . 'test' );
1230
- // the directory is not writable probably due to safe mode
 
1231
  } else {
1232
- ?><div class="updated wp-db-backup-updated error"><p><?php _e('WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files.','wp-db-backup'); ?></p><?php
1233
- if( ini_get('safe_mode') ){
1234
- ?><p><?php _e('This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create.', 'wp-db-backup'); ?></p><?php
1235
- }
1236
- ?><?php printf(__('You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s', 'wp-db-backup'), '<code>' . $this->backup_dir . '</code>');
1237
- ?></div><?php
 
 
 
 
 
 
 
 
1238
  $whoops = true;
1239
  }
1240
  }
1241
 
1242
-
1243
-
1244
- if ( !file_exists($this->backup_dir . 'index.php') )
1245
- @ touch($this->backup_dir . 'index.php');
1246
- ?><div class='wrap'>
1247
- <h2><?php _e('Backup','wp-db-backup') ?></h2>
1248
- <form method="post" action="">
1249
- <?php if ( function_exists('wp_nonce_field') ) wp_nonce_field($this->referer_check_key); ?>
1250
- <fieldset class="options"><legend><?php _e('Tables','wp-db-backup') ?></legend>
1251
- <div class="tables-list core-tables alternate">
1252
- <h4><?php _e('These core WordPress tables will always be backed up:','wp-db-backup') ?></h4><ul><?php
1253
- $excs = (array) get_option('wp_db_backup_excs');
1254
- foreach ($wp_backup_default_tables as $table) {
1255
- if ( $table == $wpdb->comments ) {
1256
- $checked = ( isset($excs['spam']) && is_array($excs['spam'] ) && in_array($table, $excs['spam']) ) ? ' checked=\'checked\'' : '';
1257
- echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code> <span class='instructions'> <input type='checkbox' name='exclude-spam[]' value='$table' $checked /> " . __('Exclude spam comments', 'wp-db-backup') . '</span></li>';
1258
- } elseif ( function_exists('wp_get_post_revisions') && $table == $wpdb->posts ) {
1259
- $checked = ( isset($excs['revisions']) && is_array($excs['revisions'] ) && in_array($table, $excs['revisions']) ) ? ' checked=\'checked\'' : '';
1260
- echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code> <span class='instructions'> <input type='checkbox' name='exclude-revisions[]' value='$table' $checked /> " . __('Exclude post revisions', 'wp-db-backup') . '</span></li>';
1261
- } else {
1262
- echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code></li>";
1263
- }
1264
  }
1265
- ?></ul>
1266
- </div>
1267
- <div class="tables-list extra-tables" id="extra-tables-list">
1268
- <?php
1269
- if (count($other_tables) > 0) {
 
 
 
1270
  ?>
1271
- <h4><?php _e('You may choose to include any of the following tables:','wp-db-backup'); ?></h4>
1272
- <ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1273
  <?php
1274
- foreach ($other_tables as $table) {
1275
  ?>
1276
- <li><label><input type="checkbox" name="other_tables[]" value="<?php echo $table; ?>" /> <code><?php echo $table; ?></code></label>
 
 
 
 
 
 
 
 
 
1277
  <?php
1278
  }
1279
- ?></ul><?php
1280
- }
1281
- ?></div>
1282
  </fieldset>
1283
 
1284
  <fieldset class="options">
1285
- <legend><?php _e('Backup Options','wp-db-backup'); ?></legend>
1286
- <p><?php _e('What to do with the backup file:','wp-db-backup'); ?></p>
1287
  <ul>
1288
  <li><label for="do_download">
1289
  <input type="radio" checked="checked" id="do_download" name="deliver" value="http" style="border:none;" />
1290
- <?php _e('Download to your computer','wp-db-backup'); ?>
1291
  </label></li>
1292
  <li><label for="do_email">
1293
  <input type="radio" name="deliver" id="do_email" value="smtp" style="border:none;" />
1294
- <?php _e('Email backup to:','wp-db-backup'); ?>
1295
- <input type="text" name="backup_recipient" size="20" value="<?php
1296
- $backup_recip = get_option('wpdb_backup_recip');
1297
- if ( empty( $backup_recip ) ) {
1298
- $backup_recip = get_option('admin_email');
1299
- }
1300
-
1301
- echo $backup_recip; ?>" />
1302
  </label></li>
1303
  </ul>
1304
  <?php if ( ! $whoops ) : ?>
1305
  <input type="hidden" name="do_backup" id="do_backup" value="backup" />
1306
  <p class="submit">
1307
- <input type="submit" name="submit" onclick="document.getElementById('do_backup').value='fragments';" value="<?php _e('Backup now!','wp-db-backup'); ?>" />
1308
  </p>
1309
  <?php else : ?>
1310
- <div class="updated wp-db-backup-updated error"><p><?php _e('WARNING: Your backup directory is <strong>NOT</strong> writable!','wp-db-backup'); ?></p></div>
1311
  <?php endif; // ! whoops ?>
1312
  </fieldset>
1313
- <?php do_action('wp_db_b_backup_opts'); ?>
1314
  </form>
1315
 
1316
  <?php
1317
  // this stuff only displays if some sort of wp-cron is available
1318
- $cron = ( function_exists('wp_schedule_event') ) ? true : false; // wp-cron in WP 2.1+
1319
- $cron_old = ( function_exists('wp_cron_init') && ! $cron ) ? true : false; // wp-cron plugin by Skippy
 
1320
  if ( $cron_old || $cron ) :
1321
- echo '<fieldset class="options"><legend>' . __('Scheduled Backup','wp-db-backup') . '</legend>';
1322
- $datetime = get_option('date_format') . ' ' . get_option('time_format');
1323
  if ( $cron ) :
1324
- $next_cron = wp_next_scheduled('wp_db_backup_cron');
1325
  if ( ! empty( $next_cron ) ) :
1326
  ?>
1327
  <p id="backup-time-wrap">
1328
- <?php printf(__('Next Backup: %s','wp-db-backup'), '<span id="next-backup-time">' . gmdate($datetime, $next_cron + (get_option('gmt_offset') * 3600)) . '</span>'); ?>
1329
  </p>
1330
  <?php
1331
  endif;
1332
  elseif ( $cron_old ) :
1333
- ?><p><?php printf(__('Last WP-Cron Daily Execution: %s','wp-db-backup'), gmdate($datetime, get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600))); ?><br /><?php
1334
- printf(__('Next WP-Cron Daily Execution: %s','wp-db-backup'), gmdate($datetime, (get_option('wp_cron_daily_lastrun') + (get_option('gmt_offset') * 3600) + 86400))); ?></p><?php
 
 
 
 
 
1335
  endif;
1336
- ?><form method="post" action="">
1337
- <?php if ( function_exists('wp_nonce_field') ) wp_nonce_field($this->referer_check_key); ?>
 
 
 
 
1338
  <div class="tables-list">
1339
- <h4><?php _e('Schedule: ','wp-db-backup'); ?></h4>
1340
  <?php
1341
  if ( $cron_old ) :
1342
- $wp_cron_backup_schedule = get_option('wp_cron_backup_schedule');
1343
- $schedule = array(0 => __('None','wp-db-backup'), 1 => __('Daily','wp-db-backup'));
1344
- foreach ($schedule as $value => $name) {
 
 
 
1345
  echo ' <input type="radio" style="border:none;" name="cron_schedule"';
1346
- if ($wp_cron_backup_schedule == $value) {
1347
  echo ' checked="checked" ';
1348
  }
1349
  echo 'value="' . $value . '" /> ' . $name;
1350
  }
1351
  elseif ( $cron ) :
1352
- echo apply_filters('wp_db_b_schedule_choices', wp_get_schedules() );
1353
  endif;
1354
- $cron_recipient = get_option('wp_cron_backup_recipient');
1355
- if (! is_email($cron_recipient)) {
1356
- $cron_recipient = get_option('admin_email');
 
 
1357
  }
1358
- $cron_recipient_input = '<p><label for="cron_backup_recipient">' . __('Email backup to:','wp-db-backup') . ' <input type="text" name="cron_backup_recipient" id="cron_backup_recipient" size="20" value="' . $cron_recipient . '" /></label></p>';
1359
- echo apply_filters('wp_db_b_cron_recipient_input', $cron_recipient_input);
1360
- echo '<p class="submit"><input type="submit" name="submit" value="' . __('Schedule backup','wp-db-backup') . '" /></p>';
 
1361
  echo '</div>';
1362
- $cron_tables = get_option('wp_cron_backup_tables');
1363
- if (! is_array($cron_tables)) {
 
1364
  $cron_tables = array();
1365
  }
1366
- if (count($other_tables) > 0) {
 
1367
  echo '<div class="tables-list alternate" id="include-tables-list">';
1368
- echo '<h4>' . __('Tables to include in the scheduled backup:','wp-db-backup') . '</h4><ul>';
1369
- foreach ($other_tables as $table) {
1370
  echo '<li><input type="checkbox" ';
1371
- if (in_array($table, $cron_tables)) {
1372
  echo 'checked="checked" ';
1373
  }
1374
  echo "name='wp_cron_backup_tables[]' value='{$table}' /> <code>{$table}</code></li>";
1375
  }
1376
  echo '</ul></div>';
1377
  }
 
1378
  echo '<input type="hidden" name="wp_cron_backup_options" value="SET" /></form>';
1379
  echo '</fieldset>';
1380
  endif; // end of wp_cron (legacy) section
@@ -1385,60 +1420,98 @@ class wpdbBackup {
1385
 
1386
  function get_sched() {
1387
  $options = array_keys( (array) wp_get_schedules() );
1388
- $freq = get_option('wp_cron_backup_schedule');
1389
- $freq = ( in_array( $freq , $options ) ) ? $freq : 'never';
 
1390
  return $freq;
1391
  }
1392
 
1393
- function schedule_choices($schedule) { // create the cron menu based on the schedule
 
1394
  $wp_cron_backup_schedule = $this->get_sched();
1395
- $next_cron = wp_next_scheduled('wp_db_backup_cron');
1396
  $wp_cron_backup_schedule = ( empty( $next_cron ) ) ? 'never' : $wp_cron_backup_schedule;
1397
- $sort = array();
1398
- foreach ( (array) $schedule as $key => $value ) $sort[$key] = $value['interval'];
 
 
 
1399
  asort( $sort );
 
1400
  $schedule_sorted = array();
1401
- foreach ( (array) $sort as $key => $value ) $schedule_sorted[$key] = $schedule[$key];
1402
- $menu = '<ul>';
1403
- $schedule = array_merge( array( 'never' => array( 'interval' => 0, 'display' => __('Never','wp-db-backup') ) ),
1404
- (array) $schedule_sorted );
1405
- foreach ( $schedule as $name => $settings) {
 
 
 
 
 
 
 
 
 
 
 
1406
  $interval = (int) $settings['interval'];
1407
- if ( 0 == $interval && ! 'never' == $name ) continue;
1408
- $display = ( ! '' == $settings['display'] ) ? $settings['display'] : sprintf(__('%s seconds','wp-db-backup'),$interval);
1409
- $menu .= "<li><input type='radio' name='wp_cron_schedule' style='border:none;' ";
1410
- if ($wp_cron_backup_schedule == $name) {
 
 
1411
  $menu .= " checked='checked' ";
1412
  }
1413
  $menu .= "value='$name' /> $display</li>";
1414
  }
 
1415
  $menu .= '</ul>';
 
1416
  return $menu;
1417
  } // end schedule_choices()
1418
 
1419
- function wp_cron_daily() { // for legacy cron plugin
1420
- $schedule = intval(get_option('wp_cron_backup_schedule'));
 
 
1421
  // If scheduled backup is disabled
1422
- if (0 == $schedule)
1423
- return;
1424
- else return $this->cron_backup();
 
 
1425
  }
1426
 
1427
  function cron_backup() {
1428
  global $table_prefix, $wpdb;
1429
- $all_tables = $wpdb->get_results("SHOW TABLES", ARRAY_N);
1430
- $all_tables = array_map(create_function('$a', 'return $a[0];'), $all_tables);
1431
- $core_tables = array_intersect($all_tables, $this->core_table_names);
1432
- $other_tables = get_option('wp_cron_backup_tables');
1433
- $recipient = get_option('wp_cron_backup_recipient');
1434
- $backup_file = $this->db_backup($core_tables, $other_tables);
1435
- if (false !== $backup_file)
1436
- return $this->deliver_backup($backup_file, 'smtp', $recipient, 'main');
1437
- else return false;
 
 
 
 
 
 
 
 
 
1438
  }
1439
 
1440
- function add_sched_options($sched) {
1441
- $sched['weekly'] = array('interval' => 604800, 'display' => __('Once Weekly','wp-db-backup'));
 
 
 
 
1442
  return $sched;
1443
  }
1444
 
@@ -1447,11 +1520,27 @@ class wpdbBackup {
1447
  * @param string $kind
1448
  * @return bool
1449
  */
1450
- function wp_secure($kind = 'warn', $loc = 'main') {
1451
  global $wp_version;
1452
- if ( function_exists('wp_verify_nonce') ) return true;
1453
- else {
1454
- $this->error(array('kind' => $kind, 'loc' => $loc, 'msg' => sprintf(__('Your WordPress version, %1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href="%2s">upgrading WordPress</a> to a more recent version.','wp-db-backup'),$wp_version,'http://wordpress.org/download/')));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1455
  return false;
1456
  }
1457
  }
@@ -1461,30 +1550,59 @@ class wpdbBackup {
1461
  * @param string $loc
1462
  * @return bool
1463
  */
1464
- function can_user_backup($loc = 'main') {
1465
  $can = false;
 
1466
  // make sure WPMU users are site admins, not ordinary admins
1467
- if ( function_exists('is_site_admin') && ! is_site_admin() )
1468
  return false;
1469
- if ( ( $this->wp_secure('fatal', $loc) ) && current_user_can('import') )
1470
- $can = $this->verify_nonce($_REQUEST['_wpnonce'], $this->referer_check_key, $loc);
1471
- if ( false == $can )
1472
- $this->error(array('loc' => $loc, 'kind' => 'fatal', 'msg' => __('You are not allowed to perform backups.','wp-db-backup')));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1473
  return $can;
1474
  }
1475
 
1476
  /**
1477
  * Verify that the nonce is legitimate
1478
- * @param string $rec the nonce received
1479
- * @param string $nonce what the nonce should be
1480
- * @param string $loc the location of the check
1481
  * @return bool
1482
  */
1483
- function verify_nonce($rec = '', $nonce = 'X', $loc = 'main') {
1484
- if ( wp_verify_nonce($rec, $nonce) )
1485
  return true;
1486
- else
1487
- $this->error(array('loc' => $loc, 'kind' => 'fatal', 'msg' => sprintf(__('There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted.','wp-db-backup'),get_option('home'))));
 
 
 
 
 
 
 
 
 
 
 
 
 
1488
  }
1489
 
1490
  /**
@@ -1493,22 +1611,33 @@ class wpdbBackup {
1493
  * @param string $file
1494
  * @return null
1495
  */
1496
- function validate_file($file) {
1497
- if ( (false !== strpos($file, '..')) || (false !== strpos($file, './')) || (':' == substr($file, 1, 1)) )
1498
- $this->error(array('kind' => 'fatal', 'loc' => 'frame', 'msg' => __("Cheatin' uh ?",'wp-db-backup')));
 
 
 
 
 
 
 
 
 
 
1499
  }
1500
 
1501
  /**
1502
- * Get the sitename by query $_SERVER['SERVER_NAME'].
1503
  * If it is not set, then use site_url() instead
1504
  * @return string
1505
  */
1506
  function get_sitename() {
1507
- $sitename='';
1508
- if ( isset($_SERVER['SERVER_NAME']) ) {
 
1509
  $sitename = strtolower( sanitize_text_field( $_SERVER['SERVER_NAME'] ) );
1510
  } else {
1511
- if ( function_exists('site_url') ) {
1512
  // site_url() was added since 3.0.0
1513
  // force http scheme so we can easily get rid of leading http://
1514
  $sitename = strtolower( site_url( '', 'http' ) );
@@ -1523,10 +1652,12 @@ class wpdbBackup {
1523
  }
1524
  }
1525
  }
 
1526
  // get rid of www
1527
  if ( substr( $sitename, 0, 4 ) == 'www.' ) {
1528
  $sitename = substr( $sitename, 4 );
1529
  }
 
1530
  return $sitename;
1531
  }
1532
 
@@ -1538,11 +1669,13 @@ class wpdbBackup {
1538
  *
1539
  * @return array
1540
  */
1541
- function sanitize_array($array_to_sanitize) {
1542
  $sanitized = array();
 
1543
  foreach ( $array_to_sanitize as $key => $value ) {
1544
- $sanitized[$key] = sanitize_text_field($value);
1545
  }
 
1546
  return $sanitized;
1547
  }
1548
 
@@ -1553,12 +1686,14 @@ class wpdbBackup {
1553
  *
1554
  * @return array
1555
  */
1556
- function get_post_data_array($post_key) {
1557
  $sanitized_data = array();
1558
- if (isset( $_POST[$post_key] )) {
1559
- $sanitized_data = (array) $_POST[$post_key];
 
1560
  }
1561
- return $this->sanitize_array($sanitized_data);
 
1562
  }
1563
 
1564
  /**
@@ -1567,7 +1702,7 @@ class wpdbBackup {
1567
  * @return array
1568
  */
1569
  function get_revisions_to_exclude() {
1570
- return $this->get_post_data_array('exclude-revisions');
1571
  }
1572
 
1573
  /**
@@ -1576,7 +1711,7 @@ class wpdbBackup {
1576
  * @return array
1577
  */
1578
  function get_spam_to_exclude() {
1579
- return $this->get_post_data_array('exclude-spam');
1580
  }
1581
 
1582
  /**
@@ -1585,8 +1720,9 @@ class wpdbBackup {
1585
  * @return array
1586
  */
1587
  function get_submitted_tables_to_backup_in_cron() {
1588
- return $this->get_post_data_array('wp_cron_backup_tables');
1589
  }
 
1590
  }
1591
 
1592
  function wpdbBackup_init() {
@@ -1594,5 +1730,4 @@ function wpdbBackup_init() {
1594
  $mywpdbbackup = new wpdbBackup();
1595
  }
1596
 
1597
- add_action('plugins_loaded', 'wpdbBackup_init');
1598
- ?>
1
  <?php
2
  /*
3
+ Plugin Name: Database Backup for WordPress
4
  Plugin URI: https://github.com/matzko/wp-db-backup
5
  Description: On-demand backup of your WordPress database. Navigate to <a href="edit.php?page=wp-db-backup">Tools &rarr; Backup</a> to get started.
6
+ Author: Delicious Brains
7
+ Author URI: https://deliciousbrains.com
8
+ Version: 2.4
9
+ Domain Path: /languages
10
 
11
  Copyright 2018 Austin Matzko (email : austin at pressedcode.com)
12
 
13
+ This program is free software; you can redistribute it and/or modify
14
+ it under the terms of the GNU General Public License as published by
15
+ the Free Software Foundation; either version 2 of the License, or
16
+ (at your option) any later version.
17
 
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
 
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
26
  */
27
 
28
+ if ( ! defined( 'ABSPATH' ) ) {
29
+ die( 'Please do not load this file directly.' );
30
  }
31
 
32
+ if ( ! defined( 'DBBWP_ROWS_PER_SEGMENT' ) ) {
33
+ define( 'DBBWP_ROWS_PER_SEGMENT', 100 );
 
 
 
 
 
34
  }
35
 
36
  /**
37
+ * Set DBBWP_MOD_EVASIVE_OVERRIDE to true
38
+ * and increase DBBWP_MOD_EVASIVE_DELAY
39
  * if the backup stops prematurely.
40
  */
41
+ // define('DBBWP_MOD_EVASIVE_OVERRIDE', false);
42
+ if ( ! defined( 'DBBWP_MOD_EVASIVE_DELAY' ) ) {
43
+ define( 'DBBWP_MOD_EVASIVE_DELAY', '500' );
44
  }
45
 
46
  class wpdbBackup {
47
 
48
  var $backup_complete = false;
49
+ var $backup_file = '';
50
  var $backup_filename;
51
  var $core_table_names = array();
52
+ var $errors = array();
53
  var $basename;
54
  var $page_url;
55
  var $referer_check_key;
56
+ var $version = '2.4';
57
 
58
  function module_check() {
59
  $mod_evasive = false;
60
+
61
+ if ( defined( 'DBBWP_MOD_EVASIVE_OVERRIDE' ) && true === DBBWP_MOD_EVASIVE_OVERRIDE ) {
62
+ return true;
63
+ }
64
+
65
+ if ( ! defined( 'DBBWP_MOD_EVASIVE_OVERRIDE' ) || false === DBBWP_MOD_EVASIVE_OVERRIDE ) {
66
+ return false;
67
+ }
68
+
69
+ if ( function_exists( 'apache_get_modules' ) ) {
70
+ foreach ( (array) apache_get_modules() as $mod ) {
71
+ if ( false !== strpos( $mod, 'mod_evasive' ) || false !== strpos( $mod, 'mod_dosevasive' ) ) {
72
  return true;
73
+ }
74
+ }
75
+ }
76
+
77
  return false;
78
  }
79
 
80
  function __construct() {
81
  global $table_prefix, $wpdb;
82
+
83
+ add_action( 'wp_ajax_save_backup_time', array( &$this, 'save_backup_time' ) );
84
+ add_action( 'init', array( &$this, 'init_textdomain' ) );
85
+ add_action( 'init', array( &$this, 'set_page_url' ) );
86
+ add_action( 'admin_notices', array( &$this, 'update_notice' ) );
87
+ add_action( 'wp_db_backup_cron', array( &$this, 'cron_backup' ) );
88
+ add_action( 'wp_cron_daily', array( &$this, 'wp_cron_daily' ) );
89
+ add_filter( 'cron_schedules', array( &$this, 'add_sched_options' ) );
90
+ add_filter( 'wp_db_b_schedule_choices', array( &$this, 'schedule_choices' ) );
91
+
92
+ $table_prefix = ( isset( $table_prefix ) ) ? $table_prefix : $wpdb->prefix;
93
+ $datum = date( 'Ymd_B' );
94
  $this->backup_filename = DB_NAME . "_$table_prefix$datum.sql";
95
 
96
  $possible_names = array(
107
  'terms',
108
  'term_taxonomy',
109
  'term_relationships',
110
+ 'termmeta',
111
  'users',
112
  'usermeta',
113
  );
114
 
115
+ foreach ( $possible_names as $name ) {
116
  if ( isset( $wpdb->{$name} ) ) {
117
  $this->core_table_names[] = $wpdb->{$name};
118
  }
119
  }
120
 
121
+ $tmp_dir = get_temp_dir();
122
+
123
+ if ( isset( $_GET['wp_db_temp_dir'] ) ) {
124
+ $requested_dir = sanitize_text_field( $_GET['wp_db_temp_dir'] );
125
+ if ( is_writeable( $requested_dir ) ) {
126
+ $tmp_dir = $requested_dir;
127
+ }
128
+ }
129
+
130
+ $this->backup_dir = trailingslashit( apply_filters( 'wp_db_b_backup_dir', $tmp_dir ) );
131
+ $this->basename = 'wp-db-backup';
132
 
133
  $this->referer_check_key = $this->basename . '-download_' . DB_NAME;
134
+ if ( isset( $_POST['do_backup'] ) ) {
135
+ $this->wp_secure( 'fatal' );
136
+ check_admin_referer( $this->referer_check_key );
137
+ $this->can_user_backup( 'main' );
138
 
139
  // save exclude prefs
140
+ update_option(
141
+ 'wp_db_backup_excs',
142
+ array(
143
+ 'revisions' => $this->get_revisions_to_exclude(),
144
+ 'spam' => $this->get_spam_to_exclude(),
145
+ )
146
+ );
147
+ switch ( $_POST['do_backup'] ) {
148
+ case 'backup':
149
+ add_action( 'init', array( &$this, 'perform_backup' ) );
150
+ break;
151
+ case 'fragments':
152
+ add_action( 'admin_menu', array( &$this, 'fragment_menu' ) );
153
+ break;
154
  }
155
+ } elseif ( isset( $_GET['fragment'] ) ) {
156
+ $this->can_user_backup( 'frame' );
157
+ add_action( 'init', array( &$this, 'init' ) );
158
+ } elseif ( isset( $_GET['backup'] ) ) {
159
  $this->can_user_backup();
160
+ add_action( 'init', array( &$this, 'init' ) );
161
  } else {
162
+ add_action( 'admin_menu', array( &$this, 'admin_menu' ) );
163
  }
164
  }
165
 
166
  function init() {
167
  $this->can_user_backup();
168
+ if ( isset( $_GET['backup'] ) ) {
169
+ $via = isset( $_GET['via'] ) ? sanitize_text_field( $_GET['via'] ) : 'http';
170
+
171
+ $this->backup_file = sanitize_text_field( $_GET['backup'] );
172
+ $this->validate_file( $this->backup_file );
173
+
174
+ switch ( $via ) {
175
+ case 'smtp':
176
+ case 'email':
177
+ $success = $this->deliver_backup( $this->backup_file, 'smtp', sanitize_text_field( $_GET['recipient'] ), 'frame' );
178
+ $this->error_display( 'frame' );
179
+ if ( $success ) {
180
+ echo '
181
  <!-- ' . $via . ' -->
182
  <script type="text/javascript"><!--\\
183
  ';
184
+ echo '
185
+ alert("' . __( 'Backup Complete!', 'wp-db-backup' ) . '");
186
  window.onbeforeunload = null;
187
  </script>
188
  ';
189
+ }
190
+ break;
191
+ default:
192
+ $success = $this->deliver_backup( $this->backup_file, $via );
193
+ echo $this->error_display( 'frame', false );
194
 
195
+ if ( $success ) {
196
+ echo '
197
  <script type="text/javascript">
198
+ window.parent.setProgress("' . __( 'Backup Complete!', 'wp-db-backup' ) . '");
199
  </script>
200
  ';
201
+ }
202
  }
203
  exit;
204
  }
205
+
206
+ if ( isset( $_GET['fragment'] ) ) {
207
+ list($table, $segment, $filename) = explode( ':', sanitize_text_field( $_GET['fragment'] ) );
208
+ $this->validate_file( $filename );
209
+ $this->backup_fragment( $table, $segment, $filename );
210
  }
211
 
212
  die();
213
  }
214
 
215
  function init_textdomain() {
216
+ load_plugin_textdomain(
217
+ 'wp-db-backup',
218
+ false,
219
+ dirname( plugin_basename( __FILE__ ) ) . '/languages'
220
+ );
221
  }
222
 
223
  function set_page_url() {
224
  $query_args = array( 'page' => $this->basename );
225
+
226
+ if ( function_exists( 'wp_create_nonce' ) ) {
227
+ $query_args = array_merge( $query_args, array( '_wpnonce' => wp_create_nonce( $this->referer_check_key ) ) );
228
+ }
229
+
230
+ $base = ( function_exists( 'site_url' ) ) ? site_url( '', 'admin' ) : get_option( 'siteurl' );
231
+ $this->page_url = add_query_arg( $query_args, $base . '/wp-admin/edit.php' );
232
  }
233
 
234
  /*
235
  * Add a link to back up your database when doing a core upgrade.
236
  */
237
+ function update_notice() {
238
  global $pagenow;
 
 
 
 
 
 
 
 
 
 
 
 
 
239
 
240
+ if ( empty( $pagenow ) || 'update-core.php' !== $pagenow ) {
241
+ return false;
242
+ }
243
+ ?>
244
+ <div class="notice notice-warning">
245
+ <p>
246
+ <?php
247
+ printf(
248
+ __( 'Click <a href="%s">here</a> to back up your database using the WordPress Database Backup plugin. <strong>Note:</strong> WordPress Database Backup does <em>not</em> back up your files, just your database.', 'wp-db-backup' ),
249
+ esc_url( get_admin_url( null, 'tools.php?page=wp-db-backup' ) )
250
+ );
251
+ ?>
252
+ </p>
253
+ </div>
254
+ <?php
255
  }
256
 
257
  function build_backup_script() {
258
  global $table_prefix, $wpdb;
259
 
260
  echo "<div class='wrap'>";
261
+ echo '<fieldset class="options"><legend>' . __( 'Progress', 'wp-db-backup' ) . '</legend>
262
  <p><strong>' .
263
+ __( 'DO NOT DO THE FOLLOWING AS IT WILL CAUSE YOUR BACKUP TO FAIL:', 'wp-db-backup' ) .
264
  '</strong></p>
265
  <ol>
266
+ <li>' . __( 'Close this browser', 'wp-db-backup' ) . '</li>
267
+ <li>' . __( 'Reload this page', 'wp-db-backup' ) . '</li>
268
+ <li>' . __( 'Click the Stop or Back buttons in your browser', 'wp-db-backup' ) . '</li>
269
  </ol>
270
+ <p><strong>' . __( 'Progress:', 'wp-db-backup' ) . '</strong></p>
271
  <div id="meterbox" style="height:11px;width:80%;padding:3px;border:1px solid #659fff;"><div id="meter" style="color:#fff;height:11px;line-height:11px;background-color:#659fff;width:0%;text-align:center;font-size:6pt;">&nbsp;</div></div>
272
  <div id="progress_message"></div>
273
  <div id="errors"></div>
276
  <script type="text/javascript">
277
  //<![CDATA[
278
  window.onbeforeunload = function() {
279
+ return "' . __( 'Navigating away from this page will cause your backup to fail.', 'wp-db-backup' ) . '";
280
  }
281
  function setMeter(pct) {
282
  var meter = document.getElementById("meter");
309
  setMeter(100);
310
  ';
311
 
312
+ $download_uri = add_query_arg( 'backup', $this->backup_filename, $this->page_url );
313
+ switch ( $_POST['deliver'] ) {
314
+ case 'http':
315
+ echo '
316
+ setProgress("' . __( 'Preparing download.', 'wp-db-backup' ) . '");
317
  window.onbeforeunload = null;
318
  fram.src = "' . $download_uri . '";
319
 
323
  secondFrame.src = "' . $download_uri . '&download-retry=1";
324
  }, 30000 );
325
  ';
326
+ break;
327
+ case 'smtp':
328
+ $email = sanitize_text_field( wp_unslash( $_POST['backup_recipient'] ) );
329
+ if ( get_option( 'wpdb_backup_recip' ) != $email ) {
330
+ update_option( 'wpdb_backup_recip', $email );
331
+ }
332
+ echo '
333
+ setProgress("' . sprintf( __( 'Your backup has been emailed to %s', 'wp-db-backup' ), $email ) . '");
334
  window.onbeforeunload = null;
335
  fram.src = "' . $download_uri . '&via=email&recipient=' . $email . '";
336
  ';
337
+ break;
338
+ default:
339
+ echo '
340
+ setProgress("' . __( 'Backup Complete!', 'wp-db-backup' ) . '");
341
  window.onbeforeunload = null;
342
  ';
343
  }
350
  case 0: backup("", 0); break;
351
  ';
352
 
353
+ $also_backup = $this->get_post_data_array( 'other_tables' );
354
+ $core_tables = $this->get_post_data_array( 'core_tables' );
355
+ $tables = array_merge( $core_tables, $also_backup );
356
+ $step_count = 1;
357
+
358
+ foreach ( $tables as $table ) {
359
+ $rec_count = $wpdb->get_var( "SELECT count(*) FROM {$table}" );
360
+ $rec_segments = ceil( $rec_count / DBBWP_ROWS_PER_SEGMENT );
361
+ $table_count = 0;
362
  if ( $this->module_check() ) {
363
+ $delay = "setTimeout('";
364
+ $delay_time = "', " . (int) DBBWP_MOD_EVASIVE_DELAY . ')';
365
+ } else {
366
+ $delay = $delay_time = ''; }
367
  do {
368
  echo "case {$step_count}: {$delay}backup(\"{$table}\", {$table_count}){$delay_time}; break;\n";
369
  $step_count++;
370
  $table_count++;
371
+ } while ( $table_count < $rec_segments );
372
  echo "case {$step_count}: {$delay}backup(\"{$table}\", -1){$delay_time}; break;\n";
373
  $step_count++;
374
  }
375
+
376
  echo "case {$step_count}: finishBackup(); break;";
 
377
  echo '
378
  }
379
  if(step != 0) setMeter(100 * step / ' . $step_count . ');
387
  $this->backup_menu();
388
  }
389
 
390
+ function backup_fragment( $table, $segment, $filename ) {
391
  global $table_prefix, $wpdb;
392
 
393
  echo "$table:$segment:$filename";
394
 
395
+ if ( $table == '' ) {
396
+ $msg = __( 'Creating backup file...', 'wp-db-backup' );
397
  } else {
398
+ if ( $segment == -1 ) {
399
+ $msg = sprintf( __( 'Finished backing up table \\"%s\\".', 'wp-db-backup' ), $table );
400
  } else {
401
+ $msg = sprintf( __( 'Backing up table \\"%s\\"...', 'wp-db-backup' ), $table );
402
  }
403
  }
404
 
405
+ if ( is_writable( $this->backup_dir ) ) {
406
+ $this->fp = $this->open( $this->backup_dir . $filename, 'a' );
407
+ if ( ! $this->fp ) {
408
+ $this->error( __( 'Could not open the backup file for writing!', 'wp-db-backup' ) );
409
+ $this->error(
410
+ array(
411
+ 'loc' => 'frame',
412
+ 'kind' => 'fatal',
413
+ 'msg' => __(
414
+ 'The backup file could not be saved. Please check the permissions for writing to your backup directory and try again.',
415
+ 'wp-db-backup'
416
+ ),
417
+ )
418
+ );
419
+ } else {
420
+ if ( $table == '' ) {
421
  //Begin new backup of MySql
422
+ $this->stow( '# ' . __( 'WordPress MySQL database backup', 'wp-db-backup' ) . "\n" );
423
+ $this->stow( "#\n" );
424
+ $this->stow( '# ' . sprintf( __( 'Generated: %s', 'wp-db-backup' ), date( 'l j. F Y H:i T' ) ) . "\n" );
425
+ $this->stow( '# ' . sprintf( __( 'Hostname: %s', 'wp-db-backup' ), DB_HOST ) . "\n" );
426
+ $this->stow( '# ' . sprintf( __( 'Database: %s', 'wp-db-backup' ), $this->backquote( DB_NAME ) ) . "\n" );
427
+ $this->stow( "# --------------------------------------------------------\n" );
428
  } else {
429
+ if ( $segment == 0 ) {
430
  // Increase script execution time-limit to 15 min for every table.
431
+ if ( ! ini_get( 'safe_mode' ) ) {
432
+ @set_time_limit( 15 * 60 );
433
+ }
434
  // Create the SQL statements
435
+ $this->stow( "# --------------------------------------------------------\n" );
436
+ $this->stow( '# ' . sprintf( __( 'Table: %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
437
+ $this->stow( "# --------------------------------------------------------\n" );
438
  }
439
+ $this->backup_table( $table, $segment );
440
  }
441
  }
442
  } else {
443
+ $this->error(
444
+ array(
445
+ 'kind' => 'fatal',
446
+ 'loc' => 'frame',
447
+ 'msg' => __(
448
+ 'The backup directory is not writeable! Please check the permissions for writing to your backup directory and try again.',
449
+ 'wp-db-backup'
450
+ ),
451
+ )
452
+ );
453
  }
454
 
455
+ if ( $this->fp ) {
456
+ $this->close( $this->fp );
457
+ }
458
 
459
+ $this->error_display( 'frame' );
460
 
461
  echo '<script type="text/javascript"><!--//
462
  var msg = "' . $msg . '";
470
  function perform_backup() {
471
  // are we backing up any other tables?
472
  $also_backup = array();
473
+ if ( isset( $_POST['other_tables'] ) ) {
474
+ $also_backup = sanitize_text_field( $_POST['other_tables'] );
475
+ }
476
+
477
+ $core_tables = sanitize_text_field( $_POST['core_tables'] );
478
+ $this->backup_file = $this->db_backup( $core_tables, $also_backup );
479
+
480
+ if ( false !== $this->backup_file ) {
481
+ if ( 'smtp' == $_POST['deliver'] ) {
482
+ $email = sanitize_text_field( wp_unslash( $_POST['backup_recipient'] ) );
483
+ $this->deliver_backup( $this->backup_file, sanitize_text_field( $_POST['deliver'] ), $email, 'main' );
484
+ if ( get_option( 'wpdb_backup_recip' ) != $email ) {
485
+ update_option( 'wpdb_backup_recip', $email );
486
  }
487
+ wp_redirect( $this->page_url );
488
+ } elseif ( 'http' == $_POST['deliver'] ) {
489
+ $download_uri = add_query_arg( 'backup', $this->backup_file, $this->page_url );
490
+ wp_redirect( $download_uri );
491
  exit;
492
  }
493
+
494
  // we do this to say we're done.
495
  $this->backup_complete = true;
496
  }
515
  if ( 2 < lis.length ) {
516
  var text = document.createElement('p');
517
  text.className = 'instructions';
518
+ text.innerHTML = '<?php _e( 'Click and hold down <code>[SHIFT]</code> to toggle multiple checkboxes', 'wp-db-backup' ); ?>';
519
  ul.parentNode.insertBefore(text, ul);
520
  }
521
  }
544
  }
545
  }
546
 
547
+ <?php if ( function_exists( 'wp_schedule_event' ) ) : // needs to be at least WP 2.1 for ajax ?>
548
  if ( 'undefined' == typeof XMLHttpRequest )
549
  var xml = new ActiveXObject( navigator.userAgent.indexOf('MSIE 5') >= 0 ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP' );
550
  else
553
  var initTimeChange = function() {
554
  var timeWrap = document.getElementById('backup-time-wrap');
555
  var backupTime = document.getElementById('next-backup-time');
556
+ if ( !! timeWrap && !! backupTime && ( 1 ==
557
+ <?php
558
  echo (int) ( 'en' == strtolower( substr( get_locale(), 0, 2 ) ) );
559
+ ?>
560
+ ) ) {
561
  var span = document.createElement('span');
562
  span.className = 'submit';
563
  span.id = 'change-wrap';
564
+ span.innerHTML = '<input type="submit" id="change-backup-time" name="change-backup-time" value="<?php _e( 'Change', 'wp-db-backup' ); ?>" />';
565
  timeWrap.appendChild(span);
566
  backupTime.ondblclick = function(e) { span.parentNode.removeChild(span); clickTime(e, backupTime); };
567
  span.onclick = function(e) { span.parentNode.removeChild(span); clickTime(e, backupTime); };
570
 
571
  var clickTime = function(e, backupTime) {
572
  var tText = backupTime.innerHTML;
573
+ backupTime.innerHTML = '<input type="text" value="' + tText + '" name="backup-time-text" id="backup-time-text" /> <span class="submit"><input type="submit" name="save-backup-time" id="save-backup-time" value="<?php _e( 'Save', 'wp-db-backup' ); ?>" /></span>';
574
  backupTime.ondblclick = null;
575
  var mainText = document.getElementById('backup-time-text');
576
  mainText.focus();
594
  xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
595
  if ( xml.overrideMimeType )
596
  xml.setRequestHeader('Connection', 'close');
597
+ xml.send('action=save_backup_time&_wpnonce=<?php echo wp_create_nonce( $this->referer_check_key ); ?>&backup-time='+tVal);
598
  xml.onreadystatechange = function() {
599
  if ( 4 == xml.readyState && '0' != xml.responseText ) {
600
  backupTime.innerHTML = xml.responseText;
609
  }
610
  //]]>
611
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
612
  <?php
613
  }
614
 
615
  function admin_load() {
616
+ add_action( 'admin_head', array( &$this, 'admin_header' ) );
617
+ wp_enqueue_style( 'wp-db-backup-styles', plugin_dir_url( __FILE__ ) . 'assets/css/style.css' );
618
  }
619
 
620
  function admin_menu() {
621
+ $_page_hook = add_management_page( __( 'Backup', 'wp-db-backup' ), __( 'Backup', 'wp-db-backup' ), 'import', $this->basename, array( &$this, 'backup_menu' ) );
622
+ add_action( 'load-' . $_page_hook, array( &$this, 'admin_load' ) );
623
+ if ( function_exists( 'get_current_screen' ) ) {
624
+ $screen = convert_to_screen( $_page_hook );
625
+ if ( method_exists( $screen, 'add_help_tab' ) ) {
626
+ $screen->add_help_tab(
627
+ array(
628
+ 'title' => __( 'Backup', 'wp-db-backup' ),
629
+ 'id' => $_page_hook,
630
+ 'content' => $this->help_menu(),
631
+ )
632
+ );
633
  }
634
+ } elseif ( function_exists( 'add_contextual_help' ) ) {
635
  $text = $this->help_menu();
636
+ add_contextual_help( $_page_hook, $text );
637
  }
638
  }
639
 
640
  function fragment_menu() {
641
+ $page_hook = add_management_page( __( 'Backup', 'wp-db-backup' ), __( 'Backup', 'wp-db-backup' ), 'import', $this->basename, array( &$this, 'build_backup_script' ) );
642
+ add_action( 'load-' . $page_hook, array( &$this, 'admin_load' ) );
643
  }
644
 
645
  /**
647
  * @return string The text of the help menu.
648
  */
649
  function help_menu() {
650
+ $text = "\n<a href=\"http://wordpress.org/extend/plugins/wp-db-backup/faq/\" target=\"_blank\">" . __( 'FAQ', 'wp-db-backup' ) . '</a>';
651
  return $text;
652
  }
653
 
654
  function save_backup_time() {
655
  if ( $this->can_user_backup() ) {
656
  // try to get a time from the input string
657
+ $time = strtotime( strval( $_POST['backup-time'] ) );
658
  if ( ! empty( $time ) && time() < $time ) {
659
  wp_clear_scheduled_hook( 'wp_db_backup_cron' ); // unschedule previous
660
  $scheds = (array) wp_get_schedules();
661
+ $name = get_option( 'wp_cron_backup_schedule' );
662
  if ( 0 != $time ) {
663
+ wp_schedule_event( $time, $name, 'wp_db_backup_cron' );
664
+ echo gmdate( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $time + ( get_option( 'gmt_offset' ) * 3600 ) );
665
  exit;
666
  }
667
  }
668
  } else {
669
+ die( 0 );
670
  }
671
  }
672
 
674
  * Better addslashes for SQL queries.
675
  * Taken from phpMyAdmin.
676
  */
677
+ function sql_addslashes( $a_string = '', $is_like = false ) {
678
+ if ( $is_like ) {
679
+ $a_string = str_replace( '\\', '\\\\\\\\', $a_string );
680
+ } else {
681
+ $a_string = str_replace( '\\', '\\\\', $a_string );
682
+ }
683
+
684
+ return str_replace( '\'', '\\\'', $a_string );
685
  }
686
 
687
  /**
688
  * Add backquotes to tables and db-names in
689
  * SQL queries. Taken from phpMyAdmin.
690
  */
691
+ function backquote( $a_name ) {
692
+ if ( ! empty( $a_name ) && $a_name != '*' ) {
693
+ if ( is_array( $a_name ) ) {
694
  $result = array();
695
+ reset( $a_name );
696
+ while ( list($key, $val) = each( $a_name ) ) {
697
+ $result[ $key ] = '`' . $val . '`';
698
+ }
699
  return $result;
700
  } else {
701
  return '`' . $a_name . '`';
705
  }
706
  }
707
 
708
+ function open( $filename = '', $mode = 'w' ) {
709
+ if ( '' == $filename ) {
710
+ return false;
711
+ }
712
+ $fp = @fopen( $filename, $mode );
713
  return $fp;
714
  }
715
 
716
+ function close( $fp ) {
717
+ fclose( $fp );
718
  }
719
 
720
  /**
722
  * @param string $query_line the line to write
723
  * @return null
724
  */
725
+ function stow( $query_line ) {
726
+ if ( false === @fwrite( $this->fp, $query_line ) ) {
727
+ $this->error( __( 'There was an error writing a line to the backup script:', 'wp-db-backup' ) . ' ' . $query_line . ' ' . $php_errormsg );
728
+ }
729
  }
730
 
731
  /**
733
  * @param array $args
734
  * @return bool
735
  */
736
+ function error( $args = array() ) {
737
+ if ( is_string( $args ) ) {
738
+ $args = array( 'msg' => $args );
739
+ }
740
+
741
+ $args = array_merge(
742
+ array(
743
+ 'loc' => 'main',
744
+ 'kind' => 'warn',
745
+ 'msg' => '',
746
+ ),
747
+ $args
748
+ );
749
+
750
+ $this->errors[ $args['kind'] ][] = $args['msg'];
751
+
752
+ if ( 'fatal' == $args['kind'] || 'frame' == $args['loc'] ) {
753
+ $this->error_display( $args['loc'] );
754
+ }
755
+
756
  return true;
757
  }
758
 
762
  * @param string $loc
763
  * @return string
764
  */
765
+ function error_display( $loc = 'main', $echo = true ) {
766
  $errs = $this->errors;
767
  unset( $this->errors );
768
+
769
+ if ( ! count( $errs ) ) {
770
+ return;
771
+ }
772
+
773
+ $msg = '';
774
  $errs['fatal'] = isset( $errs['fatal'] ) ? (array) $errs['fatal'] : array();
775
+ $errs['warn'] = isset( $errs['warn'] ) ? (array) $errs['warn'] : array();
776
+ $err_list = array_slice( array_merge( $errs['fatal'], $errs['warn'] ), 0, 10 );
777
+
778
+ if ( 10 == count( $err_list ) ) {
779
+ $err_list[9] = __( 'Subsequent errors have been omitted from this log.', 'wp-db-backup' );
780
+ }
781
+
782
  $wrap = ( 'frame' == $loc ) ? "<script type=\"text/javascript\">\n var msgList = ''; \n %1\$s \n if ( msgList ) alert(msgList); \n </script>" : '%1$s';
783
  $line = ( 'frame' == $loc ) ?
784
  "try{ window.parent.addError('%1\$s'); } catch(e) { msgList += ' %1\$s';}\n" :
785
  "%1\$s<br />\n";
786
+
787
+ foreach ( (array) $err_list as $err ) {
788
+ $msg .= sprintf( $line, str_replace( array( "\n", "\r" ), '', addslashes( $err ) ) );
 
 
 
789
  }
790
+
791
+ $msg = sprintf( $wrap, $msg );
792
+
793
+ if ( count( $errs['fatal'] ) ) {
794
+ if ( function_exists( 'wp_die' ) && 'frame' != $loc ) {
795
+ wp_die( stripslashes( $msg ) );
796
+ } else {
797
+ die( $msg );
798
+ }
799
+ } else {
800
+ if ( $echo ) {
801
+ echo $msg;
802
+ } else {
803
+ return $msg;
804
+ }
805
  }
806
  }
807
 
816
  * @param string $segment
817
  * @return void
818
  */
819
+ function backup_table( $table, $segment = 'none' ) {
820
  global $wpdb;
821
 
822
+ $table_structure = $wpdb->get_results( "DESCRIBE $table" );
823
+ if ( ! $table_structure ) {
824
+ $this->error( __( 'Error getting table details', 'wp-db-backup' ) . ": $table" );
825
  return false;
826
  }
827
 
828
+ if ( ( $segment == 'none' ) || ( $segment == 0 ) ) {
829
  // Add SQL statement to drop existing table
830
+ $this->stow( "\n\n" );
831
+ $this->stow( "#\n" );
832
+ $this->stow( '# ' . sprintf( __( 'Delete any existing table %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
833
+ $this->stow( "#\n" );
834
+ $this->stow( "\n" );
835
+ $this->stow( 'DROP TABLE IF EXISTS ' . $this->backquote( $table ) . ";\n" );
836
 
837
  // Table structure
838
  // Comment in SQL-file
839
+ $this->stow( "\n\n" );
840
+ $this->stow( "#\n" );
841
+ $this->stow( '# ' . sprintf( __( 'Table structure of table %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
842
+ $this->stow( "#\n" );
843
+ $this->stow( "\n" );
844
+
845
+ $create_table = $wpdb->get_results( "SHOW CREATE TABLE $table", ARRAY_N );
846
+ if ( false === $create_table ) {
847
+ $err_msg = sprintf( __( 'Error with SHOW CREATE TABLE for %s.', 'wp-db-backup' ), $table );
848
+ $this->error( $err_msg );
849
+ $this->stow( "#\n# $err_msg\n#\n" );
850
  }
851
+ $this->stow( $create_table[0][1] . ' ;' );
852
 
853
+ if ( false === $table_structure ) {
854
+ $err_msg = sprintf( __( 'Error getting table structure of %s', 'wp-db-backup' ), $table );
855
+ $this->error( $err_msg );
856
+ $this->stow( "#\n# $err_msg\n#\n" );
857
  }
858
 
859
  // Comment in SQL-file
860
+ $this->stow( "\n\n" );
861
+ $this->stow( "#\n" );
862
+ $this->stow( '# ' . sprintf( __( 'Data contents of table %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
863
+ $this->stow( "#\n" );
864
  }
865
 
866
+ if ( ( $segment == 'none' ) || ( $segment >= 0 ) ) {
867
  $defs = array();
868
  $ints = array();
869
+ foreach ( $table_structure as $struct ) {
870
+ if ( ( 0 === strpos( $struct->Type, 'tinyint' ) ) ||
871
+ ( 0 === strpos( strtolower( $struct->Type ), 'smallint' ) ) ||
872
+ ( 0 === strpos( strtolower( $struct->Type ), 'mediumint' ) ) ||
873
+ ( 0 === strpos( strtolower( $struct->Type ), 'int' ) ) ||
874
+ ( 0 === strpos( strtolower( $struct->Type ), 'bigint' ) ) ) {
875
+ $defs[ strtolower( $struct->Field ) ] = ( null === $struct->Default ) ? 'NULL' : $struct->Default;
876
+ $ints[ strtolower( $struct->Field ) ] = '1';
877
  }
878
  }
879
 
 
880
  // Batch by $row_inc
881
 
882
+ if ( $segment == 'none' ) {
883
  $row_start = 0;
884
+ $row_inc = DBBWP_ROWS_PER_SEGMENT;
885
  } else {
886
+ $row_start = $segment * DBBWP_ROWS_PER_SEGMENT;
887
+ $row_inc = DBBWP_ROWS_PER_SEGMENT;
888
  }
889
 
890
  do {
891
  // don't include extra stuff, if so requested
892
+ $excs = (array) get_option( 'wp_db_backup_excs' );
893
  $where = '';
894
+
895
+ if ( is_array( $excs['spam'] ) && in_array( $table, $excs['spam'] ) ) {
896
+ $where = " WHERE comment_approved != 'spam'";
897
+ } elseif ( is_array( $excs['revisions'] ) && in_array( $table, $excs['revisions'] ) ) {
898
+ $where = " WHERE post_type != 'revision'";
899
  }
900
 
901
+ if ( ! ini_get( 'safe_mode' ) ) {
902
+ @set_time_limit( 15 * 60 );
903
+ }
904
+ $table_data = $wpdb->get_results( "SELECT * FROM $table $where LIMIT {$row_start}, {$row_inc}", ARRAY_A );
905
 
906
+ $entries = 'INSERT INTO ' . $this->backquote( $table ) . ' VALUES (';
907
  // \x08\\x09, not required
908
+ $search = array( "\x00", "\x0a", "\x0d", "\x1a" );
909
+ $replace = array( '\0', '\n', '\r', '\Z' );
910
+
911
+ if ( $table_data ) {
912
+ foreach ( $table_data as $row ) {
913
  $values = array();
914
+ foreach ( $row as $key => $value ) {
915
+ if ( ! empty( $ints[ strtolower( $key ) ] ) ) {
916
  // make sure there are no blank spots in the insert syntax,
917
  // yet try to avoid quotation marks around integers
918
+ $value = ( null === $value || '' === $value ) ? $defs[ strtolower( $key ) ] : $value;
919
  $values[] = ( '' === $value ) ? "''" : $value;
920
  } else {
921
+ $values[] = "'" . str_replace( $search, $replace, $this->sql_addslashes( $value ) ) . "'";
922
  }
923
  }
924
+ $this->stow( " \n" . $entries . implode( ', ', $values ) . ');' );
925
  }
926
  $row_start += $row_inc;
927
  }
928
+ } while ( ( count( $table_data ) > 0 ) and ( $segment == 'none' ) );
929
  }
930
 
931
+ if ( ( $segment == 'none' ) || ( $segment < 0 ) ) {
932
  // Create footer/closing comment in SQL-file
933
+ $this->stow( "\n" );
934
+ $this->stow( "#\n" );
935
+ $this->stow( '# ' . sprintf( __( 'End of data contents of table %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
936
+ $this->stow( "# --------------------------------------------------------\n" );
937
+ $this->stow( "\n" );
938
  }
939
  } // end backup_table()
940
 
941
+ function db_backup( $core_tables, $other_tables ) {
942
  global $table_prefix, $wpdb;
943
 
944
+ if ( is_writable( $this->backup_dir ) ) {
945
+ $this->fp = $this->open( $this->backup_dir . $this->backup_filename );
946
+ if ( ! $this->fp ) {
947
+ $this->error( __( 'Could not open the backup file for writing!', 'wp-db-backup' ) );
948
  return false;
949
  }
950
  } else {
951
+ $this->error( __( 'The backup directory is not writeable!', 'wp-db-backup' ) );
952
  return false;
953
  }
954
 
955
  //Begin new backup of MySql
956
+ $this->stow( '# ' . __( 'WordPress MySQL database backup', 'wp-db-backup' ) . "\n" );
957
+ $this->stow( "#\n" );
958
+ $this->stow( '# ' . sprintf( __( 'Generated: %s', 'wp-db-backup' ), date( 'l j. F Y H:i T' ) ) . "\n" );
959
+ $this->stow( '# ' . sprintf( __( 'Hostname: %s', 'wp-db-backup' ), DB_HOST ) . "\n" );
960
+ $this->stow( '# ' . sprintf( __( 'Database: %s', 'wp-db-backup' ), $this->backquote( DB_NAME ) ) . "\n" );
961
+ $this->stow( "# --------------------------------------------------------\n" );
962
+
963
+ if ( ( is_array( $other_tables ) ) && ( count( $other_tables ) > 0 ) ) {
964
+ $tables = array_merge( $core_tables, $other_tables );
965
+ } else {
966
  $tables = $core_tables;
967
+ }
968
 
969
+ foreach ( $tables as $table ) {
970
  // Increase script execution time-limit to 15 min for every table.
971
+ if ( ! ini_get( 'safe_mode' ) ) {
972
+ @set_time_limit( 15 * 60 );
973
+ }
974
  // Create the SQL statements
975
+ $this->stow( "# --------------------------------------------------------\n" );
976
+ $this->stow( '# ' . sprintf( __( 'Table: %s', 'wp-db-backup' ), $this->backquote( $table ) ) . "\n" );
977
+ $this->stow( "# --------------------------------------------------------\n" );
978
+ $this->backup_table( $table );
979
  }
980
 
981
+ $this->close( $this->fp );
982
 
983
+ if ( count( $this->errors ) ) {
984
  return false;
985
  } else {
986
  return $this->backup_filename;
990
 
991
  /**
992
  * Sends the backed-up file via email
993
+ *
994
  * @param string $to
995
  * @param string $subject
996
  * @param string $message
997
+ * @param string $diskfile
998
+ *
999
  * @return bool
1000
  */
1001
+ function send_mail( $to, $subject, $message, $diskfile ) {
1002
+ return wp_mail( $to, $subject, $message, array(), array( $diskfile ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1003
  }
1004
 
1005
+ function deliver_backup( $filename = '', $delivery = 'http', $recipient = '', $location = 'main' ) {
1006
+ if ( '' == $filename ) {
1007
+ return false; }
1008
 
1009
+ $diskfile = $this->backup_dir . $filename;
1010
  $gz_diskfile = "{$diskfile}.gz";
1011
+ $retry = isset( $_GET['download-retry'] );
1012
+ $success = false;
1013
+
1014
+ // Try to gzip the file if we can.
1015
+ if ( file_exists( $diskfile ) && ! file_exists( $gz_diskfile ) && ! $retry ) {
1016
+ if ( function_exists( 'gzencode' ) && function_exists( 'file_get_contents' ) ) {
1017
+ // Try upping the memory limit before gzipping
1018
+ if ( function_exists( 'memory_get_usage' ) && ( (int) @ini_get( 'memory_limit' ) < 64 ) ) {
1019
+ @ini_set( 'memory_limit', '64M' );
1020
+ }
1021
 
1022
+ $contents = file_get_contents( $diskfile );
1023
+ $gzipped = gzencode( $contents, 9 );
1024
+ $fp = fopen( $gz_diskfile, 'w' );
 
 
 
 
 
 
 
 
 
 
 
1025
 
1026
+ fwrite( $fp, $gzipped );
 
 
 
 
 
1027
 
1028
+ if ( fclose( $fp ) ) {
1029
+ unlink( $diskfile );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1030
  }
1031
  }
 
 
 
 
 
 
1032
  }
1033
 
1034
+ if ( file_exists( $gz_diskfile ) ) {
1035
+ $filename = $filename . '.gz';
1036
+ $file_to_deliver = $gz_diskfile;
1037
+ } else {
1038
+ $file_to_deliver = $diskfile;
1039
+ }
1040
+
1041
+ if ( 'http' == $delivery ) {
1042
+ if ( ! file_exists( $file_to_deliver ) ) {
1043
+ if ( ! $retry ) {
1044
+ $this->error(
1045
+ array(
1046
+ 'kind' => 'fatal',
1047
+ 'msg' => sprintf(
1048
+ __(
1049
+ 'File not found:%s',
1050
+ 'wp-db-backup'
1051
+ ),
1052
+ "&nbsp;<strong>$filename</strong><br />"
1053
+ ) . '<br /><a href="' . $this->page_url . '">' . __(
1054
+ 'Return to Backup',
1055
+ 'wp-db-backup'
1056
+ ) . '</a>',
1057
+ )
1058
+ );
1059
  } else {
1060
  return true;
1061
  }
1062
+ } else {
1063
+ header( 'Content-Description: File Transfer' );
1064
+ header( 'Content-Type: application/octet-stream' );
1065
+ header( 'Content-Length: ' . filesize( $file_to_deliver ) );
1066
+ header( "Content-Disposition: attachment; filename=$filename" );
1067
+ $success = readfile( $file_to_deliver );
1068
  if ( $success ) {
1069
+ unlink( $file_to_deliver );
1070
  }
1071
  }
1072
+ } elseif ( 'smtp' == $delivery ) {
1073
+ if ( ! file_exists( $file_to_deliver ) ) {
1074
+ $msg = sprintf( __( 'File %s does not exist!', 'wp-db-backup' ), $file_to_deliver );
1075
+ $this->error( $msg );
1076
  return false;
1077
  }
1078
+
1079
+ if ( ! is_email( $recipient ) ) {
1080
+ $recipient = get_option( 'admin_email' );
1081
  }
1082
+
1083
+ $message = sprintf( __( "Attached to this email is\n %1\$1s\n Size:%2\$2s kilobytes\n", 'wp-db-backup' ), $filename, round( filesize( $file_to_deliver ) / 1024 ) );
1084
+ $success = $this->send_mail( $recipient, get_bloginfo( 'name' ) . ' ' . __( 'Database Backup', 'wp-db-backup' ), $message, $file_to_deliver );
1085
 
1086
  if ( false === $success ) {
1087
+ $msg = __( 'The following errors were reported:', 'wp-db-backup' ) . "\n ";
1088
+ if ( function_exists( 'error_get_last' ) ) {
1089
+ $err = error_get_last();
1090
  $msg .= $err['message'];
1091
  } else {
1092
+ $msg .= __( 'ERROR: The mail application has failed to deliver the backup.', 'wp-db-backup' );
1093
  }
1094
+ $this->error(
1095
+ array(
1096
+ 'kind' => 'fatal',
1097
+ 'loc' => $location,
1098
+ 'msg' => $msg,
1099
+ )
1100
+ );
1101
  } else {
1102
+ if ( file_exists( $file_to_deliver ) ) {
1103
+ unlink( $file_to_deliver );
1104
  }
1105
  }
1106
  }
1107
+
1108
  return $success;
1109
  }
1110
 
1111
  function backup_menu() {
1112
  global $table_prefix, $wpdb;
1113
  $feedback = '';
1114
+ $whoops = false;
1115
 
1116
  // did we just do a backup? If so, let's report the status
1117
  if ( $this->backup_complete ) {
1118
+ $feedback = '<div class="updated wp-db-backup-updated"><p>' . __( 'Backup Successful', 'wp-db-backup' ) . '!';
1119
+ $file = $this->backup_file;
1120
+ switch ( $_POST['deliver'] ) {
1121
+ case 'http':
1122
+ $feedback .= '<br />' . sprintf( __( 'Your backup file: %2s should begin downloading shortly.', 'wp-db-backup' ), "{$this->backup_file}", $this->backup_file );
1123
+ break;
1124
+ case 'smtp':
1125
+ $email = sanitize_text_field( wp_unslash( $_POST['backup_recipient'] ) );
1126
+ if ( ! is_email( $email ) ) {
1127
+ $feedback .= get_option( 'admin_email' );
1128
+ } else {
1129
+ $feedback .= $email;
1130
+ }
1131
+ $feedback = '<br />' . sprintf( __( 'Your backup has been emailed to %s', 'wp-db-backup' ), $feedback );
1132
+ break;
1133
  }
1134
+
1135
  $feedback .= '</p></div>';
1136
  }
1137
 
1138
  // security check
1139
  $this->wp_secure();
1140
 
1141
+ if ( count( $this->errors ) ) {
1142
+ $feedback .= '<div class="updated wp-db-backup-updated error"><p><strong>' . __( 'The following errors were reported:', 'wp-db-backup' ) . '</strong></p>';
1143
  $feedback .= '<p>' . $this->error_display( 'main', false ) . '</p>';
1144
+ $feedback .= '</p></div>';
1145
  }
1146
 
1147
  // did we just save options for wp-cron?
1148
+ if ( ( function_exists( 'wp_schedule_event' ) || function_exists( 'wp_cron_init' ) ) && isset( $_POST['wp_cron_backup_options'] ) ) :
1149
+ do_action( 'wp_db_b_update_cron_options' );
1150
+
1151
+ if ( function_exists( 'wp_schedule_event' ) ) {
1152
  wp_clear_scheduled_hook( 'wp_db_backup_cron' ); // unschedule previous
1153
+ $scheds = (array) wp_get_schedules();
1154
+ $name = sanitize_text_field( strval( $_POST['wp_cron_schedule'] ) );
1155
+ $interval = ( isset( $scheds[ $name ]['interval'] ) ) ? (int) $scheds[ $name ]['interval'] : 0;
1156
+ update_option( 'wp_cron_backup_schedule', $name, false );
1157
+
1158
  if ( 0 !== $interval ) {
1159
+ wp_schedule_event( time() + $interval, $name, 'wp_db_backup_cron' );
1160
  }
1161
+ } else {
1162
+ update_option( 'wp_cron_backup_schedule', intval( $_POST['cron_schedule'] ), false );
1163
  }
1164
+
1165
+ update_option( 'wp_cron_backup_tables', $this->get_submitted_tables_to_backup_in_cron() );
1166
+
1167
+ if ( is_email( $_POST['cron_backup_recipient'] ) ) {
1168
+ update_option( 'wp_cron_backup_recipient', sanitize_text_field( $_POST['cron_backup_recipient'] ), false );
 
1169
  }
1170
+
1171
+ $feedback .= '<div class="updated wp-db-backup-updated"><p>' . __( 'Scheduled Backup Options Saved!', 'wp-db-backup' ) . '</p></div>';
1172
  endif;
1173
 
1174
  $other_tables = array();
1175
+ $also_backup = array();
1176
 
1177
  // Get complete db table list
1178
+ $all_tables = $wpdb->get_results( 'SHOW TABLES', ARRAY_N );
1179
+ $all_tables = array_map(
1180
+ function( $a ) {
1181
+ return $a[0];
1182
+ },
1183
+ $all_tables
1184
+ );
1185
+
1186
  // Get list of WP tables that actually exist in this DB (for 1.6 compat!)
1187
+ $wp_backup_default_tables = array_intersect( $all_tables, $this->core_table_names );
1188
  // Get list of non-WP tables
1189
+ $other_tables = array_diff( $all_tables, $wp_backup_default_tables );
1190
 
1191
+ if ( '' != $feedback ) {
1192
  echo $feedback;
1193
+ }
1194
 
1195
+ if ( ! $this->wp_secure() ) {
1196
  return;
1197
+ }
1198
 
1199
  // Give the new dirs the same perms as wp-content.
1200
+ // $stat = stat( ABSPATH . 'wp-content' );
1201
+ // $dir_perms = $stat['mode'] & 0000777; // Get the permission bits.
1202
  $dir_perms = '0777';
1203
 
1204
  // the file doesn't exist and can't create it
1205
+ if ( ! file_exists( $this->backup_dir ) && ! @mkdir( $this->backup_dir ) ) {
1206
+ ?>
1207
+ <div class="updated wp-db-backup-updated error">
1208
+ <p><?php _e( 'WARNING: Your backup directory does <strong>NOT</strong> exist, and we cannot create it.', 'wp-db-backup' ); ?></p>
1209
+ <p><?php printf( __( 'Using your FTP client, try to create the backup directory yourself: %s', 'wp-db-backup' ), '<code>' . $this->backup_dir . '</code>' ); ?></p>
1210
+ </div>
1211
+ <?php
1212
+ // not writable due to write permissions
1213
  $whoops = true;
1214
+ } elseif ( ! is_writable( $this->backup_dir ) && ! @chmod( $this->backup_dir, $dir_perms ) ) {
1215
+ ?>
1216
+ <div class="updated wp-db-backup-updated error">
1217
+ <p><?php _e( 'WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files.', 'wp-db-backup' ); ?></p>
1218
+ <p><?php printf( __( 'Using your FTP client, try to set the backup directory&rsquo;s write permission to %1$s or %2$s: %3$s', 'wp-db-backup' ), '<code>777</code>', '<code>a+w</code>', '<code>' . $this->backup_dir . '</code>' ); ?></p>
1219
+ </div>
1220
+ <?php
1221
  $whoops = true;
1222
  } else {
1223
+ $this->fp = $this->open( $this->backup_dir . 'test' );
1224
+
1225
+ if ( $this->fp ) {
1226
+ $this->close( $this->fp );
1227
+ @unlink( $this->backup_dir . 'test' );
1228
+ // the directory is not writable probably due to safe mode
1229
  } else {
1230
+ ?>
1231
+ <div class="updated wp-db-backup-updated error">
1232
+ <p><?php _e( 'WARNING: Your backup directory is <strong>NOT</strong> writable! We cannot create the backup files.', 'wp-db-backup' ); ?></p>
1233
+ <?php
1234
+ if ( ini_get( 'safe_mode' ) ) {
1235
+ ?>
1236
+ <p><?php _e( 'This problem seems to be caused by your server&rsquo;s <code>safe_mode</code> file ownership restrictions, which limit what files web applications like WordPress can create.', 'wp-db-backup' ); ?></p>
1237
+ <?php
1238
+ }
1239
+
1240
+ printf( __( 'You can try to correct this problem by using your FTP client to delete and then re-create the backup directory: %s', 'wp-db-backup' ), '<code>' . $this->backup_dir . '</code>' );
1241
+ ?>
1242
+ </div>
1243
+ <?php
1244
  $whoops = true;
1245
  }
1246
  }
1247
 
1248
+ if ( ! file_exists( $this->backup_dir . 'index.php' ) ) {
1249
+ @touch( $this->backup_dir . 'index.php' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1250
  }
1251
+ ?>
1252
+ <div class='wrap'>
1253
+ <h2><?php _e( 'Backup', 'wp-db-backup' ); ?></h2>
1254
+ <form method="post" action="">
1255
+ <?php
1256
+ if ( function_exists( 'wp_nonce_field' ) ) {
1257
+ wp_nonce_field( $this->referer_check_key );
1258
+ }
1259
  ?>
1260
+ <fieldset class="options"><legend><?php _e( 'Tables', 'wp-db-backup' ); ?></legend>
1261
+ <div class="tables-list core-tables alternate">
1262
+ <h4><?php _e( 'These core WordPress tables will always be backed up:', 'wp-db-backup' ); ?></h4>
1263
+ <ul>
1264
+ <?php
1265
+ $excs = (array) get_option( 'wp_db_backup_excs' );
1266
+ foreach ( $wp_backup_default_tables as $table ) {
1267
+ if ( $table == $wpdb->comments ) {
1268
+ $checked = ( isset( $excs['spam'] ) && is_array( $excs['spam'] ) && in_array( $table, $excs['spam'] ) ) ? ' checked=\'checked\'' : '';
1269
+ echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code> <span class='instructions'> <input type='checkbox' name='exclude-spam[]' value='$table' $checked /> " . __( 'Exclude spam comments', 'wp-db-backup' ) . '</span></li>';
1270
+ } elseif ( function_exists( 'wp_get_post_revisions' ) && $table == $wpdb->posts ) {
1271
+ $checked = ( isset( $excs['revisions'] ) && is_array( $excs['revisions'] ) && in_array( $table, $excs['revisions'] ) ) ? ' checked=\'checked\'' : '';
1272
+ echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code> <span class='instructions'> <input type='checkbox' name='exclude-revisions[]' value='$table' $checked /> " . __( 'Exclude post revisions', 'wp-db-backup' ) . '</span></li>';
1273
+ } else {
1274
+ echo "<li><input type='hidden' name='core_tables[]' value='$table' /><code>$table</code></li>";
1275
+ }
1276
+ }
1277
+ ?>
1278
+ </ul>
1279
+ </div>
1280
+ <div class="tables-list extra-tables" id="extra-tables-list">
1281
  <?php
1282
+ if ( count( $other_tables ) > 0 ) {
1283
  ?>
1284
+ <h4><?php _e( 'You may choose to include any of the following tables:', 'wp-db-backup' ); ?></h4>
1285
+ <ul>
1286
+ <?php
1287
+ foreach ( $other_tables as $table ) {
1288
+ ?>
1289
+ <li><label><input type="checkbox" name="other_tables[]" value="<?php echo $table; ?>" /> <code><?php echo $table; ?></code></label>
1290
+ <?php
1291
+ }
1292
+ ?>
1293
+ </ul>
1294
  <?php
1295
  }
1296
+ ?>
1297
+ </div>
 
1298
  </fieldset>
1299
 
1300
  <fieldset class="options">
1301
+ <legend><?php _e( 'Backup Options', 'wp-db-backup' ); ?></legend>
1302
+ <p><?php _e( 'What to do with the backup file:', 'wp-db-backup' ); ?></p>
1303
  <ul>
1304
  <li><label for="do_download">
1305
  <input type="radio" checked="checked" id="do_download" name="deliver" value="http" style="border:none;" />
1306
+ <?php _e( 'Download to your computer', 'wp-db-backup' ); ?>
1307
  </label></li>
1308
  <li><label for="do_email">
1309
  <input type="radio" name="deliver" id="do_email" value="smtp" style="border:none;" />
1310
+ <?php
1311
+ $backup_recip = get_option( 'wpdb_backup_recip' );
1312
+ if ( empty( $backup_recip ) ) {
1313
+ $backup_recip = get_option( 'admin_email' );
1314
+ }
1315
+ _e( 'Email backup to:', 'wp-db-backup' );
1316
+ ?>
1317
+ <input type="text" name="backup_recipient" size="20" value="<?php echo esc_attr( $backup_recip ); ?>" />
1318
  </label></li>
1319
  </ul>
1320
  <?php if ( ! $whoops ) : ?>
1321
  <input type="hidden" name="do_backup" id="do_backup" value="backup" />
1322
  <p class="submit">
1323
+ <input type="submit" name="submit" onclick="document.getElementById('do_backup').value='fragments';" value="<?php _e( 'Backup now!', 'wp-db-backup' ); ?>" />
1324
  </p>
1325
  <?php else : ?>
1326
+ <div class="updated wp-db-backup-updated error"><p><?php _e( 'WARNING: Your backup directory is <strong>NOT</strong> writable!', 'wp-db-backup' ); ?></p></div>
1327
  <?php endif; // ! whoops ?>
1328
  </fieldset>
1329
+ <?php do_action( 'wp_db_b_backup_opts' ); ?>
1330
  </form>
1331
 
1332
  <?php
1333
  // this stuff only displays if some sort of wp-cron is available
1334
+ $cron = ( function_exists( 'wp_schedule_event' ) ) ? true : false; // wp-cron in WP 2.1+
1335
+ $cron_old = ( function_exists( 'wp_cron_init' ) && ! $cron ) ? true : false; // wp-cron plugin by Skippy
1336
+
1337
  if ( $cron_old || $cron ) :
1338
+ echo '<fieldset class="options"><legend>' . __( 'Scheduled Backup', 'wp-db-backup' ) . '</legend>';
1339
+ $datetime = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
1340
  if ( $cron ) :
1341
+ $next_cron = wp_next_scheduled( 'wp_db_backup_cron' );
1342
  if ( ! empty( $next_cron ) ) :
1343
  ?>
1344
  <p id="backup-time-wrap">
1345
+ <?php printf( __( 'Next Backup: %s', 'wp-db-backup' ), '<span id="next-backup-time">' . gmdate( $datetime, $next_cron + ( get_option( 'gmt_offset' ) * 3600 ) ) . '</span>' ); ?>
1346
  </p>
1347
  <?php
1348
  endif;
1349
  elseif ( $cron_old ) :
1350
+ ?>
1351
+ <p><?php printf( __( 'Last WP-Cron Daily Execution: %s', 'wp-db-backup' ), gmdate( $datetime, get_option( 'wp_cron_daily_lastrun' ) + ( get_option( 'gmt_offset' ) * 3600 ) ) ); ?><br />
1352
+ <?php
1353
+ printf( __( 'Next WP-Cron Daily Execution: %s', 'wp-db-backup' ), gmdate( $datetime, ( get_option( 'wp_cron_daily_lastrun' ) + ( get_option( 'gmt_offset' ) * 3600 ) + 86400 ) ) );
1354
+ ?>
1355
+ </p>
1356
+ <?php
1357
  endif;
1358
+ ?>
1359
+ <form method="post" action="">
1360
+ <?php
1361
+ if ( function_exists( 'wp_nonce_field' ) ) {
1362
+ wp_nonce_field( $this->referer_check_key );}
1363
+ ?>
1364
  <div class="tables-list">
1365
+ <h4><?php _e( 'Schedule: ', 'wp-db-backup' ); ?></h4>
1366
  <?php
1367
  if ( $cron_old ) :
1368
+ $wp_cron_backup_schedule = get_option( 'wp_cron_backup_schedule' );
1369
+ $schedule = array(
1370
+ 0 => __( 'None', 'wp-db-backup' ),
1371
+ 1 => __( 'Daily', 'wp-db-backup' ),
1372
+ );
1373
+ foreach ( $schedule as $value => $name ) {
1374
  echo ' <input type="radio" style="border:none;" name="cron_schedule"';
1375
+ if ( $wp_cron_backup_schedule == $value ) {
1376
  echo ' checked="checked" ';
1377
  }
1378
  echo 'value="' . $value . '" /> ' . $name;
1379
  }
1380
  elseif ( $cron ) :
1381
+ echo apply_filters( 'wp_db_b_schedule_choices', wp_get_schedules() );
1382
  endif;
1383
+
1384
+ $cron_recipient = get_option( 'wp_cron_backup_recipient' );
1385
+
1386
+ if ( ! is_email( $cron_recipient ) ) {
1387
+ $cron_recipient = get_option( 'admin_email' );
1388
  }
1389
+
1390
+ $cron_recipient_input = '<p><label for="cron_backup_recipient">' . __( 'Email backup to:', 'wp-db-backup' ) . ' <input type="text" name="cron_backup_recipient" id="cron_backup_recipient" size="20" value="' . $cron_recipient . '" /></label></p>';
1391
+ echo apply_filters( 'wp_db_b_cron_recipient_input', $cron_recipient_input );
1392
+ echo '<p class="submit"><input type="submit" name="submit" value="' . __( 'Schedule backup', 'wp-db-backup' ) . '" /></p>';
1393
  echo '</div>';
1394
+ $cron_tables = get_option( 'wp_cron_backup_tables' );
1395
+
1396
+ if ( ! is_array( $cron_tables ) ) {
1397
  $cron_tables = array();
1398
  }
1399
+
1400
+ if ( count( $other_tables ) > 0 ) {
1401
  echo '<div class="tables-list alternate" id="include-tables-list">';
1402
+ echo '<h4>' . __( 'Tables to include in the scheduled backup:', 'wp-db-backup' ) . '</h4><ul>';
1403
+ foreach ( $other_tables as $table ) {
1404
  echo '<li><input type="checkbox" ';
1405
+ if ( in_array( $table, $cron_tables ) ) {
1406
  echo 'checked="checked" ';
1407
  }
1408
  echo "name='wp_cron_backup_tables[]' value='{$table}' /> <code>{$table}</code></li>";
1409
  }
1410
  echo '</ul></div>';
1411
  }
1412
+
1413
  echo '<input type="hidden" name="wp_cron_backup_options" value="SET" /></form>';
1414
  echo '</fieldset>';
1415
  endif; // end of wp_cron (legacy) section
1420
 
1421
  function get_sched() {
1422
  $options = array_keys( (array) wp_get_schedules() );
1423
+ $freq = get_option( 'wp_cron_backup_schedule' );
1424
+ $freq = ( in_array( $freq, $options ) ) ? $freq : 'never';
1425
+
1426
  return $freq;
1427
  }
1428
 
1429
+ function schedule_choices( $schedule ) {
1430
+ // create the cron menu based on the schedule
1431
  $wp_cron_backup_schedule = $this->get_sched();
1432
+ $next_cron = wp_next_scheduled( 'wp_db_backup_cron' );
1433
  $wp_cron_backup_schedule = ( empty( $next_cron ) ) ? 'never' : $wp_cron_backup_schedule;
1434
+ $sort = array();
1435
+
1436
+ foreach ( (array) $schedule as $key => $value ) {
1437
+ $sort[ $key ] = $value['interval'];
1438
+ }
1439
  asort( $sort );
1440
+
1441
  $schedule_sorted = array();
1442
+ foreach ( (array) $sort as $key => $value ) {
1443
+ $schedule_sorted[ $key ] = $schedule[ $key ];
1444
+ }
1445
+
1446
+ $menu = '<ul>';
1447
+ $schedule = array_merge(
1448
+ array(
1449
+ 'never' => array(
1450
+ 'interval' => 0,
1451
+ 'display' => __( 'Never', 'wp-db-backup' ),
1452
+ ),
1453
+ ),
1454
+ (array) $schedule_sorted
1455
+ );
1456
+
1457
+ foreach ( $schedule as $name => $settings ) {
1458
  $interval = (int) $settings['interval'];
1459
+ if ( 0 == $interval && ! 'never' == $name ) {
1460
+ continue;
1461
+ }
1462
+ $display = ( ! '' == $settings['display'] ) ? $settings['display'] : sprintf( __( '%s seconds', 'wp-db-backup' ), $interval );
1463
+ $menu .= "<li><input type='radio' name='wp_cron_schedule' style='border:none;' ";
1464
+ if ( $wp_cron_backup_schedule == $name ) {
1465
  $menu .= " checked='checked' ";
1466
  }
1467
  $menu .= "value='$name' /> $display</li>";
1468
  }
1469
+
1470
  $menu .= '</ul>';
1471
+
1472
  return $menu;
1473
  } // end schedule_choices()
1474
 
1475
+ function wp_cron_daily() {
1476
+ // for legacy cron plugin
1477
+ $schedule = intval( get_option( 'wp_cron_backup_schedule' ) );
1478
+
1479
  // If scheduled backup is disabled
1480
+ if ( 0 == $schedule ) {
1481
+ return;
1482
+ } else {
1483
+ return $this->cron_backup();
1484
+ }
1485
  }
1486
 
1487
  function cron_backup() {
1488
  global $table_prefix, $wpdb;
1489
+
1490
+ $all_tables = $wpdb->get_results( 'SHOW TABLES', ARRAY_N );
1491
+ $all_tables = array_map(
1492
+ function( $a ) {
1493
+ return $a[0];
1494
+ },
1495
+ $all_tables
1496
+ );
1497
+ $core_tables = array_intersect( $all_tables, $this->core_table_names );
1498
+ $other_tables = get_option( 'wp_cron_backup_tables' );
1499
+ $recipient = get_option( 'wp_cron_backup_recipient' );
1500
+ $backup_file = $this->db_backup( $core_tables, $other_tables );
1501
+
1502
+ if ( false !== $backup_file ) {
1503
+ return $this->deliver_backup( $backup_file, 'smtp', $recipient, 'main' );
1504
+ } else {
1505
+ return false;
1506
+ }
1507
  }
1508
 
1509
+ function add_sched_options( $sched ) {
1510
+ $sched['weekly'] = array(
1511
+ 'interval' => 604800,
1512
+ 'display' => __( 'Once Weekly', 'wp-db-backup' ),
1513
+ );
1514
+
1515
  return $sched;
1516
  }
1517
 
1520
  * @param string $kind
1521
  * @return bool
1522
  */
1523
+ function wp_secure( $kind = 'warn', $loc = 'main' ) {
1524
  global $wp_version;
1525
+
1526
+ if ( function_exists( 'wp_verify_nonce' ) ) {
1527
+ return true;
1528
+ } else {
1529
+ $this->error(
1530
+ array(
1531
+ 'kind' => $kind,
1532
+ 'loc' => $loc,
1533
+ 'msg' => sprintf(
1534
+ __(
1535
+ 'Your WordPress version, %1$1s, lacks important security features without which it is unsafe to use the WP-DB-Backup plugin. Hence, this plugin is automatically disabled. Please consider <a href="%2$2s">upgrading WordPress</a> to a more recent version.',
1536
+ 'wp-db-backup'
1537
+ ),
1538
+ $wp_version,
1539
+ 'http://wordpress.org/download/'
1540
+ ),
1541
+ )
1542
+ );
1543
+
1544
  return false;
1545
  }
1546
  }
1550
  * @param string $loc
1551
  * @return bool
1552
  */
1553
+ function can_user_backup( $loc = 'main' ) {
1554
  $can = false;
1555
+
1556
  // make sure WPMU users are site admins, not ordinary admins
1557
+ if ( function_exists( 'is_site_admin' ) && ! is_site_admin() ) {
1558
  return false;
1559
+ }
1560
+
1561
+ if ( ( $this->wp_secure( 'fatal', $loc ) ) && current_user_can( 'import' ) ) {
1562
+ $can = $this->verify_nonce( $_REQUEST['_wpnonce'], $this->referer_check_key, $loc );
1563
+ }
1564
+
1565
+ if ( false == $can ) {
1566
+ $this->error(
1567
+ array(
1568
+ 'loc' => $loc,
1569
+ 'kind' => 'fatal',
1570
+ 'msg' => __(
1571
+ 'You are not allowed to perform backups.',
1572
+ 'wp-db-backup'
1573
+ ),
1574
+ )
1575
+ );
1576
+ }
1577
+
1578
  return $can;
1579
  }
1580
 
1581
  /**
1582
  * Verify that the nonce is legitimate
1583
+ * @param string $rec the nonce received
1584
+ * @param string $nonce what the nonce should be
1585
+ * @param string $loc the location of the check
1586
  * @return bool
1587
  */
1588
+ function verify_nonce( $rec = '', $nonce = 'X', $loc = 'main' ) {
1589
+ if ( wp_verify_nonce( $rec, $nonce ) ) {
1590
  return true;
1591
+ } else {
1592
+ $this->error(
1593
+ array(
1594
+ 'loc' => $loc,
1595
+ 'kind' => 'fatal',
1596
+ 'msg' => sprintf(
1597
+ __(
1598
+ 'There appears to be an unauthorized attempt from this site to access your database located at %1s. The attempt has been halted.',
1599
+ 'wp-db-backup'
1600
+ ),
1601
+ get_option( 'home' )
1602
+ ),
1603
+ )
1604
+ );
1605
+ }
1606
  }
1607
 
1608
  /**
1611
  * @param string $file
1612
  * @return null
1613
  */
1614
+ function validate_file( $file ) {
1615
+ if ( ( false !== strpos( $file, '..' ) ) || ( false !== strpos( $file, './' ) ) || ( ':' == substr( $file, 1, 1 ) ) ) {
1616
+ $this->error(
1617
+ array(
1618
+ 'kind' => 'fatal',
1619
+ 'loc' => 'frame',
1620
+ 'msg' => __(
1621
+ "Cheatin' uh ?",
1622
+ 'wp-db-backup'
1623
+ ),
1624
+ )
1625
+ );
1626
+ }
1627
  }
1628
 
1629
  /**
1630
+ * Get the sitename by query $_SERVER['SERVER_NAME'].
1631
  * If it is not set, then use site_url() instead
1632
  * @return string
1633
  */
1634
  function get_sitename() {
1635
+ $sitename = '';
1636
+
1637
+ if ( isset( $_SERVER['SERVER_NAME'] ) ) {
1638
  $sitename = strtolower( sanitize_text_field( $_SERVER['SERVER_NAME'] ) );
1639
  } else {
1640
+ if ( function_exists( 'site_url' ) ) {
1641
  // site_url() was added since 3.0.0
1642
  // force http scheme so we can easily get rid of leading http://
1643
  $sitename = strtolower( site_url( '', 'http' ) );
1652
  }
1653
  }
1654
  }
1655
+
1656
  // get rid of www
1657
  if ( substr( $sitename, 0, 4 ) == 'www.' ) {
1658
  $sitename = substr( $sitename, 4 );
1659
  }
1660
+
1661
  return $sitename;
1662
  }
1663
 
1669
  *
1670
  * @return array
1671
  */
1672
+ function sanitize_array( $array_to_sanitize ) {
1673
  $sanitized = array();
1674
+
1675
  foreach ( $array_to_sanitize as $key => $value ) {
1676
+ $sanitized[ $key ] = sanitize_text_field( $value );
1677
  }
1678
+
1679
  return $sanitized;
1680
  }
1681
 
1686
  *
1687
  * @return array
1688
  */
1689
+ function get_post_data_array( $post_key ) {
1690
  $sanitized_data = array();
1691
+
1692
+ if ( isset( $_POST[ $post_key ] ) ) {
1693
+ $sanitized_data = (array) $_POST[ $post_key ];
1694
  }
1695
+
1696
+ return $this->sanitize_array( $sanitized_data );
1697
  }
1698
 
1699
  /**
1702
  * @return array
1703
  */
1704
  function get_revisions_to_exclude() {
1705
+ return $this->get_post_data_array( 'exclude-revisions' );
1706
  }
1707
 
1708
  /**
1711
  * @return array
1712
  */
1713
  function get_spam_to_exclude() {
1714
+ return $this->get_post_data_array( 'exclude-spam' );
1715
  }
1716
 
1717
  /**
1720
  * @return array
1721
  */
1722
  function get_submitted_tables_to_backup_in_cron() {
1723
+ return $this->get_post_data_array( 'wp_cron_backup_tables' );
1724
  }
1725
+
1726
  }
1727
 
1728
  function wpdbBackup_init() {
1730
  $mywpdbbackup = new wpdbBackup();
1731
  }
1732
 
1733
+ add_action( 'plugins_loaded', 'wpdbBackup_init' );