Skip to content

Commit

Permalink
Fixed #283 -- Compatibilidade com versão do PHP mais recente
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonmoura committed Apr 8, 2022
1 parent caba23d commit 52ee726
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/business/myprofiledocuments.php
Expand Up @@ -87,7 +87,7 @@
$result = MyProfiles::updateProfile($_SESSION["userTK"],$_REQUEST["profile"],$xml);
$response["status"] = true;
}else{
$result = MyProfiles::getProfile($_SESSION["userTK"],$_REQUEST["profile"]);
$result = MyProfiles::getProfile($_SESSION["userTK"],$_REQUEST["profile"],false);
}
$response["values"] = $result[0];
break;
Expand Down
2 changes: 1 addition & 1 deletion client/business/suggesteddocs.php
Expand Up @@ -52,7 +52,7 @@
case "myprofiledocuments":
$similarDocs = false;
$profile = $_REQUEST["profile"] ? $_REQUEST["profile"] : 0;
$result = MyProfiles::getProfile($_SESSION["userTK"], $profile);
$result = MyProfiles::getProfile($_SESSION["userTK"], $profile, false);

if ( $result ) {
$paginationData['pages'] = SimilarDocs::getTotalSimilarsDocsPages($_SESSION["userTK"],$result[0]["profileID"]);
Expand Down
7 changes: 5 additions & 2 deletions client/includes/sessionHandler.php
Expand Up @@ -35,6 +35,9 @@
$_SESSION["lang"] = DEFAULT_LANG;
}

if ( isset($_REQUEST['data']) && !empty($_REQUEST['data']) )
if ( isset($_REQUEST['data']) && !empty($_REQUEST['data']) ) {
$_SESSION['data'] = json_decode(urldecode($_REQUEST['data']));
?>
}

$_SESSION["skin"] = DEFAULT_SKIN;
?>
6 changes: 3 additions & 3 deletions server/classes/ProfileDAO.php
Expand Up @@ -92,7 +92,7 @@ public static function addProfile($userID,$objProfile){
public static function updateProfile($userID,$profileID,$profile){
$retValue = false;
$sysUID = UserDAO::getSysUID($userID);
$getProfile = self::getProfile( $userID, $profileID );
$getProfile = self::getProfile( $userID, $profileID, false );

if ($profile->getProfileDefault() == 1){
$strsql = "UPDATE profiles set profileDefault=0
Expand Down Expand Up @@ -206,7 +206,7 @@ public static function getProfile($userID,$profileID,$update=false){

$updateProfile = self::updateProfile($userID,$profileID,$objProfile);

$result = self::getProfile($userID,$profileID);
$result = self::getProfile($userID,$profileID,false);
}
}

Expand Down Expand Up @@ -266,7 +266,7 @@ public static function getTotalPages($userID,$itensPerPage){
public static function removeProfile($userID,$profileID){
$retValue = false;
$sysUID = UserDAO::getSysUID($userID);
$profile = self::getProfile( $userID, $profileID );
$profile = self::getProfile( $userID, $profileID, false );

$strsql = "DELETE FROM profiles
WHERE profileID = ".$profileID." and sysUID = '".$sysUID."'";
Expand Down
2 changes: 1 addition & 1 deletion server/classes/SimilarDocs.php
Expand Up @@ -207,7 +207,7 @@ public static function addProfile($userID,$profileID,$profileName,$string,$skip=

if(!$skip){
if($xml){
$similars = self::getSimilars($userID,$profileName);
$similars = self::getSimilars($userID,$profileName,null);

if ( $similars ) {
if ( 'none' == $similars )
Expand Down
12 changes: 6 additions & 6 deletions server/classes/Tools.php
Expand Up @@ -94,7 +94,7 @@ class Mailer {
public static function sendMail($body,$altbody,$subject,$to,$fromMail=EMAIL_FROM,
$fromName=EMAIL_FROMNAME){
global $_conf;

$objMailer = new PHPMailer();
$objMailer->CharSet = CHARSET;
$objMailer->Host = EMAIL_HOST;
Expand All @@ -103,13 +103,13 @@ public static function sendMail($body,$altbody,$subject,$to,$fromMail=EMAIL_FROM
$objMailer->Username = EMAIL_USERNAME;
$objMailer->Password = EMAIL_PASSWORD;
$objMailer->IsSMTP();
$objMailer->SMTPAuth = true;
if ( EMAIL_PORT ) {
$objMailer->SMTPAuth = true;
if ( EMAIL_PORT ) {
$objMailer->Port = EMAIL_PORT;
}
if ( EMAIL_SECURE && in_array(EMAIL_SECURE, array('ssl', 'tls')) ) {
}
if ( EMAIL_SECURE && in_array(EMAIL_SECURE, array('ssl', 'tls')) ) {
$objMailer->SMTPSecure = EMAIL_SECURE;
}
}
$objMailer->IsHTML(true);
$objMailer->ClearAddresses();
foreach ($to as $user){
Expand Down
4 changes: 3 additions & 1 deletion server/pub/include/sessionHandler.php
Expand Up @@ -27,4 +27,6 @@
if ( !isset($_SESSION["skin"]) || empty($_SESSION["skin"]) ){
$_SESSION["skin"] = DEFAULT_SKIN;
}
?>

$_SESSION["skin"] = DEFAULT_SKIN;
?>

0 comments on commit 52ee726

Please sign in to comment.