To answer the question above, nothing. However, here's what I've got now. I used the API to update and it seems to have worked aswell. What do you think Juraj?
protected void Page_Load(object sender, EventArgs e)
{
var templates = PageTemplateInfoProvider.GetTemplates();
foreach (var template in templates)
{
PageTemplateInfo temptemp;
if (template.ObjectSettings.ObjectCheckedOutByUserID != 0)
{
temptemp = template;
temptemp.ObjectSettings.ObjectCheckedOutByUserID = 0;
temptemp.ObjectSettings.ObjectCheckedOutVersionHistoryID = 0;
temptemp.ObjectSettings.SetValue("IsCheckedOut", false);
temptemp.ObjectSettings.SetValue("IsCheckedOutByUserID", 0);
PageTemplateInfoProvider.SetPageTemplateInfo(temptemp);
}
}
}
I created a page that's called "Check all items back in" and this code runs when I click on it. but I'm planning on putting this code into a scheduled task that's disabled, so that any dev can click run it to check stuff back in if the other dev is offline and not in the app.
Thoughts?
EDIT: switched does note equal null to does not equal 0 because it's an int not a bool. although this code seemed to work anyway with != null