mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Change files_versions namespace to OCA\Files_Versions
This commit is contained in:
parent
69fd3f42e5
commit
148e4facfa
6 changed files with 11 additions and 11 deletions
|
|
@ -5,7 +5,7 @@ $userDirectory = "/".OCP\USER::getUser()."/files";
|
|||
$source = $_GET['source'];
|
||||
|
||||
$count = 5; //show the newest revisions
|
||||
if( ($versions = OCA_Versions\Storage::getVersions( $source, $count)) ) {
|
||||
if( ($versions = OCA\Files_Versions\Storage::getVersions( $source, $count)) ) {
|
||||
|
||||
$versionsFormatted = array();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ $userDirectory = "/".OCP\USER::getUser()."/files";
|
|||
$file = $_GET['file'];
|
||||
$revision=(int)$_GET['revision'];
|
||||
|
||||
if(OCA_Versions\Storage::rollback( $file, $revision )) {
|
||||
if(OCA\Files_Versions\Storage::rollback( $file, $revision )) {
|
||||
OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file )));
|
||||
}else{
|
||||
OCP\JSON::error(array("data" => array( "message" => "Could not revert:" . $file )));
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
//require_once 'files_versions/versions.php';
|
||||
OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/versions.php';
|
||||
OC::$CLASSPATH['OCA_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php';
|
||||
OC::$CLASSPATH['OCA\Files_Versions\Storage'] = 'apps/files_versions/lib/versions.php';
|
||||
OC::$CLASSPATH['OCA\Files_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php';
|
||||
|
||||
OCP\App::registerAdmin('files_versions', 'settings');
|
||||
OCP\App::registerPersonal('files_versions', 'settings-personal');
|
||||
|
|
@ -10,7 +10,7 @@ OCP\App::registerPersonal('files_versions', 'settings-personal');
|
|||
OCP\Util::addscript('files_versions', 'versions');
|
||||
|
||||
// Listen to write signals
|
||||
OCP\Util::connectHook('OC_Filesystem', 'write', "OCA_Versions\Hooks", "write_hook");
|
||||
OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "write_hook");
|
||||
// Listen to delete and rename signals
|
||||
OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA_Versions\Hooks", "remove_hook");
|
||||
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA_Versions\Hooks", "rename_hook");
|
||||
OCP\Util::connectHook('OC_Filesystem', 'post-delete', "OCA\Files_Versions\Hooks", "remove_hook");
|
||||
OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook");
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ if ( isset( $_GET['path'] ) ) {
|
|||
|
||||
$path = $_GET['path'];
|
||||
$tmpl->assign( 'path', $path );
|
||||
$versions = new OCA_Versions\Storage();
|
||||
$versions = new OCA\Files_Versions\Storage();
|
||||
|
||||
// roll back to old version if button clicked
|
||||
if( isset( $_GET['revert'] ) ) {
|
||||
|
|
@ -52,7 +52,7 @@ if ( isset( $_GET['path'] ) ) {
|
|||
|
||||
// show the history only if there is something to show
|
||||
$count = 999; //show the newest revisions
|
||||
if( ($versions = OCA_Versions\Storage::getVersions( $path, $count)) ) {
|
||||
if( ($versions = OCA\Files_Versions\Storage::getVersions( $path, $count)) ) {
|
||||
|
||||
$tmpl->assign( 'versions', array_reverse( $versions ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
* This class contains all hooks.
|
||||
*/
|
||||
|
||||
namespace OCA_Versions;
|
||||
namespace OCA\Files_Versions;
|
||||
|
||||
class Hooks {
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* A class to handle the versioning of files.
|
||||
*/
|
||||
|
||||
namespace OCA_Versions;
|
||||
namespace OCA\Files_Versions;
|
||||
|
||||
class Storage {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue