Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/data/
/php/conf/localConf.ini
/php/conf/local.*.ini
3 changes: 1 addition & 2 deletions error_type.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
session_start();
error_reporting(E_ALL);

require_once "./php/AccountManager.php";
require_once "./php/ToolsError.php";
require_once __DIR__.'/php/loader.php';

$am = AccountManager::getInstance();
$am->isLogged();
Expand Down
12 changes: 3 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

error_reporting(E_ALL);
session_start();

require_once './php/html.templates.php';
require_once __DIR__.'/php/loader.php';
require_once __DIR__.'/php/html.templates.php';

// Perm link management
if (isset($_REQUEST['perm'])) {
Expand All @@ -11,8 +12,6 @@

if( substr($perm, -4) == '.php' )
{
require_once dirname(__FILE__) . '/php/ProjectManager.php';
require_once dirname(__FILE__) . '/php/RepositoryFetcher.php';

$_project = $_REQUEST['project'];

Expand Down Expand Up @@ -43,8 +42,6 @@
$patch = trim($_REQUEST['patch'], '/ ');
$_project = $_REQUEST['project'];

require_once dirname(__FILE__) . '/php/ProjectManager.php';

// Set the project
ProjectManager::getInstance()->setProject($_project);

Expand All @@ -59,9 +56,6 @@
$patchID = trim($_REQUEST['patchID'], '/ ');
$_project = $_REQUEST['project'];

require_once dirname(__FILE__) . '/php/ProjectManager.php';
require_once dirname(__FILE__) . '/php/RepositoryManager.php';

// Set the project
ProjectManager::getInstance()->setProject($_project);

Expand Down
8 changes: 4 additions & 4 deletions install/doc-editor.sql
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ CREATE TABLE IF NOT EXISTS `files` (
`xmlid` varchar(255) DEFAULT NULL,
`path` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`revision` int(11) unsigned DEFAULT NULL,
`en_revision` int(11) unsigned DEFAULT NULL,
`revision` VARCHAR(255) DEFAULT NULL,
`en_revision` VARCHAR(255) DEFAULT NULL,
`reviewed` varchar(20) DEFAULT NULL,
`reviewed_maintainer` text,
`size` int(11) unsigned DEFAULT NULL,
Expand Down Expand Up @@ -202,8 +202,8 @@ CREATE TABLE IF NOT EXISTS `work` (
`lang` varchar(10) NOT NULL,
`path` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`revision` int(11) NOT NULL,
`en_revision` int(11) NOT NULL,
`revision` VARCHAR(255) NOT NULL,
`en_revision` VARCHAR(255) NOT NULL,
`reviewed` varchar(50) NOT NULL,
`maintainer` varchar(255) NOT NULL,
`reviewed_maintainer` varchar(255) NOT NULL,
Expand Down
11 changes: 6 additions & 5 deletions install/firstRun.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
error_reporting(E_ALL);
set_time_limit(0);

require_once '../php/html.templates.php';
require_once '../php/ProjectManager.php';
require_once '../php/RepositoryManager.php';
require_once '../php/TranslationStatistic.php';
require_once '../php/TranslatorStatistic.php';

chdir(dirname(__FILE__));

require_once __DIR__.'/../php/loader.php';
require_once __DIR__.'/../php/html.templates.php';


$isCLI = (PHP_SAPI == 'cli');

Expand Down
5 changes: 1 addition & 4 deletions install/migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
error_reporting(E_ALL);
set_time_limit(0);

require_once '../php/ProjectManager.php';
require_once '../php/DBConnection.php';
require_once '../php/RepositoryManager.php';
require_once '../php/AccountManager.php';
require_once __DIR__.'/../php/loader.php';

$am = AccountManager::getInstance();
$rm = RepositoryManager::getInstance();
Expand Down
4 changes: 0 additions & 4 deletions js/locale/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,6 @@ var i18n = new Array();
i18n["check in progress..."] = "جاري الفحص...";


// In file: ../../js/ui/task/UpdateSingleFolderTask.js
i18n["Please, wait until update this folder..."] = "يرجى الانتظار حتى يتم تحديث المجلد...";


// In file: ../../js/ui/task/SaveTransFileTask.js
i18n["Saving data..."] = "حفظ البيانات...";
i18n["Document saved"] = "تم حفظ الوثيقة";
Expand Down
2 changes: 0 additions & 2 deletions js/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,6 @@ var i18n = new Array();
i18n["Retrying in {0} second(s)."] = "Nouvelle tentative de connexion dans {0} seconde(s).";


// In file: ../../js/ui/task/UpdateSingleFolderTask.js
i18n["Please, wait until update this folder..."] = "Merci de patienter pendant la mise à jour de ce dossier...";


// In file: ../../js/ui/task/SaveTransFileTask.js
Expand Down
135 changes: 0 additions & 135 deletions js/main-all-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -11806,130 +11806,6 @@ ui.task.UpdateConfTask = function(config)
}
}
});
};Ext.namespace('ui','ui.task','ui.task._UpdateSingleFolderTask');

