userproc3_swappcontentversions, a new stored procedure, added to the CMS so that content swaps can take place
A typical usage would be this:
// Push to live
p.Add("@sourcetype", SqlDbType.Int, 4, ParameterDirection.Input, 2);
p.Add("@sourceid", SqlDbType.Int, 4, ParameterDirection.Input, investmentid);
p.Add("@sourceversion", SqlDbType.Int, 4, ParameterDirection.Input, 3);
p.Add("@targetversion", SqlDbType.Int, 4, ParameterDirection.Input, 1);
outcome = db.ExecProcVoidParams("userproc3_swappcontentversions", p);
What this is doing is copying edit content (sourceversion = 3) to live content (targetversion = 1)
Also:
// Refresh from live
p.Add("@sourcetype", SqlDbType.Int, 4, ParameterDirection.Input, 2);
p.Add("@sourceid", SqlDbType.Int, 4, ParameterDirection.Input, investmentid);
p.Add("@sourceversion", SqlDbType.Int, 4, ParameterDirection.Input, 1);
p.Add("@targetversion", SqlDbType.Int, 4, ParameterDirection.Input, 3);
outcome = db.ExecProcVoidParams("userproc3_swappcontentversions", p);
What this is doing is copying live content (sourceversion = 1) to edit content (targetversion = 3)
No comments:
Post a Comment