Trim trailing whitespace

This commit is contained in:
Peter Kokot
2018-10-02 02:29:56 +02:00
parent 9e610e6d7e
commit 67ed29f21f
48 changed files with 1133 additions and 1133 deletions

View File

@@ -139,7 +139,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an

2
README
View File

@@ -1,7 +1,7 @@
=== Installation instructions ===
== Requirements ==
* PHP 5.2.1+
* PHP 5.2.1+
* The MySQLi extension
* The cURL extension
* Shell exec privileges

View File

@@ -1,12 +1,12 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title></title>
<style type="text/css" media="all">
.msg {
font: normal 12px arial, tahoma, helvetica, sans-serif;
background-color: #EEE;
@@ -16,25 +16,25 @@
text-align: center;
border-radius: 15px;
}
</style>
</head>
<body>
<?php
if( isset($_GET['msg']) ) {
$msg = $_GET['msg'];
} else {
$msg = '';
$msg = '';
}
?>
<p class="msg"><?php echo htmlspecialchars($msg); ?></p>
</body>
</html>

200
index.php
View File

@@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/php/utility.php';
if (isset($_REQUEST['perm'])) {
$perm = trim($_REQUEST['perm'], '/ ');
if( substr($perm, -4) == '.php' )
{
require_once dirname(__FILE__) . '/php/ProjectManager.php';
@@ -50,11 +50,11 @@ if (isset($_REQUEST['perm'])) {
// Set the project
ProjectManager::getInstance()->setProject($_project);
$_patch = explode('/', $patch);
$fileName = $_patch[count($_patch)-1];
$filePath = substr($patch, 0, (strlen($patch)-strlen($fileName)));
$jsVar = "\n".'var directAccess = {"link":"patch", "lang":"en", "path":"'.htmlspecialchars($filePath).'", "name":"'.htmlspecialchars($fileName).'", "project":"'.htmlspecialchars($_project).'"},';
} else if (isset($_REQUEST['patchID'])) {
@@ -67,28 +67,28 @@ if (isset($_REQUEST['perm'])) {
// Set the project
ProjectManager::getInstance()->setProject($_project);
$patchInfo = RepositoryManager::getInstance()->getPatchInfo($patchID);
$jsVar = "\n".'var directAccess = {"link":"patchID", "lang":"en", "patchID":"'.htmlspecialchars($patchID).'", "patchName":"'.htmlspecialchars($patchInfo->name).'", "project":"'.htmlspecialchars($_project).'"},';
} else if (isset($_REQUEST['action'])) {
$_project = $_REQUEST['project'];
$_action = $_REQUEST['action'];
$_idDB = $_REQUEST['idDB'];
require_once dirname(__FILE__) . '/php/ProjectManager.php';
// Set the project
ProjectManager::getInstance()->setProject($_project);
$jsVar = "\n".'var directAccess = {
"project":"'.htmlspecialchars($_project).'",
"action": "'.htmlspecialchars($_action).'",
"idDB": "'.htmlspecialchars($_idDB).'"
},';
} else {
$jsVar = "\nvar directAccess = false,";
}
@@ -107,221 +107,221 @@ $jsVar .= " auth = {};\n";
if (!isset($_SESSION['userID']))
{
$Conf = Config::getInstance()->getConf();
// Init var
if( !isset($_SESSION['oauth']) ) $_SESSION['oauth'] = array();
/* instagram */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'instagram') {
$_SESSION['oauth']['identService'] = 'instagram';
$instagram = new Oauth_instagram($Conf['GLOBAL_CONFIGURATION']['oauth.instagram.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.instagram.clientSecret']);
$instagram->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'instagram' && isset($_GET['code']) ) {
$instagram = new Oauth_instagram($Conf['GLOBAL_CONFIGURATION']['oauth.instagram.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.instagram.clientSecret']);
$access_token = $instagram->RequestToken($_GET['code']);
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($access_token->user->id)."\",
auth.login = \"".htmlspecialchars($access_token->user->full_name)."\",
auth.serviceID = \"".htmlspecialchars($access_token->user->id)."\",
auth.login = \"".htmlspecialchars($access_token->user->full_name)."\",
auth.email = \"\";
";
}
/* Github */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'github') {
$_SESSION['oauth']['identService'] = 'github';
$git = new Oauth_github($Conf['GLOBAL_CONFIGURATION']['oauth.github.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.github.clientSecret']);
$git->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'github' && isset($_GET['code']) ) {
$git = new Oauth_github($Conf['GLOBAL_CONFIGURATION']['oauth.github.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.github.clientSecret']);
$access_token = $git->RequestToken($_GET['code']);
$user = $git->getUserInfo($access_token);
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($user->name)."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($user->name)."\",
auth.email = \"".htmlspecialchars($user->email)."\";
";
}
/* stackoverflow */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'stackoverflow') {
$_SESSION['oauth']['identService'] = 'stackoverflow';
$stack = new Oauth_stackoverflow($Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientSecret'], $Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientKey']);
$stack->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'stackoverflow' && isset($_GET['code']) ) {
$stack = new Oauth_stackoverflow($Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientSecret'], $Conf['GLOBAL_CONFIGURATION']['oauth.stackoverflow.clientKey']);
$access_token = $stack->RequestToken($_GET['code']);
$user = $stack->getUserInfo($access_token);
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($user->items[0]->user_id)."\",
auth.login = \"".htmlspecialchars(utf8_encode(html_entity_decode($user->items[0]->display_name)))."\",
auth.serviceID = \"".htmlspecialchars($user->items[0]->user_id)."\",
auth.login = \"".htmlspecialchars(utf8_encode(html_entity_decode($user->items[0]->display_name)))."\",
auth.email = \"\";
";
}
/* facebook */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'facebook') {
$_SESSION['oauth']['identService'] = 'facebook';
$facebook = new Oauth_facebook($Conf['GLOBAL_CONFIGURATION']['oauth.facebook.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.facebook.clientSecret']);
$facebook->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'facebook' && isset($_GET['code']) ) {
$facebook = new Oauth_facebook($Conf['GLOBAL_CONFIGURATION']['oauth.facebook.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.facebook.clientSecret']);
$access_token = $facebook->RequestToken($_GET['code']);
$user = $facebook->getUserInfo($access_token);
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($user->name)."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($user->name)."\",
auth.email = \"".htmlspecialchars($user->email)."\";
";
}
/* google */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'google') {
$_SESSION['oauth']['identService'] = 'google';
$google = new Oauth_google($Conf['GLOBAL_CONFIGURATION']['oauth.google.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.google.clientSecret']);
$google->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'google' && isset($_GET['code']) ) {
$google = new Oauth_google($Conf['GLOBAL_CONFIGURATION']['oauth.google.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.google.clientSecret']);
$access_token = $google->RequestToken($_GET['code']);
$user = $google->getUserInfo($access_token);
$displayName = ( trim($user->displayName) == "" ) ? $user->emails[0]->value : $user->displayName;
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($displayName)."\",
auth.serviceID = \"".htmlspecialchars($user->id)."\",
auth.login = \"".htmlspecialchars($displayName)."\",
auth.email = \"".htmlspecialchars($user->emails[0]->value)."\";
";
}
/* linkedin */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'linkedin') {
$_SESSION['oauth']['identService'] = 'linkedin';
$linkedin = new Oauth_linkedin($Conf['GLOBAL_CONFIGURATION']['oauth.linkedin.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.linkedin.clientSecret']);
$linkedin->RequestCode();
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'linkedin' && isset($_GET['code']) ) {
$linkedin = new Oauth_linkedin($Conf['GLOBAL_CONFIGURATION']['oauth.linkedin.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.linkedin.clientSecret']);
$access_token = $linkedin->RequestToken($_GET['code']);
$user = $linkedin->getUserInfo($access_token);
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars(md5($user['profil']))."\",
auth.login = \"".htmlspecialchars($user['profil'])."\",
auth.serviceID = \"".htmlspecialchars(md5($user['profil']))."\",
auth.login = \"".htmlspecialchars($user['profil'])."\",
auth.email = \"".htmlspecialchars($user['email'])."\";
";
}
/* twitter */
if( isset($_GET['oauth']) && $_GET['oauth'] == 'twitter') {
require_once dirname(__FILE__) . '/php/oauth/twitter/twitteroauth.php';
$_SESSION['oauth']['identService'] = 'twitter';
$connection = new TwitterOAuth($Conf['GLOBAL_CONFIGURATION']['oauth.twitter.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.twitter.clientSecret']);
$temporary_credentials = $connection->getRequestToken($Conf['GLOBAL_CONFIGURATION']['oauth.twitter.redirectURL']);
$redirect_url = $connection->getAuthorizeURL($temporary_credentials);
header('Location: ' . $redirect_url);
exit;
}
if( isset($_SESSION['oauth']['identService']) && $_SESSION['oauth']['identService'] == 'twitter' && isset($_GET['oauth_token']) ) {
require_once dirname(__FILE__) . '/php/oauth/twitter/twitteroauth.php';
$connection = new TwitterOAuth($Conf['GLOBAL_CONFIGURATION']['oauth.twitter.clientID'], $Conf['GLOBAL_CONFIGURATION']['oauth.twitter.clientSecret'], $_GET['oauth_token'],$_GET['oauth_verifier']);
$token_credentials = $connection->getAccessToken($_GET['oauth_verifier']);
$account = $connection->get('account/verify_credentials');
$jsVar .= "
auth.service = \"".$_SESSION['oauth']['identService']."\",
auth.serviceID = \"".htmlspecialchars($account->id_str)."\",
auth.login = \"".htmlspecialchars($account->name)."\",
auth.serviceID = \"".htmlspecialchars($account->id_str)."\",
auth.login = \"".htmlspecialchars($account->name)."\",
auth.email = \"\";
";
}
echo headerTemplate();
echo cssLoadTemplate('js/ExtJs/resources/css/ext-all.css');
echo cssLoadTemplate('themes/login-all.css');
echo jsCallTemplate($jsVar);
echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading Core API...";');
echo jsLoadTemplate('js/ExtJs/adapter/ext/ext-base.js');
echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading UI Components...";');
echo jsLoadTemplate('js/ExtJs/ext-all.js');

View File

@@ -27,7 +27,7 @@ while( list($key, $project) = each($availableProject) ) {
$project = $am->project;
// Get all modified files
$s = 'SELECT
*
FROM
@@ -45,7 +45,7 @@ while( list($key, $project) = each($availableProject) ) {
$destFolder = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'-new/'.$a['lang'].$a['path'];
$fromFolder = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'/'.$a['lang'].$a['path'];
echo 'Dest folder : '.$destFolder."\r\n";
echo 'From folder : '.$fromFolder."\r\n";

View File

@@ -161,7 +161,7 @@ class AccountManager
$this->isAnonymous = $_SESSION['isAnonymous'];
$this->haveKarma = $_SESSION['haveKarma'];
$this->email = $_SESSION['email'];
$this->authService = ( isset($_SESSION['authService']) ) ? $_SESSION['authService'] : false;
$this->authServiceID = ( isset($_SESSION['authServiceID']) ) ? $_SESSION['authServiceID'] : false;
@@ -203,74 +203,74 @@ class AccountManager
$this->authService = $authService;
$this->authServiceID = $authServiceID;
/*
* VCS AUTH SYSTEM
*
*/
if( $this->authService == 'VCS' ) {
/*
* ANONYMOUS VCS
*
*/
// Anonymous's user can logging into this app by providing this login/pass => anonymous/(empty) ou (empty)/(empty)
// The result is the same. $this->vcsLogin will be "anonymous" and $this->vcsPasswd, (empty)
if( ($vcsLogin == "anonymous" && $vcsPasswd == "")
|| ($vcsLogin == "" && $vcsPasswd == "") ) {
$this->isAnonymous = true;
$this->haveKarma = false;
// Even if the user provide an empty login, we force it to be 'anonymous'
$vcsLogin = 'anonymous';
$this->anonymousIdent = ( isset($_COOKIE['anonymousIdent']) ) ? $_COOKIE['anonymousIdent'] : uniqid('', true);
setcookie("anonymousIdent", $this->anonymousIdent, time() + 3600*24*365, "/"); // One year ;)
// Register var
$this->vcsLogin = $vcsLogin;
$this->vcsPasswd = '';
$this->vcsLang = $lang;
$this->email = $email;
// Check DB
$s = 'SELECT * FROM `users` WHERE `project` = "%s" AND `authService` = "VCS" AND `vcs_login` = "%s" AND `anonymousIdent` = "%s"';
$params = array($project, $this->vcsLogin, $this->anonymousIdent);
$r = $this->conn->query($s, $params);
if ($r->num_rows == 1) {
//This anonymous user exist into DB. We store his configuration into ...
$a = $r->fetch_object();
// ... object's property ...
$this->userConf = json_decode($a->conf);
$this->userID = $a->userID;
// ... and into the php's session (only specific var)
$_SESSION['userConf'] = $this->userConf;
// We update the email if this user have decided to change it.
$this->updateEmail();
} else {
// We register this new valid user
$userID = $this->register();
$this->userID = $userID;
// Store in session only specific var
$_SESSION['userConf'] = $this->defaultConf;
}
// Generic session var for VALID & ANONYMOUS VCS user
$_SESSION['userID'] = $this->userID;
$_SESSION['project'] = $this->project;
@@ -283,35 +283,35 @@ class AccountManager
$_SESSION['email'] = $this->email;
$_SESSION['authService'] = $this->authService;
$_SESSION['authServiceID'] = $this->authServiceID;
// We set up the CSRF token
$_SESSION['csrfToken'] = sha1(uniqid(rand(), true));
// Store some user info in cookies: we can use this to pre-fill the
// login page if the user's session expires.
setcookie("loginApp", 'anonymous', time() + 3600*24*365, "/"); // One year ;)
setcookie("email", $this->email, time() + 3600*24*365, "/");
setcookie("lang", $this->vcsLang, time() + 3600*24*365, "/");
// We construct the return's var for ExtJs
$return['state'] = true;
$return['msg'] = 'Welcome !';
return $return;
}
/*
* VALID VCS USER
*
*/
else {
$this->isAnonymous = false;
$this->anonymousIdent = '';
// If this app is installed into Php's server, we use the standad way to verify login/password
if( $_SERVER["SERVER_NAME"] == "doc.php.net" ) {
// We try to authenticate this user to master php server.
@@ -322,14 +322,14 @@ class AccountManager
$AuthReturn = VCSFactory::getInstance()->svnAuthenticate($vcsLogin, $vcsPasswd);
$return['authMethod'] = 'svnServer';
}
if( $AuthReturn !== true ) {
$return['state'] = false;
$return['msg'] = $AuthReturn;
return $return;
} else {
// Check the karma
$karma = $this->checkKarma($vcsLogin, $lang);
$this->haveKarma = ($karma === true);
@@ -339,40 +339,40 @@ class AccountManager
$this->vcsPasswd = $vcsPasswd;
$this->vcsLang = $lang;
$this->email = $email;
// Check DB
$s = 'SELECT * FROM `users` WHERE `project` = "%s" AND `authService` = "VCS" AND `vcs_login` = "%s"';
$params = array($project, $this->vcsLogin);
$r = $this->conn->query($s, $params);
if ($r->num_rows == 1) {
//This user exist into DB. We store his configuration into ...
$a = $r->fetch_object();
// ... object's property ...
$this->userConf = json_decode($a->conf);
$this->userID = $a->userID;
// ... and into the php's session (only specific var)
$_SESSION['userConf'] = $this->userConf;
// We update the email if this user have decided to change it.
$this->updateEmail();
} else {
// We register this new valid user
$userID = $this->register();
$this->userID = $userID;
// Store in session only specific var
$_SESSION['userConf'] = $this->defaultConf;
}
// Generic session var for VALID & ANONYMOUS VCS user
$_SESSION['userID'] = $this->userID;
$_SESSION['project'] = $this->project;
@@ -385,33 +385,33 @@ class AccountManager
$_SESSION['email'] = $this->email;
$_SESSION['authService'] = $this->authService;
$_SESSION['authServiceID'] = $this->authServiceID;
// We set up the CSRF token
$_SESSION['csrfToken'] = sha1(uniqid(rand(), true));
// Store some user info in cookies: we can use this to pre-fill the
// login page if the user's session expires.
setcookie("loginApp", utf8_encode($this->vcsLogin), time() + 3600*24*365, "/"); // One year ;)
setcookie("email", $this->email, time() + 3600*24*365, "/");
setcookie("lang", $this->vcsLang, time() + 3600*24*365, "/");
// We construct the return's var for ExtJs
$return['state'] = true;
$return['msg'] = 'Welcome !';
return $return;
}
}
}
/*
* EXTERNAL AUTH SYSTEM
*
*/
else if(
else if(
$this->authService == 'google' ||
$this->authService == 'facebook' ||
$this->authService == 'github' ||
@@ -419,51 +419,51 @@ class AccountManager
$this->authService == 'linkedin' ||
$this->authService == 'instagram' ||
$this->authService == 'twitter'
) {
$this->isAnonymous = true;
$this->haveKarma = false;
$this->anonymousIdent = $this->authService.'-'.$this->authServiceID;
// Register var
$this->vcsLogin = $vcsLogin;
$this->vcsPasswd = '';
$this->vcsLang = $lang;
$this->email = $email;
// Check DB
$s = 'SELECT * FROM `users` WHERE `project` = "%s" AND `authService` = "%s" AND `authServiceID` = "%s" AND `vcs_login` = "%s" AND `anonymousIdent` = "%s"';
$params = array($project, $this->authService, $this->authServiceID, $this->vcsLogin, $this->anonymousIdent);
$r = $this->conn->query($s, $params);
if ($r->num_rows == 1) {
//This anonymous user exist into DB. We store his configuration into ...
$a = $r->fetch_object();
// ... object's property ...
$this->userConf = json_decode($a->conf);
$this->userID = $a->userID;
// ... and into the php's session (only specific var)
$_SESSION['userConf'] = $this->userConf;
// We update the email if this user have decided to change it.
$this->updateEmail();
} else {
// We register this new valid user
$userID = $this->register();
$this->userID = $userID;
// Store in session only specific var
$_SESSION['userConf'] = $this->defaultConf;
}
// Generic session var for VALID & ANONYMOUS VCS user
$_SESSION['userID'] = $this->userID;
$_SESSION['project'] = $this->project;
@@ -476,35 +476,35 @@ class AccountManager
$_SESSION['email'] = $this->email;
$_SESSION['authService'] = $this->authService;
$_SESSION['authServiceID'] = $this->authServiceID;
// We set up the CSRF token
$_SESSION['csrfToken'] = sha1(uniqid(rand(), true));
// Store some user info in cookies: we can use this to pre-fill the
// login page if the user's session expires.
setcookie("loginApp", htmlentities($this->vcsLogin), time() + 3600*24*365, "/"); // One year ;)
setcookie("email", $this->email, time() + 3600*24*365, "/");
setcookie("lang", $this->vcsLang, time() + 3600*24*365, "/");
// We construct the return's var for ExtJs
$return['state'] = true;
$return['msg'] = 'Welcome !';
return $return;
} else {
$return['state'] = false;
$return['msg'] = 'Bad authService';
$return['authMethod'] = '-';
return $return;
}
}
public function isGlobalAdmin()
{
// Anonymous can't be a globalAdmin
if( $this->isAnonymous ) return false;
$admin = explode(",", $this->appConf[$this->project]['project.globaladmin']);
return ( in_array($this->vcsLogin, $admin) ) ? true : false;
}
@@ -513,19 +513,19 @@ class AccountManager
{
// Anonymous can't be a langAdmin
if( $this->isAnonymous ) return false;
if( !isset($this->appConf[$this->project]['project.langadmin.'.$this->vcsLang]) ) {
return false;
}
$admin = explode(",", $this->appConf[$this->project]['project.langadmin.'.$this->vcsLang]);
return ( in_array($this->vcsLogin, $admin) ) ? true : false;
}
public function isAdmin($lang=false)
{
if( $this->isAnonymous ) return false;
// If lang is true, this method must return true if current user is either a global admin, or a lang admin
if( $lang ) {
return ( $this->isGlobalAdmin() || $this->isLangAdmin() ) ? true : false;
@@ -533,26 +533,26 @@ class AccountManager
// If lang is false, this method must return true if current user is ONLY a global admin
return ( $this->isGlobalAdmin() ) ? true : false;
}
return false;
}
public function updateEmail()
{
$s = 'UPDATE `users` SET `email`="%s" WHERE `userID`=%d';
$params = array($this->email, $this->userID);
$this->conn->query($s, $params);
}
public function getVCSUsers()
{
$s = 'SELECT `userID`, `vcs_login`, `anonymousIdent`, `authService` FROM `users` WHERE project="%s" AND vcs_login != "anonymous" ORDER BY authService, vcs_login';
$params = array($this->project);
$r = $this->conn->query($s, $params);
$result = array();
$i=0;
while( $a = $r->fetch_object() ) {
$result[$i]['userID'] = $a->userID;
$result[$i]['userName'] = $a->vcs_login;
@@ -561,7 +561,7 @@ class AccountManager
}
return $result;
}
public function setFileOwner($fileIdDB, $newOwnerID)
{
// We update the file
@@ -570,7 +570,7 @@ class AccountManager
$this->conn->query($s, $params);
}
/**
* Get user's details
*
@@ -621,7 +621,7 @@ class AccountManager
}
}
/**
* Get the email for a user
@@ -648,7 +648,7 @@ class AccountManager
}
}
/**
* Register a new valid user on the application.
*
@@ -685,11 +685,11 @@ class AccountManager
}
$this->userConf->{$module}->{$itemName} = ( is_numeric($value) ) ? (int) $value : $value;
// In session
unset($_SESSION['userConf']->{$module}->{$itemName});
$_SESSION['userConf']->{$module}->{$itemName} = ( is_numeric($value) ) ? (int) $value : $value;
// In DB
if( $this->isAnonymous ) {
$s = 'UPDATE `users` SET `conf`="%s" WHERE `vcs_login`="anonymous" AND `anonymousIdent`="%s"';
@@ -738,7 +738,7 @@ class AccountManager
if( $fromType == 'user' ) {
$from = $this->vcsLogin."@php.net";
}
$headers = 'From: '.$from . "\r\n" .
'X-Mailer: Php Docbook Online Editor' ."\r\n" .
'Content-Type: text/plain; charset="utf-8"'."\n";

View File

@@ -5,14 +5,14 @@
*
*/
class BugReader {
/**
* The lang
*
* @var string
*/
private $lang;
/**
* Initialise
*
@@ -22,10 +22,10 @@ class BugReader {
{
$this->lang = $lang;
}
/**
* Get all open bugs for this LANG.
*
*
* @return An indexed array (id, title, description, link, pubDate) readable by ExtJs
*/
function getOpenBugs()
@@ -83,7 +83,7 @@ class BugReader {
$result[$i]['xmlID'] = $match[1];
}
}
$i++;
}
@@ -91,5 +91,5 @@ class BugReader {
return $result;
}
}

