component/admin/models/packagefile.php 1 location
|
@@ 437-448 (lines=12) @@
|
| 434 |
|
$return = JFile::write($path, $formattedXML); |
| 435 |
|
|
| 436 |
|
// Try to make the file unwriteable. |
| 437 |
|
if (!$ftp['enabled'] && JPath::isOwner($path) && !JPath::setPermissions($path, '0444')) |
| 438 |
|
{ |
| 439 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_PACKAGE_UNWRITABLE', $path)); |
| 440 |
|
|
| 441 |
|
return false; |
| 442 |
|
} |
| 443 |
|
elseif (!$return) |
| 444 |
|
{ |
| 445 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_PACKAGE_FILESAVE', $path)); |
| 446 |
|
|
| 447 |
|
return false; |
| 448 |
|
} |
| 449 |
|
} |
| 450 |
|
|
| 451 |
|
/** @TODO: Check ftp code |
component/admin/models/language.php 1 location
|
@@ 421-435 (lines=15) @@
|
| 418 |
|
$fileSavePermission = $params->get('filesavepermission', '0444'); |
| 419 |
|
|
| 420 |
|
// Try to make the template file unwriteable. |
| 421 |
|
if (!$ftp['enabled'] && JPath::isOwner($path) && !JPath::setPermissions($path, $fileSavePermission)) |
| 422 |
|
{ |
| 423 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_LANGUAGE_UNWRITABLE', $path)); |
| 424 |
|
|
| 425 |
|
return false; |
| 426 |
|
} |
| 427 |
|
else |
| 428 |
|
{ |
| 429 |
|
if (!$return) |
| 430 |
|
{ |
| 431 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_LANGUAGE_FILESAVE', $path)); |
| 432 |
|
|
| 433 |
|
return false; |
| 434 |
|
} |
| 435 |
|
} |
| 436 |
|
|
| 437 |
|
$id = LocaliseHelper::getFileId($path); |
| 438 |
|
|
component/admin/models/package.php 1 location
|
@@ 447-458 (lines=12) @@
|
| 444 |
|
$return = JFile::write($path, $formattedXML); |
| 445 |
|
|
| 446 |
|
// Try to make the file unwriteable. |
| 447 |
|
if (!$ftp['enabled'] && JPath::isOwner($path) && !JPath::setPermissions($path, '0444')) |
| 448 |
|
{ |
| 449 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_PACKAGE_UNWRITABLE', $path)); |
| 450 |
|
|
| 451 |
|
return false; |
| 452 |
|
} |
| 453 |
|
elseif (!$return) |
| 454 |
|
{ |
| 455 |
|
$this->setError(JText::sprintf('COM_LOCALISE_ERROR_PACKAGE_FILESAVE', $path)); |
| 456 |
|
|
| 457 |
|
return false; |
| 458 |
|
} |
| 459 |
|
} |
| 460 |
|
|
| 461 |
|
// Save the title and the description in the language file |