Commit 97e0e880 authored by Frank Bergmann's avatar Frank Bergmann

- Gustaf changes

parent 27a46ad2
...@@ -44,7 +44,7 @@ ad_proc -public im_security_update_exchange_rate_sweeper { } { ...@@ -44,7 +44,7 @@ ad_proc -public im_security_update_exchange_rate_sweeper { } {
return return
} }
set days_since_update [expr $now_julian - $last_update_julian] set days_since_update [expr {$now_julian - $last_update_julian}]
ns_log Notice "im_security_update_exchange_rate_sweeper: days_since_update=$days_since_update, max_days_since_update=$max_days_since_update" ns_log Notice "im_security_update_exchange_rate_sweeper: days_since_update=$days_since_update, max_days_since_update=$max_days_since_update"
if {$days_since_update > $max_days_since_update} { if {$days_since_update > $max_days_since_update} {
...@@ -114,7 +114,7 @@ ad_proc im_security_update_update_currencies { ...@@ -114,7 +114,7 @@ ad_proc im_security_update_update_currencies {
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if {![string equal $root_name "asus_reply"] } { if {$root_name ne "asus_reply" } {
append html "Expected <asus_reply> as root node of update.xml file, found: '$root_name'" append html "Expected <asus_reply> as root node of update.xml file, found: '$root_name'"
return $html return $html
} }
...@@ -511,7 +511,7 @@ ad_proc im_security_update_client_component { } { ...@@ -511,7 +511,7 @@ ad_proc im_security_update_client_component { } {
Passes on the version numbers of all installed packages Passes on the version numbers of all installed packages
in order to be able to retreive relevant messages in order to be able to retreive relevant messages
} { } {
set current_user_id [ad_maybe_redirect_for_registration] set current_user_id [auth::require_login]
set action_url "/intranet-security-update-client/update-preferences" set action_url "/intranet-security-update-client/update-preferences"
set return_url [ad_conn url] set return_url [ad_conn url]
...@@ -687,7 +687,7 @@ ad_proc im_security_update_connected_email { ...@@ -687,7 +687,7 @@ ad_proc im_security_update_connected_email {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -724,7 +724,7 @@ ad_proc im_security_update_connected_email { ...@@ -724,7 +724,7 @@ ad_proc im_security_update_connected_email {
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if { ![string equal $root_name "asus_reply"] } { if { $root_name ne "asus_reply" } {
ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'" ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'"
} }
...@@ -760,7 +760,7 @@ ad_proc im_security_update_backup_component { ...@@ -760,7 +760,7 @@ ad_proc im_security_update_backup_component {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -798,7 +798,7 @@ ad_proc im_security_update_backup_component { ...@@ -798,7 +798,7 @@ ad_proc im_security_update_backup_component {
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if {![string equal $root_name "asus_reply"] } { if {$root_name ne "asus_reply" } {
append html "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'" append html "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'"
return $html return $html
} }
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<td><%= [lang::message::lookup "" intranet-security-update-client.Your_Email "Your<br>Email"] %></td> <td><%= [lang::message::lookup "" intranet-security-update-client.Your_Email "Your<br>Email"] %></td>
<td>@email@</td> <td>@email@</td>
<td>@user_account_status@</td> <td>@user_account_status@</td>
<td><a class="button" href="@create_account_url;noquote@">Create User Account</a> <td><a class="button" href="@create_account_url@">Create User Account</a>
</tr> </tr>
</if> </if>
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<td> <td>
Password<br> Password<br>
<form action="@login_url;noquote@" method=GET> <form action="@login_url;noquote@" method=GET>
<input type=hidden name=email value="@email;noquote@"> <input type="hidden" name="email" value="@email;noquote@">
<input type=password name=password value=""> <input type=password name="password" value="">
<input type=submit value="Login"> <input type="submit" value="Login">
</form> </form>
</td> </td>
</tr> </tr>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<td><%= [lang::message::lookup "" intranet-security-update-client.Your_System "Your<br>SystemID"] %></td> <td><%= [lang::message::lookup "" intranet-security-update-client.Your_System "Your<br>SystemID"] %></td>
<td>@system_id@</td> <td>@system_id@</td>
<td>@system_status@</td> <td>@system_status@</td>
<td><a class="button" href="@create_system_url;noquote@">Create System</a></td> <td><a class="button" href="@create_system_url@">Create System</a></td>
</tr> </tr>
<tr> <tr>
......
...@@ -24,7 +24,7 @@ set po "&#93;project-open&#91;" ...@@ -24,7 +24,7 @@ set po "&#93;project-open&#91;"
set current_url [ns_conn url] set current_url [ns_conn url]
set system_id [im_system_id] set system_id [im_system_id]
set current_user_id [ad_maybe_redirect_for_registration] set current_user_id [auth::require_login]
db_0or1row user_info " db_0or1row user_info "
select * select *
from cc_users from cc_users
......
<master> <master>
<property name="context">@context;noquote@</property> <property name="context">@context;literal@</property>
<property name="title">@page_title@</property> <property name="doc(title)">@page_title;literal@</property>
<property name="admin_navbar_label">admin</property> <property name="admin_navbar_label">admin</property>
<h1>@page_title@</h1> <h1>@page_title@</h1>
......
...@@ -15,7 +15,7 @@ ad_page_contract { ...@@ -15,7 +15,7 @@ ad_page_contract {
# Defaults & Security # Defaults & Security
# ------------------------------------------------------ # ------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration] set user_id [auth::require_login]
set page_title [lang::message::lookup "" intranet-security-update-client.Connect_to_ASUS "Connect to ASUS"] set page_title [lang::message::lookup "" intranet-security-update-client.Connect_to_ASUS "Connect to ASUS"]
set context_bar [im_context_bar $page_title] set context_bar [im_context_bar $page_title]
...@@ -39,7 +39,7 @@ if { [catch { ...@@ -39,7 +39,7 @@ if { [catch {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -79,7 +79,7 @@ if {![regexp {<asus_reply>} $update_xml match]} { ...@@ -79,7 +79,7 @@ if {![regexp {<asus_reply>} $update_xml match]} {
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if { ![string equal $root_name "asus_reply"] } { if { $root_name ne "asus_reply" } {
ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'" ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'"
} }
......
...@@ -16,7 +16,7 @@ ad_page_contract { ...@@ -16,7 +16,7 @@ ad_page_contract {
# Defaults & Security # Defaults & Security
# ------------------------------------------------------ # ------------------------------------------------------
set user_id [ad_maybe_redirect_for_registration] set user_id [auth::require_login]
# ------------------------------------------------------ # ------------------------------------------------------
# Connect to server and check if there is a user_id for system_id # Connect to server and check if there is a user_id for system_id
...@@ -34,7 +34,7 @@ if { [catch { ...@@ -34,7 +34,7 @@ if { [catch {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_base_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -74,7 +74,7 @@ if {![regexp {<asus_reply>} $update_xml match]} { ...@@ -74,7 +74,7 @@ if {![regexp {<asus_reply>} $update_xml match]} {
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if { ![string equal $root_name "asus_reply"] } { if { $root_name ne "asus_reply" } {
ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'" ad_return_complaint 1 "Expected &lt;asus_reply&gt; as root node of update.xml file, found: '$root_name'"
} }
......
...@@ -36,10 +36,10 @@ switch $platform { ...@@ -36,10 +36,10 @@ switch $platform {
# The file name is the last piece of the URL # The file name is the last piece of the URL
set url_pieces [split $url "/"] set url_pieces [split $url "/"]
set file_name [lindex $url_pieces [expr [llength $url_pieces]-1]] set file_name [lindex $url_pieces [llength $url_pieces]-1]
set file_pieces [split $file_name "."] set file_pieces [split $file_name "."]
set file_ext [string tolower [lindex $file_pieces [expr [llength $file_pieces]-1]]] set file_ext [string tolower [lindex $file_pieces [llength $file_pieces]-1]]
set filename "$file_path/$file_name" set filename "$file_path/$file_name"
if {"tgz" != $file_ext} { if {"tgz" != $file_ext} {
...@@ -75,7 +75,7 @@ if {[catch { ...@@ -75,7 +75,7 @@ if {[catch {
ns_write " ns_write "
<li><b>Error deleting file '$filename'</b>:<br> <li><b>Error deleting file '$filename'</b>:<br>
Please check your url or your file system.<br> Please check your url or your file system.<br>
<pre>[ad_quotehtml $err_msg]</pre> <pre>[ns_quotehtml $err_msg]</pre>
" "
ns_write "</ul>[im_footer]\n" ns_write "</ul>[im_footer]\n"
ad_script_abort ad_script_abort
...@@ -100,7 +100,7 @@ if {[catch { ...@@ -100,7 +100,7 @@ if {[catch {
ns_write " ns_write "
<li><b>Unable to load url '$file_url' into file '$filename'</b>:<br> <li><b>Unable to load url '$file_url' into file '$filename'</b>:<br>
Commend to execute:<br><pre>exec /usr/bin/wget -q -O $filename $file_url</pre><br> Commend to execute:<br><pre>exec /usr/bin/wget -q -O $filename $file_url</pre><br>
Error message:<br><pre>[ad_quotehtml $err_msg]</pre> Error message:<br><pre>[ns_quotehtml $err_msg]</pre>
" "
ns_write "</ul>[im_footer]\n" ns_write "</ul>[im_footer]\n"
ad_script_abort ad_script_abort
...@@ -119,7 +119,7 @@ if {[catch { exec $gzip_cmd --test $filename } gzip_err]} { ...@@ -119,7 +119,7 @@ if {[catch { exec $gzip_cmd --test $filename } gzip_err]} {
<li><b>Invalid format of '$filename'</b>:<br> <li><b>Invalid format of '$filename'</b>:<br>
The file '$filename' is not a valid 'gzip' file.<br> The file '$filename' is not a valid 'gzip' file.<br>
Here is the original error message: Here is the original error message:
<pre>[ad_quotehtml $gzip_err]</pre> <pre>[ns_quotehtml $gzip_err]</pre>
" "
ns_write "</ul>[im_footer]\n" ns_write "</ul>[im_footer]\n"
ad_script_abort ad_script_abort
...@@ -140,7 +140,7 @@ if {[catch { set file_list [exec $tar_cmd tzf $filename] } tar_err]} { ...@@ -140,7 +140,7 @@ if {[catch { set file_list [exec $tar_cmd tzf $filename] } tar_err]} {
<li><b>Error unpacking '$filename'</b>:<br> <li><b>Error unpacking '$filename'</b>:<br>
The file '$filename' is not a valid 'tgz' file.<br> The file '$filename' is not a valid 'tgz' file.<br>
Here is the original error message: Here is the original error message:
<pre>[ad_quotehtml $tar_err]</pre> <pre>[ns_quotehtml $tar_err]</pre>
" "
ns_write "</ul>[im_footer]\n" ns_write "</ul>[im_footer]\n"
ad_script_abort ad_script_abort
...@@ -211,7 +211,7 @@ if {[catch { set tar_output [exec $tar_cmd --directory $file_path -x -z -f $file ...@@ -211,7 +211,7 @@ if {[catch { set tar_output [exec $tar_cmd --directory $file_path -x -z -f $file
ns_write " ns_write "
<li><b>Error unpacking '$filename'</b>:<br> <li><b>Error unpacking '$filename'</b>:<br>
Here is the original error message: Here is the original error message:
<pre>[ad_quotehtml $tar_err]</pre> <pre>[ns_quotehtml $tar_err]</pre>
" "
ns_write "</ul>[im_footer]\n" ns_write "</ul>[im_footer]\n"
ad_script_abort ad_script_abort
......
...@@ -59,7 +59,7 @@ if { [catch { ...@@ -59,7 +59,7 @@ if { [catch {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$currency_update_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$currency_update_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
return return
} }
...@@ -96,7 +96,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2]} { ...@@ -96,7 +96,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2]} {
set update_xml "" set update_xml ""
} }
if {[string tolower $tag1] == "html" || [string tolower $tag2] == "html"} { if {[string tolower $tag1] eq "html" || [string tolower $tag2] eq "html"} {
ns_write " ns_write "
<li> <li>
<font color=red> <font color=red>
......
<master src="../../intranet-core/www/master"> <master src="../../intranet-core/www/master">
<property name="title">@page_title@</property> <property name="doc(title)">@page_title;literal@</property>
<property name="main_navbar_label">admin</property> <property name="main_navbar_label">admin</property>
...@@ -10,7 +10,7 @@ The <span class=brandsec>]</span><span class=brandfirst>project-open</span><span ...@@ -10,7 +10,7 @@ The <span class=brandsec>]</span><span class=brandfirst>project-open</span><span
server responded: server responded:
</p> </p>
<table cellspacing=1 cellpadding=1> <table cellspacing="1" cellpadding="1">
<tr class=rowtitle> <tr class=rowtitle>
<td class=rowtitle>Field</td> <td class=rowtitle>Field</td>
<td class=rowtitle>Value</td> <td class=rowtitle>Value</td>
...@@ -32,7 +32,7 @@ the <a href="index">instructions</a>.<br> ...@@ -32,7 +32,7 @@ the <a href="index">instructions</a>.<br>
<li>You need to perform a complete backup before each and every update. <li>You need to perform a complete backup before each and every update.
</ul> </ul>
<table cellspacing=2 cellpadding=2> <table cellspacing="2" cellpadding="2">
<tr class=rowtitle> <tr class=rowtitle>
<td class=rowtitle align=middle>Update</td> <td class=rowtitle align=middle>Update</td>
<td class=rowtitle align=middle>Package</td> <td class=rowtitle align=middle>Package</td>
......
...@@ -59,7 +59,7 @@ if { [catch { ...@@ -59,7 +59,7 @@ if { [catch {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -86,7 +86,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2 tag ...@@ -86,7 +86,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2 tag
return return
} }
if {[string tolower $tag1] == "/table" || [string tolower $tag1] == "html" || [string tolower $tag2] == "html" || [string tolower $tag3] == "html"} { if {[string tolower $tag1] eq "/table" || [string tolower $tag1] eq "html" || [string tolower $tag2] eq "html" || [string tolower $tag3] eq "html"} {
ad_return_complaint 1 " ad_return_complaint 1 "
Error while retreiving update information from URL<br> Error while retreiving update information from URL<br>
'$service_url'.<br> '$service_url'.<br>
...@@ -146,7 +146,7 @@ ns_log notice "load-update-xml-2: update_xml=$update_xml" ...@@ -146,7 +146,7 @@ ns_log notice "load-update-xml-2: update_xml=$update_xml"
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if { ![string equal $root_name "po_software_update"] } { if { $root_name ne "po_software_update" } {
ad_return_complaint 1 "Expected <po_software_update> as root node of update.xml file, found: '$root_name'" ad_return_complaint 1 "Expected <po_software_update> as root node of update.xml file, found: '$root_name'"
} }
...@@ -195,7 +195,7 @@ foreach root_node $root_nodes { ...@@ -195,7 +195,7 @@ foreach root_node $root_nodes {
set version_node_name [xml_node_get_name $version_node] set version_node_name [xml_node_get_name $version_node]
if { [string equal $version_node_name "update"] } { if {$version_node_name eq "update"} {
set package_name [apm_tag_value -default "" $version_node package_name] set package_name [apm_tag_value -default "" $version_node package_name]
set package_url [apm_tag_value -default "" $version_node package_url] set package_url [apm_tag_value -default "" $version_node package_url]
...@@ -225,14 +225,14 @@ foreach root_node $root_nodes { ...@@ -225,14 +225,14 @@ foreach root_node $root_nodes {
# Skip this item if it's not "new" # Skip this item if it's not "new"
if {$show_only_new_p} { if {$show_only_new_p} {
if {![string equal $is_new "t"]} { continue } if {$is_new != "t" } { continue }
} }
# set higher_version_p [apm_higher_version_installed_p "intranet-core" $package_version] # set higher_version_p [apm_higher_version_installed_p "intranet-core" $package_version]
# ns_log Notice "load-update-xml-2: higher: $higher_version_p, v=$package_version" # ns_log Notice "load-update-xml-2: higher: $higher_version_p, v=$package_version"
append version_html " append version_html "
<tr $bgcolor([expr $ctr % 2])> <tr $bgcolor([expr {$ctr % 2}])>
<td><a href=\"$update_url\" title=\"Update\" class=\"button\">Update</a>&nbsp;</td> <td><a href=\"$update_url\" title=\"Update\" class=\"button\">Update</a>&nbsp;</td>
<td>$package_formatted</td> <td>$package_formatted</td>
<td>$package_version</td> <td>$package_version</td>
......
<master src="../../intranet-core/www/master"> <master src="../../intranet-core/www/master">
<property name="title">@page_title@</property> <property name="doc(title)">@page_title;literal@</property>
<property name="main_navbar_label">admin</property> <property name="main_navbar_label">admin</property>
...@@ -9,24 +9,24 @@ ...@@ -9,24 +9,24 @@
<table> <table>
<tr> <tr>
<td>Update URL:</td> <td>Update URL:</td>
<td><input name=service_url size=60 value="@update_url;noquote@"></td> <td><input name="service_url" size="60" value="@update_url;noquote@"></td>
</tr> </tr>
<tr> <tr>
<td>Service<br>Email:</td> <td>Service<br>Email:</td>
<td><input name=service_email size=40 value="@user_email;noquote@"></td> <td><input name="service_email" size="40" value="@user_email;noquote@"></td>
</tr> </tr>
<tr> <tr>
<td>Service<br>Password:</td> <td>Service<br>Password:</td>
<td> <td>
<input type=password name=service_password size=40 value=""><br> <input type=password name="service_password" size="40" value=""><br>
<small>Attention! This is <strong>not</strong> the login password for you local server.</small> <small>Attention! This is <strong>not</strong> the login password for you local server.</small>
</td> </td>
<td> <td>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan=2 align=right> <td colspan="2" align="right">
<input type=submit name=check value="Check for Updates"> <input type="submit" name="check" value="Check for Updates">
</td> </td>
</tr> </tr>
</table> </table>
......
<master src="../../intranet-core/www/admin/master"> <master src="../../intranet-core/www/admin/master">
<property name="title">@page_title@</property> <property name="doc(title)">@page_title;literal@</property>
<property name="main_navbar_label">admin</property> <property name="main_navbar_label">admin</property>
<property name="admin_navbar_label">software_updates</property> <property name="admin_navbar_label">software_updates</property>
<table cellspacing=0 cellpadding=0 width="100%"> <table cellspacing="0" cellpadding="0" width="100%">
<tr valign=top> <tr valign="top">
<td> <td>
<h1><nobr>@page_title@</nobr></h1> <h1><nobr>@page_title@</nobr></h1>
<%= [lang::message::lookup "" intranet-security-update-client.Guide_Intro " <%= [lang::message::lookup "" intranet-security-update-client.Guide_Intro "
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<if @ctr@ ne 0> <if @ctr@ ne 0>
<table cellspacing=2 cellpadding=2 width="100%"> <table cellspacing="2" cellpadding="2" width="100%">
<tr class=rowtitle> <tr class=rowtitle>
<td class=rowtitle><%= [lang::message::lookup "" intranet-security-update-client.Update "Update"] %></td> <td class=rowtitle><%= [lang::message::lookup "" intranet-security-update-client.Update "Update"] %></td>
<td class=rowtitle><%= [lang::message::lookup "" intranet-security-update-client.Package "Package"] %></td> <td class=rowtitle><%= [lang::message::lookup "" intranet-security-update-client.Package "Package"] %></td>
......
...@@ -72,7 +72,7 @@ if { [catch { ...@@ -72,7 +72,7 @@ if { [catch {
} errmsg] } { } errmsg] } {
ad_return_complaint 1 "Error while accessing the URL '$service_url'.<br> ad_return_complaint 1 "Error while accessing the URL '$service_url'.<br>
Please check your URL. The following error was returned: <br> Please check your URL. The following error was returned: <br>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>" <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort ad_script_abort
return return
} }
...@@ -98,7 +98,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2 tag ...@@ -98,7 +98,7 @@ if {![regexp {<([^>]*)>\s*<([^>]*)>\s*<([^>]*)>} $update_xml match tag1 tag2 tag
} }
# Check if the file was an error # Check if the file was an error
if {[string tolower $tag1] == "/table" || [string tolower $tag1] == "html" || [string tolower $tag2] == "html" || [string tolower $tag3] == "html"} { if {[string tolower $tag1] eq "/table" || [string tolower $tag1] eq "html" || [string tolower $tag2] eq "html" || [string tolower $tag3] eq "html"} {
ad_return_complaint 1 " ad_return_complaint 1 "
Error while retreiving update information from URL<br> Error while retreiving update information from URL<br>
'$service_url'.<br> '$service_url'.<br>
...@@ -148,7 +148,7 @@ if {[string tolower $tag1] == "/table" || [string tolower $tag1] == "html" || [s ...@@ -148,7 +148,7 @@ if {[string tolower $tag1] == "/table" || [string tolower $tag1] == "html" || [s
set tree [xml_parse -persist $update_xml] set tree [xml_parse -persist $update_xml]
set root_node [xml_doc_get_first_node $tree] set root_node [xml_doc_get_first_node $tree]
set root_name [xml_node_get_name $root_node] set root_name [xml_node_get_name $root_node]
if { ![string equal $root_name "po_software_update"] } { if { $root_name ne "po_software_update" } {
ad_return_complaint 1 "Expected <po_software_update> as root node of update.xml file, found: '$root_name'" ad_return_complaint 1 "Expected <po_software_update> as root node of update.xml file, found: '$root_name'"
} }
...@@ -178,7 +178,7 @@ foreach root_node $root_nodes { ...@@ -178,7 +178,7 @@ foreach root_node $root_nodes {
set version_nodes [xml_node_get_children $root_node] set version_nodes [xml_node_get_children $root_node]
foreach version_node $version_nodes { foreach version_node $version_nodes {
set version_node_name [xml_node_get_name $version_node] set version_node_name [xml_node_get_name $version_node]
if { [string equal $version_node_name "update"] } { if {$version_node_name eq "update"} {
set package_name [apm_tag_value -default "" $version_node package_name] set package_name [apm_tag_value -default "" $version_node package_name]
set package_url [apm_tag_value -default "" $version_node package_url] set package_url [apm_tag_value -default "" $version_node package_url]
set po_version [apm_tag_value $version_node po_version] set po_version [apm_tag_value $version_node po_version]
...@@ -197,10 +197,10 @@ foreach root_node $root_nodes { ...@@ -197,10 +197,10 @@ foreach root_node $root_nodes {
if {"" != $po_version_url} {set po_version_formatted "<a href=\"$po_version_url\">$po_version</a>" } if {"" != $po_version_url} {set po_version_formatted "<a href=\"$po_version_url\">$po_version</a>" }
# Skip this item if it's not "new" # Skip this item if it's not "new"
if {$show_only_new_p} { if {$show_only_new_p} {
if {![string equal $is_new "t"]} { continue } if {$is_new != "t" } { continue }
} }
append version_html " append version_html "
<tr $bgcolor([expr $ctr % 2])> <tr $bgcolor([expr {$ctr % 2}])>
<td><a href=\"$update_url\" title=\"Update\" class=\"button\">Update</a>&nbsp;</td> <td><a href=\"$update_url\" title=\"Update\" class=\"button\">Update</a>&nbsp;</td>
<td>$package_formatted</td> <td>$package_formatted</td>
<td><nobr>$po_version_formatted</nobr></td> <td><nobr>$po_version_formatted</nobr></td>
......
...@@ -13,7 +13,7 @@ ad_page_contract { ...@@ -13,7 +13,7 @@ ad_page_contract {
{ return_url "/intranet/admin"} { return_url "/intranet/admin"}
} }
set current_user_id [ad_maybe_redirect_for_registration] set current_user_id [auth::require_login]
set user_admin_p [im_is_user_site_wide_or_intranet_admin $current_user_id] set user_admin_p [im_is_user_site_wide_or_intranet_admin $current_user_id]
if {!$user_admin_p} { if {!$user_admin_p} {
......
<master> <master>
<property name="title">@page_title;noquote@</property> <property name="doc(title)">@page_title;literal@</property>
<property name="admin_navbar_label">admin</property> <property name="admin_navbar_label">admin</property>
...@@ -119,10 +119,10 @@ of the service or the product. ...@@ -119,10 +119,10 @@ of the service or the product.
<form action="/intranet-security-update-client/update-preferences"> <form action="/intranet-security-update-client/update-preferences">
<%= [export_vars -form {return_url}] %> <%= [export_vars -form {return_url}] %>
<input type=radio name=verbosity value=1 checked>Enable full Automatic Security Update Service (ASUS)<br> <input type="radio" name="verbosity" value="1" checked>Enable full Automatic Security Update Service (ASUS)<br>
<input type=radio name=verbosity value=0>Limit ASUS to anonymous data<br> <input type="radio" name="verbosity" value="0">Limit ASUS to anonymous data<br>
<br> <br>
<input type=submit value="Enable ASUS"> <input type="submit" value="Enable ASUS">
</form> </form>
</td> </td>
......
...@@ -12,7 +12,7 @@ ad_page_contract { ...@@ -12,7 +12,7 @@ ad_page_contract {
{ return_url "/intranet/admin/index"} { return_url "/intranet/admin/index"}
} }
set current_user_id [ad_maybe_redirect_for_registration] set current_user_id [auth::require_login]
set po "&#93;project-open&#91" set po "&#93;project-open&#91"
set page_title "ASUS Terms &amp; Conditions" set page_title "ASUS Terms &amp; Conditions"
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