diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php index 52a85a41..591b91fd 100644 --- a/lib/Data/AbstractData.php +++ b/lib/Data/AbstractData.php @@ -15,7 +15,7 @@ namespace PrivateBin\Data; /** * AbstractData * - * Abstract model for PrivateBin data access, implemented as a singleton. + * Abstract model for data access, implemented as a singleton. */ abstract class AbstractData { @@ -40,7 +40,7 @@ abstract class AbstractData /** * Enforce singleton, disable constructor * - * Instantiate using {@link getInstance()}, privatebin is a singleton object. + * Instantiate using {@link getInstance()}, this object implements the singleton pattern. * * @access protected */ @@ -51,7 +51,7 @@ abstract class AbstractData /** * Enforce singleton, disable cloning * - * Instantiate using {@link getInstance()}, privatebin is a singleton object. + * Instantiate using {@link getInstance()}, this object implements the singleton pattern. * * @access private */ diff --git a/lib/Data/Database.php b/lib/Data/Database.php index 1d1327fd..0c66d330 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -234,7 +234,7 @@ class Database extends AbstractData self::$_cache[$pasteid] = false; try { - $paste = self::_select( + $paste = self::_select( 'SELECT * FROM ' . self::_sanitizeIdentifier('paste') . ' WHERE dataid = ?', array($pasteid), true ); diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index 9b8e7ba5..25cca459 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -23,12 +23,19 @@ use PrivateBin\Json; class Filesystem extends AbstractData { /** - * first line in file, to protect its contents + * first line in paste or comment files, to protect their contents from browsing exposed data directories * * @const string */ const PROTECTION_LINE = '_info = $info; $this->_connection = $connection; $timeCreated = new Datetime(); - $this->_info['metadata']['timeCreated'] = $timeCreated->format(GoogleCloudStorage::DATETIME_FORMAT); + $this->_info['metadata']['timeCreated'] = $timeCreated->format('Y-m-d\TH:i:s.u\Z'); } public function acl()