config/alfresco/site-webscripts/org/sharextras/components/dashlets/audit-application-data.get.js
// Determine is the fix is required, depending on the current version of the repository the web-tier is currently running against.
Determine is the fix is required, depending on the current version of the repository the web-tier is currently running against.
Determine is the fix is required depending on the current version of the repository the web - tier is currently running against .
function isJsonQuoteFixRequired(connector)
{
   var srvInfo = connector.get("/api/server");
   var srvInfoJson = jsonUtils.toObject(srvInfo);
   var serverVersion, serverEdition, serverVersionNumbers;
   serverVersion = srvInfoJson.data ? srvInfoJson.data.version : "1.0.0";
   serverEdition = srvInfoJson.data ? srvInfoJson.data.edition : "Enterprise";
   if (serverEdition == "Enterprise")
   {
      serverVersionNumbers = ((serverVersion.substr(0,5).replace(/\./g,""))*1); 
      if (logger.isLoggingEnabled())
         logger.log("Enterprise serverVersionNumbers:'"+serverVersionNumbers+"'");
      return (serverVersionNumbers < 343);
   }
   else if (serverEdition == "Community")
   {
       serverVersionNumbers = ((serverVersion.substr(0,3).replace(/\./g,""))*1); 
       if (logger.isLoggingEnabled())
          logger.log("Community serverVersionNumbers:'"+serverVersionNumbers+"'");
       return (serverVersionNumbers < 40);
   }
   else
      return true; 
}
function isJsonQuoteFixRequired ( connector ) { var srvInfo = connector . get ( "/api/server" ) ; var srvInfoJson = jsonUtils . toObject ( srvInfo ) ; var serverVersion , serverEdition , serverVersionNumbers ; serverVersion = srvInfoJson . data ? srvInfoJson . data . version : "1.0.0" ; serverEdition = srvInfoJson . data ? srvInfoJson . data . edition : "Enterprise" ; if ( serverEdition == "Enterprise" ) { serverVersionNumbers = ( ( serverVersion . substr ( 0 , 5 ) . replace ( / \. / g , "" ) ) * 1 ) ; if ( logger . isLoggingEnabled ( ) ) logger . log ( "Enterprise serverVersionNumbers:'" + serverVersionNumbers + "'" ) ; return ( serverVersionNumbers < 343 ) ; } else if ( serverEdition == "Community" ) { serverVersionNumbers = ( ( serverVersion . substr ( 0 , 3 ) . replace ( / \. / g , "" ) ) * 1 ) ; if ( logger . isLoggingEnabled ( ) ) logger . log ( "Community serverVersionNumbers:'" + serverVersionNumbers + "'" ) ; return ( serverVersionNumbers < 40 ) ; } else return true ; }
Determine is the fix is required, depending on the current version of the repository the web-tier is currently running against.
Determine is the fix is required depending on the current version of the repository the web - tier is currently running against .
// get current server version to determine if a workaround for ALF-8307 is needed. // setup defaults // if Enterprise edition, extract x.y.z from the version number. if community, only extract x.y (exclude service packs). // extract x.y.z from the version number (i.e, include service pack). // extract x.y from the version number (i.e, exclude service pack). // apply the fix if unhandled / different edition.