Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickebates committed Apr 20, 2017
2 parents fb07731 + 4a3d1c2 commit 3b87c2a
Show file tree
Hide file tree
Showing 115 changed files with 3,946 additions and 2,044 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Project Nami
===============

###Version: `1.5.5`###
### Version: `1.5.6` ###

###Description:###
### Description: ###
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://deploy.azure.com/?repository=https://github.com/ProjectNami/projectnami/tree/latest)

In its current form, Project Nami is basically WordPress powered by Microsoft SQL Server. **All** WordPress features and functions are supported.
Expand All @@ -19,7 +19,7 @@ Essentials supported include ( but are not limited to ) the following:
* **comments**
* **multisite**

###Why was Project Nami created?###
### Why was Project Nami created? ###
The short answer here is, **WordPress doesn't work with SQL Server**. It's a sad story, but a true one. You may be so overjoyed this exists that you have no further questions on the matter. If so, that's great. Proceed to enjoy Project Nami. However, you may be asking yourself, why not just use some sort of database abstraction plugin, or simply write my own ( or use someone elses ) `wp-db.php` drop-in. After all, WordPress already supports replacing the database class with a custom one.

While I would agree with all of this, writing ( or using ) a custom `wp-db.php` drop-in is not enough to get WordPress running on SQL Server. In reality, WP Core is littered with MySQL-specific queries, which means a custom db class won't cover all your bases. WP will remain broken and unsuable.
Expand All @@ -28,7 +28,7 @@ So, what about using only a translation plugin? This can work, but it's hardly o

We needed a version of WordPress powered by SQL Server in the cloud on Microsoft Azure. So, we rewrote WP Core to do this very thing. Porting WordPress may seem extreme, but the software simply isn't to the point where true database abstraction is feasible. Maybe someday it will be. In the meantime, Project Nami is an alternative. :)

###A few things to note:###
### A few things to note: ###
* Project Nami will work with any WordPress plugins/themes that utilize WordPress specific APIs. However, custom SQL queries will most likely fail if they use MySQL-specific syntax. In most cases, these issues can be easily resolved by using a WordPress API. If you absolutely have to use custom SQL, make sure it's MSSQL Server 2012 compliant. **We highly recommend using WordPress APIs everywhere you can.** Among other things, it makes your code portable across Project Nami and WordPress.

* As of version 0.10.0, a fallback translation layer has been added to help with MySQL-specific syntax used by plugins.
Expand Down
4 changes: 4 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

<div class="changelog point-releases">
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.', 47 ), '4.7.4', number_format_i18n( 47 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.7.4' ); ?>
</p>
<p><?php printf( _n( '<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.', 39 ), '4.7.3', number_format_i18n( 39 ) ); ?>
<?php printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_4.7.3' ); ?>
Expand Down
5 changes: 5 additions & 0 deletions wp-admin/css/customize-controls-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ body {
transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1); /* easeInOutCubic */
}

#customize-theme-controls .customize-pane-child.skip-transition {
-webkit-transition: none;
transition: none;
}

#customize-info,
#customize-theme-controls .customize-pane-parent {
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-controls-rtl.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions wp-admin/css/customize-controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,11 @@ body {
transition: 0.18s transform cubic-bezier(0.645, 0.045, 0.355, 1), 0.18s -webkit-transform cubic-bezier(0.645, 0.045, 0.355, 1); /* easeInOutCubic */
}

#customize-theme-controls .customize-pane-child.skip-transition {
-webkit-transition: none;
transition: none;
}

#customize-info,
#customize-theme-controls .customize-pane-parent {
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-controls.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions wp-admin/css/customize-nav-menus-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
outline: none;
overflow: hidden;
cursor: pointer;
text-align: center;
}

.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
Expand Down Expand Up @@ -532,6 +533,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .accordion-section-title .no-items,
Expand Down Expand Up @@ -623,6 +625,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .menu-item-handle .item-add:focus {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-nav-menus-rtl.min.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions wp-admin/css/customize-nav-menus.css
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
outline: none;
overflow: hidden;
cursor: pointer;
text-align: center;
}

