"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/web/lib/reg-task/taskqueue.class.php" between
fogproject-1.5.7.tar.gz and fogproject-1.5.8.tar.gz

About: FOG is a Linux-based network computer cloning solution for Windows, Mac OSX and various Linux distributions that ties together a few open-source tools with a PHP-based web interface. FOG doesn’t use any boot disks, or CDs; everything is done via TFTP and PXE.

taskqueue.class.php  (fogproject-1.5.7):taskqueue.class.php  (fogproject-1.5.8)
skipping to change at line 42 skipping to change at line 42
try { try {
self::randWait(); self::randWait();
$this->Task $this->Task
->set('stateID', self::getCheckedInState()) ->set('stateID', self::getCheckedInState())
->set('checkinTime', self::formatTime('now', 'Y-m-d H:i:s')) ->set('checkinTime', self::formatTime('now', 'Y-m-d H:i:s'))
->save(); ->save();
if (!$this->Task->save()) { if (!$this->Task->save()) {
throw new Exception(_('Failed to update task')); throw new Exception(_('Failed to update task'));
} }
if ($this->imagingTask) { if ($this->imagingTask) {
$this->Task
->getImage()->set('size', '')
->save();
if ($this->Task->isMulticast()) { if ($this->Task->isMulticast()) {
$msID = @min( $msID = @min(
self::getSubObjectIDs( self::getSubObjectIDs(
'MulticastSessionAssociation', 'MulticastSessionAssociation',
array( array(
'taskID' => $this->Task->get('id') 'taskID' => $this->Task->get('id')
), ),
'msID' 'msID'
) )
); );
skipping to change at line 68 skipping to change at line 65
); );
if (!$MulticastSession->isValid()) { if (!$MulticastSession->isValid()) {
throw new Exception(_('Invalid Multicast Session')); throw new Exception(_('Invalid Multicast Session'));
} }
if ($MulticastSession->get('clients') < 0) { if ($MulticastSession->get('clients') < 0) {
$clients = 1; $clients = 1;
} else { } else {
$clients = $MulticastSession->get('clients') + 1; $clients = $MulticastSession->get('clients') + 1;
} }
$MulticastSession $MulticastSession
->set('clients', $clients) ->set('clients', $clients);
->set('stateID', self::getProgressState());
if (!$MulticastSession->save()) { if (!$MulticastSession->save()) {
throw new Exception(_('Failed to update Session')); throw new Exception(_('Failed to update Session'));
} }
if (self::$Host->isValid()) { if (self::$Host->isValid()) {
self::$Host self::$Host
->set( ->set(
'imageID', 'imageID',
$MulticastSession->get('image') $MulticastSession->get('image')
); );
} }
$this->StorageNode = self::nodeFail(
self::getClass('StorageNode', $this->Task->get('storagen
odeID')),
self::$Host->get('id')
);
if ($MulticastSession->get('stateID') == 1) {
$msg = sprintf(
'%s, %s %d %s.',
_('No open slots'),
_('There are'),
$inFront,
_('before me')
);
throw new Exception($msg);
}
} elseif ($this->Task->isForced()) { } elseif ($this->Task->isForced()) {
self::$HookManager->processEvent( self::$HookManager->processEvent(
'TASK_GROUP', 'TASK_GROUP',
array( array(
'StorageGroup' => &$this->StorageGroup, 'StorageGroup' => &$this->StorageGroup,
'Host' => &self::$Host 'Host' => &self::$Host
) )
); );
$this->StorageNode = null; $this->StorageNode = null;
self::$HookManager->processEvent( self::$HookManager->processEvent(
skipping to change at line 268 skipping to change at line 279
"From: %s\r\nX-Mailer: PHP/%s", "From: %s\r\nX-Mailer: PHP/%s",
$fromEmail, $fromEmail,
phpversion() phpversion()
); );
$engineer = ucwords( $engineer = ucwords(
$this->Task->get('createdBy') $this->Task->get('createdBy')
); );
$primaryUser = ucwords( $primaryUser = ucwords(
self::$Host->get('inventory')->get('primaryUser') self::$Host->get('inventory')->get('primaryUser')
); );
$replaceUser = '#\$\{user-name\}#';
$emailAddress = preg_replace(
$replaceUser,
lcfirst($engineer),
$emailAddress
);
$emailAddress = preg_replace(
$reg,
$nodeName,
$emailAddress
);
$Inventory = self::$Host->get('inventory'); $Inventory = self::$Host->get('inventory');
$mac = self::$Host->get('mac')->__toString(); $mac = self::$Host->get('mac')->__toString();
$ImageName = $this->Task->getImage()->get('name'); $ImageName = $this->Task->getImage()->get('name');
$Snapins = implode(',', (array)$SnapinNames); $Snapins = implode(',', (array)$SnapinNames);
$email = array( $email = array(
sprintf("%s:-\n", _('Machine Details')) => '', sprintf("%s:-\n", _('Machine Details')) => '',
sprintf("\n%s: ", _('Host Name')) => self::$Host->get('name'), sprintf("\n%s: ", _('Host Name')) => self::$Host->get('name'),
sprintf("\n%s: ", _('Computer Model')) => $Inventory->get('sysproduc t'), sprintf("\n%s: ", _('Computer Model')) => $Inventory->get('sysproduc t'),
sprintf("\n%s: ", _('Serial Number')) => $Inventory->get('sysserial' ), sprintf("\n%s: ", _('Serial Number')) => $Inventory->get('sysserial' ),
sprintf("\n%s: ", _('MAC Address')) => $mac, sprintf("\n%s: ", _('MAC Address')) => $mac,
 End of changes. 4 change blocks. 
5 lines changed or deleted 28 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)