diff --git a/clientgui/sg_TaskPanel.cpp b/clientgui/sg_TaskPanel.cpp index b6b64e6031..3ac2016857 100644 --- a/clientgui/sg_TaskPanel.cpp +++ b/clientgui/sg_TaskPanel.cpp @@ -939,9 +939,11 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) { std::vectoris_alive; bool needRefresh = false; wxString resname; + CC_STATUS status; CMainDocument* pDoc = wxGetApp().GetDocument(); CSkinSimple* pSkinSimple = wxGetApp().GetSkinManager()->GetSimple(); - + wxASSERT(pDoc); + static bool bAlreadyRunning = false; wxASSERT(pDoc); @@ -1088,16 +1090,23 @@ void CSimpleTaskPanel::UpdateTaskSelectionList(bool reskin) { } } + pDoc->GetCoreClientStatus(status); + count = m_TaskSelectionCtrl->GetCount(); for(j = 0; j < count; ++j) { selData = (TaskSelectionData*)m_TaskSelectionCtrl->GetClientData(j); ctrlResult = selData->result; if (isRunning(ctrlResult)) { newIcon = runningIcon; - } else if (ctrlResult->scheduler_state == CPU_SCHED_PREEMPTED) { - newIcon = waitingIcon; - } else { + } else if (Suspended() || + ctrlResult->suspended_via_gui || + ctrlResult->project_suspended_via_gui || + // kludge. But ctrlResult->avp isn't populated. + (status.gpu_suspend_reason && (strstr(ctrlResult->resources, "GPU") != NULL))) + { newIcon = suspendedIcon; + } else { + newIcon = waitingIcon; } if (reskin || (newIcon != selData->dotColor)) { @@ -1176,7 +1185,7 @@ bool CSimpleTaskPanel::Suspended() { bool result = false; pDoc->GetCoreClientStatus(status); - if ( pDoc->IsConnected() && status.task_suspend_reason > 0 && status.task_suspend_reason != SUSPEND_REASON_DISK_SIZE && status.task_suspend_reason != SUSPEND_REASON_CPU_THROTTLE ) { + if ( pDoc->IsConnected() && status.task_suspend_reason > 0 && status.task_suspend_reason != SUSPEND_REASON_CPU_THROTTLE ) { result = true; } return result; @@ -1224,6 +1233,8 @@ void CSimpleTaskPanel::DisplayIdleState() { UpdateStaticText(&m_StatusValueText, _("Processing Suspended: Time of Day.")); } else if ( status.task_suspend_reason & SUSPEND_REASON_BENCHMARKS ) { UpdateStaticText(&m_StatusValueText, _("Processing Suspended: Benchmarks Running.")); + } else if ( status.task_suspend_reason & SUSPEND_REASON_DISK_SIZE ) { + UpdateStaticText(&m_StatusValueText, _("Processing Suspended: need disk space.")); } else { UpdateStaticText(&m_StatusValueText, _("Processing Suspended.")); } diff --git a/drupal/sites/default/boinc/modules/boincimport/boincimport.module b/drupal/sites/default/boinc/modules/boincimport/boincimport.module index 49ddc22607..989ddca234 100644 --- a/drupal/sites/default/boinc/modules/boincimport/boincimport.module +++ b/drupal/sites/default/boinc/modules/boincimport/boincimport.module @@ -2019,6 +2019,8 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) { while ($topic = db_fetch_object($topics)) { + $error_detail = ''; + db_set_active('boinc'); // Get the content of the post that started the topic @@ -2095,18 +2097,30 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) { node_save($node); taxonomy_node_save($node, array($tid)); $success = ($node->nid) ? TRUE : FALSE; + if ($success) { + $success = db_query(' + INSERT INTO {boincimport_temp_topic} (topic_id, post_id, nid) + VALUES (%d, %d, %d)', $topic->id, $post->id, $node->nid + ); + if ($success) { + // Hack to keep the topics in correct order + $success = db_query('UPDATE {node_comment_statistics} SET last_comment_timestamp = %d WHERE nid = %d', $node->created, $node->nid); + if (!$success) { + $error_detail = 'topic imported, but failed to set last comment timestamp'; + } + } + else { + $error_detail = 'topic node saved, but failed to link in boincimport_temp_topic table'; + } + } + else { + $error_detail = 'failed to save topic node to database'; + } } // See if the import worked $message = ''; if ($success) { - db_query(' - INSERT INTO {boincimport_temp_topic} (topic_id, post_id, nid) - VALUES (%d, %d, %d)', $topic->id, $post->id, $node->nid - ); - // Hack to keep the topics in correct order - db_query('UPDATE {node_comment_statistics} SET last_comment_timestamp = %d WHERE nid = %d', $node->created, $node->nid); - // Store some result for post-processing in the finished callback. $context['results']['success'][] = $topic->id; $message = "Successfully imported topic {$topic->id}"; @@ -2123,8 +2137,12 @@ function boincimport_topics_op($offset, $batch_size, $pre = '', &$context) { $context['results']['failure'][] = $topic->id; $message = "Failed to import topic {$topic->id}!"; watchdog('boincimport', - 'Failed to import topic @id!', - array('@id' => $topic->id), WATCHDOG_WARNING + 'Failed to import topic @id! (@error)', + array( + '@id' => $topic->id, + '@error' => $error_detail, + ), + WATCHDOG_WARNING ); } @@ -2269,9 +2287,13 @@ function boincimport_forum_posts() { 'finished' => 'boincimport_posts_finished', 'title' => t('Importing posts'), 'init_message' => t('Beginning post import...'), - 'progress_message' => t('Processed posts in @current out of @total batches (@size topics per batch).', array( - '@size' => $batch_size, - )), + 'progress_message' => t( + 'Processed posts in @current out of @total batches (@size topics per batch).', + array( + '@size' => $batch_size, + // @current and @total are managed by the batch API + ) + ), 'error_message' => t('Post import has encountered an error.'), ); @@ -2294,12 +2316,13 @@ function boincimport_posts_op($offset, $batch_size, &$context) { // Get the topics with posts to import db_set_active('boinc'); $boinc_topic_ids = db_query(' - SELECT t.id FROM %sthread t + SELECT DISTINCT t.id FROM %sthread t JOIN %sforum f ON f.id = t.forum + JOIN %spost p ON p.thread = t.id WHERE f.parent_type = 0 ORDER BY t.id LIMIT %d,%d', - $pre, $pre, $offset, $batch_size + $pre, $pre, $pre, $offset, $batch_size ); db_set_active('default'); @@ -2308,20 +2331,15 @@ function boincimport_posts_op($offset, $batch_size, &$context) { db_set_active('boinc'); $boinc_posts = db_query(' SELECT id, user, thread, timestamp, content, parent_post, hidden - FROM %spost WHERE thread = %d ORDER BY timestamp ASC', $pre, $boinc_topic->id); + FROM %spost WHERE thread = %d ORDER BY id ASC', $pre, $boinc_topic->id); db_set_active('default'); $first_post = true; $success = FALSE; - $invalid = FALSE; $posts_imported = 0; $empty_posts = 0; $error_posts = 0; $duplicate_posts = 0; - - if (!mysql_num_rows($boinc_posts)) { - $invalid = TRUE; - } while ($post = db_fetch_object($boinc_posts)) { @@ -2439,13 +2457,6 @@ function boincimport_posts_op($offset, $batch_size, &$context) { $context['results']['success'][] = $boinc_topic->id; $message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id}"; } - elseif ($invalid) { - $context['results']['invalid'][] = $boinc_topic->id; - $message = "Topic {$boinc_topic->id} has no content at all, so is invalid"; - watchdog('boincimport', $message, - array(), WATCHDOG_WARNING - ); - } else { $context['results']['failure'][] = $boinc_topic->id; $message = "Imported {$posts_imported} post(s) for topic {$boinc_topic->id} (excluded {$error_posts} errors, {$duplicate_posts} duplicates, and {$empty_posts} empty)"; @@ -2484,13 +2495,12 @@ function boincimport_posts_finished($success, $results, $operations) { $posts_imported = count($results['posts']['success']); $topic_count = count($results['success']); $topics_skipped = count($results['failure']); - $topics_invalid = count($results['invalid']); $duplicates = count($results['posts']['duplicate']); $empty_posts = count($results['posts']['empty']); $failed_posts = count($results['posts']['failure']); $message = t( 'Successfully imported @post_count posts in @topic_count topics ' . - '(@skipped topics either had no replies or all replies were already imported, @invalid_topics had no content at all and were invalid; ' . + '(@skipped topics either had no replies or all replies were already imported, ' . '@duplicates posts were skipped as already imported, ' . '@empty_posts had no content, ' . 'and @error_posts encountered errors during import)', @@ -2498,7 +2508,6 @@ function boincimport_posts_finished($success, $results, $operations) { '@post_count' => $posts_imported, '@topic_count' => $topic_count, '@skipped' => $topics_skipped, - '@invalid_topics' => $topics_invalid, '@duplicates' => $duplicates, '@empty_posts' => $empty_posts, '@error_posts' => $failed_posts, diff --git a/html/inc/db_ops.inc b/html/inc/db_ops.inc index dc478a5dc1..908bd33a22 100644 --- a/html/inc/db_ops.inc +++ b/html/inc/db_ops.inc @@ -714,6 +714,7 @@ function show_app_version($app_version) { row("Application", "appid\">" . app_name_by_id($app_version->appid) . ""); row("Version num", $app_version->version_num); row("Platform", "platformid\">" . platform_name_by_id($app_version->platformid) . "" ); + row("Plan Class", $app_version->plan_class); row("XML doc", "
".htmlspecialchars($app_version->xml_doc)."
"); row("min_core_version", $app_version->min_core_version); row("max_core_version", $app_version->max_core_version); @@ -729,6 +730,7 @@ function app_version_short_header() { Application Version Platform + Plan Class "; } @@ -742,6 +744,7 @@ function show_app_version_short($app_version) { appid\">$x $app_version->version_num platformid\">$y + $app_version->plan_class "; } @@ -1100,7 +1103,7 @@ function show_result_short($result) { $received = "". time_str($result->report_deadline) . ""; } } - $version = app_version_string($result); + $version = app_version_string($result)." (app_version_id\">$result->app_version_id)"; $outcome_color = outcome_color($result->outcome); $validate_color = validate_color($result->validate_state); $host_user = host_user_link($result->hostid); @@ -1134,6 +1137,7 @@ function show_user($user) { row("Name", $user->name); row("Authenticator", $user->authenticator); row("Email address", $user->email_addr); + row("OK to send Email?", $user->send_email); row("Country", $user->country); row("Postal code", $user->postal_code); row("Total credit", $user->total_credit); diff --git a/html/inc/util_basic.inc b/html/inc/util_basic.inc index 1dffd30ced..3bc578b254 100644 --- a/html/inc/util_basic.inc +++ b/html/inc/util_basic.inc @@ -146,4 +146,17 @@ function is_gpu($plan_class) { return false; } +// the same as file_get_contents() but uses curl +// +function url_get_contents($url) { + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_HEADER, false); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_MAXREDIRS, 5); + $content = curl_exec($ch); + curl_close($ch); + return $content; +} + ?> diff --git a/locale/it_IT/BOINC-Client.po b/locale/it_IT/BOINC-Client.po index 86211510f2..486123ea7a 100644 --- a/locale/it_IT/BOINC-Client.po +++ b/locale/it_IT/BOINC-Client.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: BOINC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-10-15 22:25-0700\n" -"PO-Revision-Date: 2015-11-13 09:00+0000\n" +"PO-Revision-Date: 2015-12-09 12:59+0000\n" "Last-Translator: Sebastiano Pistore \n" "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n" "MIME-Version: 1.0\n" diff --git a/locale/it_IT/BOINC-Drupal.po b/locale/it_IT/BOINC-Drupal.po index 5cabfc6260..456a064444 100644 --- a/locale/it_IT/BOINC-Drupal.po +++ b/locale/it_IT/BOINC-Drupal.po @@ -5,11 +5,12 @@ # Alessandro Caiulo , 2015 # Gianfranco Costamagna , 2015 # Pietro , 2015 +# Sebastiano Pistore , 2015 msgid "" msgstr "" "Project-Id-Version: BOINC\n" "POT-Creation-Date: 2015-08-14 09:37+0000\n" -"PO-Revision-Date: 2015-11-17 11:11+0000\n" +"PO-Revision-Date: 2015-12-09 12:39+0000\n" "Last-Translator: Sebastiano Pistore \n" "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n" "MIME-Version: 1.0\n" @@ -64,10 +65,10 @@ msgid "You are banned from community participation until @date" msgstr "Sei stato bannato dalla community fino al @date" msgid "Computers @old_ids have been merged successfully into @id." -msgstr "I computer @old_ids sono stati fusi con successo in @id." +msgstr "I @old_ids dei computer sono stati uniti con successo in @id." msgid "A team named \"@name\" already exists." -msgstr "Un'altra squadra denominata \"@name\" già esiste." +msgstr "Un team di nome \"@name\" esiste già." msgid "Post topic" msgstr "Argomento del post" @@ -82,10 +83,10 @@ msgid "Make founder" msgstr "Rendi fondatore" msgid "!site: comment posted to \"!topic_name\"" -msgstr "!site: commento inserito su \"!topic_name\"" +msgstr "!site: commento postato in \"!topic_name\"" msgid "!author has posted a reply to \"!topic_name\"." -msgstr "!author ha postato una risposta su \"!topic_name\"." +msgstr "!author ha postato una risposta in \"!topic_name\"." msgid "" "To view this topic at !site, click here: \n" @@ -593,7 +594,7 @@ msgid "Enforced by version @number" msgstr "Disponibile dalla versione @number" msgid "\"In use\" means mouse/keyboard activity in last" -msgstr "\"In uso\" significa attività mouse/tastiera negli ultimi" +msgstr "\"In uso\" significa che c'è stata attività del mouse/tastiera negli ultimi" msgid "minutes" msgstr "minuti" diff --git a/locale/it_IT/BOINC-Manager.mo b/locale/it_IT/BOINC-Manager.mo index 95eceaa7a3..18b00eb12e 100644 Binary files a/locale/it_IT/BOINC-Manager.mo and b/locale/it_IT/BOINC-Manager.mo differ diff --git a/locale/it_IT/BOINC-Manager.po b/locale/it_IT/BOINC-Manager.po index a78a3be765..dac24c7800 100644 --- a/locale/it_IT/BOINC-Manager.po +++ b/locale/it_IT/BOINC-Manager.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: BOINC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-10-16 17:27-0500\n" -"PO-Revision-Date: 2015-12-04 11:26+0000\n" +"PO-Revision-Date: 2015-12-09 12:39+0000\n" "Last-Translator: Sebastiano Pistore \n" "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n" "MIME-Version: 1.0\n" diff --git a/locale/it_IT/BOINC-Project-Generic.po b/locale/it_IT/BOINC-Project-Generic.po index 842f97c4f7..eaed09e917 100644 --- a/locale/it_IT/BOINC-Project-Generic.po +++ b/locale/it_IT/BOINC-Project-Generic.po @@ -14,7 +14,7 @@ msgstr "" "Project-Id-Version: BOINC\n" "Report-Msgid-Bugs-To: BOINC translation team \n" "POT-Creation-Date: 2015-06-24 13:05 PDT\n" -"PO-Revision-Date: 2015-12-04 11:06+0000\n" +"PO-Revision-Date: 2015-12-09 12:58+0000\n" "Last-Translator: Sebastiano Pistore \n" "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n" "MIME-Version: 1.0\n" diff --git a/locale/it_IT/BOINC-Web.mo b/locale/it_IT/BOINC-Web.mo index 635ceecd6b..31df829126 100644 Binary files a/locale/it_IT/BOINC-Web.mo and b/locale/it_IT/BOINC-Web.mo differ diff --git a/locale/it_IT/BOINC-Web.po b/locale/it_IT/BOINC-Web.po index 1456b892ce..d5970f670d 100644 --- a/locale/it_IT/BOINC-Web.po +++ b/locale/it_IT/BOINC-Web.po @@ -13,7 +13,7 @@ msgstr "" "Project-Id-Version: BOINC\n" "Report-Msgid-Bugs-To: BOINC translation team \n" "POT-Creation-Date: 2015-07-09 18:59 PDT\n" -"PO-Revision-Date: 2015-12-04 11:23+0000\n" +"PO-Revision-Date: 2015-12-09 12:56+0000\n" "Last-Translator: Sebastiano Pistore \n" "Language-Team: Italian (Italy) (http://www.transifex.com/boinc/boinc/language/it_IT/)\n" "MIME-Version: 1.0\n" @@ -743,7 +743,7 @@ msgstr "Accademia cinese delle scienze" #: projects.inc:458 msgid "Physics, biochemistry, and others" -msgstr "Fisica, biochimica, ed altre" +msgstr "Fisica, biochimica, ed altro" #: projects.inc:459 msgid "" diff --git a/locale/sk/BOINC-Manager.mo b/locale/sk/BOINC-Manager.mo index d353afa6c1..cc6e8a5d95 100644 Binary files a/locale/sk/BOINC-Manager.mo and b/locale/sk/BOINC-Manager.mo differ diff --git a/locale/zh_TW/BOINC-Manager.mo b/locale/zh_TW/BOINC-Manager.mo index 4b398d5686..f3c27843cc 100644 Binary files a/locale/zh_TW/BOINC-Manager.mo and b/locale/zh_TW/BOINC-Manager.mo differ diff --git a/locale/zh_TW/BOINC-Web.mo b/locale/zh_TW/BOINC-Web.mo index 2b404210fd..21156b6230 100644 Binary files a/locale/zh_TW/BOINC-Web.mo and b/locale/zh_TW/BOINC-Web.mo differ