ui.task._UpdateSingleFolderTask.getUpdateFolderResponse = function(node)
{
XHR({
params : {
task: 'getUpdateFolderResponse'
},
success : function(r)
{
var o = Ext.util.JSON.decode(r.responseText);
ui.task._UpdateSingleFolderTask.afterUpdate(o, node);
}
});
}

ui.task._UpdateSingleFolderTask.poll = new Ext.util.DelayedTask(function()
{
var node = arguments[0],
u = node.attributes.id.split('/'),
FirstFolder, t = new Array();

u.shift();
FirstFolder = u[0];

t.push(node);

XHR({
params : {
task : 'checkLockFile',
lockFile : 'project_' + PhDOE.project + '_' + FirstFolder + '_lock_update_folder'
},
success : function()
{
ui.task._UpdateSingleFolderTask.poll.delay(5000, null, this, t);
},
failure : function(response)
{
var o = Ext.util.JSON.decode(response.responseText);

if (o && o.success === false) {
new ui.task._UpdateSingleFolderTask.getUpdateFolderResponse(node);

} else {
ui.task._UpdateSingleFolderTask.poll.delay(5000, null, this, t);
}
}
});
});

ui.task._UpdateSingleFolderTask.afterUpdate = function(o, node)
{
Ext.getBody().unmask();

// Re-enable TaskPing
ui.task.PingTask.getInstance().delay(30000);

// TODO: we must handle the response here
var r = Ext.util.JSON.decode(o.result);

// We reload and highlight the modified node
node.reload(function() {

Ext.iterate(r.newFiles, function(prop, val){
node.findChild('text', prop).getUI().addClass('treeFileUpdated');
});

}, this);

// Reload all store
PhDOE.reloadAllStore();

};

ui.task._UpdateSingleFolderTask.update = function(node)
{
var t = new Array();
t.push(node);

Ext.getBody().mask(
'<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' +
_('Please, wait until update this folder...')
);

// We need to stop ping test during this process
ui.task.PingTask.getInstance().cancel();

XHR({
params : {
task : 'updateFolder',
path : node.id
},
success : function(r)
{
var o = Ext.util.JSON.decode(r.responseText);
ui.task._UpdateSingleFolderTask.afterUpdate(o, node);
},
failure : function(r)
{
var o = Ext.util.JSON.decode(r.responseText);

if (o && o.success === false) {
// Re-enable TaskPing
ui.task.PingTask.getInstance().delay(30000);
Ext.getBody().unmask();
PhDOE.winForbidden();
} else {
// take over 30sec (max Keep-Alive time)
// poll every XX secondes if the update is finish
ui.task._UpdateSingleFolderTask.poll.delay(5000, null, this, t);
}
}
});
};

ui.task.UpdateSingleFolderTask = function(node)
{
// If the user is anonymous, we don't update anything
if (PhDOE.user.isAnonymous) {
Ext.getCmp('winVCSCommit').close();
PhDOE.winForbidden();
return;
}
ui.task._UpdateSingleFolderTask.update(node);
};Ext.namespace('ui','ui.task','ui.task._VCSCommitTask');

ui.task._VCSCommitTask.getCommitResponse = function()
Expand Down Expand Up @@ -22397,17 +22273,6 @@ Ext.extend(ui.cmp._RepositoryTree.menu.folder, Ext.menu.Menu, {
}
}
}, '-', {
text: _('Update this folder'),
iconCls: 'iconFilesNeedUpdate',
scope: this,
handler: function(){
// We start by expand this node.
this.node.expand();

//... and fire the update processus
new ui.task.UpdateSingleFolderTask(this.node);
}
}, {
text: _('Add a new folder'),
iconCls: 'iconFolderNew',
hidden: (this.node.id === '/' ||
Expand Down
2 changes: 1 addition & 1 deletion js/main-all.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions js/ui/cmp/RepositoryTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,6 @@ Ext.extend(ui.cmp._RepositoryTree.menu.folder, Ext.menu.Menu, {
}
}
}, '-', {
text: _('Update this folder'),
iconCls: 'iconFilesNeedUpdate',
scope: this,
handler: function(){
// We start by expand this node.
this.node.expand();

//... and fire the update processus
new ui.task.UpdateSingleFolderTask(this.node);
}
}, {
text: _('Add a new folder'),
iconCls: 'iconFolderNew',
hidden: (this.node.id === '/' ||
Expand Down
Loading