.wp-customizer .menu-item.menu-item-edit-active .item-edit .toggle-indicator:after {
Expand Down Expand Up @@ -532,6 +533,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .accordion-section-title .no-items,
Expand Down Expand Up @@ -623,6 +625,7 @@
box-shadow: none;
outline: none;
cursor: pointer;
text-align: center;
}

#available-menu-items .menu-item-handle .item-add:focus {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/customize-nav-menus.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-admin/customize.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
if ( is_rtl() ) {
$body_class .= ' rtl';
}
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
$body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_user_locale() ) ) );

$admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loading&hellip;' ) );

Expand Down
6 changes: 1 addition & 5 deletions wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ function wp_add_id3_tag_data( &$metadata, $data ) {
if ( ! empty( $data[$version]['comments'] ) ) {
foreach ( $data[$version]['comments'] as $key => $list ) {
if ( 'length' !== $key && ! empty( $list ) ) {
$metadata[$key] = reset( $list );
$metadata[$key] = wp_kses_post( reset( $list ) );
// Fix bug in byte stream analysis.
if ( 'terms_of_use' === $key && 0 === strpos( $metadata[$key], 'yright notice.' ) )
$metadata[$key] = 'Cop' . $metadata[$key];
Expand Down Expand Up @@ -3072,8 +3072,6 @@ function wp_read_video_metadata( $file ) {

wp_add_id3_tag_data( $metadata, $data );

$metadata = wp_kses_post_deep( $metadata );

return $metadata;
}

Expand Down Expand Up @@ -3119,8 +3117,6 @@ function wp_read_audio_metadata( $file ) {

wp_add_id3_tag_data( $metadata, $data );

$metadata = wp_kses_post_deep( $metadata );

return $metadata;
}

Expand Down
2 changes: 1 addition & 1 deletion wp-admin/includes/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
$customize_action = esc_url( add_query_arg(
array(
'return' => urlencode( esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ),
'return' => urlencode( esc_url_raw( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) ),
),
wp_customize_url( $slug )
) );
Expand Down
16 changes: 1 addition & 15 deletions wp-admin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ function display_setup_form( $error = null ) {

$scripts_to_print[] = 'user-profile';

display_header();
// Fill in the data we gathered
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';
$user_name = isset($_POST['user_name']) ? trim( wp_unslash( $_POST['user_name'] ) ) : '';
Expand All @@ -347,43 +348,28 @@ function display_setup_form( $error = null ) {
$error = false;
if ( empty( $user_name ) ) {
// TODO: poka-yoke
display_header();
display_setup_form( __( 'Please provide a valid username.' ) );
$error = true;
} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
display_header();
display_setup_form( __( 'The username you provided has invalid characters.' ) );
$error = true;
} elseif ( $admin_password != $admin_password_check ) {
// TODO: poka-yoke
display_header();
display_setup_form( __( 'Your passwords do not match. Please try again.' ) );
$error = true;
} elseif ( empty( $admin_email ) ) {
// TODO: poka-yoke
display_header();
display_setup_form( __( 'You must provide an email address.' ) );
$error = true;
} elseif ( ! is_email( $admin_email ) ) {
// TODO: poka-yoke
display_header();
display_setup_form( __( 'Sorry, that isn&#8217;t a valid email address. Email addresses look like <code>[email protected]</code>.' ) );
$error = true;
}

if ( $error === false ) {
$wpdb->show_errors();
$result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language );

// Log the user in and send them to wp-admin:
if ( ! headers_sent() ) {
wp_set_auth_cookie( $result['user_id'], true, is_ssl() );
wp_redirect( admin_url() );
exit;
}

// If headers have already been sent, fall back to a "Success!" message:
display_header();
?>

<h1><?php _e( 'Success!' ); ?></h1>
Expand Down
Loading

0 comments on commit 3b87c2a

Please sign in to comment.