As you mentioned, Judge Leon of the Federal District Court for the District of Columbia ruled on December 16th, 2013 the the NSA bulk phone records collection program was unconstitutional:
Judge Questions Legality of N.S.A. Phone Records
The judge, Richard J. Leon of Federal District Court for the District of Columbia, ordered the government to stop collecting data on the personal calls of the two plaintiffs in the case and to destroy the records of their calling history. But Judge Leon, appointed to the bench in 2002 by President George W. Bush, stayed his injunction “in light of the significant national security interests at stake in this case and the novelty of the constitutional issues,” allowing the government time to appeal it, which he said could take at least six months.
However 11 days later, a different District Court judge (William H. Pauley III of the Southern District of New York), came to the opposite conclusion:
Judge Upholds N.S.A.’s Bulk Collection of Data on Calls
A federal judge on Friday ruled that a National Security Agency program that collects enormous troves of phone records is legal ...
The decision on Friday “is the exact opposite of Judge Leon’s in every way, substantively and rhetorically,” said Orin S. Kerr, a law professor at George Washington University. “It’s matter and antimatter.” ...
The main dispute between the judges was over how to interpret a 1979 Supreme Court decision, Smith v. Maryland, in which the court said a robbery suspect had no reasonable expectation that his right to privacy extended to the numbers dialed from his phone. ...
Judge Pauley disagreed [with the earlier ruling by Judge Leon]. “The collection of breathtaking amounts of information unprotected by the Fourth Amendment does not transform that sweep into a Fourth Amendment search,” he wrote.
The case was then appealed up to the United States Court of Appeals for the Second Circuit which ruled in 2015 that the bulk call data collection was illegal and not allowed by Section 215 of the PATRIOT Act:
N.S.A. Collection of Bulk Call Data Is Ruled Illegal
A federal appeals court in New York ruled on Thursday that the once-secret National Security Agency program that is systematically collecting Americans’ phone records in bulk is illegal. The decision comes as a fight in Congress is intensifying over whether to end and replace the program, or to extend it without changes.
In a 97-page ruling, a three-judge panel for the United States Court of Appeals for the Second Circuit held that a provision of the U.S.A. Patriot Act, known as Section 215, cannot be legitimately interpreted to allow the bulk collection of domestic calling records. ...
It did not come with any injunction ordering the program to cease, and it is not clear that anything else will happen in the judicial system before Congress has to make a decision about the expiring law. ...
Several lawmakers who helped draft the U.S.A. Freedom Act seized on it as justification for enacting their bill.
In the end, the ruling didn't accomplish anything directly since the PATRIOT act was replaced shortly afterwards with the USA Freedom Act which modified the program to make it more compatible with the court rulings by:
N.S.A. Triples Collection of Data From U.S. Phone Companies
Still, the large and growing volume of data gathered shows that the N.S.A. continues to collect significant amounts of information about Americans’ phone and text messages after changes made by Congress in a 2015 law, the USA Freedom Act, which overhauled how the N.S.A. can gain access to domestic telecom data.
Though Congress ended [the NSA Bulk Phone Data Collection program], lawmakers still wanted the N.S.A. to retain its function: the ability to analyze links between people in search of hidden associates of terrorism suspects. So it authorized a new system in which the bulk records stay with the phone companies but the N.S.A. can get copies of all records of a target and everyone with whom a target has been in contact.
As of late 2018, the Trump Administration is requesting that the program, which is set to expire on December 15th, 2019, be renewed. However, reportedly, the program is no longer in use, not because of civil liberty concerns, but technical issues:
Trump Administration Asks Congress to Reauthorize N.S.A.’s Deactivated Call Records Program
But public signs of trouble with the Freedom Act system began to emerge in June 2018, when the N.S.A. announced that it had discovered “technical irregularities” that caused it to collect more phone records than it had legal authority to gather. ...
Unable to separate the good data from the bad, the agency deleted its entire collection of Americans’ phone records — hundreds of millions of communications logs — and started over. But in October 2018, it discovered that the problem was happening again, and, once again, had to purge the data, according to a recently declassified inspector general report.
The recurring headaches, including the inability of the N.S.A. to verify whether the data returned from the phone companies was accurate and the relatively low value of the intelligence that was being gleaned from it, contributed to an intelligence community decision in late 2018 to start winding the program down, officials familiar with the matter have said. ...
A slightly garbled sign of that move first came to light in March, when a senior Republican congressional aide said in a national security podcast interview, with what was apparently overstatement in terms of the timing, that the N.S.A. had not been using the program “for the past six months.” But for months, the government had refused to say what its status was.