Changeset 14699
- Timestamp:
- 03/12/2026 03:25:55 AM (41 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php
r14414 r14699 25 25 26 26 $options[] = 'non-interactive'; 27 if ( empty( $options['username'] ) ) {27 if ( empty( $options['username'] ) && defined( 'PLUGIN_SVN_MANAGEMENT_USER' ) ) { 28 28 $options['username'] = PLUGIN_SVN_MANAGEMENT_USER; 29 29 $options['password'] = PLUGIN_SVN_MANAGEMENT_PASS; … … 75 75 $options[] = 'non-interactive'; 76 76 $options['m'] = $message; 77 if ( empty( $options['username'] ) ) {77 if ( empty( $options['username'] ) && defined( 'PLUGIN_SVN_MANAGEMENT_USER' ) ) { 78 78 $options['username'] = PLUGIN_SVN_MANAGEMENT_USER; 79 79 $options['password'] = PLUGIN_SVN_MANAGEMENT_PASS; 80 } 81 82 if ( empty( $options['username'] ) ) { 83 return [ 84 'result' => false, 85 'revision' => false, 86 'errors' => [ 'No SVN credentials configured.' ], 87 ]; 80 88 } 81 89 … … 250 258 $options[] = 'non-interactive'; 251 259 $options['m'] = $message; 252 if ( empty( $options['username'] ) ) {260 if ( empty( $options['username'] ) && defined( 'PLUGIN_SVN_MANAGEMENT_USER' ) ) { 253 261 $options['username'] = PLUGIN_SVN_MANAGEMENT_USER; 254 262 $options['password'] = PLUGIN_SVN_MANAGEMENT_PASS; 263 } 264 265 if ( empty( $options['username'] ) ) { 266 return [ 267 'result' => false, 268 'revision' => false, 269 'errors' => [ 'No SVN credentials configured.' ], 270 ]; 255 271 } 256 272 … … 290 306 $options[] = 'non-interactive'; 291 307 $options['m'] = $message; 292 if ( empty( $options['username'] ) ) {308 if ( empty( $options['username'] ) && defined( 'PLUGIN_SVN_MANAGEMENT_USER' ) ) { 293 309 $options['username'] = PLUGIN_SVN_MANAGEMENT_USER; 294 310 $options['password'] = PLUGIN_SVN_MANAGEMENT_PASS; 311 } 312 313 if ( empty( $options['username'] ) ) { 314 return [ 315 'result' => false, 316 'revision' => false, 317 'errors' => [ 'No SVN credentials configured.' ], 318 ]; 295 319 } 296 320 … … 342 366 $xml = simplexml_load_string( $output ); 343 367 libxml_use_internal_errors( $errors ); 368 369 if ( ! $xml || ! isset( $xml->list ) ) { 370 return false; 371 } 344 372 345 373 $files = []; … … 496 524 } 497 525 498 if ( empty( $options['username'] ) ) {526 if ( empty( $options['username'] ) && defined( 'PLUGIN_SVN_MANAGEMENT_USER' ) ) { 499 527 $options['username'] = PLUGIN_SVN_MANAGEMENT_USER; 500 528 $options['password'] = PLUGIN_SVN_MANAGEMENT_PASS; 529 } 530 531 if ( empty( $options['username'] ) ) { 532 return [ 533 'result' => false, 534 'revision' => false, 535 'errors' => [ 'No SVN credentials configured.' ], 536 ]; 501 537 } 502 538 }
Note: See TracChangeset
for help on using the changeset viewer.