File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -1052,6 +1052,31 @@ angular.module('mm.core')
10521052 } ) ;
10531053 } ;
10541054
1055+ /**
1056+ * Get a package timemodified.
1057+ *
1058+ * @module mm.core
1059+ * @ngdoc method
1060+ * @name $mmFilepool#getPackageTimemodified
1061+ * @param {String } siteId Site ID.
1062+ * @param {String } component Package's component.
1063+ * @param {Number } [componentId] An ID to use in conjunction with the component.
1064+ * @return {Promise } Promise resolved with the timemodified.
1065+ */
1066+ self . getPackageTimemodified = function ( siteId , component , componentId ) {
1067+ return $mmSitesManager . getSite ( siteId ) . then ( function ( site ) {
1068+ var db = site . getDb ( ) ,
1069+ packageId = self . getPackageId ( component , componentId ) ;
1070+
1071+ // Get status.
1072+ return db . get ( mmFilepoolPackagesStore , packageId ) . then ( function ( entry ) {
1073+ return entry . timemodified ;
1074+ } , function ( ) {
1075+ return - 1 ;
1076+ } ) ;
1077+ } ) ;
1078+ } ;
1079+
10551080 /**
10561081 * Get the deferred object for a file in the queue.
10571082 *
You can’t perform that action at this time.
0 commit comments