View File

@@ -51,13 +51,13 @@ class Config
// First, we load the configuration file for this project
$this->conf[strtoupper($t[1])] = parse_ini_file($p.$entry);
// Second, we try to load a local configuration file for this project
// This file must have this name, for example, PHP project : local.project.php.ini
if( is_file($p.'local.'.$entry) ) {
$this->conf[strtoupper($t[1])] = array_merge( $this->conf[strtoupper($t[1])], parse_ini_file($p.'local.'.$entry) );
}
}
}
$d->close();
@@ -76,7 +76,7 @@ class Config
$new_val = $v;
for( $i=0; $i < count($match[0]); $i++ ) {
$new_val = str_replace( $match[0][$i],
$new_val = str_replace( $match[0][$i],
$this->conf[$match[1][$i]][$match[2][$i]],
$new_val
);

View File

@@ -1,7 +1,7 @@
<?php
/*
* A class to manage a dictionary
*
*
*/
require_once dirname(__FILE__) . '/DBConnection.php';

View File

@@ -1,7 +1,7 @@
<?php
/*
*
*
/*
*
*
*/
class EntitiesAcronymsFetcher {
@@ -45,7 +45,7 @@ class EntitiesAcronymsFetcher {
if( empty($file) || !$content = file_get_contents($file) ) {
continue;
}
preg_match_all('/<varlistentry>(.*?)<term>(.*?)<\/term>(.*?)<simpara>(.*?)<\/simpara>(.*?)<\/varlistentry>/s', $content, $match);
$from = explode('/',$file);
@@ -72,14 +72,14 @@ class EntitiesAcronymsFetcher {
$files = explode("|", $appConf[$project]['entities.usedbyeditor.location']);
$this->entities = array();
$count = 0;
while( list($k, $file) = each($files))
{
{
if( empty($file) || !$content = file_get_contents($file) ) {
continue;
}
preg_match_all('/<!ENTITY\s(.*?)\s(\'|")(.*?)(\2)>/s', $content, $match);
$from = explode('/',$file);

View File

@@ -98,11 +98,11 @@ class ExtJsController
$value['user'] = $am->vcsLogin;
$value['lang'] = $lang;
$value['authService'] = $am->authService;
RepositoryManager::getInstance()->setStaticValue('info', 'login', json_encode($value), true);
return JsonResponseBuilder::success();
} elseif ($response['state'] === false) {
// This user is unknow from this server
@@ -110,7 +110,7 @@ class ExtJsController
'msg' => $response['msg'],
'authMethod' => $response['authMethod']
));
} else {
return JsonResponseBuilder::failure();
}
@@ -176,7 +176,7 @@ class ExtJsController
$filePath = "/".implode("/", $t).$newFolderName;
$file = new File($fileLang, $filePath);
// We test if this folder not already exist
if( $file->exist() )
{
@@ -324,7 +324,7 @@ class ExtJsController
if ( !$am->isGlobalAdmin() ) {
return JsonResponseBuilder::failure(
array(
'type' => 'action_only_global_admin'
'type' => 'action_only_global_admin'
)
);
}
@@ -399,22 +399,22 @@ class ExtJsController
// TODO : find a way to detect modification into Work & patches modules
//$data['NbPendingCommit'] = $rf->getNbPendingCommit();
//$data['NbPendingPatch'] = $rf->getNbPendingPatch();
$data['topicInfo'] = $rf->getStaticValue('main_topic', '');
$data['lastInfoDate'] = $rf->getLastInfoDate();
// We get the update_data lock file
$lockFile = new LockFile('project_' . $am->project . '_lock_update_data');
if( $lockFile->isLocked() ) {
$updateData = $lockFile->readLock();
} else {
$updateData = false;
}
$response = !isset($_SESSION['userID']) ? 'false' : 'pong';
return JsonResponseBuilder::success(
@@ -785,13 +785,13 @@ class ExtJsController
$str = str_replace("\n", "[@]", $str);
$bing = new MicrosoftTranslator("0Iwzej5BJeHK/2nvHh7/uJyHLhmnyFJEAuOYOfJ1QLg=");
$bing->translate('en', $lang, $str);
$bing->response->jsonResponse;
preg_match("/<string xmlns=\"(.[^\"]*)\">(.*)?<\/string>/e", $bing->response->translation, $match);
// Replace new line mark
$translation = str_replace("[@]", "<br>", $match[2]);
@@ -817,40 +817,40 @@ class ExtJsController
public function getURLToOriginalManualPage()
{
$am = AccountManager::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
$fileFullPath = $this->getRequestVariable('fileFullPath');
$t = explode("/", $fileFullPath);
$FileLang = array_shift($t);
$FilePath = implode('/', $t);
$file = new File($FileLang, $FilePath);
$info = $file->getInfo();
// Extract xmlId and take the first one
$xmlID = '';
$tmp = explode('|', $info['xmlid']);
$xmlID = $tmp[0];
// Build the URL for the original Documentation
$url = 'http://php.net/manual/'.$FileLang.'/'.$xmlID.'.php';
if( trim($xmlID) == '' || $FileLang == 'doc-base' ) {
$url = '404';
}
return JsonResponseBuilder::success(
array(
'url' => $url
)
);
}
/**
* Get information of a file by his xmlID
*/
@@ -888,11 +888,11 @@ class ExtJsController
public function getFile()
{
$am = AccountManager::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
$appConf = $am->appConf;
$project = $am->project;
@@ -921,16 +921,16 @@ class ExtJsController
$skeleton = str_replace('..', '', $skeleton);
// $skeleton is the ful path of the file
// It must start with this : $appConf[$project]['skeletons.folder']
if( !isset($appConf[$project]['skeletons.folder']) ) {
return false;
}
if( substr($skeleton, 0, strlen($appConf[$project]['skeletons.folder']) ) != $appConf[$project]['skeletons.folder'] ) {
return false;
}
$return['content'] = ( $skeleton == '-' ) ? '' : file_get_contents($skeleton);
$return['warn_tab'] = false;
$return['warn_encoding'] = false;
@@ -988,7 +988,7 @@ class ExtJsController
{
$return['warn_tab'] = false ;
}
// We must check if this file isn't own by the current user
$return['fileModified'] = $file->isModified();
@@ -1080,7 +1080,7 @@ class ExtJsController
}
/**
* Save a file. The new file have an extension like ".new", and is saved in the same folder as the original.
*
*
* @HERE : The new file no more have an extension '.new'. Now, it's saved into 'module-name-'new folder, with the same folder's hierarchie
*
*
@@ -1089,7 +1089,7 @@ class ExtJsController
{
$am = AccountManager::getInstance();
$tx = new ToolsXmllint();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
@@ -1122,11 +1122,11 @@ class ExtJsController
// Replace &nbsp; by space
$fileContent = str_replace("&nbsp;", "", $fileContent);
// We check the Xml consistence only for .xml file
if( substr($fileName, -3) == 'xml' ) {
$xmlError = $tx->checkForError($fileContent);
if( $xmlError != 'no_error' ) {
return JsonResponseBuilder::failure(
array(
@@ -1135,15 +1135,15 @@ class ExtJsController
);
}
}
// Get file object
$file = new File($fileLang, $filePath.$fileName);
// Rules to allow this file to be saved or not.
if( $infoModified = $file->isModified() ) {
$infoModified = json_decode($infoModified);
// If the user who have modified this file isn't the current one
if( $am->userID == $infoModified->userID ) {
// We can modify it, it's mine ;)
@@ -1153,7 +1153,7 @@ class ExtJsController
// The current user can modify it
} else {
// We must trow an error. We can't modify it.
return JsonResponseBuilder::failure(
array(
'type' => 'save_you_cant_modify_it'
@@ -1162,7 +1162,7 @@ class ExtJsController
}
}
}
// Detect encoding
$charset = $file->getEncoding($fileContent);
@@ -1220,7 +1220,7 @@ class ExtJsController
$er = $file->save($fileContent);
if( $er['state'] ) {
$r = RepositoryManager::getInstance()->addProgressWork(
$file, $info['rev'], $info['en-rev'], $info['reviewed'], $info['reviewed_maintainer'], $info['maintainer'], 'new'
);
@@ -1392,7 +1392,7 @@ class ExtJsController
$optNbLine = $this->getRequestVariable('optNbLine');
$optB = $this->getRequestVariable('optB');
$optW = $this->getRequestVariable('optW');
if ($patchID) {
$r = File::patchDiff($patchID);
} else {
@@ -1450,9 +1450,9 @@ class ExtJsController
)
);
}
/**
*
*
*/
public function setFileOwner()
{
@@ -1462,23 +1462,23 @@ class ExtJsController
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
$fileIdDB = $this->getRequestVariable('fileIdDB');
$newOwnerID = $this->getRequestVariable('newOwnerID');
$fileInfo = $rf->getModifiesById($fileIdDB);
// This user must be a global admin or the admin for this lang
// Or if the owner of this file is an anonymous and the current user is a valid user
if($am->isAdmin(true))
{
$am->setFileOwner($fileIdDB, $newOwnerID);
$value = array();
$value['user'] = $am->vcsLogin;
RepositoryManager::getInstance()->setStaticValue('info', 'changeFilesOwner', json_encode($value), true);
return JsonResponseBuilder::success();
} else {
return JsonResponseBuilder::failure(
@@ -1488,7 +1488,7 @@ class ExtJsController
);
}
}
/**
* Get the commit log Message after a VCS commit.
*/
@@ -1526,11 +1526,11 @@ class ExtJsController
// If we are on root node, FilePath is empty. He must be "/".
if( $FilePath == '' ) $FilePath = '/';
$info = RepositoryManager::getInstance()->clearLocalChange(
$FileType, new File($FileLang, $FilePath.$FileName)
);
if(is_array($info)) {
return JsonResponseBuilder::success(
array(
@@ -1624,7 +1624,7 @@ class ExtJsController
)
);
}
$xmlDetails = $this->getRequestVariable('xmlDetails');
$return = "";
@@ -1769,7 +1769,7 @@ class ExtJsController
// Manage log message (add new or ignore it if this message already exist for this user)
LogManager::getInstance()->addCommitLog($logMessage);
// We send an email only if this commit is from a patch
if( $patchID ) {
$rm->postPatchCommit($patchID);
@@ -1831,7 +1831,7 @@ class ExtJsController
public function setTopic()
{
$am = AccountManager::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
@@ -1839,20 +1839,20 @@ class ExtJsController
if (!$am->haveKarma) {
return JsonResponseBuilder::failure();
}
$content = $this->getRequestVariable('content');
$isLang = (bool) ($this->getRequestVariable('lang') == 'lang');
$params = Array(
'content' => $content,
'author' => $am->vcsLogin,
'topicDate' => @date('Y-m-d H:i:s')
);
RepositoryManager::getInstance()->setStaticValue('main_topic', $isLang ? $am->vcsLang : '', json_encode($params));
return JsonResponseBuilder::success($params);
}
/**
* Send an email.
@@ -1901,7 +1901,7 @@ class ExtJsController
{
$am = AccountManager::getInstance();
$rf = RepositoryFetcher::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
@@ -2128,7 +2128,7 @@ class ExtJsController
$patchID = $this->getRequestVariable('patchID');
$r = RepositoryManager::getInstance()->deletePatch($patchID);
if( $r === true ) {
return JsonResponseBuilder::success();
} else {
@@ -2141,7 +2141,7 @@ class ExtJsController
}
/**
* Get patch List for a the current user
*
*
*/
public function getPatchList()
{
@@ -2150,7 +2150,7 @@ class ExtJsController
}
$r = RepositoryFetcher::getInstance()->getPatchList();
return JsonResponseBuilder::success(
array(
'nbItems' => count($r),
@@ -2166,7 +2166,7 @@ class ExtJsController
public function managePatch()
{
$rm = RepositoryManager::getInstance();
if (!AccountManager::getInstance()->isLogged()) {
return JsonResponseBuilder::failure();
}
@@ -2608,7 +2608,7 @@ class ExtJsController
}
/**
*
*
*/
public function previewFile()
{
@@ -2635,32 +2635,32 @@ class ExtJsController
);
}
/**
*
*
*/
public function getDirectActionData()
{
$am = AccountManager::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
$rf = RepositoryFetcher::getInstance();
$action = $this->getRequestVariable('action');
$idDB = $this->getRequestVariable('idDB');
$fileInfo = $rf->getModifiesById($idDB);
$fileInfo = $fileInfo[0];
// We get the diff
$file = new File(
$fileInfo['lang'],
$fileInfo['path'].$fileInfo['name']
);
return JsonResponseBuilder::success(
array(
'fileInfo' => $fileInfo,
@@ -2670,27 +2670,27 @@ class ExtJsController
);
}
/**
*
*
*/
public function setDirectAction()
{
$am = AccountManager::getInstance();
if (!$am->isLogged()) {
return JsonResponseBuilder::failure();
}
$action = $this->getRequestVariable('action');
$patchID = $this->getRequestVariable('patchID');
$idDB = $this->getRequestVariable('idDB');
if( $action == 'putIntoMyPatches' )
{
$r = RepositoryManager::getInstance()->moveToPatch($patchID, $idDB);
if( $r === true ) {
return JsonResponseBuilder::success();
} else {
@@ -2700,13 +2700,13 @@ class ExtJsController
)
);
}
}
if( $action == 'deleteThisChange' )
{
$r = RepositoryManager::getInstance()->clearLocalChangeByModifiedID($idDB);
if( is_array($r) ) {
return JsonResponseBuilder::success();
} else {
@@ -2716,25 +2716,25 @@ class ExtJsController
)
);
}
}
}
/**
*
*
*/
public function getElephpants()
{
//$r = RepositoryManager::getInstance()->moveToPatch();
$r = getFlickr();
return JsonResponseBuilder::success(
Array(
'Items' => $r
)
);
}

View File

@@ -17,15 +17,15 @@ class File
public $full_new_path;
public $full_path_fallback;
public $full_path_dir;
public $full_new_path_dir;
public $isDir;
public $isFile;
private $conn;
/**
* Constructor will normalize the lang and the path as specified as parameters.
* The path can be a folder or a file.
@@ -46,11 +46,11 @@ class File
$this->lang = $lang = trim($lang, '/');
$path = trim($path, '.');
$path = trim($path, '/');
// Find if the path is a folder or a file. As it, if the path contains an extension, we assume the path is a file.
// Else, it's a folder.
$path_parts = pathinfo($path);
if( !isset($path_parts['extension']) ) {
$this->isDir = true;
$this->isFile = false;
@@ -63,11 +63,11 @@ class File
$this->name = $path_parts['basename'];
$path = $path_parts['dirname'];
}
$path = trim($path, '.');
$path = trim($path, '/');
$path = trim($path, '.');
if (strlen($path) > 0) {
$this->path = "/$path/";
@@ -91,7 +91,7 @@ class File
$this->full_path_fallback = $appConf[$project]['vcs.path'].'en/'.$this->name;
}
$this->conn = DBConnection::getInstance();
$this->conn = DBConnection::getInstance();
}
public function exist()
@@ -110,7 +110,7 @@ class File
{
// We must check if the file exist.
// For example, when we start a translation, save it, and then open it from work in progress module, the path don't exist and we must use the fallback path for translation
$originalContent = ( is_file($this->full_path) ) ? file_get_contents($this->full_path) : file_get_contents($this->full_path_fallback);
// We search for new line caracters and mark it ! (Google API delete new line)
@@ -133,7 +133,7 @@ class File
$translation = str_replace("&quot;", '"', $translation);
$translation = str_replace("&lt;" , '<', $translation);
$translation = str_replace("&gt;" , '>', $translation);
// CLeanUp entities. Google return it like this : & Reftitle.parameters;. We convert it like this : &reftitle.parameters;
$translation = preg_replace_callback("/(&)\s(.)(.[^;]*?)(;)/s",
create_function(
@@ -141,13 +141,13 @@ class File
'return $matches[1].strtolower($matches[2]).$matches[3].$matches[4];'
),
$translation);
// We remove extra space after :: operator
$translation = preg_replace("/(\w+)(::)(\s)(\w+)/s", "$1$2$4", $translation);
// We delete space into tab like this </ b>
$translation = preg_replace("/(<\/\s(\w+[^>]*)>)/s", "</$2>", $translation);
// We delete space just after an open tag, and just before a close tag, like this <b> foo </b>
$translation = preg_replace("/(<(\w+[^>]*)>)(\s?)(.[^>]*?)(\s?)(<\/(\\2)>)/s", "<$2>$4</$7>", $translation);
@@ -168,7 +168,7 @@ class File
$isModified = $this->isModified();
$isModified = (bool) $isModified;
}
$path = ($readOriginal || !$isModified)
? $this->full_path
: $this->full_new_path;
@@ -214,7 +214,7 @@ class File
/**
* Create a new folder locally & register it to pendingCommit
* If $path is provided, it is used to create the according path. Else, we use the current folder's path.
*
*
* @param string $path The path to create. By default, we use the current path.
* @return boolean TRUE if the path have been created successfully, FALSE otherwise.
*/
@@ -223,7 +223,7 @@ class File
$am = AccountManager::getInstance();
$appConf = $am->appConf;
$project = $am->project;
if( !$path ) {
$path = $this->path;
}
@@ -421,31 +421,31 @@ class File
public function diff($optNbLine=3, $optB=false, $optW=false)
{
// $optNbLine need to be an integer, >= 3
$optNbLine = (int) $optNbLine;
if( $optNbLine < 3 ) $optNbLine = 3;
// $optB & $optW need to be a boolean
$optB = ($optB == 'true') ? true : false;
$optW = ($optW == 'true') ? true : false;
$_optB = ( $optB == 'true' ) ? ' -b' : '';
$_optW = ( $optW == 'true' ) ? ' -w' : '';
/* Diff option (from man page) :
* U : output NUM (default 3) lines of unified context
*
*
* N : treat absent files as empty
*
*
* b : ignore changes in the amount of white space
* Ne pas tenir compte des différences concernant des espaces blancs.
*
*
* w : ignore all white space
* Ignorer les espaces blancs lors de la comparaison de lignes.
*
*
*/
$commands = array(
new ExecStatement(
'diff -uN -U '.$optNbLine.' '.$_optB.$_optW.' --label %s --label %s %s %s',

View File

@@ -64,32 +64,32 @@ class GTranslate
/**
* Google Translate(TM) Api endpoint
* @access private
* @var String
* @var String
*/
private $url = "http://ajax.googleapis.com/ajax/services/language/translate";
/**
* Google Translate (TM) Api Version
* @access private
* @var String
*/
* @var String
*/
private $api_version = "1.0";
/**
* Comunication Transport Method
* Available: http / curl
* @access private
* @var String
* @var String
*/
private $request_type = "http";
/**
* Path to available languages file
* @access private
* @var String
* @var String
*/
private $available_languages_file = "languages.ini";
/**
* Holder to the parse of the ini file
* @access private
@@ -99,7 +99,7 @@ class GTranslate
/**
* Google Translate api key
* @access private
* @access private
* @var string
*/
private $api_key = null;
@@ -169,9 +169,9 @@ class GTranslate
}
return false;
}
/**
* Query the Google(TM) endpoint
* Query the Google(TM) endpoint
* @access private
* @param array $lang_pair
* @param array $string
@@ -186,7 +186,7 @@ class GTranslate
}
/**
* Query Wrapper for Http Transport
* Query Wrapper for Http Transport
* @access private
* @param String $url
* returns String $response
@@ -197,8 +197,8 @@ class GTranslate
return GTranslate::evalResponse(json_decode(file_get_contents($this->url."?".$url)));
}
/**
* Query Wrapper for Curl Transport
/**
* Query Wrapper for Curl Transport
* @access private
* @param String $url
* returns String $response
@@ -217,9 +217,9 @@ class GTranslate
return GTranslate::evalResponse(json_decode($body));
}
/**
/**
* Response Evaluator, validates the response
* Throws an exception on error
* Throws an exception on error
* @access private
* @param String $json_response
* returns String $response
@@ -241,9 +241,9 @@ class GTranslate
}
/**
/**
* Validates if the language pair is valid
* Throws an exception on error
* Throws an exception on error
* @access private
* @param Array $languages
* returns Array $response Array with formated languages pair
@@ -259,7 +259,7 @@ class GTranslate
$valid_languages = false;
if( TRUE == in_array($languages[0],$language_list_v) AND TRUE == in_array($languages[1],$language_list_v) )
{
$valid_languages = true;
$valid_languages = true;
}
if( FALSE === $valid_languages AND TRUE == in_array($languages[0],$language_list_k) AND TRUE == in_array($languages[1],$language_list_k) )
@@ -300,7 +300,7 @@ class GTranslate
return $this->query($languages,$string);
}
/**
/**
* Magic method to understande translation comman
* Evaluates methods like language_to_language
* @access public

View File

@@ -5,14 +5,14 @@
*/
class lockFile
{
/**
* Lock file identifier
*
* @var string
*/
private $id;
/**
* Initialise the lock file
*
@@ -29,54 +29,54 @@ class lockFile
$this->id = $id;
$this->path = $appConf['GLOBAL_CONFIGURATION']['data.path'] . '.' . $this->id;
}
/**
* Tells if the lock file exists
*
*
* @return boolean Returns TRUE if the file exists, FALSE otherwise
*/
function isLocked()
{
return file_exists($this->path);
}
/**
* Sets the lock file
*
* @return boolean Returns TRUE if the lock was successfully set, FALSE otherwise
*/
function lock()
function lock()
{
if ($this->isLocked()) {
return false;
}
return touch($this->path);
}
/**
* Release the lock
*
* @return boolean Returns TRUE if the lock was released, FALSE otherwise
*/
function release()
function release()
{
if ($this->isLocked()) {
return unlink($this->path);
}
return true;
}
/**
* Write into the lock
*
* @return boolean Returns TRUE if the write is OK, or FALSE otherwise
*/
function writeIntoLock($text)
function writeIntoLock($text)
{
if( $this->isLocked() )
{
$handle = fopen($this->path, 'w');
if (fwrite($handle, $text) === FALSE) {
return false;
} else {
@@ -85,15 +85,15 @@ class lockFile
} else {
return false;
}
}
/**
* Read the lock
*
* @return The content of the lock or FALSE if the lock didn't exist
*/
function readLock()
function readLock()
{
if( $this->isLocked() )
{
@@ -103,8 +103,8 @@ class lockFile
{
return false;
}
}
}
?>

View File

@@ -134,7 +134,7 @@ class LogManager
$am = AccountManager::getInstance();
$appConf = $am->appConf;
$project = $am->project;
return $this->highlightBuildLog(file_get_contents($appConf[$project]['vcs.path'] . '../.' . basename($file)));
}
@@ -158,7 +158,7 @@ class LogManager
* Highlight buildLog with some colors.
*
* @param $content The content of the log we want to highlight
* @return The log highlighted
* @return The log highlighted
*/
public function highlightBuildLog($content)
{

View File

@@ -2,8 +2,8 @@
/**
* MicrosoftTranslator - A PHP Wrapper for Microsoft JSON Translator API
*
* @category Translation
*
* @category Translation
* @author Renjith Pillai
* @link http://www.renjith.co.in
* @copyright 2012 Renjith Pillai
@@ -138,7 +138,7 @@ public function translate($from, $to, $text, $format = 'Raw' )
$request = $this->getRequest(self::TRANSLATE );
$response = file_get_contents( $request, 0, $this->context );
if(!empty($response) && isset($response)){
$this->getSuccessResponse($response);
} else {
@@ -152,20 +152,20 @@ public function translate($from, $to, $text, $format = 'Raw' )
*/
public function getLanguagesSelectBox($selectBox){
//some how Raw format gives a single string of all countries and user changing format doesnt make sense here as output is html
$this->format = 'json';
$request = $this->getRequest( self::GET_LANG);
$this->format = 'json';
$request = $this->getRequest( self::GET_LANG);
if( ! $response = $this->getCache( self::LANG_CACHE_FILE )) {
$response = file_get_contents( $request, 0, $this->context );
$this->putToCache( self::LANG_CACHE_FILE, $response );
}
$objResponse = json_decode($response);
if(!empty($objResponse) && isset($objResponse)){
$this->getSuccessResponse($objResponse, $selectBox);
} else {
$this->getErrorResponse($objResponse, self::UNEXPECTED_ERROR, $missing );
}
}
/**
* Encodes request in desirable format for Microsoft translator
@@ -189,30 +189,30 @@ private function getSuccessResponse($response, $selectBox = ''){
$this->response->translation = $response;
// Fot instance if you need both Raw and Json format
if($this->format == 'Raw') {
$this->response->jsonResponse = !function_exists('json_decode') ? $this->response : json_encode($this->response);
}
$this->response->jsonResponse = !function_exists('json_decode') ? $this->response : json_encode($this->response);
}
} elseif($this->requestInvoked == self::GET_LANG ) {
//currently it directly give selctbox
$this->response->languageSelectBox = $this->getSelectBox($response,$selectBox);
}
}
private function getSelectBox($response,$selectBox) {
$options = '';
foreach($response->d->results as $values ) {
if(isset( $values->Code )) {
$options.= "<option value='".$values->Code."'>".$values->Code."</option>";
}
}
$select = "<select id ='".$selectBox['id']."' name='".$selectBox['name']. "'class='".$selectBox['class']."'>";
$select.= $options;
$select.= "</select>";
return $select;
}
/**
@@ -223,11 +223,11 @@ private function getSelectBox($response,$selectBox) {
* @param unknown_type $param
*/
private function getErrorResponse($response, $reason , $param){
$this->response = new stdClass();
$this->response = new stdClass();
$this->response->status = self::ERROR ;
$this->response->errorReason = str_replace("%s", $param, $reason);
$this->response->jsonResponse = !function_exists('json_decode') ? $this->response : json_encode($this->response);
$this->response->errorReason = str_replace("%s", $param, $reason);
$this->response->jsonResponse = !function_exists('json_decode') ? $this->response : json_encode($this->response);
}
@@ -249,8 +249,8 @@ private function getRequest($type)
$request = $this->serviceRootURL. $type.'?'. $params;
} elseif ($type == self::GET_LANG ){
$request = $this->serviceRootURL. $type.'?'. $top.'&'. $format;
}
}
return $request ;
}
/**
@@ -265,8 +265,8 @@ private function getContext()
'request_fulluri' => true,
'header' => "Authorization: Basic " . base64_encode($this->accountKey . ":" . $this->accountKey)
)
));
));
return $context;
}
@@ -279,7 +279,7 @@ private function putToCache($file, $toCache) {
fwrite($handle, $toCache);
fclose($handle);
}
} catch (Exception $e) {
die ('put to cache failed ' . $e->getMessage());
}
@@ -291,14 +291,14 @@ private function getCache($file) {
if(is_dir(self::CACHE_DIRECTORY) && file_exists(self::CACHE_DIRECTORY . $file)) {
$handle = fopen(self::CACHE_DIRECTORY . $file, "r");
$contents = '';
while (!feof($handle))
while (!feof($handle))
{
$contents .= fread($handle, 8192);
}
fclose($handle);
return $contents;
} else {
return false;

View File

@@ -6,14 +6,14 @@
*/
class NewsReader
{
/**
* The lang
*
* @var string
*/
private $lang;
/**
* Initialise
*
@@ -23,10 +23,10 @@ class NewsReader
{
$this->lang = $lang;
}
/**
* Get all news for this LANG.
*
*
* @return An indexed array (id, title, description, link, pubDate) readable by ExtJs, or false if an error occurs
*/
function getLastNews()
@@ -63,6 +63,6 @@ class NewsReader
return $result;
}
}
?>

View File

@@ -14,35 +14,35 @@ class PreviewFile
private $fullPath;
private $fullNewPath;
/**
*/
public function __construct($path)
{
$this->am = AccountManager::getInstance();
// Only available for PHP project
if( $this->am->project != 'PHP' ) {
return false;
}
$this->path = str_replace('..', '', $path);
$this->checkPath();
$this->makePreview();
}
private function checkPath()
{
$appConf = $this->am->appConf;
$project = $this->am->project;
$this->fullPath = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'/'.$this->path;
$this->fullNewPath = $appConf['GLOBAL_CONFIGURATION']['data.path'].$appConf[$project]['vcs.module'].'-new/'.$this->path;
}
private function checkDir()
{
// Output
@@ -50,7 +50,7 @@ class PreviewFile
if( !is_dir($this->outputDir) ) {
mkdir($this->outputDir);
}
// Input
$this->inputDir = $this->am->appConf[$this->am->project]['preview.baseURI.path'].'manual/en/';
if( !is_dir($this->inputDir) ) {
@@ -58,16 +58,16 @@ class PreviewFile
mkdir($this->inputDir);
}
}
/**
*/
private function makePreview()
{
$appConf = $this->am->appConf;
$project = $this->am->project;
$this->checkDir();
// We clean the input output directory
$commands = array(
new ExecStatement('cd %s', array($this->outputDir)),
@@ -76,7 +76,7 @@ class PreviewFile
SaferExec::execMulti($commands, $output);
$this->cleanCmd = implode('; ', $commands);
$this->cleanLog = $output;
$rename = 0;
$t = time();
// We are editing temporary file
@@ -85,7 +85,7 @@ class PreviewFile
rename($this->fullPath, $this->fullPath . $t);
rename($this->fullNewPath, $this->fullPath);
}
// We start the build for this file
$commands = array(
new ExecStatement('cd %s', array($appConf[$project]['vcs.path'])),
@@ -102,7 +102,7 @@ class PreviewFile
rename($this->fullPath, $this->fullNewPath);
rename($this->fullPath . $t, $this->fullPath);
}
// Only move the specific file we are generating
$xmlID = $this->getOutputId();
$filename = 'phdoe-' . time() . '-' . $xmlID. '.php';
@@ -110,12 +110,12 @@ class PreviewFile
SaferExec::exec($cmd, $output);
$this->moveCmd = $cmd->__toString();
$this->moveLog = $output;
$this->previewUrl = $this->am->appConf[$this->am->project]['preview.baseURI'].'manual/en/' . $filename;
}
private function getOutputId()
{
// The output file name is the first ID of the file
@@ -123,23 +123,23 @@ class PreviewFile
$lang = $file[0];
array_shift($file);
$path = implode('/',$file);
$fileInfo = new File($lang, $path);
$info = $fileInfo->getInfo();
$xmlIDs = explode('|',$info['xmlid']);
$xmlID = $xmlIDs[0];
return $xmlID;
}
public function getPreviewUrl() {
return $this->previewUrl;
}
public function getBuildCmd() {
return $this->buildCmd;
}
}
?>

View File

@@ -134,8 +134,8 @@ class RepositoryFetcher
(
( `type`="nbCon" AND `subType`="Total" )
OR
( `type`="nbCreatedFiles" OR
`type`="nbDeletedFiles" OR
( `type`="nbCreatedFiles" OR
`type`="nbDeletedFiles" OR
`type`="nbUpdatedFiles" )
) AND
YEAR(`yearMonth`) = %s
@@ -148,13 +148,13 @@ class RepositoryFetcher
$r = $this->conn->query($s, $params);
while ($a = $r->fetch_object()) {
// Init
if( !isset($infos[$a->month]) ){
$infos[$a->month]['nbConTotal'] = 0;
$infos[$a->month]['nbCommitTotal'] = 0;
}
if( $a->type == 'nbCon' && $a->subType == 'Total' ) {
$infos[$a->month]['nbConTotal'] = $a->value;
} else {
@@ -165,28 +165,28 @@ class RepositoryFetcher
$return = array();
//
for( $i=0; $i < 12; $i++ ) {
$return[$i]['id'] = $i+1;
$return[$i]['month'] = $i+1;
// nbConTotal
if( isset($infos[$i+1]['nbConTotal']) ) {
$return[$i]['nbConTotal'] = (int) $infos[$i+1]['nbConTotal'];
} else {
$return[$i]['nbConTotal'] = 0;
}
// nbCommitTotal
if( isset($infos[$i+1]['nbCommitTotal']) ) {
$return[$i]['nbCommitTotal'] = (int) $infos[$i+1]['nbCommitTotal'];
} else {
$return[$i]['nbCommitTotal'] = 0;
}
}
return $return;
}
@@ -230,10 +230,10 @@ class RepositoryFetcher
`work`.`name` as name,
`work`.`en_revision` as en_revision,
`work`.`maintainer` as maintainer,
`work`.`reviewed` as reviewed,
`work`.`reviewed_maintainer` as reviewed_maintainer,
`users`.`vcs_login` as user,
`users`.`anonymousIdent` as anonymousIdent
FROM
@@ -743,8 +743,8 @@ class RepositoryFetcher
return $a->total;
}
public function getPatchList()
{
$am = AccountManager::getInstance();
@@ -756,10 +756,10 @@ class RepositoryFetcher
`description`,
`email`,
`date`
FROM
FROM
`patches`
WHERE
`project`="%s" AND
`userID` = %s';
@@ -769,9 +769,9 @@ class RepositoryFetcher
);
$r = $this->conn->query($s, $params);
$result = array();
while ($a = $r->fetch_assoc()) {
$result[] = $a;
}
@@ -839,20 +839,20 @@ class RepositoryFetcher
`users`.`authService` as `authService`,
`work`.`date`,
`work`.`type`
FROM
`work`,
`users`
WHERE
`work`.`userID` = `users`.`userID` AND
`work`.`module` = "PatchesForReview" AND
`work`.`lang` = "%s" AND
`work`.`project` = "%s"
ORDER BY
`work`.`type`, `work`.`date`
';
$params = array(
$lang,
@@ -1101,11 +1101,11 @@ class RepositoryFetcher
case 'twitter':
$iconUser = 'iconTwitter';
break;
default:
$iconUser = 'iconUser';
}
$isAnonymous = ($userData['data']['authService'] != 'VCS' || $userData['data']['vcs_login'] == 'anonymous');
$result[] = array(
'task' => $userData['data']['vcs_login'] . ($userData['data']['vcs_login'] == 'anonymous' ? ' #'.$userId : ''),
@@ -1235,11 +1235,11 @@ class RepositoryFetcher
case 'twitter':
$iconUser = 'iconTwitter';
break;
default:
$iconUser = 'iconUser';
}
$isAnonymous = ($userData['data']['authService'] != 'VCS' || $userData['data']['vcs_login'] == 'anonymous');
$result[] = array(
'task' => $userData['data']['vcs_login'] . ($userData['data']['vcs_login'] == 'anonymous' ? ' #'.$userId : ''),
@@ -1472,8 +1472,8 @@ TODO: Handle project here
$tmp = explode('.',$f);
$ext = array_pop($tmp);
$files[] = array(
'text' => $f,
'id' => $dir.$f,

View File

@@ -449,7 +449,7 @@ class RepositoryManager
return $fileID;
}
/**
* Delete files from work in progress module.
*
@@ -477,7 +477,7 @@ class RepositoryManager
$this->conn->query($query, $params);
}
}
/**
* Move some files into a specific patch.
*
@@ -526,9 +526,9 @@ class RepositoryManager
implode(',', array_map('intval', explode(',', $filesID)))
);
$r = $this->conn->query($s, $params);
if( $this->conn->affected_rows() < 1 ) {
// Either an error or this change is wanted by a VCS user
if( !$am->isAnonymous )
{
@@ -548,13 +548,13 @@ class RepositoryManager
implode(',', array_map('intval', explode(',', $filesID)))
);
$r = $this->conn->query($s, $params);
if( $this->conn->affected_rows() < 1 ) {
return 'Error. Is this file(s) is(are) own by you ?';
} else {
return true;
}
} else {
return 'Error. Is this file(s) is(are) own by you ?';
}
@@ -563,7 +563,7 @@ class RepositoryManager
}
}
/**
* Move some files into work in progress module.
*
@@ -592,7 +592,7 @@ class RepositoryManager
implode(',', array_map('intval', explode(',', $filesID)))
);
$r = $this->conn->query($s, $params);
if( $this->conn->affected_rows() < 1 ) {
return 'Error. Is this file(s) is(are) own by you ?';
} else {
@@ -614,18 +614,18 @@ class RepositoryManager
// We start by retrieve patch information
$patchInfo = $this->getPatchInfo($patchID);
if( !$patchInfo ) {
return 'patch_delete_dont_exist'; // the patch don't exist
} else {
// We must check if we can delete this patch
// Either this patch must be own by the current user or the current user is a global admin for this project
if( $patchInfo->userID != $am->userID && !$am->isAdmin() ) {
return 'patch_delete_isnt_own_by_current_user';
}
}
// We start by change files for this patch.
$s = 'UPDATE
`work`
@@ -676,7 +676,7 @@ class RepositoryManager
$patchID
);
$r = $this->conn->query($s, $params);
if( $r->num_rows == 0 ) {
return false;
} else {
@@ -703,12 +703,12 @@ class RepositoryManager
WHERE
`module` = \'PatchesForReview\' AND
`patchID` = "%s"';
$params = array(
$patchID
);
$r = $this->conn->query($s, $params);
if( $r->num_rows == 0 ) {
return false;
} else {
@@ -716,11 +716,11 @@ class RepositoryManager
while( $a = $r->fetch_object() ) {
$return[] = $a;
}
return $return;
}
}
/**
* Create a new patch for the current user.
*
@@ -1246,7 +1246,7 @@ class RepositoryManager
} else {
$a = $r->fetch_object();
if($a->userID != $userID) {
return 'file_isnt_owned_by_current_user';
}
@@ -1270,21 +1270,21 @@ class RepositoryManager
public function clearLocalChangeByModifiedID($modifiedID)
{
$rf = RepositoryFetcher::getInstance();
// We retrieve modifiedID information
$fileInfo = $rf->getModifiesById($modifiedID);
$fileInfo = $fileInfo[0];
// If we are on root node, $fileInfo['path'] is empty. He must be "/".
if( $fileInfo['path'] == '' ) $fileInfo['path'] = '/';
$info = $this->clearLocalChange(
$fileInfo['type'], new File($fileInfo['lang'], $fileInfo['path'].$fileInfo['name'])
);
return $info;
}
/**
* clear local change of a file.
*
@@ -1323,20 +1323,20 @@ class RepositoryManager
`lang` = '%s' AND
`path` = '%s' AND
`name` = '%s'";
$params = array(
$project,
$lang,
$path,
$name
);
$r = $this->conn->query($s, $params);
if( $r->num_rows == 0 ) {
return 'file_localchange_didnt_exist';
} else {
$a = $r->fetch_object();
@@ -1344,9 +1344,9 @@ class RepositoryManager
if($a->userID != $userID && $am->isAnonymous) {
return 'file_isnt_owned_by_current_user';
}
}
$return['oldIdDB'] = $a->id;
// We need delete row from work table
@@ -1686,17 +1686,17 @@ class RepositoryManager
{
$name = $file->name;
$path = $file->path;
if( substr($name, -4) === '.new' ) {
$toDisplay = true;
} else {
$toDisplay = false;
}
$return = "needParsing : \n";
$return .= " => name : $name\n";
$return .= " => path : $path\n";
if (
!$file->exist()
|| ( is_file($file->full_path) && !in_array(substr($name, -3), array('xml','ent')) )
@@ -1757,11 +1757,11 @@ class RepositoryManager
$files = array();
while (($name = readdir($dh)) !== false) {
if( $name == '.' || $name == '..') {
continue;
}
$file = new File($lang, $path.$name);
if (!$this->needParsing($file)) {
continue;
@@ -1772,7 +1772,7 @@ class RepositoryManager
} elseif ( $file->isFile ) {
$files[] = $file;
}
}
@closedir($dh);
@@ -1817,11 +1817,11 @@ class RepositoryManager
$files = array();
while (($name = readdir($dh)) !== false) {
if( $name == '.' || $name == '..') {
continue;
}
$file = new File('en', $path.$name);
if (!$this->needParsing($file)) {
continue;
@@ -1834,7 +1834,7 @@ class RepositoryManager
}
}
closedir($dh);
foreach($files as $f) {
$en_size = intval(filesize($f->full_path) / 1024);
@@ -2006,7 +2006,7 @@ class RepositoryManager
/*
// Check for error in this file ONLY if this file is uptodate
if ($revision == $en_revision && $revision != 0 ) {
$error = new ToolsError();
$error->setParams(
@@ -2017,7 +2017,7 @@ class RepositoryManager
$error->saveError();
}
*/
} else {
$query = 'INSERT INTO `files` (`project`, `lang`, `path`, `name`, `size`)
VALUES ("%s", "%s", "%s", "%s", "%s")';
@@ -2099,20 +2099,20 @@ class RepositoryManager
DBConnection::getInstance()->query($s, $params);
}
}
public function applyStaticRevcheck()
{
$am = AccountManager::getInstance();
$appConf = $am->appConf;
$project = $am->project;
$ExistingLanguage = $this->getExistingLanguage();
foreach( $ExistingLanguage as $lang ) {
$lang = $lang["code"];
if( $lang == 'en' ) { continue; }
$commands = array(
new ExecStatement('cd %s', array($appConf[$project]['vcs.path'])),
new ExecStatement($appConf['GLOBAL_CONFIGURATION']['php.bin'] . ' doc-base/scripts/revcheck.php %s > %s 2>&1', array($lang, $appConf['GLOBAL_CONFIGURATION']['data.path'].'revcheck/'.$lang.'.html'))
@@ -2120,7 +2120,7 @@ class RepositoryManager
SaferExec::execMulti($commands);
}
}
/**
* All we must do after a patch have been commited.
*
@@ -2130,13 +2130,13 @@ class RepositoryManager
{
$am = AccountManager::getInstance();
$vcsLogin = $am->vcsLogin;
// We get patch Information
$patchInfo = $this->getPatchInfo($patchID);
// We silently return if the patch didn't exist
if( !$patchInfo ) return;
$to = trim($patchInfo->email);
$subject = '['.$patchInfo->project.'-DOC] - Patch named "'.$patchInfo->name.'" accepted';
$msg = <<<EOD
@@ -2147,7 +2147,7 @@ time to get updated, we would like to ask you to be a bit patient.
Thank you for your submission, and for helping us make our documentation better.
--
--
{$vcsLogin}@php.net
EOD;
@@ -2159,7 +2159,7 @@ EOD;
$am->email($to, $subject, $msg);
}
}
/**
* Create the folder how hold all modified files for this project.
*
@@ -2182,65 +2182,65 @@ EOD;
}
}
}
public function applyOnlyTools()
{
$am = AccountManager::getInstance();
// We start by cleaning up the database
$this->conn->query("DELETE FROM `errorfiles` WHERE `project`='%s'", array($am->project));
// We start by all translation
// We select files how have revision=en_revision for this lang
$query = 'SELECT * FROM files WHERE `project`="%s" AND `lang`!="%s" AND `revision`=`en_revision`';
$params = array(
$am->project,
'en'
);
$r = $this->conn->query($query, $params);
while( $a = $r->fetch_object() )
{
$error = new ToolsError();
$fileEN = new File('en', $a->path.$a->name);
$ENContent = $fileEN->read(true);
$fileLANG = new File($a->lang, $a->path.$a->name);
$LANGContent = $fileLANG->read(true);
$error->setParams($ENContent, $LANGContent, $a->lang, $a->path, $a->name, '');
$error->run();
$error->saveError();
}
//.... and now, EN files
$query = 'SELECT * FROM files WHERE `project`="%s" AND `lang`="%s"';
$params = array(
$am->project,
'en'
);
$r = $this->conn->query($query, $params);
while( $a = $r->fetch_object() )
{
$error = new ToolsError();
$fileEN = new File('en', $a->path.$a->name);
$ENContent = $fileEN->read(true);
$error->setParams($ENContent, '', $a->lang, $a->path, $a->name, '');
$error->run();
$error->saveError();
}
}
}
?>

View File

@@ -34,7 +34,7 @@ class SaferExec
ob_start();
passthru($command, $return_var);
$output = explode(PHP_EOL, ob_get_clean());
}
}

View File

@@ -308,11 +308,11 @@ class SvnClient
$o['revision'] = str_replace('r', '', $infos[0]);
$o['author'] = $infos[1];
$o['date'] = str_replace('-', '/', array_shift(explode(' +', $infos[2])));
if( $tmp = strstr($o['date'], " /", true) ) {
$o['date'] = $tmp;
}
$o['content'] = str_replace("\n", '<br/>', trim(implode('<br/>', $contents)));
$final[] = $o;
@@ -436,7 +436,7 @@ class SvnClient
// Info we must store into DB
$info = array();
$pathLogFile = $this->createCommitLogFile($log);
$create_stack = array();
@@ -569,13 +569,13 @@ class SvnClient
return array('err' => $err, 'output' => $output);
}
public function checkKeyWords($lang,$filePath,$fileName)
{
$am = AccountManager::getInstance();
$appConf = $am->appConf;
$project = $am->project;
$goodSVNKeywords = Array(
0 => "Id",
1 => "Rev",
@@ -592,14 +592,14 @@ class SvnClient
$goodSVNEolStyle = Array(
0 => "native"
);
$result = array(
"keyWords" => false,
"EolStyle" => false
);
$isDirty = false;
$commands = array(
new ExecStatement('cd %s', array($appConf[$project]['vcs.path'].$lang.$filePath)),
new ExecStatement('svn proplist --xml --verbose %s', array($fileName))
@@ -613,73 +613,73 @@ class SvnClient
}
$outputXML = implode("\n", $output)."\n";
$content = trim($outputXML);
$content = str_replace("\r", " ", $content);
$content = str_replace("\n", " ", $content);
$content = simplexml_load_string($content);
$keywords = array();
for( $i=0; $i < count($content->target->property); $i++) {
$attributName = "";
$attributValue = "";
$attributName = $content->target->property[$i]->attributes();
$attributValue = (string) $content->target->property[$i][0];
$attributName = explode(":",$attributName);
$attributName = $attributName[1];
$attributValue = explode(" ",$attributValue);
$keywords[$attributName] = $attributValue;
}
// For keywords
if( isset($keywords["keywords"]) ) {
$diffKeywords = array_diff($goodSVNKeywords, $keywords["keywords"]);
if( ! empty($diffKeywords) ) {
$result['keyWords'] = implode(' ',$diffKeywords);
$isDirty = true;
}
} else {
$result['keyWords'] = implode(' ',$goodSVNKeywords);
$isDirty = true;
}
// For eol-style
if( isset($keywords["eol-style"]) ) {
$diffEolStyle = array_diff($goodSVNEolStyle, $keywords["eol-style"]);
if( ! empty($diffEolStyle) ) {
$result['EolStyle'] = implode(' ',$diffEolStyle);
$isDirty = true;
}
} else {
$result['EolStyle'] = implode(' ',$goodSVNEolStyle);
$isDirty = true;
}
// We send the result
if( $isDirty ) {
return $result;
} else {
return false;
}
}
}

View File

@@ -205,7 +205,7 @@ class ToolsCheckEntities {
$status = 0;
$child = pcntl_wait($status);
--$children;
}
}
}
while ($children) {
@@ -213,7 +213,7 @@ class ToolsCheckEntities {
$child = pcntl_wait($status);
--$children;
}
} else {
// no forking
// walk through entities found

View File

@@ -134,7 +134,7 @@ class ToolsError
} else {
$this->setParams($nodes[$i]['lang_content'], '', 'en', $FilePath, $FileName, '');
}
$this->clearError();
$this->run();
@@ -248,7 +248,7 @@ class ToolsError
$project,
$this->lang
);
$r = $this->conn->query($s, $params);
$node = array();
@@ -796,30 +796,30 @@ class ToolsError
{
$reg = '/<phpdoc:classref (.[^>]*)>/s';
$reg2 = '/(.*?)="(.*?)"/s';
$en_PhpdocClassref = $match = $_match = array();
preg_match($reg, $this->en_content, $_match);
if( !isset($_match[1]) ) $_match[1]=false;
preg_match_all($reg2, $_match[1], $match);
for( $i=0; $i < count($match[1]); $i++ ) {
$en_PhpdocClassref[trim($match[1][$i])] = $match[2][$i];
}
$lang_PhpdocClassref = $match = $_match = array();
preg_match($reg, $this->lang_content, $_match);
if( !isset($_match[1]) ) $_match[1]=false;
preg_match_all($reg2, $_match[1], $match);
for( $i=0; $i < count($match[1]); $i++ ) {
$lang_PhpdocClassref[trim($match[1][$i])] = $match[2][$i];
}
$en_PhpdocClassref["xml:id"] = isset($en_PhpdocClassref["xml:id"]) ? $en_PhpdocClassref["xml:id"] : false;
$lang_PhpdocClassref["xml:id"] = isset($lang_PhpdocClassref["xml:id"]) ? $lang_PhpdocClassref["xml:id"] : false;
if ($en_PhpdocClassref["xml:id"] != $lang_PhpdocClassref["xml:id"] ) {
$this->addError(array(
"value_en" => $en_PhpdocClassref["xml:id"],
@@ -828,10 +828,10 @@ class ToolsError
));
}
$en_PhpdocClassref["xmlns:phpdoc"] = isset($en_PhpdocClassref["xmlns:phpdoc"]) ? $en_PhpdocClassref["xmlns:phpdoc"] : false;
$lang_PhpdocClassref["xmlns:phpdoc"] = isset($lang_PhpdocClassref["xmlns:phpdoc"]) ? $lang_PhpdocClassref["xmlns:phpdoc"] : false;
if ($en_PhpdocClassref["xmlns:phpdoc"] != $lang_PhpdocClassref["xmlns:phpdoc"] ) {
$this->addError(array(
"value_en" => $en_PhpdocClassref["xmlns:phpdoc"],
@@ -843,7 +843,7 @@ class ToolsError
$en_PhpdocClassref["xmlns"] = isset($en_PhpdocClassref["xmlns"]) ? $en_PhpdocClassref["xmlns"] : false;
$lang_PhpdocClassref["xmlns"] = isset($lang_PhpdocClassref["xmlns"]) ? $lang_PhpdocClassref["xmlns"] : false;
if ($en_PhpdocClassref["xmlns"] != $lang_PhpdocClassref["xmlns"] ) {
$this->addError(array(
"value_en" => $en_PhpdocClassref["xmlns"],
@@ -855,7 +855,7 @@ class ToolsError
$en_PhpdocClassref["xmlns:xlink"] = isset($en_PhpdocClassref["xmlns:xlink"]) ? $en_PhpdocClassref["xmlns:xlink"] : false;
$lang_PhpdocClassref["xmlns:xlink"] = isset($lang_PhpdocClassref["xmlns:xlink"]) ? $lang_PhpdocClassref["xmlns:xlink"] : false;
if ($en_PhpdocClassref["xmlns:xlink"] != $lang_PhpdocClassref["xmlns:xlink"] ) {
$this->addError(array(
"value_en" => $en_PhpdocClassref["xmlns:xlink"],
@@ -866,7 +866,7 @@ class ToolsError
$en_PhpdocClassref["xmlns:xi"] = isset($en_PhpdocClassref["xmlns:xi"]) ? $en_PhpdocClassref["xmlns:xi"] : false;
$lang_PhpdocClassref["xmlns:xi"] = isset($lang_PhpdocClassref["xmlns:xi"]) ? $lang_PhpdocClassref["xmlns:xi"] : false;
if ($en_PhpdocClassref["xmlns:xi"] != $lang_PhpdocClassref["xmlns:xi"] ) {
$this->addError(array(
"value_en" => $en_PhpdocClassref["xmlns:xi"],
@@ -1872,7 +1872,7 @@ class ToolsError
if (!isset($lang_methodsynopsis[$i]['methodname']['modifier'])) { $lang_methodsynopsis[$i]['methodname']['modifier'] = ''; }
if ($en_methodsynopsis[$i]['methodname']['modifier'] != $lang_methodsynopsis[$i]['methodname']['modifier'] ) {
$this->addError(array(
'value_en' => $en_methodsynopsis[$i]['methodname']['modifier'],
'value_lang' => $lang_methodsynopsis[$i]['methodname']['modifier'],
@@ -1997,26 +1997,26 @@ class ToolsError
function checkVCSKeyWords()
{
$result = VCSFactory::getInstance()->checkKeyWords($this->lang,$this->filePath,$this->fileName);
if( $result ) {
$errLibel = "";
if( $result["keyWords"] ) {
$errLibel .= "keyWords : ".$result["keyWords"]." ; ";
}
if( $result["EolStyle"] ) {
$errLibel .= "EolStyle : ".$result["EolStyle"]." ; ";
}
$this->addError(array(
'value_en' => $errLibel,
'value_lang' => '',
'type' => 'VCSKeyWordsEolStyle'
));
}
}
/**
@@ -2024,11 +2024,11 @@ class ToolsError
* Add an entry into the error's stack if MemberShip's Comment isn't the same as EN version
*
*/
function checkMembershipComment()
{
$reg = '/<!-- Membership: (.*?) -->/s';
$en_MembershipComment = array();
$match = array();
preg_match($reg, $this->en_content_with_comment, $match);
@@ -2040,15 +2040,15 @@ class ToolsError
$lang_MembershipComment = (isset($match[1])) ? $match[1] : false;
if( $en_MembershipComment != $lang_MembershipComment ) {
$this->addError(array(
'value_en' => $en_MembershipComment,
'value_lang' => $lang_MembershipComment,
'type' => 'MembershipComment'
));
}
}
/**
@@ -2056,11 +2056,11 @@ class ToolsError
* Add an entry into the error's stack if Purpose's Comment isn't the same as EN version
*
*/
function checkPurposeComment()
{
$reg = '/<!-- Purpose: (.*?) -->/s';
$en_MembershipComment = array();
$match = array();
preg_match($reg, $this->en_content_with_comment, $match);
@@ -2072,29 +2072,29 @@ class ToolsError
$lang_MembershipComment = (isset($match[1])) ? $match[1] : false;
if( $en_MembershipComment != $lang_MembershipComment ) {
$this->addError(array(
'value_en' => $en_MembershipComment,
'value_lang' => $lang_MembershipComment,
'type' => 'PurposeComment'
));
}
}
/**
* Check PhpDoc Tag
*
*
*/
function checkPhpDocTag()
{
$reg = '/<\?phpdoc\s(.*?)="(.*?)"\s?\?>/s';
$en_PhpDocTag = array();
preg_match_all($reg, $this->en_content, $en_PhpDocTag);
$lang_PhpDocTag = array();
preg_match_all($reg, $this->lang_content, $lang_PhpDocTag);
@@ -2104,21 +2104,21 @@ class ToolsError
'value_lang' => count($lang_PhpDocTag[0]),
'type' => 'PhpDocTagNb'
));
} else {
for( $i=0; $i < count($en_PhpDocTag[0]); $i++ ) {
if( $en_PhpDocTag[1][$i] != $lang_PhpDocTag[1][$i] ||
$en_PhpDocTag[2][$i] != $lang_PhpDocTag[2][$i] ) {
$this->addError(array(
'value_en' => $en_PhpDocTag[0][$i],
'value_lang' => $lang_PhpDocTag[0][$i],
'type' => 'PhpDocTagError'
));
}
}
}
} // checkPhpDocTag

View File

@@ -68,10 +68,10 @@ class ToolsXmllint
$return[$numResult][$tmp] = $this->rawErrors[$i];
if( $tmp != 2 ) {
$tmp ++;
$tmp ++;
} else {
$tmp = 0;
$numResult ++;
$numResult ++;
}
}
@@ -80,7 +80,7 @@ class ToolsXmllint
// We check all errors
for( $i=0; $i < count($return); $i++) {
// We skip the filename in the first element of the array
$return[$i][0] = substr($return[$i][0], strlen($this->XmlFileName), strlen($return[$i][0]));
@@ -107,7 +107,7 @@ class ToolsXmllint
}
return empty($result) ? 'no_error' : $result;
}
}

