Plugin Directory

Changeset 768959


Ignore:
Timestamp:
09/09/2013 10:51:33 AM (13 years ago)
Author:
Driskell
Message:

New lang, and fix line endings in generated data

Location:
wponlinebackup/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wponlinebackup/trunk/include/stream_full.php

    r768952 r768959  
    729729        $date_format = __( 'd-m-Y H.i.s T' , 'wponlinebackup' );
    730730
    731         // The data
    732         $data = sprintf(
    733             _x(
    734                 'Online Backup for WordPress' . PHP_EOL .
    735                 'Version %s' . PHP_EOL .
    736                 'http://www.backup-technology.com/free-wordpress-backup/' . PHP_EOL .
    737                 PHP_EOL .
    738                 'Blog: %s' . PHP_EOL .
    739                 'Creation Time: %s',
    740                 'Readme.txt file in downloadable ZIP file',
    741                 'wponlinebackup'
    742             ),
    743             WPONLINEBACKUP_VERSION,
    744             get_bloginfo( 'wpurl' ),
    745             date( $date_format, $status['mod_time'] )
    746         );
     731        $data =
     732            __( 'Online Backup for WordPress', 'wponlinebackup' ) . WPONLINEBACKUP_EOL .
     733            sprintf( __( 'Version %s', 'wponlinebackup' ), WPONLINEBACKUP_VERSION ) . WPONLINEBACKUP_EOL .
     734            __( 'http://www.backup-technology.com/free-wordpress-backup/', 'wponlinebackup' ) . WPONLINEBACKUP_EOL .
     735            WPONLINEBACKUP_EOL .
     736            sprintf( __( 'Blog: %s', 'wponlinebackup' ), get_bloginfo( 'wpurl' ) ) . WPONLINEBACKUP_EOL .
     737            sprintf( __( 'Creation Time: %s', 'wponlinebackup' ), date( $date_format, $status['mod_time'] ) ) . WPONLINEBACKUP_EOL;
    747738
    748739        // Calculate header attributes and compress data
  • wponlinebackup/trunk/include/tables.php

    r727864 r768959  
    364364
    365365            $header =
    366                     '-- ' . _x( 'Online Backup for WordPress', 'DB backup header', 'wponlinebackup' ) . PHP_EOL .
    367                     '-- ' . sprintf( _x( 'Version %s', 'DB backup header', 'wponlinebackup' ), WPONLINEBACKUP_VERSION ) . PHP_EOL .
    368                     '-- ' . _x( 'http://www.backup-technology.com/free-wordpress-backup/', 'DB backup header', 'wponlinebackup' ) . PHP_EOL .
    369                     '-- ' . PHP_EOL .
    370                     '-- ' . sprintf( _x( 'Blog: %s', 'DB backup header', 'wponlinebackup' ), get_bloginfo( 'wpurl' ) ) . PHP_EOL .
    371                     '-- ' . sprintf( _x( 'Dump Time: %s', 'DB backup header', 'wponlinebackup' ), date( $date_format ) ) . PHP_EOL .
    372                     PHP_EOL .
    373                     'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . PHP_EOL .
    374                     PHP_EOL;
     366                '-- ' . __( 'Online Backup for WordPress', 'wponlinebackup' ) . WPONLINEBACKUP_EOL .
     367                '-- ' . sprintf( __( 'Version %s', 'wponlinebackup' ), WPONLINEBACKUP_VERSION ) . WPONLINEBACKUP_EOL .
     368                '-- ' . __( 'http://www.backup-technology.com/free-wordpress-backup/', 'wponlinebackup' ) . WPONLINEBACKUP_EOL .
     369                '-- ' . WPONLINEBACKUP_EOL .
     370                '-- ' . sprintf( __( 'Blog: %s', 'wponlinebackup' ), get_bloginfo( 'wpurl' ) ) . WPONLINEBACKUP_EOL .
     371                '-- ' . sprintf( __( 'Database Dump Time: %s', 'wponlinebackup' ), date( $date_format ) ) . WPONLINEBACKUP_EOL .
     372                WPONLINEBACKUP_EOL .
     373                'SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";' . WPONLINEBACKUP_EOL .
     374                WPONLINEBACKUP_EOL;
    375375
    376376            $progress['rsize'] += strlen( $header );
     
    612612                $this->progress['message'] = sprintf( __( 'Backing up %s...' , 'wponlinebackup' ), $this->job['table'] );
    613613
    614                 $drop = 'DROP TABLE IF EXISTS `' . $this->job['table'] . '`;' . PHP_EOL . PHP_EOL;
     614                $drop = 'DROP TABLE IF EXISTS `' . $this->job['table'] . '`;' . WPONLINEBACKUP_EOL . WPONLINEBACKUP_EOL;
    615615
    616616                // Table information doesn't exist, so let's gather it, first by getting the CREATE TABLE dump
     
    635635                }
    636636
    637                 $create .= ';' . PHP_EOL . PHP_EOL;
     637                // Normalise line-endings
     638                $create = preg_replace( '/\\r\\n?|\\n/', WPONLINEBACKUP_EOL, $create );
     639
     640                $create .= ';' . WPONLINEBACKUP_EOL . WPONLINEBACKUP_EOL;
    638641                $this->progress['rsize'] += strlen( $create );
    639642                if ( ( $ret = $this->stream->Write_Stream( $drop . $create ) ) !== true ) return $ret;
     
    714717                $insert .=
    715718                    ( $row_count == 1 ?
    716                         'INSERT INTO `' . $this->job['table'] . '` (' . $fields . ') VALUES' . PHP_EOL :
    717                         ',' . PHP_EOL
     719                        'INSERT INTO `' . $this->job['table'] . '` (' . $fields . ') VALUES' . WPONLINEBACKUP_EOL :
     720                        ',' . WPONLINEBACKUP_EOL
    718721                    ) .
    719722                    '(' . implode( ',', $values ) . ')';
     
    737740
    738741            // Finish the statement
    739             $insert .= ';' . PHP_EOL . PHP_EOL;
     742            $insert .= ';' . WPONLINEBACKUP_EOL . WPONLINEBACKUP_EOL;
    740743
    741744            $this->job['done'] += $row_count;
  • wponlinebackup/trunk/lang/wponlinebackup.pot

    r767779 r768959  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Online Backup for WordPress 3.0.3\n"
     5"Project-Id-Version: Online Backup for WordPress 3.0.4\n"
    66"Report-Msgid-Bugs-To: http://wordpress.org/tag/wponlinebackup\n"
    7 "POT-Creation-Date: 2013-09-06 08:31:21+00:00\n"
     7"POT-Creation-Date: 2013-09-09 10:30:52+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=UTF-8\n"
     
    2626msgstr ""
    2727
    28 #: include/admin.php:430 include/admin.php:945 include/admin.php:4315
     28#: include/admin.php:430 include/admin.php:945 include/admin.php:4340
    2929msgid "Backup"
    3030msgstr ""
     
    5959msgstr ""
    6060
    61 #. #-#-#-#-#  plugin.pot (Online Backup for WordPress 3.0.3)  #-#-#-#-#
     61#. #-#-#-#-#  plugin.pot (Online Backup for WordPress 3.0.4)  #-#-#-#-#
    6262#. Plugin Name of the plugin/theme
    6363#: include/admin.php:453
     
    580580
    581581#: include/admin.php:1846 include/admin.php:2367 include/admin.php:2422
    582 #: include/admin.php:2472 include/admin.php:4319
     582#: include/admin.php:2472 include/admin.php:4344
    583583msgid "Decrypt"
    584584msgstr ""
     
    12111211msgstr ""
    12121212
    1213 #: include/admin.php:4007
     1213#: include/admin.php:4015
    12141214msgid "Advanced Settings"
    12151215msgstr ""
    12161216
    1217 #: include/admin.php:4017
     1217#: include/admin.php:4025
    12181218msgid ""
    12191219"These are advanced (and sometimes dangerous) settings that control the "
     
    12231223msgstr ""
    12241224
    1225 #: include/admin.php:4018
     1225#: include/admin.php:4026
    12261226msgid ""
    12271227"For 99% of users, the default settings will work perfectly fine. Changes to "
     
    12301230msgstr ""
    12311231
    1232 #: include/admin.php:4022
     1232#: include/admin.php:4030
    12331233msgid ""
    12341234"ATTENTION! DO NOT MAKE CHANGES TO THESE SETTINGS UNLESS ABSOLUTELY NECESSARY "
     
    12361236msgstr ""
    12371237
    1238 #: include/admin.php:4172 include/admin.php:4207
     1238#: include/admin.php:4180 include/admin.php:4215 include/admin.php:4245
    12391239msgid "Yes"
    12401240msgstr ""
    12411241
    1242 #: include/admin.php:4176 include/admin.php:4211
     1242#: include/admin.php:4184 include/admin.php:4219 include/admin.php:4249
    12431243msgid "No"
    12441244msgstr ""
    12451245
    1246 #: include/admin.php:4224
     1246#: include/admin.php:4232
    12471247msgid "Save Advanced Settings"
    12481248msgstr ""
    12491249
    1250 #: include/admin.php:4310
     1250#: include/admin.php:4335
    12511251msgctxt "Type of backup"
    12521252msgid "Unknown"
    12531253msgstr ""
    12541254
    1255 #: include/admin.php:4351
     1255#: include/admin.php:4376
    12561256msgid "Nothing is currently running."
    12571257msgstr ""
    12581258
    1259 #: include/admin.php:4365
     1259#: include/admin.php:4390
    12601260msgid "%s stopped unexpectedly. The WordPress cron may be misconfigured."
    12611261msgstr ""
    12621262
    1263 #: include/admin.php:4369
     1263#: include/admin.php:4394
    12641264msgid "%1$s completed successfully with %2$d warning."
    12651265msgid_plural "%1$s completed successfully with %2$d warnings."
     
    12671267msgstr[1] ""
    12681268
    1269 #: include/admin.php:4369
     1269#: include/admin.php:4394
    12701270msgid "%s completed successfully."
    12711271msgstr ""
    12721272
    1273 #: include/admin.php:4378
     1273#: include/admin.php:4403
    12741274msgid ""
    12751275"%1$s completed partially with %2$d error. Please consult the event log for "
     
    12811281msgstr[1] ""
    12821282
    1283 #: include/admin.php:4378
     1283#: include/admin.php:4403
    12841284msgid "%s completed partially."
    12851285msgstr ""
    12861286
    1287 #: include/admin.php:4407
     1287#: include/admin.php:4432
    12881288msgid "Processing..."
    12891289msgstr ""
     
    14001400msgstr ""
    14011401
    1402 #: include/bootstrap.php:1453
     1402#: include/bootstrap.php:1452
    14031403msgid "Backup starting..."
    14041404msgstr ""
    14051405
    1406 #: include/bootstrap.php:1457
     1406#: include/bootstrap.php:1456
    14071407msgid "Scheduled backup starting..."
    14081408msgstr ""
    14091409
    1410 #: include/bootstrap.php:1461
     1410#: include/bootstrap.php:1460
    14111411msgid "Decrypt starting..."
    14121412msgstr ""
    14131413
    1414 #: include/bootstrap.php:1465
     1414#: include/bootstrap.php:1464
    14151415msgid "Starting..."
    14161416msgstr ""
    14171417
    1418 #: include/bootstrap.php:1484
     1418#: include/bootstrap.php:1483
    14191419msgid "The backup failed to start: %s"
    14201420msgstr ""
    14211421
    1422 #: include/bootstrap.php:1488
     1422#: include/bootstrap.php:1487
    14231423msgid "The scheduled backup failed to start: %s"
    14241424msgstr ""
    14251425
    1426 #: include/bootstrap.php:1492
     1426#: include/bootstrap.php:1491
    14271427msgid "The decrypt failed to start: %s"
    14281428msgstr ""
    14291429
    1430 #: include/bootstrap.php:1496
     1430#: include/bootstrap.php:1495
    14311431msgid "The activity failed to start: %s"
    14321432msgstr ""
    14331433
    1434 #: include/bootstrap.php:1516
     1434#: include/bootstrap.php:1515
    14351435msgid ""
    14361436"An online backup cannot be performed if the plugin is not currently logged "
     
    14391439msgstr ""
    14401440
    1441 #: include/bootstrap.php:1522
     1441#: include/bootstrap.php:1521
    14421442msgid ""
    14431443"The backup could not be started: An online backup cannot be performed if the "
     
    14451445msgstr ""
    14461446
    1447 #: include/bootstrap.php:1542
     1447#: include/bootstrap.php:1541
    14481448msgid "The activity was stopped by %s."
    14491449msgstr ""
    14501450
    1451 #: include/bootstrap.php:1549
     1451#: include/bootstrap.php:1548
    14521452msgid "The activity was stopped."
    14531453msgstr ""
    14541454
    1455 #: include/bootstrap.php:1575
     1455#: include/bootstrap.php:1574
    14561456msgid "The activity failed to initialise: %s"
    14571457msgstr ""
    14581458
    1459 #: include/bootstrap.php:1642
     1459#: include/bootstrap.php:1641
    14601460msgid "The activity failed: %s"
    14611461msgstr ""
    14621462
    1463 #: include/bootstrap.php:1667
     1463#: include/bootstrap.php:1666
    14641464msgid "Backup complete."
    14651465msgstr ""
    14661466
    1467 #: include/bootstrap.php:1671
     1467#: include/bootstrap.php:1670
    14681468msgid "Scheduled backup complete."
    14691469msgstr ""
    14701470
    1471 #: include/bootstrap.php:1675
     1471#: include/bootstrap.php:1674
    14721472msgid "Decrypt complete."
    14731473msgstr ""
    14741474
    1475 #: include/bootstrap.php:1679
     1475#: include/bootstrap.php:1678
    14761476msgid "Completed."
    14771477msgstr ""
    14781478
    1479 #: include/bootstrap.php:1745
     1479#: include/bootstrap.php:1744
    14801480msgid "Initialising..."
    14811481msgstr ""
    14821482
    1483 #: include/bootstrap.php:1769
     1483#: include/bootstrap.php:1768
    14841484msgid "Initialisation completed."
    14851485msgstr ""
    14861486
     1487#: include/bootstrap.php:2130
     1488msgid ""
     1489"The directory (%s) where local backups will be stored could not be created."
     1490msgstr ""
     1491
    14871492#: include/bootstrap.php:2131
    1488 msgid ""
    1489 "The directory (%s) where local backups will be stored could not be created."
    1490 msgstr ""
    1491 
    1492 #: include/bootstrap.php:2132
    14931493msgid ""
    14941494"You may need to login via FTP and create the folder yourself and \"CHMOD\" "
     
    14971497msgstr ""
    14981498
    1499 #: include/bootstrap.php:2133 include/bootstrap.php:2155
    1500 #: include/bootstrap.php:2177 include/bootstrap.php:2211
    1501 #: include/bootstrap.php:2493
     1499#: include/bootstrap.php:2132 include/bootstrap.php:2154
     1500#: include/bootstrap.php:2176 include/bootstrap.php:2210
     1501#: include/bootstrap.php:2492
    15021502msgid "Error: %s"
    15031503msgstr ""
    15041504
    1505 #: include/bootstrap.php:2136
     1505#: include/bootstrap.php:2135
    15061506msgid "Unable to create the local backup directory."
    15071507msgstr ""
    15081508
     1509#: include/bootstrap.php:2152
     1510msgid ""
     1511"The directory (%s) where local backups will be stored cannot be written to."
     1512msgstr ""
     1513
    15091514#: include/bootstrap.php:2153
    1510 msgid ""
    1511 "The directory (%s) where local backups will be stored cannot be written to."
    1512 msgstr ""
    1513 
    1514 #: include/bootstrap.php:2154
    15151515msgid ""
    15161516"You may need to login via FTP and \"CHMOD\" it to \"0770\" or, as a last "
     
    15191519msgstr ""
    15201520
    1521 #: include/bootstrap.php:2158
     1521#: include/bootstrap.php:2157
    15221522msgid "Unable to write to the local backup directory."
    15231523msgstr ""
    15241524
    1525 #: include/bootstrap.php:2175
     1525#: include/bootstrap.php:2174
    15261526msgid ""
    15271527"The temporary processing directory (%s) where data is processed could not be "
     
    15291529msgstr ""
    15301530
    1531 #: include/bootstrap.php:2176
     1531#: include/bootstrap.php:2175
    15321532msgid ""
    15331533"You may need to login via FTP and create the folder yourself and \"CHMOD\" "
     
    15351535msgstr ""
    15361536
    1537 #: include/bootstrap.php:2180
     1537#: include/bootstrap.php:2179
    15381538msgid "Unable to create the temporary processing directory."
    15391539msgstr ""
    15401540
    1541 #: include/bootstrap.php:2209
     1541#: include/bootstrap.php:2208
    15421542msgid ""
    15431543"The temporary data file could not be created in the temporary processing "
     
    15451545msgstr ""
    15461546
    1547 #: include/bootstrap.php:2210
     1547#: include/bootstrap.php:2209
    15481548msgid ""
    15491549"If the below error is related to permissions, you may need to login to your "
     
    15541554msgstr ""
    15551555
    1556 #: include/bootstrap.php:2214
     1556#: include/bootstrap.php:2213
    15571557msgid "Unable to create the temporary data file."
    15581558msgstr ""
    15591559
    1560 #: include/bootstrap.php:2309
     1560#: include/bootstrap.php:2308
    15611561msgid "Finalising..."
    15621562msgstr ""
    15631563
    1564 #: include/bootstrap.php:2427
     1564#: include/bootstrap.php:2426
    15651565msgid "Stored the decrypted file locally as %s."
    15661566msgstr ""
    15671567
    1568 #: include/bootstrap.php:2461
     1568#: include/bootstrap.php:2460
    15691569msgid "WPOnlineBackup_%1$s_%2$s_%3$s"
    15701570msgstr ""
    15711571
    1572 #: include/bootstrap.php:2492
     1572#: include/bootstrap.php:2491
    15731573msgid ""
    15741574"An error occurred trying to save the backup to the local backup folder at %s."
    15751575msgstr ""
    15761576
    1577 #: include/bootstrap.php:2496
     1577#: include/bootstrap.php:2495
    15781578msgid "Failed to save the backup to local storage."
    15791579msgstr ""
    15801580
    1581 #: include/bootstrap.php:2506
     1581#: include/bootstrap.php:2505
    15821582msgid "Stored the backup locally as %s."
    15831583msgstr ""
    15841584
    1585 #: include/bootstrap.php:2545
     1585#: include/bootstrap.php:2544
    15861586msgid "Local Backups contains %1$s generation with a total size of %2$s."
    15871587msgid_plural ""
     
    15901590msgstr[1] ""
    15911591
    1592 #: include/bootstrap.php:2555 include/transmission.php:646
     1592#: include/bootstrap.php:2554 include/transmission.php:646
    15931593msgid "Performing retention..."
    15941594msgstr ""
    15951595
    1596 #: include/bootstrap.php:2571
     1596#: include/bootstrap.php:2570
    15971597msgid "Retention is not required."
    15981598msgstr ""
    15991599
    1600 #: include/bootstrap.php:2628
     1600#: include/bootstrap.php:2627
    16011601msgid "Failed to delete local backup %1$s: %2$s"
    16021602msgstr ""
    16031603
    1604 #: include/bootstrap.php:2665
     1604#: include/bootstrap.php:2664
    16051605msgid ""
    16061606"Errors were encountered trying to delete one or more Local Backups. Disk "
     
    16091609msgstr ""
    16101610
    1611 #: include/bootstrap.php:2673 include/transmission.php:717
     1611#: include/bootstrap.php:2672 include/transmission.php:717
    16121612msgid "Retention completed; deleted %d file with a total size of %s."
    16131613msgid_plural "Retention completed; deleted %d files with a total size of %s."
     
    19501950msgstr ""
    19511951
    1952 #: include/stream_full.php:718
     1952#: include/stream_full.php:720
    19531953msgctxt "Readme.txt filename in downloadable ZIP file"
    19541954msgid "Readme.txt"
     
    19591959#. translators: date() function string when displaying dump time in database
    19601960#. backup header
    1961 #: include/stream_full.php:725 include/tables.php:363
     1961#: include/stream_full.php:729 include/tables.php:363
    19621962msgid "d-m-Y H.i.s T"
    19631963msgstr ""
    19641964
    1965 #: include/stream_full.php:810
     1965#: include/stream_full.php:774
    19661966msgctxt "Full backup folder name in downloadable ZIP file"
    19671967msgid "Database"
    19681968msgstr ""
    19691969
    1970 #: include/stream_full.php:824
     1970#: include/stream_full.php:792
    19711971msgctxt "Full backup folder name in downloadable ZIP file"
    19721972msgid "FileSystem"
  • wponlinebackup/trunk/wponlinebackup.php

    r768952 r768959  
    3838if ( !defined( 'PHP_EOL' ) )
    3939    define( 'PHP_EOL', "\n" ); // Default to Linux style
     40
     41// When we generate data, we use Windows line-endings since they are more universal, and most users will be Windows
     42// This prevents apparent mangled Readme.txt and OBFW_Database.sql files in downloaded ZIP files
     43define( 'WPONLINEBACKUP_EOL', "\r\n" );
    4044
    4145// Our custom error handler - Only used when we are missing error_get_last() and only activated when WPOnlineBackup::Enable_Error_Handling is called
Note: See TracChangeset for help on using the changeset viewer.