Commit c12fe49d authored by merlinofchaos's avatar merlinofchaos

Miscellaneous minor fixes, including fixing the uid and nid argument titles

parent ce301d4a
...@@ -111,6 +111,8 @@ function views_ui_preview($js, $view) { ...@@ -111,6 +111,8 @@ function views_ui_preview($js, $view) {
$args = explode('/', $form_state['args']); $args = explode('/', $form_state['args']);
} }
// Fix 'q' for paging so that it will go to the NON ajax live preview.
$_GET['q'] = str_replace('ajax', 'nojs', $_GET['q']);
$preview = $view->preview($form_state['display_id'], $args); $preview = $view->preview($form_state['display_id'], $args);
$output .= '<div class="views-query-info">'; $output .= '<div class="views-query-info">';
......
...@@ -359,7 +359,7 @@ class views_handler_argument_node_nid extends views_handler_argument { ...@@ -359,7 +359,7 @@ class views_handler_argument_node_nid extends views_handler_argument {
* Override the behavior of title(). Get the title of the node. * Override the behavior of title(). Get the title of the node.
*/ */
function title() { function title() {
$title = db_result(db_query(db_rewrite_sql("SELECT n.title FROM {node} n WHERE n.nid = %d"), $this->argument)); $title = db_result(db_query(db_rewrite_sql("SELECT n.title FROM {node} n WHERE n.nid = %d", $this->argument)));
if (empty($title)) { if (empty($title)) {
return t('No title'); return t('No title');
} }
......
...@@ -152,10 +152,10 @@ class views_handler_argument_user_uid extends views_handler_argument { ...@@ -152,10 +152,10 @@ class views_handler_argument_user_uid extends views_handler_argument {
$title = variable_get('anonymous', t('Anonymous')); $title = variable_get('anonymous', t('Anonymous'));
} }
else { else {
$title = db_result(db_query("SELECT u.title FROM {user} u WHERE u.uid = %d"), $this->argument); $title = db_result(db_query("SELECT u.name FROM {users} u WHERE u.uid = %d", $this->argument));
} }
if (empty($title)) { if (empty($title)) {
return t('No title'); return t('No user');
} }
return check_plain($title); return check_plain($title);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment