Comments

naveenvalecha created an issue. See original summary.

ramdas gaikar’s picture

Status: Active » Needs review
StatusFileSize
new39.62 KB

Patch Attached for Coding Standards.

naveenvalecha’s picture

Status: Needs review » Needs work

Thanks for starting on this.
I have committed the patch to new branch codingstandards branch.Let's see what coding standards fixes left.

There are still lots of coding standards missing http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-codings...

back to Needs work.

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
ramdas gaikar’s picture

StatusFileSize
new43.5 KB

Hi Yogesh Pawar,

Please find the patch below with almost all changes. This patch will help you tor further changes.

naveenvalecha’s picture

Thanks for the updated patch @Ramdas Gaikar
Please post the interdiff as well. It would be easier to review.

I have committed the patch in #5 to branch codingstandards.Let's see what coding standards fixes left.

This still needs some love http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-codings...

yogeshmpawar’s picture

StatusFileSize
new30.03 KB

I have created a new patch for coding standards, please check this patch will work or not.

Thanks @Ramdas Gaikar for the updated patch.

yogeshmpawar’s picture

Status: Needs work » Needs review
yogeshmpawar’s picture

Assigned: yogeshmpawar » Unassigned
naveenvalecha’s picture

Status: Needs review » Needs work

@Yogesh Pawar,
Thanks for the patch in #7 but the patch does not apply.


N/W for #5 as it seems closer to commit.
yogeshmpawar’s picture

Status: Needs work » Needs review
StatusFileSize
new50.58 KB

Updated patch.

wellme’s picture

@Yogesh Pawar,
Thanks for the patch in #11 but the patch can't apply after apply patch #5.
Also please post the interdiff as well. It would be easier for review.

yogeshmpawar’s picture

@wellme, This patch is a individual patch which contains patch #5 as well. you have to remove patch #5 & apply patch #11 individually.

naveenvalecha’s picture

Status: Needs review » Needs work

@Yogesh Pawar,
Thanks for the patch!

The patch #11 is very near to RTBC
Here's the result after applying patch #11 to branch 2765259-11
http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-2765259-11

#12
+1
Please post the interdiff as well. It would be easier to review.

yogeshmpawar’s picture

Assigned: Unassigned » yogeshmpawar
yogeshmpawar’s picture

Status: Needs work » Needs review
StatusFileSize
new8.65 KB
new52.07 KB
naveenvalecha’s picture

Status: Needs review » Needs work

