Feature request, check.php show RS version

55 views
Skip to first unread message

Mike Hathaway

unread,
Mar 20, 2015, 11:42:27 AM3/20/15
to resour...@googlegroups.com
I was looking as to weather or not I should update my server.
can we have the /pages/check.php display the resourcespace version running.
More cool would be also show if there is an update available but just showing the RS version would make my life much easier.  I just want to see my version when looking at what is available and doing an svn check or other action seems like a little to much work.

Mike Hathaway

Jeff Nova

unread,
Mar 20, 2015, 12:43:23 PM3/20/15
to resour...@googlegroups.com
Go to prepare bug report and it will show your version. Not ideal but works now. 

Jeff

--
Jeff Nova
Chief Executive Officer
Colorhythm LLC

Main Office:  +1 415-399-9921
Mobile:  +1 510-710-9590

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.org
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric G

unread,
Mar 26, 2015, 9:08:01 AM3/26/15
to resour...@googlegroups.com
Yes, this would be very handy. +1

Bruce Harper

unread,
Mar 26, 2015, 2:43:19 PM3/26/15
to resour...@googlegroups.com
As mentioned, it is listed in the "Prepare Bug Report" section. I checked that script and it is a simple call. So I grabbed that chunk of code, opened check.php (the Installation Check script) and plugged in the version check code, tweaked the table output, and now can see the Resource Space version along with the PHP version, et al. If someone with the power to do so would be so kind as to tweak the source, I'm sure it would be appreciated by all.

For those who don't mind dabbling in their own installation, open check.php and locate the line 
# Check PHP version
and insert the code from the admin_reportbug.php script, along with the formating to display the result in the table.

# Check ResourceSpace Build
$build
= '';
if ($productversion == 'SVN'){
 $p_version
= 'Trunk (SVN)'; # Should not be translated as this information is sent to the bug tracker.
 
//Try to run svn info to determine revision number
 $out
= array();
 
exec('svn info ../../', $out);
 
foreach($out as $outline){
  $matches
= array();
 
if (preg_match('/^revision: (\d+)/i', $outline, $matches)!=0){
   $build
= $matches[1];
 
}
 
}
}
else {
 
#Extract build number from productversion
 
if (preg_match('/^(\d+)\.(\d+)\.(\d+)/', $productversion, $matches)!=0){
   $build
= $matches[3];
 
}
}
# ResourceSpace version
$p_version
= $productversion == 'SVN'?'Trunk (SVN)':$productversion; # Should not be translated as this information is sent to the bug tracker.

?><tr><td><?php echo str_replace("?", "ResourceSpace", $lang["softwareversion"]); ?></td><td><?php echo $p_version?></td><td><br /></td></tr><?php




Bruce in Blacksburg
Virginia Tech Webmaster




 

Dan Huby

unread,
Mar 27, 2015, 10:30:38 AM3/27/15
to resour...@googlegroups.com

Nice suggestion!

That's now in the base. We're officially in a "bug fix only" period but I considered this very low risk, also it's system admin only. I tweaked it so the SVN revision gets included for SVN checkouts.

Dan
Reply all
Reply to author
Forward
0 new messages