Use instanceof instead of is_a, which is deprecated for PHP < 5.3 7.x-3.0-alpha3
authorBojan Zivanovic
Sun, 19 Jun 2011 16:44:30 +0000 (18:44 +0200)
committerBojan Zivanovic
Sun, 19 Jun 2011 16:44:30 +0000 (18:44 +0200)
views/views_bulk_operations_handler_field_operations.inc
views_bulk_operations.module

index 8cb781b..683a031 100644 (file)
@@ -156,7 +156,7 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
    * placeholder for a "select all" checkbox.
    */
   function label() {
-    if (is_a($this->view->style_plugin, 'views_plugin_style_table') && !$this->options['vbo']['force_single']) {
+    if ($this->view->style_plugin instanceof views_plugin_style_table && !$this->options['vbo']['force_single']) {
       return '<!--views-bulk-operations-select-all-->';
     }
     else {
index a76b0f3..4e147ee 100644 (file)
@@ -91,7 +91,7 @@ function views_bulk_operations_init() {
  */
 function _views_bulk_operations_get_field($view) {
   foreach ($view->field as $field_name => $field) {
-    if (is_a($field, 'views_bulk_operations_handler_field_operations')) {
+    if ($field instanceof views_bulk_operations_handler_field_operations) {
       // Add in the view object for convenience.
       $field->view = $view;
       return $field;
@@ -158,7 +158,7 @@ function theme_views_bulk_operations_select_all($variables) {
   $view = $variables['view'];
   $form = array();
 
-  if (is_a($view->style_plugin, 'views_plugin_style_table')) {
+  if ($view->style_plugin instanceof views_plugin_style_table) {
     // Table displays only get the "select all" markup if they are paginated.
     if (count($view->result) == $view->total_rows) {
       return '';