Changeset 52
- Timestamp:
- 09/08/08 22:45:07 (3 years ago)
- Location:
- drupal5/trunk/sites/all/modules/views
- Files:
-
- 2 edited
-
views.module (modified) (7 diffs)
-
views_cache.inc (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
drupal5/trunk/sites/all/modules/views/views.module
r15 r52 201 201 } 202 202 } 203 cache_set("views_urls", 'cache_views', serialize($views));203 cache_set("views_urls", 'cache_views', $views); 204 204 } 205 205 else { 206 $views = unserialize($cache->data);206 $views = $cache->data; 207 207 } 208 208 … … 303 303 304 304 // All views with an empty access setting are available to all roles. 305 if (!$view->access) { 305 if (!$view->access) { 306 306 return TRUE; 307 307 } … … 524 524 $args = array(); 525 525 } 526 526 527 527 // if no filter values are passed in, get them from the $_GET array 528 528 if ($filters == NULL) { … … 833 833 function _views_view_fields() { 834 834 return array( 835 'vid' => '%d', 836 'name' => "'%s'", 837 'description' => "'%s'", 838 'access' => "'%s'", 839 'page' => '%d', 840 'page_title' => "'%s'", 841 'page_header' => "'%s'", 842 'page_header_format' => '%d', 843 'page_footer' => "'%s'", 844 'page_footer_format' => '%d', 845 'page_empty' => "'%s'", 846 'page_empty_format' => '%d', 847 'page_type' => "'%s'", 848 'use_pager' => '%d', 849 'nodes_per_page' => '%d', 850 'url' => "'%s'", 851 'menu' => '%d', 852 'menu_tab' => '%d', 853 'menu_tab_default' => '%d', 854 'menu_tab_weight' => '%d', 855 'menu_title' => "'%s'", 835 'vid' => '%d', 836 'name' => "'%s'", 837 'description' => "'%s'", 838 'access' => "'%s'", 839 'page' => '%d', 840 'page_title' => "'%s'", 841 'page_header' => "'%s'", 842 'page_header_format' => '%d', 843 'page_footer' => "'%s'", 844 'page_footer_format' => '%d', 845 'page_empty' => "'%s'", 846 'page_empty_format' => '%d', 847 'page_type' => "'%s'", 848 'use_pager' => '%d', 849 'nodes_per_page' => '%d', 850 'url' => "'%s'", 851 'menu' => '%d', 852 'menu_tab' => '%d', 853 'menu_tab_default' => '%d', 854 'menu_tab_weight' => '%d', 855 'menu_title' => "'%s'", 856 856 'menu_tab_default_parent_type' => "'%s'", 857 'menu_parent_title' => "'%s'", 858 'menu_parent_tab_weight' => '%d', 859 'block' => '%d', 860 'block_title' => "'%s'", 861 'block_use_page_header' => '%d', 862 'block_header' => "'%s'", 863 'block_header_format' => '%d', 864 'block_use_page_footer' => '%d', 865 'block_footer' => "'%s'", 866 'block_footer_format' => '%d', 867 'block_use_page_empty' => '%d', 868 'block_empty' => "'%s'", 869 'block_empty_format' => '%d', 870 'block_type' => "'%s'", 871 'nodes_per_block' => '%d', 872 'block_more' => '%d', 873 'breadcrumb_no_home' => '%d', 874 'changed' => '%d', 875 'view_args_php' => "'%s'", 857 'menu_parent_title' => "'%s'", 858 'menu_parent_tab_weight' => '%d', 859 'block' => '%d', 860 'block_title' => "'%s'", 861 'block_use_page_header' => '%d', 862 'block_header' => "'%s'", 863 'block_header_format' => '%d', 864 'block_use_page_footer' => '%d', 865 'block_footer' => "'%s'", 866 'block_footer_format' => '%d', 867 'block_use_page_empty' => '%d', 868 'block_empty' => "'%s'", 869 'block_empty_format' => '%d', 870 'block_type' => "'%s'", 871 'nodes_per_block' => '%d', 872 'block_more' => '%d', 873 'breadcrumb_no_home' => '%d', 874 'changed' => '%d', 875 'view_args_php' => "'%s'", 876 876 'is_cacheable' => '%d', 877 877 ); … … 1315 1315 $form['view'] = array('#type' => 'value', '#value' => $view); 1316 1316 $form['submit'] = array('#type' => 'button', '#name' => '', '#value' => t('Submit')); 1317 1317 1318 1318 // clean URL get forms breaks if we don't give it a 'q'. 1319 1319 if (!(bool)variable_get('clean_url', '0')) { … … 1387 1387 $form["filter$count"] = $item; 1388 1388 } 1389 1389 1390 1390 return $form; 1391 1391 } … … 2000 2000 $query->add_where("$field $operator NULL"); 2001 2001 break; 2002 } 2002 } 2003 2003 } 2004 2004 -
drupal5/trunk/sites/all/modules/views/views_cache.inc
r15 r52 29 29 if (!$views_arguments) { 30 30 $data = cache_get("views_arguments:$locale", 'cache_views'); 31 $cache = unserialize($data->data);31 $cache = $data->data; 32 32 if (is_array($cache)) { 33 33 $views_arguments = $cache; … … 55 55 } 56 56 $cache = $views_arguments; 57 cache_set("views_arguments:$locale", 'cache_views', serialize($cache));57 cache_set("views_arguments:$locale", 'cache_views', $cache); 58 58 } 59 59 } … … 71 71 if (!$views_tables) { 72 72 $data = cache_get("views_tables:$locale", 'cache_views'); 73 $cache = unserialize($data->data);73 $cache = $data->data; 74 74 75 75 if (is_array($cache)) { … … 78 78 else { 79 79 $table_data = module_invoke_all('views_tables'); 80 80 81 81 // allow modules to alter the definitions supplied others 82 82 foreach (module_implements('views_tables_alter') as $module) { … … 84 84 $function($table_data); 85 85 } 86 86 87 87 $views_tables['tables'] = $table_data; 88 88 … … 144 144 } 145 145 } 146 cache_set("views_tables:$locale", 'cache_views', serialize($views_tables));146 cache_set("views_tables:$locale", 'cache_views', $views_tables); 147 147 } 148 148 } … … 225 225 if (!$views_default_views) { 226 226 $data = cache_get("views_default_views:$locale", 'cache_views'); 227 $cache = unserialize($data->data);227 $cache = $data->data; 228 228 229 229 if (is_array($cache)) { … … 244 244 } 245 245 } 246 cache_set("views_default_views:$locale", 'cache_views', serialize($views_default_views));246 cache_set("views_default_views:$locale", 'cache_views', $views_default_views); 247 247 } 248 248 } … … 267 267 function _views_get_query(&$view, $args, $filters) { 268 268 if ($view->is_cacheable && ($cached = cache_get('views_query:' . $view->name, 'cache_views'))) { 269 $info = unserialize($cached->data);269 $info = $cached->data; 270 270 271 271 $plugins = _views_get_style_plugins(); … … 282 282 ); 283 283 if ($view->is_cacheable) { 284 cache_set('views_query:' . $view->name, 'cache_views', serialize($data));284 cache_set('views_query:' . $view->name, 'cache_views', $data); 285 285 } 286 286 $info = array_merge($info, $data); … … 314 314 if (!$views_style_plugins) { 315 315 $data = cache_get("views_style_plugins:$locale", 'cache_views'); 316 $cache = unserialize($data->data);316 $cache = $data->data; 317 317 if (is_array($cache)) { 318 318 $views_style_plugins = $cache; … … 329 329 } 330 330 $cache = $views_style_plugins; 331 cache_set("views_style_plugins:$locale", 'cache_views', serialize($cache));331 cache_set("views_style_plugins:$locale", 'cache_views', $cache); 332 332 } 333 333 }
Note: See TracChangeset
for help on using the changeset viewer.