View File

@@ -108,7 +108,7 @@ class TranslatorStatistic
FROM
`files`
WHERE
`lang` = "%s" AND
`lang` = "%s" AND
`revision` = `en_revision` AND
`project` = "%s"
GROUP BY
@@ -163,7 +163,7 @@ class TranslatorStatistic
FROM
`files`
WHERE
`lang` = "%s" AND
`lang` = "%s" AND
`revision` = `en_revision` AND
`reviewed` = "yes" AND
`project` = "%s"
@@ -224,12 +224,12 @@ class TranslatorStatistic
`lang` = "%s"
AND
`en_revision` != `revision`
AND
AND
`size` is not NULL
AND
`project` = "%s"
GROUP BY
`maintainer`
`maintainer`
ORDER BY
`maintainer`
';
@@ -288,14 +288,14 @@ class TranslatorStatistic
WHERE
`lang` = "%s" AND
`en_revision` = `revision` AND
`en_revision` = `revision` AND
`reviewed` != "yes" AND
`size` is not NULL AND
`project` = "%s"
GROUP BY
`reviewed_maintainer`
ORDER BY
`reviewed_maintainer`
';

View File

@@ -25,32 +25,32 @@ class UsageStatistics {
{
$this->conn = DBConnection::getInstance();
}
public function computeAll($startYear)
{
$_date = new DateTime($startYear.'-01-01');
$now = new DateTime();
$intervalle = new DateInterval('P1M');
$now->add($intervalle); // We add one month to all wile statment to compute current month
while( $_date->format('Y-m') != $now->format('Y-m') ) {
echo 'Compute usage stats for '.$_date->format('Y-m').'...';
$this->computeMonth($_date->format('Y-m'));
echo "Done !\n";
$_date->add($intervalle);
}
}
public function computeMonth($yearMonth)
{
$am = AccountManager::getInstance();
$project = $am->project;
echo 'Compute usage stats for '.$yearMonth.'...';
// We get all info for this Year-Month
@@ -58,7 +58,7 @@ class UsageStatistics {
$tmp = explode('-', $yearMonth);
$year = $tmp[0];
$month = $tmp[1];
$s = 'SELECT
*
FROM
@@ -68,7 +68,7 @@ class UsageStatistics {
YEAR(`date`) = "%s" AND
MONTH(`date`) = "%s" AND
`project` = "%s"';
$params = array(
$year,
$month,
@@ -90,11 +90,11 @@ class UsageStatistics {
"nbDeletedFiles"=>0,
"nbUpdatedFiles"=>0
);
while ($a = $r->fetch_object())
{
$i = "";
// for connexions
if( $a->field == "login" )
{
@@ -102,7 +102,7 @@ class UsageStatistics {
$stats["nbCon"]["authService"][$i->authService] ++;
$stats["nbCon"]["total"] ++;
}
// for commit
if( $a->field == "commitFiles" )
{
@@ -111,11 +111,11 @@ class UsageStatistics {
$stats['nbDeletedFiles'] += $i->nbFilesDelete;
$stats['nbUpdatedFiles'] += $i->nbFilesUpdate;
}
}
// Now we have stats for this Year-Month, we add it to DB
$this->addModStat('nbCon', 'Total', $stats["nbCon"]["total"], $yearMonth);
$this->addModStat('nbCon', 'VCS', $stats["nbCon"]["authService"]["VCS"], $yearMonth);
$this->addModStat('nbCon', 'google', $stats["nbCon"]["authService"]["google"], $yearMonth);
@@ -123,19 +123,19 @@ class UsageStatistics {
$this->addModStat('nbCreatedFiles', '', $stats["nbCreatedFiles"], $yearMonth);
$this->addModStat('nbDeletedFiles', '', $stats["nbDeletedFiles"], $yearMonth);
$this->addModStat('nbUpdatedFiles', '', $stats["nbUpdatedFiles"], $yearMonth);
echo "Done !\n";
}
private function addModStat($type, $subType, $value, $yearMonth)
{
$am = AccountManager::getInstance();
$project = $am->project;
$tmp = explode('-', $yearMonth);
$year = $tmp[0];
$month = $tmp[1];
$s = '
SELECT
id
@@ -158,7 +158,7 @@ class UsageStatistics {
$r = $this->conn->query($s, $params);
$nb = $r->num_rows;
if( $nb == 0 ) {
// It's the first time we compute stats for this Year-Month. We add them into DB
$s = 'INSERT INTO
@@ -176,7 +176,7 @@ class UsageStatistics {
"%s",
"%s"
)';
$params = array(
$project,
$type,
@@ -185,10 +185,10 @@ class UsageStatistics {
$year.'-'.$month.'-01'
);
$r = $this->conn->query($s, $params);
} else {
$a = $r->fetch_object();
// It's not the first time, we update the record
$s = 'UPDATE
`usageStatistics`
@@ -197,16 +197,16 @@ class UsageStatistics {
WHERE
`id`="%s"
';
$params = array(
$value,
$a->id
);
$r = $this->conn->query($s, $params);
}
}
}

View File

@@ -89,7 +89,7 @@ class UserNotes {
);
$r = $this->conn->query($s, $params);
$a = $r->fetch_object();
if( $a->user == $vcsLogin ) {
// We can delete it
$s = 'DELETE FROM

View File

@@ -5,7 +5,7 @@ www.group = apache
sql.host = localhost
sql.user = nobody
sql.passwd =
sql.passwd =
sql.database = doc_editor
vcs.type = svn

View File

@@ -11,7 +11,7 @@ project.mail.defaultDomain = "@php.net"
; Admin for all language
project.globaladmin = "yannick"
; Admin for a specific lang
project.langadmin.es =
project.langadmin.es =
vcs.server.host = "svn.php.net"
vcs.server.repos = "repository/"

View File

@@ -1,6 +1,6 @@
<?php
/**
* HTML templates
* HTML templates
*/
/**
@@ -138,7 +138,7 @@ function cssLoadTemplate($href, $id = '')
function footerTemplate($isLoginPage=false)
{
$elephpants = ( $isLoginPage ) ? '<div id="elephpants"><div id="elephpants-images"></div></div>' : '';
return <<<EOD
$elephpants
</body>

View File

@@ -7,20 +7,20 @@ class Oauth_github
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret) {
$this->serveurURL = 'https://github.com/login/oauth/authorize';
$this->tokenURL = 'https://github.com/login/oauth/access_token';
$this->userInfoURL = 'https://api.github.com/user';
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -33,7 +33,7 @@ class Oauth_github
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -44,27 +44,27 @@ class Oauth_github
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
parse_str($httpResponse, $output);
return $output["access_token"];
}
public function getUserInfo($access_token)
{
$curl = curl_init($this->userInfoURL);
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array( 'Authorization: token ' . $access_token ),
@@ -74,8 +74,8 @@ class Oauth_github
$resp = curl_exec($curl);
return json_decode($resp);
}
}
class Oauth_stackoverflow
@@ -87,22 +87,22 @@ class Oauth_stackoverflow
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret, $clientKey) {
$this->serveurURL = 'https://stackexchange.com/oauth';
$this->tokenURL = 'https://stackexchange.com/oauth/access_token';
$this->userInfoURL = 'https://api.stackexchange.com/me';
// Prod - OK
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
$this->clientKey = $clientKey;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -115,7 +115,7 @@ class Oauth_stackoverflow
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -126,39 +126,39 @@ class Oauth_stackoverflow
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
parse_str($httpResponse, $output);
return $output["access_token"];
}
public function getUserInfo($access_token)
{
$curl = curl_init($this->userInfoURL.'?site=stackoverflow&access_token='.$access_token.'&key='.$this->clientKey);
curl_setopt_array($curl, array(
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_USERAGENT => 'Php Docbook Online Editor',
CURLOPT_CAINFO => '/local/web/sites/ca-bundle.crt'
));
$resp = curl_exec($curl);
return json_decode($resp);
}
}
class Oauth_facebook
@@ -170,21 +170,21 @@ class Oauth_facebook
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret) {
$this->serveurURL = 'https://www.facebook.com/dialog/oauth';
$this->tokenURL = 'https://graph.facebook.com/oauth/access_token';
$this->userInfoURL = 'https://graph.facebook.com/me';
// Prod - OK
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -197,7 +197,7 @@ class Oauth_facebook
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -208,39 +208,39 @@ class Oauth_facebook
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
parse_str($httpResponse, $output);
return $output["access_token"];
}
public function getUserInfo($access_token)
{
$curl = curl_init($this->userInfoURL.'?access_token='.$access_token);
curl_setopt_array($curl, array(
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_USERAGENT => 'Php Docbook Online Editor',
CURLOPT_CAINFO => '/local/web/sites/ca-bundle.crt'
));
$resp = curl_exec($curl);
return json_decode($resp);
}
}
class Oauth_google
@@ -252,21 +252,21 @@ class Oauth_google
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret) {
$this->serveurURL = 'https://accounts.google.com/o/oauth2/auth';
$this->tokenURL = 'https://accounts.google.com/o/oauth2/token';
$this->userInfoURL = 'https://www.googleapis.com/plus/v1/people/me';
// Prod
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -279,7 +279,7 @@ class Oauth_google
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -291,39 +291,39 @@ class Oauth_google
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
$httpResponse = json_decode($httpResponse);
return $httpResponse->access_token;
}
public function getUserInfo($access_token)
{
$curl = curl_init($this->userInfoURL.'?access_token='.$access_token);
curl_setopt_array($curl, array(
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_USERAGENT => 'Php Docbook Online Editor',
CURLOPT_CAINFO => '/local/web/sites/ca-bundle.crt'
));
$resp = curl_exec($curl);
return json_decode($resp);
}
}
class Oauth_linkedin
@@ -335,22 +335,22 @@ class Oauth_linkedin
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret) {
$this->serveurURL = 'https://www.linkedin.com/uas/oauth2/authorization';
$this->tokenURL = 'https://www.linkedin.com/uas/oauth2/accessToken';
$this->userInfoURLEmail = 'https://api.linkedin.com/v1/people/~/email-address';
$this->userInfoURL = 'https://api.linkedin.com/v1/people/~:(firstName,lastName)';
// Prod - OK
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -364,7 +364,7 @@ class Oauth_linkedin
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -376,61 +376,61 @@ class Oauth_linkedin
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
$httpResponse = json_decode($httpResponse);
return $httpResponse->access_token;
}
public function getUserInfo($access_token)
{
//email
$curl = curl_init($this->userInfoURLEmail.'?oauth2_access_token='.$access_token);
curl_setopt_array($curl, array(
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_USERAGENT => 'Php Docbook Online Editor',
CURLOPT_CAINFO => '/local/web/sites/ca-bundle.crt'
));
$resp = curl_exec($curl);
$xml = simplexml_load_string($resp);
$return['email'] = (string) $xml;
//profil
$curl = curl_init($this->userInfoURL.'?oauth2_access_token='.$access_token);
curl_setopt_array($curl, array(
CURLOPT_ENCODING => "",
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_USERAGENT => 'Php Docbook Online Editor',
CURLOPT_CAINFO => '/local/web/sites/ca-bundle.crt'
));
$resp = curl_exec($curl);
$xml = simplexml_load_string($resp);
$return['profil'] = $xml->{'first-name'}.' '.$xml->{'last-name'};
return $return;
}
}
class Oauth_instagram
@@ -441,21 +441,21 @@ class Oauth_instagram
public $tokenURL;
public $serveurURL;
public $userInfoURL;
public function __construct($clientID, $clientSecret) {
$this->serveurURL = 'https://api.instagram.com/oauth/authorize/';
$this->tokenURL = 'https://api.instagram.com/oauth/access_token';
$this->userInfoURL = 'https://api.instagram.com/v1/user';
// Prod - OK
$this->redirect_uri = 'https://edit.php.net/';
$this->clientID = $clientID;
$this->clientSecret = $clientSecret;
}
public function RequestCode() {
$query_params = array(
'response_type' => 'code',
'client_id' => $this->clientID,
@@ -467,7 +467,7 @@ class Oauth_instagram
header('Location: ' . $forward_url);
exit;
}
public function RequestToken($code)
{
$params = array(
@@ -479,23 +479,23 @@ class Oauth_instagram
);
$postString = rawurldecode(http_build_query( $params ));
$ch = curl_init($this->tokenURL);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, false );
curl_setopt( $ch, CURLOPT_HEADER, false );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $postString );
curl_setopt( $ch, CURLOPT_CAINFO, "/local/web/sites/ca-bundle.crt");
$httpResponse = curl_exec( $ch );
$httpResponse = json_decode($httpResponse);
return $httpResponse;
}
}
?>

View File

@@ -92,9 +92,9 @@ abstract class OAuthSignatureMethod {
}
/**
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
* where the Signature Base String is the text and the key is the concatenated values (each first
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
* The HMAC-SHA1 signature method uses the HMAC-SHA1 signature algorithm as defined in [RFC2104]
* where the Signature Base String is the text and the key is the concatenated values (each first
* encoded per Parameter Encoding) of the Consumer Secret and Token Secret, separated by an '&'
* character (ASCII code 38) even if empty.
* - Chapter 9.2 ("HMAC-SHA1")
*/
@@ -120,7 +120,7 @@ class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod {
}
/**
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
* The PLAINTEXT method does not provide any security protection and SHOULD only be used
* over a secure channel such as HTTPS. It does not use the Signature Base String.
* - Chapter 9.4 ("PLAINTEXT")
*/
@@ -130,8 +130,8 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
}
/**
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
* oauth_signature is set to the concatenated encoded values of the Consumer Secret and
* Token Secret, separated by a '&' character (ASCII code 38), even if either secret is
* empty. The result MUST be encoded again.
* - Chapter 9.4.1 ("Generating Signatures")
*
@@ -153,10 +153,10 @@ class OAuthSignatureMethod_PLAINTEXT extends OAuthSignatureMethod {
}
/**
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
* verified way to the Service Provider, in a manner which is beyond the scope of this
* The RSA-SHA1 signature method uses the RSASSA-PKCS1-v1_5 signature algorithm as defined in
* [RFC3447] section 8.2 (more simply known as PKCS#1), using SHA-1 as the hash function for
* EMSA-PKCS1-v1_5. It is assumed that the Consumer has provided its RSA public key in a
* verified way to the Service Provider, in a manner which is beyond the scope of this
* specification.
* - Chapter 9.3 ("RSA-SHA1")
*/
@@ -558,7 +558,7 @@ class OAuthServer {
private function get_version(&$request) {
$version = $request->get_parameter("oauth_version");
if (!$version) {
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
// Service Providers MUST assume the protocol version to be 1.0 if this parameter is not present.
// Chapter 7.0 ("Accessing Protected Ressources")
$version = '1.0';
}
@@ -658,7 +658,7 @@ class OAuthServer {
throw new OAuthException(
'Missing timestamp parameter. The parameter is required'
);
// verify that timestamp is recentish
$now = time();
if (abs($now - $timestamp) > $this->timestamp_threshold) {

View File

@@ -22,7 +22,7 @@ class TwitterOAuth {
/* Set timeout default. */
public $timeout = 30;
/* Set connect timeout. */
public $connecttimeout = 30;
public $connecttimeout = 30;
/* Verify SSL Cert. */
public $ssl_verifypeer = FALSE;
/* Respons format. */
@@ -74,7 +74,7 @@ class TwitterOAuth {
*/
function getRequestToken($oauth_callback) {
$parameters = array();
$parameters['oauth_callback'] = $oauth_callback;
$parameters['oauth_callback'] = $oauth_callback;
$request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
$token = OAuthUtil::parse_parameters($request);
$this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
@@ -123,7 +123,7 @@ class TwitterOAuth {
* "user_id" => "9436992",
* "screen_name" => "abraham",
* "x_auth_expires" => "0")
*/
*/
function getXAuthToken($username, $password) {
$parameters = array();
$parameters['x_auth_username'] = $username;
@@ -145,7 +145,7 @@ class TwitterOAuth {
}
return $response;
}
/**
* POST wrapper for oAuthRequest.
*/

View File

@@ -17,7 +17,7 @@ function debug($mess)
.$am->vcsLogin.' : '.str_replace("\r\n", " ", $mess)."\n";
$debugURI = ( isset($appConf[$project]) ) ? $appConf[$project]['vcs.path'].'../.debug' : $appConf['GLOBAL_CONFIGURATION']['data.path'].'/.debug';
$fp = fopen($debugURI, 'a+');
fwrite($fp, $mess);
fclose($fp);
@@ -35,7 +35,7 @@ function errlog($mess)
$fp = fopen($appConf[$project]['vcs.path'].'../.errlog', 'a+');
fwrite($fp, $mess);
fclose($fp);
// Send me all error for debug warning
$am->email(
'yannick.torres@gmail.com',
@@ -44,7 +44,7 @@ function errlog($mess)
'yannick@php.net',
'others'
);
}
function elapsedTime($startDate, $endDate) {
@@ -119,7 +119,7 @@ function time2string($timeline) {
$periods = array('hour' => 3600, 'minute' => 60, 'second' => 1);
$ret = '';
foreach($periods AS $name => $seconds){
$num = floor($timeline / $seconds);
$timeline -= ($num * $seconds);
@@ -131,26 +131,26 @@ function time2string($timeline) {
function getFlickr() {
$return = array();
$flickrRSS = 'https://api.flickr.com/services/feeds/groups_pool.gne?id=610963@N20&format=rss_200';
$xml = simplexml_load_file($flickrRSS);
foreach ($xml->channel->item as $item ) {
$namespaces = $item->getNameSpaces(true);
$t = $item->children($namespaces['media'])->thumbnail->attributes();
$thumbnail = $t['url'];
$return[] = array(
'img' => (string)$thumbnail,
'link' => (string)$item->link
);
}
}
return $return;
}

View File

@@ -55,12 +55,12 @@ while( list($key, $project) = each($availableProject) ) {
$lock = new LockFile('project_'.$pm->project.'_lock_check_build_'.$lang);
if ($lock->lock()) {
$return = $rm->checkBuild($lang);
// What we must do when the build failed
if( $return["state"] == "ko" ) {
$msg = "Your documentation is broken. The build is done on Friday.
Please, try to fix it *quickly*.
@@ -74,7 +74,7 @@ while( list($key, $project) = each($availableProject) ) {
--
This email is send automatically by the Php Docbook Online Editor.
";
//Usefull for language like pt_BR for example, because doc-pt_br don't exist, it's doc-pt-br
$emailLang = str_replace("_", "-", strtolower($lang));

View File

@@ -24,7 +24,7 @@ while( list($key, $project) = each($availableProject) ) {
// Define it as a project
$pm->setProject($project['code']);
// Just for the first run - We check if the usageStatistics table is empty
$s = 'SELECT COUNT(*) as total FROM `usageStatistics`';
$r = $db->query($s, array());
@@ -32,7 +32,7 @@ while( list($key, $project) = each($availableProject) ) {
if( $a->total == 0 ) {
$us->computeAll('2010'); // Place here the Year we want to start to compute statistics (this Year was included)
$rm->setStaticValue('info', 'computeUsageStatistics', '', true);
exit;
}
@@ -42,7 +42,7 @@ while( list($key, $project) = each($availableProject) ) {
$yesterday->sub(new DateInterval('P1D'));
$us->computeMonth($yesterday->format('Y-m'));
$rm->setStaticValue('info', 'computeUsageStatistics', '', true);
}

View File

@@ -80,7 +80,7 @@ Below is a list of URL entities that are experiencing fatal errors:
}
$msg .= "
--
--
https://edit.php.net/
This email was generated on ".@date('M, n, Y', strtotime($r['node'][0]['date']))." and sent automatically
by the PHP DocBook Online Editor

View File

@@ -57,24 +57,24 @@ There are contributions within the online editor queue for this language.
Please review, then commit or delete these patches.
";
/*
if( $data['workInProgress']['nb'] != 0 ) {
$msg .= " Work in progress : \n -----------------------\n";
for( $i=0; $i < count($data['workInProgress']['data']); $i++) {
$msg .= " * (".$data['workInProgress']['data'][$i]['type'].") On ".$data['workInProgress']['data'][$i]['date']." by ".$data['workInProgress']['data'][$i]['user']." : ".$data['workInProgress']['data'][$i]['filePath']."\n";
}
$msg .="\n\n";
}
*/
if( $data['PatchesForReview']['nb'] != 0 ) {
$msg .= " Patches for review : \n -----------------------\n\n";
for( $i=0; $i < count($data['PatchesForReview']['data']); $i++)
{
switch($data['PatchesForReview']['data'][$i]['type']) {
case 'update' :
$libelMod = 'Modified';
@@ -86,12 +86,12 @@ Please review, then commit or delete these patches.
$libelMod = 'Deleted';
break;
};
$msg .= $libelMod.": ".$data['PatchesForReview']['data'][$i]['fileFullPath']."\n";
$msg .= "By: ".$data['PatchesForReview']['data'][$i]['user']." on ".$data['PatchesForReview']['data'][$i]['date']."\n";
$msg .= "===================================================================\n";
// We get the diff
$file = new File(
$data['PatchesForReview']['data'][$i]['fileLang'],
@@ -99,27 +99,27 @@ Please review, then commit or delete these patches.
);
$r = $file->diff();
$msg .= implode("\n", $r);
$msg .= "\n
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=".$data['PatchesForReview']['data'][$i]['idDB']."
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=".$data['PatchesForReview']['data'][$i]['idDB']."
";
$msg .="\n";
$msg .= " ------------------------------------------------------------------\n\n";
}
$msg .="\n\n";
}
$msg .= "
--
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.
";
//Usefull for language like pt_BR for example, because doc-pt_br don't exist, it's doc-pt-br
$emailLang = str_replace("_", "-", strtolower($lang));

View File

@@ -36,77 +36,77 @@ while( list($key, $project) = each($availableProject) ) {
/*
* Lock
*
*
*/
$lock = new LockFile('project_' . strtoupper($project['code']) . '_lock_update_data');
if( $lock->lock() )
{
// Write into the lock the update position
$lock->writeIntoLock('vcs_update');
// VCS update
$rm->updateRepository();
// Write into the lock the update position
$lock->writeIntoLock('cleanUp_DB');
// Clean Up DB
$rm->cleanUp();
// Write into the lock the update position
$lock->writeIntoLock('revcheck');
// Start RevCheck
$rm->applyRevCheck();
// Write into the lock the update position
$lock->writeIntoLock('checkErrors');
// Start checkErrors
$rm->applyOnlyTools();
// Write into the lock the update position
$lock->writeIntoLock('notInEN');
// Search for NotInEN Old Files
$rm->updateNotInEN();
// Write into the lock the update position
$lock->writeIntoLock('updateTranslatorInfo');
// Parse translators
$rm->updateTranslatorInfo();
// Write into the lock the update position
$lock->writeIntoLock('ComputeAllStatistics');
// Compute all summary
TranslationStatistic::getInstance()->computeSummary('all');
TranslatorStatistic::getInstance()->computeSummary('all');
if( $project['code'] == 'php' ) {
// Write into the lock the update position
$lock->writeIntoLock('StaticRevcheck');
$rm->applyStaticRevcheck();
}
// Store this update info
$info = array();
$info['user'] = 'root';
$rm->setStaticValue('info', 'updateData', json_encode($info), true);
$lock->release();
} else {
echo 'Update in progress, can\'t do this action until the first finish'.PHP_EOL;
continue;
}
}

View File

@@ -25,7 +25,7 @@ function menu()
global $menu;
fwrite(STDOUT, $menu);
$choice = fgets(STDIN);
switch($choice) {
case 1: goUpdateCVS();
break;
@@ -39,17 +39,17 @@ function menu()
function goUpdateCVS() {
global $availableProject, $rm, $pm;
reset($availableProject);
echo "Start Update CVS repository....\n";
while( list($key, $project) = each($availableProject) )
{
$pm->setProject($project['code']);
echo "for project -".$project['code']."-\n";
unset($rm->existingLanguage);
$pm->setProject($project['code']);
$startTime = new DateTime();
@@ -57,67 +57,67 @@ function goUpdateCVS() {
$rm->updateRepository();
$endTime = new DateTime();
$endTimeStamp = $endTime->getTimestamp();
} // while
echo "done ! ( ".time2string($endTimeStamp-$startTimeStamp)." )\n";
menu();
}
function goRevCheck() {
global $availableProject, $rm, $pm, $conn;
reset($availableProject);
echo "Start Apply Revcheck....\n";
while( list($key, $project) = each($availableProject) )
{
$pm->setProject($project['code']);
// We cleanUp the database for this project
$conn->query("DELETE FROM `files` WHERE `project`='%s'", array($project['code']));
$conn->query("OPTIMIZE TABLE `files` ", array());
echo "for project -".$project['code']."-\n";
$startTime = new DateTime();
$startTimeStamp = $startTime->getTimestamp();
$rm->applyRevCheck();
$endTime = new DateTime();
$endTimeStamp = $endTime->getTimestamp();
} // while
echo "done ! ( ".time2string($endTimeStamp-$startTimeStamp)." )\n";
menu();
}
function goErrorTools() {
global $availableProject, $rm, $pm;
reset($availableProject);
echo "Start Error Tools....\n";
while( list($key, $project) = each($availableProject) )
{
$pm->setProject($project['code']);
echo "for project -".$project['code']."-\n";
$startTime = new DateTime();
$startTimeStamp = $startTime->getTimestamp();
$rm->applyOnlyTools();
$endTime = new DateTime();
$endTimeStamp = $endTime->getTimestamp();
} // while
echo "done ! ( ".time2string($endTimeStamp-$startTimeStamp)." )\n";
menu();
}
@@ -148,8 +148,8 @@ menu();
//fwrite(STDOUT, "Bye\n\n"); // Output - Some text
exit(0);
//fwrite(STDOUT, "Bye\n\n"); // Output - Some text
exit(0);
?>

View File

@@ -26,68 +26,68 @@ $info = array(
),
"byMonth"=>Array()
);
$availableLang = Array();
$availableUser = Array();
while( $a = $r->fetch_object()) {
$month = date("m", strtotime($a->date));
$year = date("Y", strtotime($a->date));
// pour les connexions
if( $a->field == "login" ) {
$tmp = json_decode($a->value);
$info["nbCon"]["authService"][$tmp->authService] ++;
$info["nbCon"]["total"] ++;
$info["byMonth"][$month]['dataCon']['raw'][] = $a;
$info["byMonth"][$month]['nbCon'] ++;
$i = json_decode($a->value);
$info["byMonth"][$month]['dataCon']['perLang'][$i->lang] ++;
$info["byMonth"][$month]['dataCon']['perUser'][$i->user] ++;
$availableLang[$i->lang] = 1;
$availableUser[$i->user] = 1;
}
// pour les commit
if( $a->field == "commitFiles" ) {
$i = json_decode($a->value);
$info["byMonth"][$month]['dataCommit']['raw'][] = $i;
$info['nbFilesCreate'] += $i->nbFilesCreate;
$info['nbFilesDelete'] += $i->nbFilesDelete;
$info['nbFilesUpdate'] += $i->nbFilesUpdate;
$info["byMonth"][$month]['dataCommit']['nbFilesCreate']['total'] += $i->nbFilesCreate;
$info["byMonth"][$month]['dataCommit']['nbFilesDelete']['total'] += $i->nbFilesDelete;
$info["byMonth"][$month]['dataCommit']['nbFilesUpdate']['total'] += $i->nbFilesUpdate;
$info["byMonth"][$month]['dataCommit']['nbFilesCreate']['perLang'][$i->lang] += $i->nbFilesCreate;
$info["byMonth"][$month]['dataCommit']['nbFilesDelete']['perLang'][$i->lang] += $i->nbFilesDelete;
$info["byMonth"][$month]['dataCommit']['nbFilesUpdate']['perLang'][$i->lang] += $i->nbFilesUpdate;
$info["byMonth"][$month]['dataCommit']['nbFilesCreate']['perUser'][$i->user] += $i->nbFilesCreate;
$info["byMonth"][$month]['dataCommit']['nbFilesDelete']['perUser'][$i->user] += $i->nbFilesDelete;
$info["byMonth"][$month]['dataCommit']['nbFilesUpdate']['perUser'][$i->user] += $i->nbFilesUpdate;
$availableLang[$i->lang] = 1;
$availableUser[$i->user] = 1;
}
}
echo "<h1 style=\"text-align: center\">Year : ".$year."</h1>";
echo '<div id="top">';
for( $i=2010; $i <= $nowDate->format('Y'); $i++ ) {
echo '<a href="?d='.$i.'">'.$i.'</a>';
if( $i != $nowDate->format('Y') ) echo ' - ';
}
@@ -185,20 +185,20 @@ echo "<tr>";
echo "</tr>";
echo "</table>(Nb connexion per auth Service :
echo "</table>(Nb connexion per auth Service :
Google => ".$info["nbCon"]["authService"]["google"].";
Facebook => ".$info["nbCon"]["authService"]["facebook"].";
Github => ".$info["nbCon"]["authService"]["github"].";
Instagram => ".$info["nbCon"]["authService"]["instagram"].";
Stackoverflow => ".$info["nbCon"]["authService"]["stackoverflow"].";
Linkedin => ".$info["nbCon"]["authService"]["linkedin"].";
Google => ".$info["nbCon"]["authService"]["google"].";
Facebook => ".$info["nbCon"]["authService"]["facebook"].";
Github => ".$info["nbCon"]["authService"]["github"].";
Instagram => ".$info["nbCon"]["authService"]["instagram"].";
Stackoverflow => ".$info["nbCon"]["authService"]["stackoverflow"].";
Linkedin => ".$info["nbCon"]["authService"]["linkedin"].";
VCS => ".$info["nbCon"]["authService"]["VCS"].";
)<br>";
while( list($lang, $v) = each($availableLang)) {
// Skip anonymous
if( trim($lang) == '') continue;
@@ -294,10 +294,10 @@ while( list($lang, $v) = each($availableLang)) {
while( list($user, $v) = each($availableUser)) {
// Skip anonymous
if( substr($user, 0, 11) == 'anonymous #') continue;
echo "<h1>User : ".utf8_decode($user)." <a href=\"#top\" style=\"font-size:10px\">top</a></h1>";
echo "<table border=1>";
echo "<tr>";

View File

@@ -195,7 +195,7 @@
/* Tabs */
.x-tab-panel-header, .x-tab-panel-footer {
background: #6b869f;
border-color:#4f657b;
}
@@ -427,7 +427,7 @@ body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc
/* Forms */
.x-form-text, textarea.x-form-field {
border:1px solid #9ab;
border:1px solid #9ab;
}
.x-trigger-wrap-focus .x-form-trigger {
border-bottom:1px solid #4a7192;

View File

@@ -197,7 +197,7 @@
/* Tabs */
.x-tab-panel-header, .x-tab-panel-footer {
background: #444a7d;
border-color:#4f657b;
}
@@ -429,7 +429,7 @@ body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc
/* Forms */
.x-form-text, textarea.x-form-field {
border:1px solid #9ab;
border:1px solid #9ab;
}
.x-trigger-wrap-focus .x-form-trigger {
border-bottom:1px solid #4a7192;

View File

@@ -2,7 +2,7 @@
* Ext JS Library 2.0.1
* Copyright(c) 2006-2008, Ext JS, LLC.
* licensing@extjs.com
*
*
* http://extjs.com/license
*/

View File

@@ -105,7 +105,7 @@
ul.x-tab-strip-top
{
background-color: #EFEBE7;
background-color: #EFEBE7;
background-image: none !important;
border-bottom-color: #a29587;
}
@@ -438,8 +438,8 @@ ul.x-tab-strip-bottom
background-image:url(../images/human/button/s-arrow-noline.gif);
}
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
{
background-image:url(../images/human/button/s-arrow-o.gif);
}
@@ -448,8 +448,8 @@ ul.x-tab-strip-bottom
background-image:url(../images/human/button/s-arrow-b-noline.gif);
}
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
{
background-image:url(../images/human/button/s-arrow-bo.gif);
}
@@ -1127,7 +1127,7 @@ td.x-date-mp-month a:hover,td.x-date-mp-year a:hover {
background-color: #ffc87c;
}
td.x-date-mp-sel a
td.x-date-mp-sel a
{
background : none !important;
border-color: #7a7065;

View File

@@ -19,251 +19,251 @@
height: 11px !important;
}
.flag-ad { background-position: 0 0 !important; }
.flag-ae { background-position: 0 -12px !important; }
.flag-af { background-position: 0 -24px !important; }
.flag-ag { background-position: 0 -36px !important; }
.flag-ai { background-position: 0 -48px !important; }
.flag-al { background-position: 0 -60px !important; }
.flag-am { background-position: 0 -72px !important; }
.flag-an { background-position: 0 -84px !important; }
.flag-ao { background-position: 0 -96px !important; }
.flag-ar { background-position: 0 -108px !important; }
.flag-ar2 { background-position: 0 -120px !important; }
.flag-as { background-position: 0 -132px !important; }
.flag-at { background-position: 0 -144px !important; }
.flag-au { background-position: 0 -156px !important; }
.flag-aw { background-position: 0 -168px !important; }
.flag-ax { background-position: 0 -180px !important; }
.flag-az { background-position: 0 -192px !important; }
.flag-ba { background-position: 0 -204px !important; }
.flag-bb { background-position: 0 -216px !important; }
.flag-bd { background-position: 0 -228px !important; }
.flag-be { background-position: 0 -240px !important; }
.flag-bf { background-position: 0 -252px !important; }
.flag-bg { background-position: 0 -264px !important; }
.flag-bh { background-position: 0 -276px !important; }
.flag-bi { background-position: 0 -288px !important; }
.flag-bj { background-position: 0 -300px !important; }
.flag-bm { background-position: 0 -312px !important; }
.flag-bn { background-position: 0 -324px !important; }
.flag-bo { background-position: 0 -336px !important; }
.flag-bs { background-position: 0 -348px !important; }
.flag-bt { background-position: 0 -360px !important; }
.flag-bv { background-position: 0 -372px !important; }
.flag-bw { background-position: 0 -384px !important; }
.flag-by { background-position: 0 -396px !important; }
.flag-bz { background-position: 0 -408px !important; }
.flag-ca { background-position: 0 -420px !important; }
.flag-catalonia { background-position: 0 -432px !important; }
.flag-cc { background-position: 0 -444px !important; }
.flag-cd { background-position: 0 -456px !important; }
.flag-cf { background-position: 0 -468px !important; }
.flag-cg { background-position: 0 -480px !important; }
.flag-ch { background-position: 0 -492px !important; }
.flag-ci { background-position: 0 -504px !important; }
.flag-ck { background-position: 0 -516px !important; }
.flag-cl { background-position: 0 -528px !important; }
.flag-cm { background-position: 0 -540px !important; }
.flag-cn { background-position: 0 -552px !important; }
.flag-co { background-position: 0 -564px !important; }
.flag-cr { background-position: 0 -576px !important; }
.flag-cs { background-position: 0 -588px !important; }
.flag-cu { background-position: 0 -600px !important; }
.flag-cv { background-position: 0 -612px !important; }
.flag-cx { background-position: 0 -624px !important; }
.flag-cy { background-position: 0 -636px !important; }
.flag-cz { background-position: 0 -648px !important; }
.flag-da { background-position: 0 -660px !important; }
.flag-de { background-position: 0 -672px !important; }
.flag-dj { background-position: 0 -684px !important; }
.flag-dm { background-position: 0 -696px !important; }
.flag-do { background-position: 0 -708px !important; }
.flag-dz { background-position: 0 -720px !important; }
.flag-ec { background-position: 0 -732px !important; }
.flag-ee { background-position: 0 -744px !important; }
.flag-eg { background-position: 0 -756px !important; }
.flag-eh { background-position: 0 -768px !important; }
.flag-el { background-position: 0 -780px !important; }
.flag-en { background-position: 0 -792px !important; }
.flag-england { background-position: 0 -804px !important; }
.flag-er { background-position: 0 -816px !important; }
.flag-es { background-position: 0 -828px !important; }
.flag-et { background-position: 0 -840px !important; }
.flag-europeanunion { background-position: 0 -852px !important; }
.flag-fa { background-position: 0 -864px !important; }
.flag-fam { background-position: 0 -876px !important; }
.flag-fi { background-position: 0 -888px !important; }
.flag-fj { background-position: 0 -900px !important; }
.flag-fk { background-position: 0 -912px !important; }
.flag-fm { background-position: 0 -924px !important; }
.flag-fo { background-position: 0 -936px !important; }
.flag-fr { background-position: 0 -948px !important; }
.flag-ga { background-position: 0 -960px !important; }
.flag-gd { background-position: 0 -972px !important; }
.flag-ge { background-position: 0 -984px !important; }
.flag-gf { background-position: 0 -996px !important; }
.flag-gh { background-position: 0 -1008px !important; }
.flag-gi { background-position: 0 -1020px !important; }
.flag-gl { background-position: 0 -1032px !important; }
.flag-gm { background-position: 0 -1044px !important; }
.flag-gn { background-position: 0 -1056px !important; }
.flag-gp { background-position: 0 -1068px !important; }
.flag-gq { background-position: 0 -1080px !important; }
.flag-gs { background-position: 0 -1092px !important; }
.flag-gt { background-position: 0 -1104px !important; }
.flag-gu { background-position: 0 -1116px !important; }
.flag-gw { background-position: 0 -1128px !important; }
.flag-gy { background-position: 0 -1140px !important; }
.flag-he { background-position: 0 -1152px !important; }
.flag-hk { background-position: 0 -1164px !important; }
.flag-hm { background-position: 0 -1176px !important; }
.flag-hn { background-position: 0 -1188px !important; }
.flag-hr { background-position: 0 -1200px !important; }
.flag-ht { background-position: 0 -1212px !important; }
.flag-hu { background-position: 0 -1224px !important; }
.flag-id { background-position: 0 -1236px !important; }
.flag-ie { background-position: 0 -1248px !important; }
.flag-in { background-position: 0 -1260px !important; }
.flag-io { background-position: 0 -1272px !important; }
.flag-iq { background-position: 0 -1284px !important; }
.flag-is { background-position: 0 -1296px !important; }
.flag-it { background-position: 0 -1308px !important; }
.flag-ja { background-position: 0 -1320px !important; }
.flag-jm { background-position: 0 -1332px !important; }
.flag-ke { background-position: 0 -1344px !important; }
.flag-kg { background-position: 0 -1356px !important; }
.flag-kh { background-position: 0 -1368px !important; }
.flag-ki { background-position: 0 -1380px !important; }
.flag-km { background-position: 0 -1392px !important; }
.flag-kn { background-position: 0 -1404px !important; }
.flag-kp { background-position: 0 -1416px !important; }
.flag-kr { background-position: 0 -1428px !important; }
.flag-kw { background-position: 0 -1440px !important; }
.flag-ky { background-position: 0 -1452px !important; }
.flag-kz { background-position: 0 -1464px !important; }
.flag-la { background-position: 0 -1476px !important; }
.flag-lb { background-position: 0 -1488px !important; }
.flag-lc { background-position: 0 -1500px !important; }
.flag-li { background-position: 0 -1512px !important; }
.flag-lk { background-position: 0 -1524px !important; }
.flag-lr { background-position: 0 -1536px !important; }
.flag-ls { background-position: 0 -1548px !important; }
.flag-lt { background-position: 0 -1560px !important; }
.flag-lu { background-position: 0 -1572px !important; }
.flag-lv { background-position: 0 -1584px !important; }
.flag-ly { background-position: 0 -1596px !important; }
.flag-ma { background-position: 0 -1608px !important; }
.flag-mc { background-position: 0 -1620px !important; }
.flag-md { background-position: 0 -1632px !important; }
.flag-me { background-position: 0 -1644px !important; }
.flag-mg { background-position: 0 -1657px !important; }
.flag-mh { background-position: 0 -1669px !important; }
.flag-mk { background-position: 0 -1681px !important; }
.flag-ml { background-position: 0 -1693px !important; }
.flag-mm { background-position: 0 -1705px !important; }
.flag-mn { background-position: 0 -1717px !important; }
.flag-mo { background-position: 0 -1729px !important; }
.flag-mp { background-position: 0 -1741px !important; }
.flag-mq { background-position: 0 -1753px !important; }
.flag-mr { background-position: 0 -1765px !important; }
.flag-ms { background-position: 0 -1777px !important; }
.flag-mt { background-position: 0 -1789px !important; }
.flag-mu { background-position: 0 -1801px !important; }
.flag-mv { background-position: 0 -1813px !important; }
.flag-mw { background-position: 0 -1825px !important; }
.flag-mx { background-position: 0 -1837px !important; }
.flag-my { background-position: 0 -1849px !important; }
.flag-mz { background-position: 0 -1861px !important; }
.flag-na { background-position: 0 -1873px !important; }
.flag-nc { background-position: 0 -1885px !important; }
.flag-ne { background-position: 0 -1897px !important; }
.flag-nf { background-position: 0 -1909px !important; }
.flag-ng { background-position: 0 -1921px !important; }
.flag-ni { background-position: 0 -1933px !important; }
.flag-nl { background-position: 0 -1945px !important; }
.flag-no { background-position: 0 -1957px !important; }
.flag-np { background-position: 0 -1969px !important; }
.flag-nr { background-position: 0 -1981px !important; }
.flag-nu { background-position: 0 -1993px !important; }
.flag-nz { background-position: -17px 0 !important; }
.flag-om { background-position: -17px -12px !important; }
.flag-pa { background-position: -17px -24px !important; }
.flag-pe { background-position: -17px -36px !important; }
.flag-pf { background-position: -17px -48px !important; }
.flag-pg { background-position: -17px -60px !important; }
.flag-ph { background-position: -17px -72px !important; }
.flag-pk { background-position: -17px -84px !important; }
.flag-pl { background-position: -17px -96px !important; }
.flag-pm { background-position: -17px -108px !important; }
.flag-pn { background-position: -17px -120px !important; }
.flag-pr { background-position: -17px -132px !important; }
.flag-ps { background-position: -17px -144px !important; }
.flag-pt { background-position: -17px -156px !important; }
.flag-pt_BR { background-position: -17px -168px !important; }
.flag-pw { background-position: -17px -180px !important; }
.flag-py { background-position: -17px -192px !important; }
.flag-qa { background-position: -17px -204px !important; }
.flag-re { background-position: -17px -216px !important; }
.flag-ro { background-position: -17px -228px !important; }
.flag-rs { background-position: -17px -240px !important; }
.flag-ru { background-position: -17px -252px !important; }
.flag-rw { background-position: -17px -264px !important; }
.flag-sa { background-position: -17px -276px !important; }
.flag-sb { background-position: -17px -288px !important; }
.flag-sc { background-position: -17px -300px !important; }
.flag-scotland { background-position: -17px -312px !important; }
.flag-sd { background-position: -17px -324px !important; }
.flag-se { background-position: -17px -336px !important; }
.flag-sg { background-position: -17px -348px !important; }
.flag-sh { background-position: -17px -360px !important; }
.flag-sj { background-position: -17px -372px !important; }
.flag-sk { background-position: -17px -384px !important; }
.flag-sl { background-position: -17px -396px !important; }
.flag-sl_ { background-position: -17px -408px !important; }
.flag-sm { background-position: -17px -420px !important; }
.flag-sn { background-position: -17px -432px !important; }
.flag-so { background-position: -17px -444px !important; }
.flag-sr { background-position: -17px -456px !important; }
.flag-st { background-position: -17px -468px !important; }
.flag-sv_ { background-position: -17px -480px !important; }
.flag-sy { background-position: -17px -492px !important; }
.flag-sz { background-position: -17px -504px !important; }
.flag-tc { background-position: -17px -516px !important; }
.flag-td { background-position: -17px -528px !important; }
.flag-tf { background-position: -17px -540px !important; }
.flag-tg { background-position: -17px -552px !important; }
.flag-th { background-position: -17px -564px !important; }
.flag-tj { background-position: -17px -576px !important; }
.flag-tk { background-position: -17px -588px !important; }
.flag-tl { background-position: -17px -600px !important; }
.flag-tm { background-position: -17px -612px !important; }
.flag-tn { background-position: -17px -624px !important; }
.flag-to { background-position: -17px -636px !important; }
.flag-tr { background-position: -17px -648px !important; }
.flag-tt { background-position: -17px -660px !important; }
.flag-tv { background-position: -17px -672px !important; }
.flag-tw { background-position: -17px -684px !important; }
.flag-tz { background-position: -17px -696px !important; }
.flag-uk { background-position: -17px -708px !important; }
.flag-ug { background-position: -17px -720px !important; }
.flag-um { background-position: -17px -732px !important; }
.flag-us { background-position: -17px -744px !important; }
.flag-uy { background-position: -17px -756px !important; }
.flag-uz { background-position: -17px -768px !important; }
.flag-va { background-position: -17px -780px !important; }
.flag-vc { background-position: -17px -792px !important; }
.flag-ve { background-position: -17px -804px !important; }
.flag-vg { background-position: -17px -816px !important; }
.flag-vi { background-position: -17px -828px !important; }
.flag-vn { background-position: -17px -840px !important; }
.flag-vu { background-position: -17px -852px !important; }
.flag-wales { background-position: -17px -864px !important; }
.flag-wf { background-position: -17px -876px !important; }
.flag-ws { background-position: -17px -888px !important; }
.flag-ye { background-position: -17px -900px !important; }
.flag-yt { background-position: -17px -912px !important; }
.flag-za { background-position: -17px -924px !important; }
.flag-zh { background-position: -17px -936px !important; }
.flag-zm { background-position: -17px -948px !important; }
.flag-zw { background-position: -17px -960px !important; }
.flag-ad { background-position: 0 0 !important; }
.flag-ae { background-position: 0 -12px !important; }
.flag-af { background-position: 0 -24px !important; }
.flag-ag { background-position: 0 -36px !important; }
.flag-ai { background-position: 0 -48px !important; }
.flag-al { background-position: 0 -60px !important; }
.flag-am { background-position: 0 -72px !important; }
.flag-an { background-position: 0 -84px !important; }
.flag-ao { background-position: 0 -96px !important; }
.flag-ar { background-position: 0 -108px !important; }
.flag-ar2 { background-position: 0 -120px !important; }
.flag-as { background-position: 0 -132px !important; }
.flag-at { background-position: 0 -144px !important; }
.flag-au { background-position: 0 -156px !important; }
.flag-aw { background-position: 0 -168px !important; }
.flag-ax { background-position: 0 -180px !important; }
.flag-az { background-position: 0 -192px !important; }
.flag-ba { background-position: 0 -204px !important; }
.flag-bb { background-position: 0 -216px !important; }
.flag-bd { background-position: 0 -228px !important; }
.flag-be { background-position: 0 -240px !important; }
.flag-bf { background-position: 0 -252px !important; }
.flag-bg { background-position: 0 -264px !important; }
.flag-bh { background-position: 0 -276px !important; }
.flag-bi { background-position: 0 -288px !important; }
.flag-bj { background-position: 0 -300px !important; }
.flag-bm { background-position: 0 -312px !important; }
.flag-bn { background-position: 0 -324px !important; }
.flag-bo { background-position: 0 -336px !important; }
.flag-bs { background-position: 0 -348px !important; }
.flag-bt { background-position: 0 -360px !important; }
.flag-bv { background-position: 0 -372px !important; }
.flag-bw { background-position: 0 -384px !important; }
.flag-by { background-position: 0 -396px !important; }
.flag-bz { background-position: 0 -408px !important; }
.flag-ca { background-position: 0 -420px !important; }
.flag-catalonia { background-position: 0 -432px !important; }
.flag-cc { background-position: 0 -444px !important; }
.flag-cd { background-position: 0 -456px !important; }
.flag-cf { background-position: 0 -468px !important; }
.flag-cg { background-position: 0 -480px !important; }
.flag-ch { background-position: 0 -492px !important; }
.flag-ci { background-position: 0 -504px !important; }
.flag-ck { background-position: 0 -516px !important; }
.flag-cl { background-position: 0 -528px !important; }
.flag-cm { background-position: 0 -540px !important; }
.flag-cn { background-position: 0 -552px !important; }
.flag-co { background-position: 0 -564px !important; }
.flag-cr { background-position: 0 -576px !important; }
.flag-cs { background-position: 0 -588px !important; }
.flag-cu { background-position: 0 -600px !important; }
.flag-cv { background-position: 0 -612px !important; }
.flag-cx { background-position: 0 -624px !important; }
.flag-cy { background-position: 0 -636px !important; }
.flag-cz { background-position: 0 -648px !important; }
.flag-da { background-position: 0 -660px !important; }
.flag-de { background-position: 0 -672px !important; }
.flag-dj { background-position: 0 -684px !important; }
.flag-dm { background-position: 0 -696px !important; }
.flag-do { background-position: 0 -708px !important; }
.flag-dz { background-position: 0 -720px !important; }
.flag-ec { background-position: 0 -732px !important; }
.flag-ee { background-position: 0 -744px !important; }
.flag-eg { background-position: 0 -756px !important; }
.flag-eh { background-position: 0 -768px !important; }
.flag-el { background-position: 0 -780px !important; }
.flag-en { background-position: 0 -792px !important; }
.flag-england { background-position: 0 -804px !important; }
.flag-er { background-position: 0 -816px !important; }
.flag-es { background-position: 0 -828px !important; }
.flag-et { background-position: 0 -840px !important; }
.flag-europeanunion { background-position: 0 -852px !important; }
.flag-fa { background-position: 0 -864px !important; }
.flag-fam { background-position: 0 -876px !important; }
.flag-fi { background-position: 0 -888px !important; }
.flag-fj { background-position: 0 -900px !important; }
.flag-fk { background-position: 0 -912px !important; }
.flag-fm { background-position: 0 -924px !important; }
.flag-fo { background-position: 0 -936px !important; }
.flag-fr { background-position: 0 -948px !important; }
.flag-ga { background-position: 0 -960px !important; }
.flag-gd { background-position: 0 -972px !important; }
.flag-ge { background-position: 0 -984px !important; }
.flag-gf { background-position: 0 -996px !important; }
.flag-gh { background-position: 0 -1008px !important; }
.flag-gi { background-position: 0 -1020px !important; }
.flag-gl { background-position: 0 -1032px !important; }
.flag-gm { background-position: 0 -1044px !important; }
.flag-gn { background-position: 0 -1056px !important; }
.flag-gp { background-position: 0 -1068px !important; }
.flag-gq { background-position: 0 -1080px !important; }
.flag-gs { background-position: 0 -1092px !important; }
.flag-gt { background-position: 0 -1104px !important; }
.flag-gu { background-position: 0 -1116px !important; }
.flag-gw { background-position: 0 -1128px !important; }
.flag-gy { background-position: 0 -1140px !important; }
.flag-he { background-position: 0 -1152px !important; }
.flag-hk { background-position: 0 -1164px !important; }
.flag-hm { background-position: 0 -1176px !important; }
.flag-hn { background-position: 0 -1188px !important; }
.flag-hr { background-position: 0 -1200px !important; }
.flag-ht { background-position: 0 -1212px !important; }
.flag-hu { background-position: 0 -1224px !important; }
.flag-id { background-position: 0 -1236px !important; }
.flag-ie { background-position: 0 -1248px !important; }
.flag-in { background-position: 0 -1260px !important; }
.flag-io { background-position: 0 -1272px !important; }
.flag-iq { background-position: 0 -1284px !important; }
.flag-is { background-position: 0 -1296px !important; }
.flag-it { background-position: 0 -1308px !important; }
.flag-ja { background-position: 0 -1320px !important; }
.flag-jm { background-position: 0 -1332px !important; }
.flag-ke { background-position: 0 -1344px !important; }
.flag-kg { background-position: 0 -1356px !important; }
.flag-kh { background-position: 0 -1368px !important; }
.flag-ki { background-position: 0 -1380px !important; }
.flag-km { background-position: 0 -1392px !important; }
.flag-kn { background-position: 0 -1404px !important; }
.flag-kp { background-position: 0 -1416px !important; }
.flag-kr { background-position: 0 -1428px !important; }
.flag-kw { background-position: 0 -1440px !important; }
.flag-ky { background-position: 0 -1452px !important; }
.flag-kz { background-position: 0 -1464px !important; }
.flag-la { background-position: 0 -1476px !important; }
.flag-lb { background-position: 0 -1488px !important; }
.flag-lc { background-position: 0 -1500px !important; }
.flag-li { background-position: 0 -1512px !important; }
.flag-lk { background-position: 0 -1524px !important; }
.flag-lr { background-position: 0 -1536px !important; }
.flag-ls { background-position: 0 -1548px !important; }
.flag-lt { background-position: 0 -1560px !important; }
.flag-lu { background-position: 0 -1572px !important; }
.flag-lv { background-position: 0 -1584px !important; }
.flag-ly { background-position: 0 -1596px !important; }
.flag-ma { background-position: 0 -1608px !important; }
.flag-mc { background-position: 0 -1620px !important; }
.flag-md { background-position: 0 -1632px !important; }
.flag-me { background-position: 0 -1644px !important; }
.flag-mg { background-position: 0 -1657px !important; }
.flag-mh { background-position: 0 -1669px !important; }
.flag-mk { background-position: 0 -1681px !important; }
.flag-ml { background-position: 0 -1693px !important; }
.flag-mm { background-position: 0 -1705px !important; }
.flag-mn { background-position: 0 -1717px !important; }
.flag-mo { background-position: 0 -1729px !important; }
.flag-mp { background-position: 0 -1741px !important; }
.flag-mq { background-position: 0 -1753px !important; }
.flag-mr { background-position: 0 -1765px !important; }
.flag-ms { background-position: 0 -1777px !important; }
.flag-mt { background-position: 0 -1789px !important; }
.flag-mu { background-position: 0 -1801px !important; }
.flag-mv { background-position: 0 -1813px !important; }
.flag-mw { background-position: 0 -1825px !important; }
.flag-mx { background-position: 0 -1837px !important; }
.flag-my { background-position: 0 -1849px !important; }
.flag-mz { background-position: 0 -1861px !important; }
.flag-na { background-position: 0 -1873px !important; }
.flag-nc { background-position: 0 -1885px !important; }
.flag-ne { background-position: 0 -1897px !important; }
.flag-nf { background-position: 0 -1909px !important; }
.flag-ng { background-position: 0 -1921px !important; }
.flag-ni { background-position: 0 -1933px !important; }
.flag-nl { background-position: 0 -1945px !important; }
.flag-no { background-position: 0 -1957px !important; }
.flag-np { background-position: 0 -1969px !important; }
.flag-nr { background-position: 0 -1981px !important; }
.flag-nu { background-position: 0 -1993px !important; }
.flag-nz { background-position: -17px 0 !important; }
.flag-om { background-position: -17px -12px !important; }
.flag-pa { background-position: -17px -24px !important; }
.flag-pe { background-position: -17px -36px !important; }
.flag-pf { background-position: -17px -48px !important; }
.flag-pg { background-position: -17px -60px !important; }
.flag-ph { background-position: -17px -72px !important; }
.flag-pk { background-position: -17px -84px !important; }
.flag-pl { background-position: -17px -96px !important; }
.flag-pm { background-position: -17px -108px !important; }
.flag-pn { background-position: -17px -120px !important; }
.flag-pr { background-position: -17px -132px !important; }
.flag-ps { background-position: -17px -144px !important; }
.flag-pt { background-position: -17px -156px !important; }
.flag-pt_BR { background-position: -17px -168px !important; }
.flag-pw { background-position: -17px -180px !important; }
.flag-py { background-position: -17px -192px !important; }
.flag-qa { background-position: -17px -204px !important; }
.flag-re { background-position: -17px -216px !important; }
.flag-ro { background-position: -17px -228px !important; }
.flag-rs { background-position: -17px -240px !important; }
.flag-ru { background-position: -17px -252px !important; }
.flag-rw { background-position: -17px -264px !important; }
.flag-sa { background-position: -17px -276px !important; }
.flag-sb { background-position: -17px -288px !important; }
.flag-sc { background-position: -17px -300px !important; }
.flag-scotland { background-position: -17px -312px !important; }
.flag-sd { background-position: -17px -324px !important; }
.flag-se { background-position: -17px -336px !important; }
.flag-sg { background-position: -17px -348px !important; }
.flag-sh { background-position: -17px -360px !important; }
.flag-sj { background-position: -17px -372px !important; }
.flag-sk { background-position: -17px -384px !important; }
.flag-sl { background-position: -17px -396px !important; }
.flag-sl_ { background-position: -17px -408px !important; }
.flag-sm { background-position: -17px -420px !important; }
.flag-sn { background-position: -17px -432px !important; }
.flag-so { background-position: -17px -444px !important; }
.flag-sr { background-position: -17px -456px !important; }
.flag-st { background-position: -17px -468px !important; }
.flag-sv_ { background-position: -17px -480px !important; }
.flag-sy { background-position: -17px -492px !important; }
.flag-sz { background-position: -17px -504px !important; }
.flag-tc { background-position: -17px -516px !important; }
.flag-td { background-position: -17px -528px !important; }
.flag-tf { background-position: -17px -540px !important; }
.flag-tg { background-position: -17px -552px !important; }
.flag-th { background-position: -17px -564px !important; }
.flag-tj { background-position: -17px -576px !important; }
.flag-tk { background-position: -17px -588px !important; }
.flag-tl { background-position: -17px -600px !important; }
.flag-tm { background-position: -17px -612px !important; }
.flag-tn { background-position: -17px -624px !important; }
.flag-to { background-position: -17px -636px !important; }
.flag-tr { background-position: -17px -648px !important; }
.flag-tt { background-position: -17px -660px !important; }
.flag-tv { background-position: -17px -672px !important; }
.flag-tw { background-position: -17px -684px !important; }
.flag-tz { background-position: -17px -696px !important; }
.flag-uk { background-position: -17px -708px !important; }
.flag-ug { background-position: -17px -720px !important; }
.flag-um { background-position: -17px -732px !important; }
.flag-us { background-position: -17px -744px !important; }
.flag-uy { background-position: -17px -756px !important; }
.flag-uz { background-position: -17px -768px !important; }
.flag-va { background-position: -17px -780px !important; }
.flag-vc { background-position: -17px -792px !important; }
.flag-ve { background-position: -17px -804px !important; }
.flag-vg { background-position: -17px -816px !important; }
.flag-vi { background-position: -17px -828px !important; }
.flag-vn { background-position: -17px -840px !important; }
.flag-vu { background-position: -17px -852px !important; }
.flag-wales { background-position: -17px -864px !important; }
.flag-wf { background-position: -17px -876px !important; }
.flag-ws { background-position: -17px -888px !important; }
.flag-ye { background-position: -17px -900px !important; }
.flag-yt { background-position: -17px -912px !important; }
.flag-za { background-position: -17px -924px !important; }
.flag-zh { background-position: -17px -936px !important; }
.flag-zm { background-position: -17px -948px !important; }
.flag-zw { background-position: -17px -960px !important; }

View File

@@ -108,7 +108,7 @@
.iconError { background-image: url(./img/exclamation.gif) !important;}
.iconExternalData { background-image: url(./img/svn-update.png) !important;}
.iconFacebook { background-image: url(./img/auth_facebook.png) !important;}
.iconFiles { background-image: url(./img/page.png) !important;}
.iconFiles { background-image: url(./img/page.png) !important;}
.iconFilesError { background-image: url(./img/security-medium.png) !important;}
.iconFilesNeedReviewed { background-image: url(./img/document-edit.png) !important;}
.iconFilesNeedTranslate{ background-image: url(./img/page_add.png) !important;}