@Yogesh Pawar,
All looks good. only a small change needed. Checkout here http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-2765259-16

  1. +++ b/plugins/content_types/sharethis/sharethis.inc
    @@ -18,6 +18,9 @@ $plugin = array(
    + * Implements sharethis_sharethis_content_type_render().
    

    This is not an hook. So Add the description to the function. No need to document the parameters as well.

  2. +++ b/plugins/content_types/sharethis/sharethis.inc
    @@ -46,6 +49,9 @@ function sharethis_sharethis_content_type_render($subtype, $conf, $panel_args, $
    +/**
    + * Implements sharethis_sharethis_content_type_edit_form().
    + */
    

    This is not an hook. So Add the description to the function. No need to document the parameters as well.

  3. +++ b/plugins/content_types/sharethis/sharethis.inc
    @@ -76,12 +82,18 @@ function sharethis_sharethis_content_type_edit_form($form, &$form_state) {
    +/**
    + * Implements sharethis_sharethis_content_type_edit_form_validate().
    + */
    

    This is not an hook. So Add the description to the function. No need to document the parameters as well.

  4. +++ b/plugins/content_types/sharethis/sharethis.inc
    @@ -76,12 +82,18 @@ function sharethis_sharethis_content_type_edit_form($form, &$form_state) {
    +/**
    + * Implements sharethis_sharethis_content_type_edit_form_submit().
    + */
    

    This is not an hook. So Add the description to the function. No need to document the parameters as well.

  5. +++ b/sharethis.admin.inc
    @@ -22,19 +23,13 @@ function sharethis_configuration_form($form, &$form_state) {
    -  // Create the variables related to widget choice.
    -  $widget_type = $current_options_array['widget'];
    -  $widget_markup = "";
    -  if ($widget_type == "st_multi") {
    -    $widget_markup = "st_multi";
    -  }
    

    aren't we using it ?

  6. +++ b/sharethis.module
    @@ -98,18 +89,11 @@ function sharethis_menu() {
      * TODO: Want to add the option somewhere to select nodes.
    

    this should be @TODO

  7. +++ b/sharethis.module
    @@ -213,31 +208,34 @@ function sharethis_theme($existing, $type, $theme, $path) {
    + * Implements sharethis_get_light_options().
    

    This is not a hook. Checkout where & how we use implements https://www.drupal.org/node/1354#hookimpl

  8. +++ b/sharethis.module
    @@ -253,14 +251,14 @@ function get_stLight_options($data_options)
    +  $default_sharethis_nodetypes = array("article" => "article", "page" => "page");
    

    use single quotes over double quotes.

  9. +++ b/sharethis.module
    @@ -269,7 +267,7 @@ function sharethis_get_options_array() {
    +    'option_extras' => variable_get('sharethis_option_extras', array("Google Plus One:plusone" => "Google Plus One:plusone", "Facebook Like:fblike" => "Facebook Like:fblike")),
    

    same here. using single quotes.

  10. +++ b/sharethis.module
    @@ -428,15 +432,16 @@ function sharethis_include_js() {
    +    if ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https')) {
    

    use drupal_strtolower https://api.drupal.org/api/drupal/includes%21unicode.inc/function/drupal...

    Yup I know this change is not related to coding standard but fix it here.

yogeshmpawar’s picture

Status: Needs work » Needs review
StatusFileSize
new5.61 KB
new51.98 KB
naveenvalecha’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new1.96 KB
new52.21 KB

here's the pareview.sh review of #18 http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-2765259-18

+++ b/sharethis.admin.inc
@@ -22,7 +22,12 @@ function sharethis_configuration_form($form, &$form_state) {
+  // Create the variables related to widget choice.
+  $widget_type = $current_options_array['widget'];
+  $widget_markup = "";
+  if ($widget_type == "st_multi") {
+    $widget_markup = "st_multi";
+  }

The above have question that are we using it ? but it should be reverted back. I have checked it and found that we are not using it.

Commit the patch with the updated changes. See interdiff attached.

Added a followup and removed the todo #2766845: Want to add the option somewhere to select nodes

here's the pareview.sh review of #19 http://pareview.sh/pareview/httpsgitdrupalorgprojectsharethisgit-2765259-19

yogeshmpawar’s picture

  1. +++ b/ShareThisForm.js
    @@ -4,158 +4,161 @@
    +  // After the page is loaded, we want to add events to dynamically created elements.
    

    Comment line exceeds 80 characters

  2. +++ b/ShareThisForm.js
    @@ -4,158 +4,161 @@
    +  // After it's all done, hide the text field for the service picker so that no one messes up the data.
    

    Comment line exceeds 80 characters

  3. +++ b/stlib_picker.js
    @@ -7,128 +7,134 @@
     // stlib_picker.defaultServices defines the services from stcommon that get loaded as the default services in the picker
    

    Comment line exceeds 80 characters

  4. +++ b/stlib_picker.js
    @@ -7,128 +7,134 @@
     // Styling can be found in stlib_picker.css and should be linked in the page.
    

    Comment line exceeds 80 characters

  5. +++ b/stlib_picker.js
    @@ -7,128 +7,134 @@
     // To get selected services as an array of strings:  (ie ["twitter", "sharethis", "facebook"] )
    

    Comment line exceeds 80 characters

  6. +++ b/stlib_picker.js
    @@ -7,128 +7,134 @@
    +    // Need to make sure that we don't get confused when there are multiple pickers.
    

    Comment line exceeds 80 characters

yogeshmpawar’s picture

Status: Reviewed & tested by the community » Needs work
naveenvalecha’s picture

Status: Needs work » Reviewed & tested by the community

Thanks for finding these. Are there anything else that would move this to N/W as coder is happy without these as well.
back to RTBC per #19
We will consider this in another followup.

naveenvalecha’s picture

Adding credit to @navneet0693 fro helping yogesh

naveenvalecha’s picture

Assigned: yogeshmpawar » Unassigned
Status: Reviewed & tested by the community » Fixed

Thanks everyone!
Please file followup if anything left. Fixing for now because It can go incremental.Rerolling the patch everyone time is big doom.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.